Details
Description
--source include/have_partition.inc
|
|
CREATE TABLE t (a INT AUTO_INCREMENT PRIMARY KEY) |
PARTITION BY RANGE (a) ( |
PARTITION p0 VALUES LESS THAN (10), |
PARTITION pn VALUES LESS THAN MAXVALUE |
);
|
REPLACE INTO t PARTITION (p0) SELECT 1; |
|
# Cleanup
|
DROP TABLE t; |
10.3 66cd1c33 |
mysqld: /data/src/10.3/sql/ha_partition.h:1395: virtual void ha_partition::set_auto_increment_if_higher(Field*): Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
|
220926 16:59:46 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007fc2ac994662 in __GI___assert_fail (assertion=0x55a14064aa60 "part_share->auto_inc_initialized || !can_use_for_auto_inc_init()", file=0x55a14064a860 "/data/src/10.3/sql/ha_partition.h", line=1395, function=0x55a14064aae0 "virtual void ha_partition::set_auto_increment_if_higher(Field*)") at assert.c:101
|
#8 0x000055a13fb6bc05 in ha_partition::set_auto_increment_if_higher (this=0x61d0001964a8, field=0x619000083008) at /data/src/10.3/sql/ha_partition.h:1395
|
#9 0x000055a13fb2d875 in ha_partition::write_row (this=0x61d0001964a8, buf=0x619000082fd8 "\377\001") at /data/src/10.3/sql/ha_partition.cc:4406
|
#10 0x000055a13e8fefc4 in handler::ha_write_row (this=0x61d0001964a8, buf=0x619000082fd8 "\377\001") at /data/src/10.3/sql/handler.cc:6495
|
#11 0x000055a13e0ddef5 in write_record (thd=0x62a000060208, table=0x61f000043688, info=0x62b000000bb0) at /data/src/10.3/sql/sql_insert.cc:1727
|
#12 0x000055a13e0f0a6d in select_insert::send_data (this=0x62b000000b68, values=...) at /data/src/10.3/sql/sql_insert.cc:3953
|
#13 0x000055a13e23ed1f in JOIN::exec_inner (this=0x62b000000c20) at /data/src/10.3/sql/sql_select.cc:4046
|
#14 0x000055a13e23dad7 in JOIN::exec (this=0x62b000000c20) at /data/src/10.3/sql/sql_select.cc:3965
|
#15 0x000055a13e241439 in mysql_select (thd=0x62a000060208, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=3489925888, result=0x62b000000b68, unit=0x62a0000640b8, select_lex=0x62a000064850) at /data/src/10.3/sql/sql_select.cc:4374
|
#16 0x000055a13e217c6f in handle_select (thd=0x62a000060208, lex=0x62a000063ff8, result=0x62b000000b68, setup_tables_done_option=1073741824) at /data/src/10.3/sql/sql_select.cc:372
|
#17 0x000055a13e17f8fb in mysql_execute_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:4621
|
#18 0x000055a13e1964dc in mysql_parse (thd=0x62a000060208, rawbuf=0x62b000000228 "REPLACE INTO t PARTITION (p0) SELECT 1", length=38, parser_state=0x7fc2a1fffa00, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7871
|
#19 0x000055a13e16da82 in dispatch_command (command=COM_QUERY, thd=0x62a000060208, packet=0x6290000eb209 "REPLACE INTO t PARTITION (p0) SELECT 1", packet_length=38, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
|
#20 0x000055a13e16a65e in do_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:1398
|
#21 0x000055a13e52c068 in do_handle_one_connection (connect=0x608000000ea8) at /data/src/10.3/sql/sql_connect.cc:1403
|
#22 0x000055a13e52b964 in handle_one_connection (arg=0x608000000ea8) at /data/src/10.3/sql/sql_connect.cc:1308
|
#23 0x000055a13fad6a67 in pfs_spawn_thread (arg=0x615000004408) at /data/src/10.3/storage/perfschema/pfs.cc:1869
|
#24 0x00007fc2acb2dea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#25 0x00007fc2aca5ddef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Reproducible on all 10.3+, including previous minor releases, with at least MyISAM, InnoDB, Aria.
Attachments
Issue Links
- relates to
-
MDEV-21027 Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed in ha_partition::set_auto_increment_if_higher
-
- Closed
-
-
MDEV-21310 AUTO_INCREMENT column throws range error on INSERT in partitioned table | Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed.
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
{code:sql}
--source include/have_partition.inc CREATE TABLE t (a INT AUTO_INCREMENT PRIMARY KEY) PARTITION BY RANGE (a) ( PARTITION p0 VALUES LESS THAN (10), PARTITION pn VALUES LESS THAN MAXVALUE ); REPLACE INTO t PARTITION (p0) SELECT 1; # Cleanup DROP TABLE t; {code} {noformat:title=10.3 66cd1c33} mysqld: /data/src/10.3/sql/ha_partition.h:1395: virtual void ha_partition::set_auto_increment_if_higher(Field*): Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed. 220926 16:59:46 [ERROR] mysqld got signal 6 ; #7 0x00007fc2ac994662 in __GI___assert_fail (assertion=0x55a14064aa60 "part_share->auto_inc_initialized || !can_use_for_auto_inc_init()", file=0x55a14064a860 "/data/src/10.3/sql/ha_partition.h", line=1395, function=0x55a14064aae0 "virtual void ha_partition::set_auto_increment_if_higher(Field*)") at assert.c:101 #8 0x000055a13fb6bc05 in ha_partition::set_auto_increment_if_higher (this=0x61d0001964a8, field=0x619000083008) at /data/src/10.3/sql/ha_partition.h:1395 #9 0x000055a13fb2d875 in ha_partition::write_row (this=0x61d0001964a8, buf=0x619000082fd8 "\377\001") at /data/src/10.3/sql/ha_partition.cc:4406 #10 0x000055a13e8fefc4 in handler::ha_write_row (this=0x61d0001964a8, buf=0x619000082fd8 "\377\001") at /data/src/10.3/sql/handler.cc:6495 #11 0x000055a13e0ddef5 in write_record (thd=0x62a000060208, table=0x61f000043688, info=0x62b000000bb0) at /data/src/10.3/sql/sql_insert.cc:1727 #12 0x000055a13e0f0a6d in select_insert::send_data (this=0x62b000000b68, values=...) at /data/src/10.3/sql/sql_insert.cc:3953 #13 0x000055a13e23ed1f in JOIN::exec_inner (this=0x62b000000c20) at /data/src/10.3/sql/sql_select.cc:4046 #14 0x000055a13e23dad7 in JOIN::exec (this=0x62b000000c20) at /data/src/10.3/sql/sql_select.cc:3965 #15 0x000055a13e241439 in mysql_select (thd=0x62a000060208, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=3489925888, result=0x62b000000b68, unit=0x62a0000640b8, select_lex=0x62a000064850) at /data/src/10.3/sql/sql_select.cc:4374 #16 0x000055a13e217c6f in handle_select (thd=0x62a000060208, lex=0x62a000063ff8, result=0x62b000000b68, setup_tables_done_option=1073741824) at /data/src/10.3/sql/sql_select.cc:372 #17 0x000055a13e17f8fb in mysql_execute_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:4621 #18 0x000055a13e1964dc in mysql_parse (thd=0x62a000060208, rawbuf=0x62b000000228 "REPLACE INTO t PARTITION (p0) SELECT 1", length=38, parser_state=0x7fc2a1fffa00, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7871 #19 0x000055a13e16da82 in dispatch_command (command=COM_QUERY, thd=0x62a000060208, packet=0x6290000eb209 "REPLACE INTO t PARTITION (p0) SELECT 1", packet_length=38, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852 #20 0x000055a13e16a65e in do_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:1398 #21 0x000055a13e52c068 in do_handle_one_connection (connect=0x608000000ea8) at /data/src/10.3/sql/sql_connect.cc:1403 #22 0x000055a13e52b964 in handle_one_connection (arg=0x608000000ea8) at /data/src/10.3/sql/sql_connect.cc:1308 #23 0x000055a13fad6a67 in pfs_spawn_thread (arg=0x615000004408) at /data/src/10.3/storage/perfschema/pfs.cc:1869 #24 0x00007fc2acb2dea7 in start_thread (arg=<optimized out>) at pthread_create.c:477 #25 0x00007fc2aca5ddef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 {noformat} Reproducible on all 10.3+, also on previous minor releases, with at least MyISAM, InnoDB, Aria. |
{code:sql}
--source include/have_partition.inc CREATE TABLE t (a INT AUTO_INCREMENT PRIMARY KEY) PARTITION BY RANGE (a) ( PARTITION p0 VALUES LESS THAN (10), PARTITION pn VALUES LESS THAN MAXVALUE ); REPLACE INTO t PARTITION (p0) SELECT 1; # Cleanup DROP TABLE t; {code} {noformat:title=10.3 66cd1c33} mysqld: /data/src/10.3/sql/ha_partition.h:1395: virtual void ha_partition::set_auto_increment_if_higher(Field*): Assertion `part_share->auto_inc_initialized || !can_use_for_auto_inc_init()' failed. 220926 16:59:46 [ERROR] mysqld got signal 6 ; #7 0x00007fc2ac994662 in __GI___assert_fail (assertion=0x55a14064aa60 "part_share->auto_inc_initialized || !can_use_for_auto_inc_init()", file=0x55a14064a860 "/data/src/10.3/sql/ha_partition.h", line=1395, function=0x55a14064aae0 "virtual void ha_partition::set_auto_increment_if_higher(Field*)") at assert.c:101 #8 0x000055a13fb6bc05 in ha_partition::set_auto_increment_if_higher (this=0x61d0001964a8, field=0x619000083008) at /data/src/10.3/sql/ha_partition.h:1395 #9 0x000055a13fb2d875 in ha_partition::write_row (this=0x61d0001964a8, buf=0x619000082fd8 "\377\001") at /data/src/10.3/sql/ha_partition.cc:4406 #10 0x000055a13e8fefc4 in handler::ha_write_row (this=0x61d0001964a8, buf=0x619000082fd8 "\377\001") at /data/src/10.3/sql/handler.cc:6495 #11 0x000055a13e0ddef5 in write_record (thd=0x62a000060208, table=0x61f000043688, info=0x62b000000bb0) at /data/src/10.3/sql/sql_insert.cc:1727 #12 0x000055a13e0f0a6d in select_insert::send_data (this=0x62b000000b68, values=...) at /data/src/10.3/sql/sql_insert.cc:3953 #13 0x000055a13e23ed1f in JOIN::exec_inner (this=0x62b000000c20) at /data/src/10.3/sql/sql_select.cc:4046 #14 0x000055a13e23dad7 in JOIN::exec (this=0x62b000000c20) at /data/src/10.3/sql/sql_select.cc:3965 #15 0x000055a13e241439 in mysql_select (thd=0x62a000060208, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=3489925888, result=0x62b000000b68, unit=0x62a0000640b8, select_lex=0x62a000064850) at /data/src/10.3/sql/sql_select.cc:4374 #16 0x000055a13e217c6f in handle_select (thd=0x62a000060208, lex=0x62a000063ff8, result=0x62b000000b68, setup_tables_done_option=1073741824) at /data/src/10.3/sql/sql_select.cc:372 #17 0x000055a13e17f8fb in mysql_execute_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:4621 #18 0x000055a13e1964dc in mysql_parse (thd=0x62a000060208, rawbuf=0x62b000000228 "REPLACE INTO t PARTITION (p0) SELECT 1", length=38, parser_state=0x7fc2a1fffa00, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7871 #19 0x000055a13e16da82 in dispatch_command (command=COM_QUERY, thd=0x62a000060208, packet=0x6290000eb209 "REPLACE INTO t PARTITION (p0) SELECT 1", packet_length=38, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852 #20 0x000055a13e16a65e in do_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:1398 #21 0x000055a13e52c068 in do_handle_one_connection (connect=0x608000000ea8) at /data/src/10.3/sql/sql_connect.cc:1403 #22 0x000055a13e52b964 in handle_one_connection (arg=0x608000000ea8) at /data/src/10.3/sql/sql_connect.cc:1308 #23 0x000055a13fad6a67 in pfs_spawn_thread (arg=0x615000004408) at /data/src/10.3/storage/perfschema/pfs.cc:1869 #24 0x00007fc2acb2dea7 in start_thread (arg=<optimized out>) at pthread_create.c:477 #25 0x00007fc2aca5ddef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 {noformat} Reproducible on all 10.3+, including previous minor releases, with at least MyISAM, InnoDB, Aria. |
Link |
This issue relates to |
Link |
This issue relates to |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Nayuta Yanagisawa [ JIRAUSER47117 ] | Alexey Botchkov [ holyfoot ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Alexey Botchkov [ holyfoot ] | Nayuta Yanagisawa [ JIRAUSER47117 ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.3.38 [ 28507 ] | |
Fix Version/s | 10.4.28 [ 28509 ] | |
Fix Version/s | 10.5.19 [ 28511 ] | |
Fix Version/s | 10.6.12 [ 28513 ] | |
Fix Version/s | 10.7.8 [ 28515 ] | |
Fix Version/s | 10.8.7 [ 28517 ] | |
Fix Version/s | 10.9.5 [ 28519 ] | |
Fix Version/s | 10.10.3 [ 28521 ] | |
Fix Version/s | 10.11.2 [ 28523 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | 10.8 [ 26121 ] | |
Fix Version/s | 10.9 [ 26905 ] | |
Fix Version/s | 10.10 [ 27530 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
holyfoot Please review: https://github.com/MariaDB/server/commit/9401a0fc5738b179bcf53e683032d661dd2f816d