Assertion `thd->stmt_arena != thd->progress.arena' failed in thd_progress_init on OPTIMIZE two tables when replaced by recreate

Bug #976225 reported by Elena Stepanova on 2012-04-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
High
Sergei Golubchik

Bug Description

mysqld: sql/sql_class.cc:3780: void thd_progress_init(THD*, uint): Assertion `thd->stmt_arena != thd->progress.arena' failed.

#8 0xb7459014 in __assert_fail () from /lib/libc.so.6
#9 0x0820a75c in thd_progress_init (thd=0x9cd1040, max_stage=2)
    at sql/sql_class.cc:3780
#10 0x082ccd7d in copy_data_between_tables (thd=0x9cd1040, from=0x9d8f4d8, to=0x9da0ee8,
    create=..., ignore=false, order_num=0, order=0x0, copied=0xa6321ed0,
    deleted=0xa6321ec8, keys_onoff=LEAVE_AS_IS, error_if_not_empty=false)
    at sql/sql_table.cc:7180
#11 0x082cb74c in mysql_alter_table (thd=0x9cd1040, new_db=0x9d81628 "test",
    new_name=0x9d81200 "t2", create_info=0xa6321fe0, table_list=0x9d81228,
    alter_info=0xa6322078, order_num=0, order=0x0, ignore=false, require_online=false)
    at sql/sql_table.cc:6660
#12 0x082cdb56 in mysql_recreate_table (thd=0x9cd1040, table_list=0x9d81228)
    at sql/sql_table.cc:7423
#13 0x0832d743 in admin_recreate_table (thd=0x9cd1040, table_list=0x9d81228)
    at sql/sql_admin.cc:45
#14 0x0832f5e9 in mysql_admin_table (thd=0x9cd1040, tables=0x9d80df8,
    check_opt=0x9cd2e64, operator_name=0x890b482 "optimize", lock_type=TL_WRITE,
    open_for_modify=false, repair_table_use_frm=false, extra_open_options=0,
    prepare_func=0, operator_func=
    (int (handler::*)(handler *, THD *, HA_CHECK_OPT *)) 0x83d0682 <handler::ha_optimize(THD*, HA_CHECK_OPT*)>, view_operator_func=0) at sql/sql_admin.cc:745
#15 0x08330463 in Optimize_table_statement::execute (this=0x9d81630, thd=0x9cd1040)
    at sql/sql_admin.cc:1043
#16 0x0823fc19 in mysql_execute_command (thd=0x9cd1040)
    at sql/sql_parse.cc:4454
#17 0x08242a67 in mysql_parse (thd=0x9cd1040, rawbuf=0x9d80d58 "OPTIMIZE TABLE t1, t2",
    length=21, parser_state=0xa6322db8) at sql/sql_parse.cc:5731
#18 0x08236edc in dispatch_command (command=COM_QUERY, thd=0x9cd1040,
    packet=0x9d7b0c1 "", packet_length=21) at sql/sql_parse.cc:1055
#19 0x082363a1 in do_command (thd=0x9cd1040)
    at sql/sql_parse.cc:794
#20 0x08320b75 in do_handle_one_connection (thd_arg=0x9cd1040)
    at sql/sql_connect.cc:1253
#21 0x083206c0 in handle_one_connection (arg=0x9cd1040)
    at sql/sql_connect.cc:1168
#22 0x08548c7b in pfs_spawn_thread (arg=0x9dbc3c8)
    at storage/perfschema/pfs.cc:1015
#23 0xb7738b25 in start_thread () from /lib/libpthread.so.0

bzr version-info
revision-id: <email address hidden>
date: 2012-04-05 15:57:27 +0200
build-date: 2012-04-08 00:52:33 +0400
revno: 3364

Notes:
Reproducible with XtraDB, InnoDB plugin, PBXT.
Not reproducible on MariaDB 5.3 (revno 3499), MySQL 5.5, MySQL trunk (revno 3827).

Test case:

--source include/have_xtradb.inc

CREATE TABLE t1 ( a INT ) ENGINE=InnoDB;
CREATE TABLE t2 ( b INT ) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2);
INSERT INTO t2 VALUES (3),(4);
OPTIMIZE TABLE t1, t2;

# End of test case

Elena Stepanova (elenst) wrote :

Set to 'High' rather than 'Critical' because it's a debug assertion, no visible negative effects on a release build. Please adjust if needed.

Also filed in JIRA as https://mariadb.atlassian.net/browse/MDEV-217.

summary: - Assertion `thd->stmt_arena != thd->progress.arena' failed in
- thd_progress_init on OPTIMIZE <two tables> when replaced by recreate
+ Assertion `thd->stmt_arena != thd->progress.arena' failed in
+ thd_progress_init on OPTIMIZE two tables when replaced by recreate
Elena Stepanova (elenst) wrote :

Fix released with 5.5.24

Changed in maria:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers