Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL)
Description
CREATE TEMPORARY TABLE t1 ( |
id INT NOT NULL AUTO_INCREMENT, |
f INT NOT NULL DEFAULT 0, |
PRIMARY KEY (id) |
);
|
INSERT INTO t1 () VALUES (); |
ALTER IGNORE TABLE t1 ADD CONSTRAINT CHECK (f > 0); |
ALTER TABLE t1; |
10.2 affdd79c6 |
mysqld: /data/src/10.2/sql/table.cc:4514: void TABLE::init(THD*, TABLE_LIST*): Assertion `!auto_increment_field_not_null' failed.
|
180805 21:27:27 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007fd836f2eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x000056238732a502 in TABLE::init (this=0x7fd820173290, thd=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/table.cc:4514
|
#9 0x00005623874161cf in THD::open_temporary_table (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:402
|
#10 0x00005623874162bf in THD::open_temporary_tables (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:439
|
#11 0x0000562387221842 in mysql_execute_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:3394
|
#12 0x000056238722fa96 in mysql_parse (thd=0x7fd820000b00, rawbuf=0x7fd820012478 "ALTER TABLE t1", length=14, parser_state=0x7fd83120a200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8009
|
#13 0x000056238721d516 in dispatch_command (command=COM_QUERY, thd=0x7fd820000b00, packet=0x7fd82008cb51 "ALTER TABLE t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824
|
#14 0x000056238721be79 in do_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:1378
|
#15 0x000056238736d678 in do_handle_one_connection (connect=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1335
|
#16 0x000056238736d405 in handle_one_connection (arg=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1241
|
#17 0x000056238778f79a in pfs_spawn_thread (arg=0x562389634940) at /data/src/10.2/storage/perfschema/pfs.cc:1862
|
#18 0x00007fd838c05494 in start_thread (arg=0x7fd83120b700) at pthread_create.c:333
|
#19 0x00007fd836feb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
Reproducible with at least InnoDB and MyISAM.
No obvious effect on a non-debug build.
Attachments
Issue Links
- relates to
-
MDEV-16905 ASAN heap-use-after-free in __interceptor_strnlen / ... / TABLE::verify_constraints upon INSERT into temporary table with CHECK constraint
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
{code:sql}
CREATE TEMPORARY TABLE t1 ( id INT NOT NULL AUTO_INCREMENT, f INT NOT NULL DEFAULT 0, PRIMARY KEY (id) ); INSERT INTO t1 () VALUES (); ALTER IGNORE TABLE t1 ADD CONSTRAINT CHECK (f > 0); ALTER TABLE t1; # Cleanup DROP TABLE t1; {code} {noformat:title=10.2 affdd79c6} mysqld: /data/src/10.2/sql/table.cc:4514: void TABLE::init(THD*, TABLE_LIST*): Assertion `!auto_increment_field_not_null' failed. 180805 21:27:27 [ERROR] mysqld got signal 6 ; #7 0x00007fd836f2eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000056238732a502 in TABLE::init (this=0x7fd820173290, thd=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/table.cc:4514 #9 0x00005623874161cf in THD::open_temporary_table (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:402 #10 0x00005623874162bf in THD::open_temporary_tables (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:439 #11 0x0000562387221842 in mysql_execute_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:3394 #12 0x000056238722fa96 in mysql_parse (thd=0x7fd820000b00, rawbuf=0x7fd820012478 "ALTER TABLE t1", length=14, parser_state=0x7fd83120a200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8009 #13 0x000056238721d516 in dispatch_command (command=COM_QUERY, thd=0x7fd820000b00, packet=0x7fd82008cb51 "ALTER TABLE t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824 #14 0x000056238721be79 in do_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:1378 #15 0x000056238736d678 in do_handle_one_connection (connect=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1335 #16 0x000056238736d405 in handle_one_connection (arg=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1241 #17 0x000056238778f79a in pfs_spawn_thread (arg=0x562389634940) at /data/src/10.2/storage/perfschema/pfs.cc:1862 #18 0x00007fd838c05494 in start_thread (arg=0x7fd83120b700) at pthread_create.c:333 #19 0x00007fd836feb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} No obvious effect on a non-debug build. |
{code:sql}
CREATE TEMPORARY TABLE t1 ( id INT NOT NULL AUTO_INCREMENT, f INT NOT NULL DEFAULT 0, PRIMARY KEY (id) ); INSERT INTO t1 () VALUES (); ALTER IGNORE TABLE t1 ADD CONSTRAINT CHECK (f > 0); ALTER TABLE t1; # Cleanup DROP TABLE t1; {code} {noformat:title=10.2 affdd79c6} mysqld: /data/src/10.2/sql/table.cc:4514: void TABLE::init(THD*, TABLE_LIST*): Assertion `!auto_increment_field_not_null' failed. 180805 21:27:27 [ERROR] mysqld got signal 6 ; #7 0x00007fd836f2eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000056238732a502 in TABLE::init (this=0x7fd820173290, thd=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/table.cc:4514 #9 0x00005623874161cf in THD::open_temporary_table (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:402 #10 0x00005623874162bf in THD::open_temporary_tables (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:439 #11 0x0000562387221842 in mysql_execute_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:3394 #12 0x000056238722fa96 in mysql_parse (thd=0x7fd820000b00, rawbuf=0x7fd820012478 "ALTER TABLE t1", length=14, parser_state=0x7fd83120a200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8009 #13 0x000056238721d516 in dispatch_command (command=COM_QUERY, thd=0x7fd820000b00, packet=0x7fd82008cb51 "ALTER TABLE t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824 #14 0x000056238721be79 in do_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:1378 #15 0x000056238736d678 in do_handle_one_connection (connect=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1335 #16 0x000056238736d405 in handle_one_connection (arg=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1241 #17 0x000056238778f79a in pfs_spawn_thread (arg=0x562389634940) at /data/src/10.2/storage/perfschema/pfs.cc:1862 #18 0x00007fd838c05494 in start_thread (arg=0x7fd83120b700) at pthread_create.c:333 #19 0x00007fd836feb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} Reproducible with at least InnoDB and MyISAM. No obvious effect on a non-debug build. |
Assignee | Elena Stepanova [ elenst ] | Sergei Golubchik [ serg ] |
Description |
{code:sql}
CREATE TEMPORARY TABLE t1 ( id INT NOT NULL AUTO_INCREMENT, f INT NOT NULL DEFAULT 0, PRIMARY KEY (id) ); INSERT INTO t1 () VALUES (); ALTER IGNORE TABLE t1 ADD CONSTRAINT CHECK (f > 0); ALTER TABLE t1; # Cleanup DROP TABLE t1; {code} {noformat:title=10.2 affdd79c6} mysqld: /data/src/10.2/sql/table.cc:4514: void TABLE::init(THD*, TABLE_LIST*): Assertion `!auto_increment_field_not_null' failed. 180805 21:27:27 [ERROR] mysqld got signal 6 ; #7 0x00007fd836f2eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000056238732a502 in TABLE::init (this=0x7fd820173290, thd=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/table.cc:4514 #9 0x00005623874161cf in THD::open_temporary_table (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:402 #10 0x00005623874162bf in THD::open_temporary_tables (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:439 #11 0x0000562387221842 in mysql_execute_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:3394 #12 0x000056238722fa96 in mysql_parse (thd=0x7fd820000b00, rawbuf=0x7fd820012478 "ALTER TABLE t1", length=14, parser_state=0x7fd83120a200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8009 #13 0x000056238721d516 in dispatch_command (command=COM_QUERY, thd=0x7fd820000b00, packet=0x7fd82008cb51 "ALTER TABLE t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824 #14 0x000056238721be79 in do_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:1378 #15 0x000056238736d678 in do_handle_one_connection (connect=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1335 #16 0x000056238736d405 in handle_one_connection (arg=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1241 #17 0x000056238778f79a in pfs_spawn_thread (arg=0x562389634940) at /data/src/10.2/storage/perfschema/pfs.cc:1862 #18 0x00007fd838c05494 in start_thread (arg=0x7fd83120b700) at pthread_create.c:333 #19 0x00007fd836feb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} Reproducible with at least InnoDB and MyISAM. No obvious effect on a non-debug build. |
{code:sql}
CREATE TEMPORARY TABLE t1 ( id INT NOT NULL AUTO_INCREMENT, f INT NOT NULL DEFAULT 0, PRIMARY KEY (id) ); INSERT INTO t1 () VALUES (); ALTER IGNORE TABLE t1 ADD CONSTRAINT CHECK (f > 0); ALTER TABLE t1; {code} {noformat:title=10.2 affdd79c6} mysqld: /data/src/10.2/sql/table.cc:4514: void TABLE::init(THD*, TABLE_LIST*): Assertion `!auto_increment_field_not_null' failed. 180805 21:27:27 [ERROR] mysqld got signal 6 ; #7 0x00007fd836f2eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000056238732a502 in TABLE::init (this=0x7fd820173290, thd=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/table.cc:4514 #9 0x00005623874161cf in THD::open_temporary_table (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:402 #10 0x00005623874162bf in THD::open_temporary_tables (this=0x7fd820000b00, tl=0x7fd820012540) at /data/src/10.2/sql/temporary_tables.cc:439 #11 0x0000562387221842 in mysql_execute_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:3394 #12 0x000056238722fa96 in mysql_parse (thd=0x7fd820000b00, rawbuf=0x7fd820012478 "ALTER TABLE t1", length=14, parser_state=0x7fd83120a200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:8009 #13 0x000056238721d516 in dispatch_command (command=COM_QUERY, thd=0x7fd820000b00, packet=0x7fd82008cb51 "ALTER TABLE t1", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1824 #14 0x000056238721be79 in do_command (thd=0x7fd820000b00) at /data/src/10.2/sql/sql_parse.cc:1378 #15 0x000056238736d678 in do_handle_one_connection (connect=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1335 #16 0x000056238736d405 in handle_one_connection (arg=0x5623896160f0) at /data/src/10.2/sql/sql_connect.cc:1241 #17 0x000056238778f79a in pfs_spawn_thread (arg=0x562389634940) at /data/src/10.2/storage/perfschema/pfs.cc:1862 #18 0x00007fd838c05494 in start_thread (arg=0x7fd83120b700) at pthread_create.c:333 #19 0x00007fd836feb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} Reproducible with at least InnoDB and MyISAM. No obvious effect on a non-debug build. |
Link |
This issue relates to |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Labels | affects-tests |
Fix Version/s | 10.4 [ 22408 ] | |
Affects Version/s | 10.4 [ 22408 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Affects Version/s | 10.4 [ 22408 ] |
Fix Version/s | 10.2.20 [ 23212 ] | |
Fix Version/s | 10.3.12 [ 23214 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 88752 ] | MariaDB v4 [ 154754 ] |
The same happens if the last statement is DML, not DDL:
);
10.4 8cf7e3459d
mysqld: /data/src/10.4/sql/table.cc:4668: void TABLE::init(THD*, TABLE_LIST*): Assertion `!auto_increment_field_not_null' failed.
181210 20:57:38 [ERROR] mysqld got signal 6 ;
#7 0x00007fbcf83deee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000562e857f2ca7 in TABLE::init (this=0x7fbce013b0b0, thd=0x7fbce0000b00, tl=0x7fbce0014ea0) at /data/src/10.4/sql/table.cc:4668
#9 0x0000562e8591838e in THD::open_temporary_table (this=0x7fbce0000b00, tl=0x7fbce0014ea0) at /data/src/10.4/sql/temporary_tables.cc:415
#10 0x0000562e8591847d in THD::open_temporary_tables (this=0x7fbce0000b00, tl=0x7fbce0014ea0) at /data/src/10.4/sql/temporary_tables.cc:452
#11 0x0000562e856db664 in mysql_execute_command (thd=0x7fbce0000b00) at /data/src/10.4/sql/sql_parse.cc:4718
#12 0x0000562e856e63bc in mysql_parse (thd=0x7fbce0000b00, rawbuf=0x7fbce0014db8 "INSERT INTO t1 () VALUES ()", length=27, parser_state=0x7fbcf2570600, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8103
#13 0x0000562e856d35e6 in dispatch_command (command=COM_QUERY, thd=0x7fbce0000b00, packet=0x7fbce000b421 "INSERT INTO t1 () VALUES ()", packet_length=27, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1850
#14 0x0000562e856d200a in do_command (thd=0x7fbce0000b00) at /data/src/10.4/sql/sql_parse.cc:1395
#15 0x0000562e8583ddd6 in do_handle_one_connection (connect=0x562e889910a0) at /data/src/10.4/sql/sql_connect.cc:1402
#16 0x0000562e8583db5a in handle_one_connection (arg=0x562e889910a0) at /data/src/10.4/sql/sql_connect.cc:1308
#17 0x0000562e85cf6890 in pfs_spawn_thread (arg=0x562e888f1190) at /data/src/10.4/storage/perfschema/pfs.cc:1862
#18 0x00007fbcf9e9a494 in start_thread (arg=0x7fbcf2571700) at pthread_create.c:333
#19 0x00007fbcf849b93f in clone () from /lib/x86_64-linux-gnu/libc.so.6