<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - FireBird: Auto-Increase after copy table: Error inserting new data item."
href="https://bugs.documentfoundation.org/show_bug.cgi?id=119962#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - FireBird: Auto-Increase after copy table: Error inserting new data item."
href="https://bugs.documentfoundation.org/show_bug.cgi?id=119962">bug 119962</a>
from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
<pre>Function isAutoIncrement returns a sal_bool value (sal_True or sal_False), see
<a href="https://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/ResultSetMetaData.cxx#186">https://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/ResultSetMetaData.cxx#186</a>
According to
<a href="https://github.com/FirebirdSQL/firebird/blob/master/doc/sql.extensions/README.identity_columns.txt">https://github.com/FirebirdSQL/firebird/blob/master/doc/sql.extensions/README.identity_columns.txt</a>,
each identity column is associated with a generator (RDB$GENERATOR_NAME). This
generator provide s a number and stores it.
But it seems no mechanism exists in copy process to retrieve its state (or
missed it).
Still with this same doc, notice too that the test lines 206/207 is wrong
206 if(iType == 1) // IDENTITY
207 return true;
it should be:
206 if(iType == 0 || iType == 1) // IDENTITY
207 return true;
Since 0 is for GENERATED ALWAYS (you can't override the identiy column in
Insert statements - insert/update/...) and 1 for GENERATED BY DEFAULT
Now perhaps it's because construct method
<a href="https://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/Column.cxx#28">https://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/Column.cxx#28</a>
uses "GENERATED BY DEFAULT AS IDENTITY" but it's another story.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>