• Petr Kureš's avatar
    fixing incorrect index reuse in AlterTableAddConstraint.java… · b5899708
    Petr Kureš 提交于
    fixing incorrect index reuse in AlterTableAddConstraint.java ALTER_TABLE_ADD_CONSTRAINT_REFERENTIAL and ALTER_TABLE_ADD_CONSTRAINT_UNIQUE
    
    problem in ALTER_TABLE_ADD_CONSTRAINT_REFERENTIAL was caused by commit 08b98324 by Thomas Mueller <mueller@adobe.com>
    
    he intended to reuse existing index... but it prevents that index from being dropped which can cause problems later
    Correct solution would be to rewrite how automatically created indexes (referential/constraint) are managed to create new automatic index when dropping the reused existing index. Until this is solved it's IMHO better to not reuse existing index as it causes database to be effectively corrupted.
    
    Also removing test code Thomas added to TestCases.java
    
    problem in ALTER_TABLE_ADD_CONSTRAINT_UNIQUE was caused by canUseUniqueIndex allowing to use index with more columns than requested as unique index which caused unique constraint to fail as ConstraintUnique checkRow comment says that 'unique index check is enough' and the index is not unique for given constraint if it has more columns
    b5899708
名称
最后提交
最后更新
h2 Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
README.md Loading commit data...