Bug #54109 assert in mysql_admin_table
Submitted: 31 May 2010 15:41 Modified: 15 Dec 2010 9:59
Reporter: Matthias Leich Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.6.99-m4-debug OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[31 May 2010 15:41] Matthias Leich
Description:
The assert happens in sql/sql_table.cc line 5069:
      /* Start a new row for the final status row */
      protocol->prepare_for_resend();
      protocol->store(table_name, system_charset_info);
      protocol->store(operator_name, system_charset_info);
      if (result_code) // either mysql_recreate_table or analyze failed
      {
        DBUG_ASSERT(thd->is_error()); <---------
        if (thd->is_error())
        {
          const char *err_msg= thd->stmt_da->message();
          if (!thd->vio_ok())

RQG test with
- 64 threads
- derivate of the WL5005_* grammars

Result on 5.6.99-m4-debug
mysql-next-mr revno: 3153 2010-05-31
------------------------------------
Thread 1 (process 2227):
#0  0x00007ff47c95cce6 in pthread_kill () from /lib64/libpthread.so.0
#1  0x00000000009fb6a1 in my_write_core (sig=6)
                       at .../mysys/stacktrace.c:326
#2  0x000000000053cbf6 in handle_segfault (sig=6)
                       at .../sql/mysqld.cc:2787
#3  <signal handler called>
#4  0x00007ff47bb745c5 in raise () from /lib64/libc.so.6
#5  0x00007ff47bb75bb3 in abort () from /lib64/libc.so.6
#6  0x00007ff47bb6d1e9 in __assert_fail () from /lib64/libc.so.6
#7  0x0000000000652736 in mysql_admin_table (thd=0x7ff46c109e18, tables=0x1f823f0, check_opt=0x7ff46c10c408, operator_name=0xac3285 "optimize", lock_type=TL_WRITE, open_for_modify=false, no_warnings_for_error=false,
    extra_open_options=0, prepare_func=0, operator_func=0x72c7ec <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0)
                       at .../sql/sql_table.cc:5069
#8  0x00000000006530dd in mysql_optimize_table (thd=0x7ff46c109e18, tables=0x1f823f0, check_opt=0x7ff46c10c408)
                       at .../sql/sql_table.cc:5206
#9  0x00000000005ce27a in mysql_execute_command (thd=0x7ff46c109e18)
                       at .../sql/sql_parse.cc:3050
#10 0x00000000005d385e in mysql_parse (thd=0x7ff46c109e18, inBuf=0x1f822b8 "OPTIMIZE NO_WRITE_TO_BINLOG TABLE testdb_S . t1_base1_S", length=55, parser_state=0x472869b0)
                       at .../sql/sql_parse.cc:5816
#11 0x00000000005d445d in dispatch_command (command=COM_QUERY, thd=0x7ff46c109e18, packet=0x7ff46c014f89 "", packet_length=56)
                       at .../sql/sql_parse.cc:1085
#12 0x00000000005d5985 in do_command (thd=0x7ff46c109e18)
                       at .../sql/sql_parse.cc:771
#13 0x00000000006a0df0 in do_handle_one_connection (thd_arg=0x7ff46c109e18)
                       at .../sql/sql_connect.cc:1195
#14 0x00000000006a0eb5 in handle_one_connection (arg=0x7ff46c109e18)
                       at .../sql/sql_connect.cc:1134
#15 0x00007ff47c958040 in start_thread () from /lib64/libpthread.so.0
#16 0x00007ff47bc1508d in clone () from /lib64/libc.so.6
#17 0x0000000000000000 in ?? ()
Waiting for mysqld with pid 1914 to terminate...

How to repeat:
I will try to come up with simplified grammars soon.
[15 Dec 2010 9:59] Jon Olav Hauglid
Closing this bug as a duplicate of Bug#58933.
(This bug report is older, but Bug#58933 contains more useful info.)