|
Additional testcase with somewhat different stack
SET sql_mode='';
|
CREATE TABLE t (c INT,c2 INT) ENGINE=InnoDB PARTITION BY KEY(c) PARTITIONS 8;
|
INSERT INTO t (c) SELECT MAX(c) FROM t;
|
ALTER TABLE t CHANGE COLUMN c d INT NOT NULL;
|
ALTER TABLE t ADD COLUMN c TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
|
UPDATE t SET c=(SELECT 1 FROM t)-1;
|
Leads to:
|
11.0.1 f2dc4d4c10ac36a73b5c1eb765352d3aee808d66 (Debug)
|
mariadbd: /test/11.0_dbg/sql/ha_partition.cc:4646: virtual int ha_partition::update_row(const uchar*, const uchar*): Assertion `old_part_id == m_last_part' failed.
|
|
11.0.1 f2dc4d4c10ac36a73b5c1eb765352d3aee808d66 (Debug)
|
Core was generated by `/test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=23220341073472)
|
at ./nptl/pthread_kill.c:44
|
[Current thread is 1 (Thread 0x151e682e6640 (LWP 2293934))]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=23220341073472) at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=23220341073472) at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=23220341073472, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
|
#3 0x0000151e8f77f476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
#4 0x0000151e8f7657f3 in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x0000151e8f76571b in __assert_fail_base (fmt=0x151e8f91a150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x564ca09d8901 "old_part_id == m_last_part", file=0x564ca09d8988 "/test/11.0_dbg/sql/ha_partition.cc", line=4646, function=<optimized out>) at ./assert/assert.c:92
|
#6 0x0000151e8f776e96 in __GI___assert_fail (assertion=0x564ca09d8901 "old_part_id == m_last_part", file=0x564ca09d8988 "/test/11.0_dbg/sql/ha_partition.cc", line=4646, function=0x564ca09da4c0 "virtual int ha_partition::update_row(const uchar*, const uchar*)") at ./assert/assert.c:101
|
#7 0x0000564ca0233b09 in ha_partition::update_row (this=0x151dd40b08d0, old_data=0x151dd4025280 <incomplete sequence \373>, new_data=0x151dd4025270 <incomplete sequence \373>) at /test/11.0_dbg/sql/ha_partition.cc:4646
|
#8 0x0000564c9ffb3685 in handler::ha_update_row (this=0x151dd40b08d0, old_data=0x151dd4025280 <incomplete sequence \373>, new_data=0x151dd4025270 <incomplete sequence \373>) at /test/11.0_dbg/sql/handler.cc:7838
|
#9 0x0000564c9fddb455 in multi_update::do_updates (this=this@entry=0x151dd4015548) at /test/11.0_dbg/sql/sql_update.cc:2937
|
#10 0x0000564c9fddc04b in multi_update::send_eof (this=0x151dd4015548) at /test/11.0_dbg/sql/sql_update.cc:3048
|
#11 0x0000564c9fd667e0 in do_select (procedure=<optimized out>, join=0x151dd4015658) at /test/11.0_dbg/sql/sql_select.cc:22384
|
#12 JOIN::exec_inner (this=this@entry=0x151dd4015658) at /test/11.0_dbg/sql/sql_select.cc:4888
|
#13 0x0000564c9fd66be0 in JOIN::exec (this=this@entry=0x151dd4015658) at /test/11.0_dbg/sql/sql_select.cc:4666
|
#14 0x0000564c9fd64b18 in mysql_select (thd=thd@entry=0x151dd4000d58, tables=tables@entry=0x151dd4013230, fields=@0x151e682e4d00: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x564ca11b5440 <end_of_list>, last = 0x151e682e4d00, elements = 0}, <No data fields>}, conds=conds@entry=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=37383395344512, result=0x151dd4015548, unit=0x151dd4004fa0, select_lex=0x151dd40057d0) at /test/11.0_dbg/sql/sql_select.cc:5146
|
#15 0x0000564c9fddaa4d in mysql_multi_update (thd=thd@entry=0x151dd4000d58, table_list=0x151dd4013230, fields=fields@entry=0x151dd4005a88, values=values@entry=0x151dd4005ed8, conds=0x0, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x151dd4004fa0, select_lex=0x151dd40057d0, result=0x151e682e4f00) at /test/11.0_dbg/sql/sql_update.cc:1982
|
#16 0x0000564c9fcd7afd in mysql_execute_command (thd=thd@entry=0x151dd4000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.0_dbg/sql/sql_parse.cc:4493
|
#17 0x0000564c9fcdd7cf in mysql_parse (thd=thd@entry=0x151dd4000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x151e682e52c0) at /test/11.0_dbg/sql/sql_parse.cc:8002
|
#18 0x0000564c9fcdf963 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151dd4000d58, packet=packet@entry=0x151dd400ae19 "UPDATE t SET c=(SELECT 1 FROM t)-1", packet_length=packet_length@entry=34, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_class.h:242
|
#19 0x0000564c9fce17bc in do_command (thd=0x151dd4000d58, blocking=blocking@entry=true) at /test/11.0_dbg/sql/sql_parse.cc:1407
|
#20 0x0000564c9fe326e2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x564ca2f193f8, put_in_cache=put_in_cache@entry=true) at /test/11.0_dbg/sql/sql_connect.cc:1416
|
#21 0x0000564c9fe32941 in handle_one_connection (arg=0x564ca2f193f8) at /test/11.0_dbg/sql/sql_connect.cc:1318
|
#22 0x0000151e8f7d1b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#23 0x0000151e8f863a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Bug confirmed present in:
MariaDB: 10.3.38 (dbg), 10.4.29 (dbg), 10.5.20 (dbg), 10.6.13 (dbg), 10.7.8 (dbg), 10.8.8 (dbg), 10.9.6 (dbg), 10.10.4 (dbg), 10.11.2 (dbg), 11.0.1 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.3.38 (opt), 10.4.29 (opt), 10.5.20 (opt), 10.6.13 (opt), 10.7.8 (opt), 10.8.8 (opt), 10.9.6 (opt), 10.10.4 (opt), 10.11.2 (opt), 11.0.1 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 5.7.40 (opt), 8.0.31 (dbg), 8.0.31 (opt)
|