Bug #76515 Bug #74597 not fixed? | Assertion `! is_set()' failed. in set_ok_status
Submitted: 28 Mar 2015 7:36 Modified: 17 Nov 2015 22:59
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DDL Severity:S6 (Debug Builds)
Version:5.6.23, 5.6.25 OS:Any
Assigned to: CPU Architecture:Any

[28 Mar 2015 7:36] Roel Van de Paar
Description:
Version: '5.6.23-debug'  socket: '/sda/mysql-5.6.23-linux-x86_64-debug/socket.sock'  port: 12466  MySQL Community Server (GPL)
mysqld: /bzr/mysql-5.6.23/sql/sql_error.cc:430: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `! is_set()' failed.
07:34:17 UTC - mysqld got signal 6 ;

+bt
#0  0x00007fdf304c9771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000a9804e in my_write_core (sig=6) at /bzr/mysql-5.6.23/mysys/stacktrace.c:422
#2  0x00000000007277f0 in handle_fatal_signal (sig=6) at /bzr/mysql-5.6.23/sql/signal_handler.cc:230
#3  <signal handler called>
#4  0x00007fdf2f2d55c9 in raise () from /lib64/libc.so.6
#5  0x00007fdf2f2d6cd8 in abort () from /lib64/libc.so.6
#6  0x00007fdf2f2ce536 in __assert_fail_base () from /lib64/libc.so.6
#7  0x00007fdf2f2ce5e2 in __assert_fail () from /lib64/libc.so.6
#8  0x000000000079fbba in Diagnostics_area::set_ok_status (this=0x7fde9d3273d8, affected_rows=1, last_insert_id=0, message=0x7fdf30abe890 "Records: 1  Duplicates: 0  Warnings: 1") at /bzr/mysql-5.6.23/sql/sql_error.cc:430
#9  0x000000000075e4ce in my_ok (thd=0x7fde9d324000, affected_rows=1, id=0, message=0x7fdf30abe890 "Records: 1  Duplicates: 0  Warnings: 1") at /bzr/mysql-5.6.23/sql/sql_class.h:4179
#10 0x0000000000847a45 in mysql_alter_table (thd=0x7fde9d324000, new_db=0x7fde9401f658 "test", new_name=0x0, create_info=0x7fdf30abf6e0, table_list=0x7fde9401f0f8, alter_info=0x7fdf30abf650, order_num=1, order=0x7fde9401f770, ignore=false) at /bzr/mysql-5.6.23/sql/sql_table.cc:8747
#11 0x000000000098634f in Sql_cmd_alter_table::execute (this=0x7fde9401f7b8, thd=0x7fde9d324000) at /bzr/mysql-5.6.23/sql/sql_alter.cc:313
#12 0x00000000007da008 in mysql_execute_command (thd=0x7fde9d324000) at /bzr/mysql-5.6.23/sql/sql_parse.cc:4945
#13 0x00000000007dd54a in mysql_parse (thd=0x7fde9d324000, rawbuf=0x7fde9401f010 "ALTER TABLE t1 ORDER BY c1", length=26, parser_state=0x7fdf30ac0e70) at /bzr/mysql-5.6.23/sql/sql_parse.cc:6357
#14 0x00000000007d06bc in dispatch_command (command=COM_QUERY, thd=0x7fde9d324000, packet=0x7fde9d36c001 "ALTER TABLE t1 ORDER BY c1", packet_length=26) at/bzr/mysql-5.6.23/sql/sql_parse.cc:1332
#15 0x00000000007cf7ab in do_command (thd=0x7fde9d324000) at /bzr/mysql-5.6.23/sql/sql_parse.cc:1034
#16 0x0000000000797b3d in do_handle_one_connection (thd_arg=0x7fde9d324000) at /bzr/mysql-5.6.23/sql/sql_connect.cc:982
#17 0x0000000000797626 in handle_one_connection (arg=0x7fde9d324000) at /bzr/mysql-5.6.23/sql/sql_connect.cc:898
#18 0x0000000000ae6600 in pfs_spawn_thread (arg=0x7fdf29f49b00) at /bzr/mysql-5.6.23/storage/perfschema/pfs.cc:1860
#19 0x00007fdf304c4df3 in start_thread () from /lib64/libpthread.so.0
#20 0x00007fdf2f3961ad in clone () from /lib64/libc.so.6

How to repeat:
DROP DATABASE test;CREATE DATABASE test;USE test;
CREATE TABLE t1(c1 TIMESTAMP,pk int KEY) Engine=MyISAM;
SET SQL_MODE='TRADITIONAL';
INSERT IGNORE INTO t1(c1)VALUES (DATEDIFF(NOW(),'2038-01-20')),(DATEDIFF(NOW(),'2038-01-20')),(0),(0),(0);
ALTER TABLE t1 ORDER BY c1;
[28 Mar 2015 8:23] MySQL Verification Team
Hello Roel,

Thank you for the report and test case.
Observed that 5.6.25 debug build is affected.

Thanks,
Umesh
[28 Mar 2015 8:23] MySQL Verification Team
// 5.6.25 debug build affected

scripts/mysql_install_db --basedir=/export/umesh/mysql-5.6.25 --datadir=/export/umesh/mysql-5.6.25/76515
bin/mysqld-debug --basedir=/export/umesh/mysql-5.6.25 --datadir=/export/umesh/mysql-5.6.25/76515 --core-file --socket=/tmp/mysql_ushastry.sock  --port=15000 --log-error=/export/umesh/mysql-5.6.25/76515/log.err 2>&1 &

commit: f11a63734bfab93fb223d17387ff401572909b38
date: 2015-03-27 18:03:55 +0100
build-date: 2015-03-28 03:30:33 +0100
short: f11a637
branch: mysql-5.6

MySQL source 5.6.25

(gdb) bt
#0  0x00007fdc31012771 in pthread_kill () from /lib64/libpthread.so.0
#1  0x0000000000ae14b3 in my_write_core (sig=6) at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/mysys/stacktrace.c:422
#2  0x000000000074600a in handle_fatal_signal (sig=6) at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/signal_handler.cc:230
#3  <signal handler called>
#4  0x00007fdc2fc185c9 in raise () from /lib64/libc.so.6
#5  0x00007fdc2fc19cd8 in abort () from /lib64/libc.so.6
#6  0x00007fdc2fc11536 in __assert_fail_base () from /lib64/libc.so.6
#7  0x00007fdc2fc115e2 in __assert_fail () from /lib64/libc.so.6
#8  0x00000000007c4ff2 in Diagnostics_area::set_ok_status (this=0x3280df0, affected_rows=1, last_insert_id=0, message=0x7fdc068c5da0 "Records: 1  Duplicates: 0  Warnings: 1")
    at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_error.cc:430
#9  0x0000000000781c90 in my_ok (thd=0x327ddd0, affected_rows=1, id=0, message=0x7fdc068c5da0 "Records: 1  Duplicates: 0  Warnings: 1")
    at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_class.h:4194
#10 0x000000000086c262 in mysql_alter_table (thd=0x327ddd0, new_db=0x7fdbdc005618 "test", new_name=0x0, create_info=0x7fdc068c7c10, table_list=0x7fdbdc0050b8, alter_info=0x7fdc068c7cf0,
    order_num=1, order=0x7fdbdc005730, ignore=false) at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_table.cc:8775
#11 0x00000000009be061 in Sql_cmd_alter_table::execute (this=0x7fdbdc005778, thd=0x327ddd0) at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_alter.cc:313
#12 0x0000000000801a7e in mysql_execute_command (thd=0x327ddd0) at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_parse.cc:4981
#13 0x0000000000802436 in mysql_parse (thd=0x327ddd0, rawbuf=0x7fdbdc004fd0 "ALTER TABLE t1 ORDER BY c1", length=26, parser_state=0x7fdc068c9700)
    at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_parse.cc:6391
#14 0x000000000080405a in dispatch_command (command=COM_QUERY, thd=0x327ddd0, packet=0x33ad4f1 "ALTER TABLE t1 ORDER BY c1", packet_length=26)
    at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_parse.cc:1340
#15 0x00000000008058e4 in do_command (thd=0x327ddd0) at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_parse.cc:1037
#16 0x00000000007bb319 in do_handle_one_connection (thd_arg=0x327ddd0) at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_connect.cc:982
#17 0x00000000007bb3df in handle_one_connection (arg=0x327ddd0) at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/sql/sql_connect.cc:898
#18 0x0000000000dae1ac in pfs_spawn_thread (arg=0x32a1210) at /export/home/pb2/build/sb_0-14841518-1427512220.63/mysqlcom-pro-5.6.25/storage/perfschema/pfs.cc:1860
#19 0x00007fdc3100ddf3 in start_thread () from /lib64/libpthread.so.0
#20 0x00007fdc2fcd947d in clone () from /lib64/libc.so.6
[28 Mar 2015 9:46] Roy Lyseng
The failing statement is a DDL statement and not a DML statement. Changing category.
[30 Sep 2015 15:11] Paul DuBois
Noted in 5.7.6 changelog.

For debug builds, a missing error check permitted certain ALTER TABLE
statements that should fail to continue processing.
[30 Sep 2015 22:15] Roel Van de Paar
Thanks. So the bug is fixed? It's not clear as the status is still Verified.
[16 Nov 2015 23:08] Roel Van de Paar
Bug is still seen in 5.7.9
[17 Nov 2015 22:59] Roel Van de Paar
Correction of last comment, it's bug #79303 instead