-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Exception "too few key columns found for index" raises when attempt to create table with PK and immediatelly drop this PK within the same transaction [CORE4783] #5082
Comments
Commented by: @pavel-zotov PPS. If change code to this one: set autoddl off; -- then STDERR differs on 2.5 and 3.0. On 2.0 .... 2.5: (i.e. the same) On 3.0: |
Commented by: @aafemt DFW must die. |
Commented by: @pavel-zotov Seems that `DROP TABLE` statement tries... to create index ?! Try this (file = `script.sql`):set echo on; isql localhost/port:path\empty_database.fdb -i script.sql 1>log 2>&1 Content of `log`:set autoddl off; |
Modified by: @pavel-zotovVersion: 2.1.7 [ 10651 ] Version: 3.0 Beta 2 [ 10586 ] Version: 2.5.5 [ 10670 ] Component: Engine [ 10000 ] |
Commented by: @asfernandes Pavel, I already said to you... every non-simple interaction of DDL in the same transaction will result in a bug. IMO it's time lost to fix them. There is a architectural/conceptual problem in DFW. |
Commented by: Sean Leyne (seanleyne) Priority changes to "Minor" as their is a very reasonable workaround -- commit after each DDL operation. |
Modified by: Sean Leyne (seanleyne)priority: Major [ 3 ] => Minor [ 4 ] |
Modified by: @pavel-zotovstatus: Open [ 1 ] => Open [ 1 ] QA Status: No test Test Details: TODO: return to CORE3056 after this ticket will be resolved, see comments in .fbt or its QA Status section |
… raises when attempt to create table with PK and immediatelly drop this PK within the same transaction This commit also fixes FirebirdSQL#5173 and FirebirdSQL#3886. The situation when the record is not found in RDB$INDICES was not handled correctly in create_index DFW.
Fix #5082: Exception "too few key columns found for index" raises when attempt to create table with PK and immediatelly drop this PK within the same transaction
… raises when attempt to create table with PK and immediatelly drop this PK within the same transaction This commit also fixes FirebirdSQL#5173 and FirebirdSQL#3886. The situation when the record is not found in RDB$INDICES was not handled correctly in create_index DFW.
Fix #5082: Exception "too few key columns found for index" raises when attempt to create table with PK and immediatelly drop this PK within the same transaction
Fix #5082: Exception "too few key columns found for index" raises when attempt to create table with PK and immediatelly drop this PK within the same transaction
Submitted by: @pavel-zotov
Test:
set autoddl off;
commit;
create table test(
f01 varchar(2)
,constraint test_pk1 primary key (f01)
);
alter table test drop constraint test_pk1;
STDERR:
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-too few key columns found for index TEST_PK1 (incorrect column name?)
PS. Reproduced on: WI-T3.0.0.31827, WI-V2.5.5.26861, WI-V2.1.7.18553, WI-V2.0.7.13318
====== Test Details ======
TODO: return to CORE3056 after this ticket will be resolved, see comments in .fbt or its QA Status section
The text was updated successfully, but these errors were encountered: