Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
N/A
-
None
Description
Note: The test case is similar to MDEV-14844, only here with system_time partitioning we are getting a crash, not the assertion failure.
--source include/have_innodb.inc
|
--source include/have_partition.inc
|
|
CREATE OR REPLACE TABLE t1 (pk int) ENGINE=InnoDB WITH SYSTEM VERSIONING PARTITION BY system_time INTERVAL 4 HOUR (PARTITION p1 HISTORY, PARTITION pn CURRENT); |
LOCK TABLE t1 WRITE; |
SET system_versioning_alter_history=KEEP; |
--error ER_SAME_NAME_PARTITION
|
ALTER TABLE t1 ADD PARTITION (PARTITION p1 HISTORY); |
SELECT * FROM t1; |
|
# Cleanup
|
DROP TABLE t1; |
bb-10.3-temporal a3a15126f260e26b7 |
#3 <signal handler called>
|
#4 0x000055d50cbfecb0 in base_list_iterator::next (this=0x7f3ba42f6580) at /data/src/bb-10.3-temporal/sql/sql_list.h:412
|
#5 0x000055d50cd42c39 in List_iterator<p_elem_val>::operator++ (this=0x7f3ba42f6580) at /data/src/bb-10.3-temporal/sql/sql_list.h:519
|
#6 0x000055d50cdcab0c in partition_info::check_range_constants (this=0x7f3b5809d068, thd=0x7f3b58000b00, alloc=false) at /data/src/bb-10.3-temporal/sql/partition_info.cc:1552
|
#7 0x000055d50d0eaf52 in partition_info::vers_update_range_constants (this=0x7f3b5809d068, thd=0x7f3b58000b00) at /data/src/bb-10.3-temporal/sql/partition_info.h:565
|
#8 0x000055d50d0ceaf7 in prune_partitions (thd=0x7f3b58000b00, table=0x7f3b58072020, pprune_cond=0x7f3b580160c0) at /data/src/bb-10.3-temporal/sql/opt_range.cc:3460
|
#9 0x000055d50ccd1275 in JOIN::optimize_inner (this=0x7f3b58015528) at /data/src/bb-10.3-temporal/sql/sql_select.cc:1868
|
#10 0x000055d50ccd00b8 in JOIN::optimize (this=0x7f3b58015528) at /data/src/bb-10.3-temporal/sql/sql_select.cc:1556
|
#11 0x000055d50ccd9814 in mysql_select (thd=0x7f3b58000b00, tables=0x7f3b58014e30, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2149845760, result=0x7f3b58015508, unit=0x7f3b58004898, select_lex=0x7f3b58004ff0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:4244
|
#12 0x000055d50cccb93e in handle_select (thd=0x7f3b58000b00, lex=0x7f3b580047d0, result=0x7f3b58015508, setup_tables_done_option=0) at /data/src/bb-10.3-temporal/sql/sql_select.cc:382
|
#13 0x000055d50cc96aa1 in execute_sqlcom_select (thd=0x7f3b58000b00, all_tables=0x7f3b58014e30) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:6535
|
#14 0x000055d50cc8d0e5 in mysql_execute_command (thd=0x7f3b58000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:3749
|
#15 0x000055d50cc9a3f6 in mysql_parse (thd=0x7f3b58000b00, rawbuf=0x7f3b58014c48 "SELECT * FROM t1", length=16, parser_state=0x7f3ba42f85f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7991
|
#16 0x000055d50cc87b97 in dispatch_command (command=COM_QUERY, thd=0x7f3b58000b00, packet=0x7f3b58120201 "SELECT * FROM t1", packet_length=16, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1825
|
#17 0x000055d50cc865cb in do_command (thd=0x7f3b58000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1370
|
#18 0x000055d50cdee354 in do_handle_one_connection (connect=0x55d50f8cf590) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
|
#19 0x000055d50cdee0e1 in handle_one_connection (arg=0x55d50f8cf590) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
|
#20 0x000055d50d288c5a in pfs_spawn_thread (arg=0x55d50f915dd0) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
|
#21 0x00007f3bae3c9494 in start_thread (arg=0x7f3ba42f9700) at pthread_create.c:333
|
#22 0x00007f3bac7af93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
Also reproducible on tempesta-tech/mariadb 52f9f635a5fa6.
Attachments
Issue Links
- is duplicated by
-
MDEV-14826 Server crashes in String_list::append_str / make_used_partitions_str
-
- Closed
-
-
MDEV-14844 Assertion `bit < (map)->n_bits' failed in bitmap_is_set
-
- Closed
-
This also fails on vanilla (c664c48726cdfab12c8c6ac4849c508faddab3fe):
Thread 33 "mysqld" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe52ae700 (LWP 15241)]
0x00005555560390e0 in prep_alter_part_table (thd=0x7fff80000d50, table=0x7fff80040d20, alter_info=0x7fffe52ac4b0, create_info=0x7fffe52ac560, alter_ctx=0x7fffe52ab530, partition_changed=0x7fffe52aac41, fast_alter_table=0x7fffe52aac42) at /home/midenok/src/mariadb/upstream/src/sql/sql_partition.cc:4849
4849 p_elem->part_state= PART_CHANGED;
(gdb) bt
#0 0x00005555560390e0 in prep_alter_part_table (thd=0x7fff80000d50, table=0x7fff80040d20, alter_info=0x7fffe52ac4b0, create_info=0x7fffe52ac560, alter_ctx=0x7fffe52ab530, partition_changed=0x7fffe52aac41, fast_alter_table=0x7fffe52aac42) at /home/midenok/src/mariadb/upstream/src/sql/sql_partition.cc:4849
#1 0x0000555555c83a44 in mysql_alter_table (thd=0x7fff80000d50, new_db=0x7fff80013ea0 "test", new_name=0x0, create_info=0x7fffe52ac560, table_list=0x7fff80013890, alter_info=0x7fffe52ac4b0, order_num=0, order=0x0, ignore=false) at /home/midenok/src/mariadb/upstream/src/sql/sql_table.cc:9046
#2 0x0000555555d078e1 in Sql_cmd_alter_table::execute (this=0x7fff80014198, thd=0x7fff80000d50) at /home/midenok/src/mariadb/upstream/src/sql/sql_alter.cc:325
#3 0x0000555555bb15e1 in mysql_execute_command (thd=0x7fff80000d50) at /home/midenok/src/mariadb/upstream/src/sql/sql_parse.cc:6251
#4 0x0000555555bb5b56 in mysql_parse (thd=0x7fff80000d50, rawbuf=0x7fff80013788 "alter table g1 add partition (partition p1)", length=43, parser_state=0x7fffe52ad6c0, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/upstream/src/sql/sql_parse.cc:7966
#5 0x0000555555ba5590 in dispatch_command (command=COM_QUERY, thd=0x7fff80000d50, packet=0x7fff8000afa1 "alter table g1 add partition (partition p1)", packet_length=43, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/upstream/src/sql/sql_parse.cc:1824
#6 0x0000555555ba4392 in do_command (thd=0x7fff80000d50) at /home/midenok/src/mariadb/upstream/src/sql/sql_parse.cc:1368
#7 0x0000555555d022c7 in do_handle_one_connection (connect=0x55555842d200) at /home/midenok/src/mariadb/upstream/src/sql/sql_connect.cc:1420
#8 0x0000555555d02046 in handle_one_connection (arg=0x55555842d200) at /home/midenok/src/mariadb/upstream/src/sql/sql_connect.cc:1326
#9 0x00007ffff75677fc in start_thread (arg=0x7fffe52ae700) at pthread_create.c:465
#10 0x00007ffff60f0a3f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95