[ http://issues.apache.org/jira/browse/DERBY-25?page=comments#action_54693 ] Christian d'Heureuse commented on DERBY-25: -------------------------------------------
This is the same bug as DERBY-3 (http://issues.apache.org/jira/browse/DERBY-3) > INSERT INTO SELECT DISTINCT ... skips some values for autoincrement column > -------------------------------------------------------------------------- > > Key: DERBY-25 > URL: http://issues.apache.org/jira/browse/DERBY-25 > Project: Derby > Type: Bug > Components: SQL > Versions: 10.0.2.0 > Reporter: Tulika Agrawal > Priority: Minor > > Reporting for Mamta Satoor. > If we use insert into desttable, select > distinct from source, into a desttable which has autoincrement > column in it, we might see gaps in the autoincrement column if > there are duplicated rows in the source table. The reason for > this is Derby projects values into destination table columns before > building a distinct resultset from the source table. The piece > of code doing this is in > org.apache.derby.impl.sql.execute.ProjectRestrictResultSet class's > getNextRowCore() method where it calls doProjection. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira
