Description:
My script:
----------
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 ( f2 INT, f1 INTEGER , PRIMARY KEY (f1))
ENGINE = MyISAM PARTITION BY KEY (f1) PARTITIONS 2;
ALTER TABLE t1 CHANGE COLUMN f2 my_column INT;
# Here I get the assertion
INSERT t1 (f2,f1) SELECT 1,1 FROM DUAL WHERE 1 = 2;
DROP TABLE t1;
Backtrace from mysql-next-bugfixing:
------------------------------------
Thread 1 (process 1464):
#0 0x00007fa342f14ce6 in pthread_kill () from /lib64/libpthread.so.0
#1 0x0000000000b58068 in my_write_core (sig=6) at stacktrace.c:309
#2 0x00000000006efb31 in handle_segfault (sig=6) at mysqld.cc:2738
#3 <signal handler called>
#4 0x00007fa341e105c5 in raise () from /lib64/libc.so.6
#5 0x00007fa341e11bb3 in abort () from /lib64/libc.so.6
#6 0x00007fa341e091e9 in __assert_fail () from /lib64/libc.so.6
#7 0x00000000008585c6 in ha_partition::end_bulk_insert (this=0x16758e0, abort=false) at ha_partition.cc:3508
#8 0x00000000007b382c in handler::ha_end_bulk_insert (this=0x16758e0, abort=false) at handler.h:1619
#9 0x00000000007ab70e in select_insert::abort (this=0x160c5e8) at sql_insert.cc:3381
#10 0x00000000007a71b2 in handle_select (thd=0x166e808, lex=0x16700d8, result=0x160c5e8, setup_tables_done_option=1073741824) at sql_select.cc:312
#11 0x0000000000704e10 in mysql_execute_command (thd=0x166e808) at sql_parse.cc:3276
#12 0x000000000070a36f in mysql_parse (thd=0x166e808, inBuf=0x160b9a0 "INSERT t1 (f2,f1) SELECT 1,1 FROM DUAL WHERE 1 = 2", length=50, found_semicolon=0x404cdf20) at sql_parse.cc:5941
#13 0x000000000070af8d in dispatch_command (command=COM_QUERY, thd=0x166e808, packet=0x1607949 "INSERT t1 (f2,f1) SELECT 1,1 FROM DUAL WHERE 1 = 2", packet_length=50) at sql_parse.cc:1062
#14 0x000000000070c431 in do_command (thd=0x166e808) at sql_parse.cc:744
#15 0x00000000006f99bf in handle_one_connection (arg=0x166e808) at sql_connect.cc:1163
#16 0x00007fa342f10040 in start_thread () from /lib64/libpthread.so.0
#17 0x00007fa341eb108d in clone () from /lib64/libc.so.6
#18 0x0000000000000000 in ?? ()
In case of mysql-5.1-bugteam I get:
-----------------------------------
At line 9: query 'INSERT t1 (f2,f1) SELECT 1,1 FROM DUAL WHERE 1 = 2' failed: 1054: Unknown column 'f2' in 'field list'
This is also wrong.
How to repeat:
See above