Assertion `share->reopen == 1' failed at maria_extra on ADD PARTITION

Bug #990187 reported by Elena Stepanova on 2012-04-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
High
Michael Widenius

Bug Description

mysqld: storage/maria/ma_extra.c:288: maria_extra: Assertion `share->reopen == 1' failed.

#6 0x00007f544d7c0d4d in __GI___assert_fail (assertion=0xdf6f72 "share->reopen == 1", file=<optimized out>, line=288, function=<optimized out>) at assert.c:81
#7 0x0000000000997387 in maria_extra (info=0x34a0a90, function=HA_EXTRA_FORCE_REOPEN, extra_arg=0x0) at storage/maria/ma_extra.c:288
#8 0x0000000000952038 in ha_maria::extra (this=0x34cf618, operation=HA_EXTRA_FORCE_REOPEN) at storage/maria/ha_maria.cc:2510
#9 0x0000000000c7bf3a in ha_partition::loop_extra (this=0x34ceb28, operation=HA_EXTRA_FORCE_REOPEN) at sql/ha_partition.cc:6261
#10 0x0000000000c7b963 in ha_partition::extra (this=0x34ceb28, operation=HA_EXTRA_FORCE_REOPEN) at sql/ha_partition.cc:6025
#11 0x00000000005ad69f in wait_while_table_is_used (thd=0x3383fe0, table=0x34ce160, function=HA_EXTRA_FORCE_REOPEN) at sql/sql_base.cc:2341
#12 0x000000000091b73e in fast_alter_partition_table (thd=0x3383fe0, table=0x34ce160, alter_info=0x7f5442ea4660, create_info=0x7f5442ea4560, table_list=0x34867e8, db=0x3486db0 "test", table_name=0x34867b0 "t", fast_alter_table=0x3512590) at sql/sql_partition.cc:6823
#13 0x00000000006a9877 in mysql_alter_table (thd=0x3383fe0, new_db=0x3486db0 "test", new_name=0x34867b0 "t", create_info=0x7f5442ea4560, table_list=0x34867e8, alter_info=0x7f5442ea4660, order_num=0, order=0x0, ignore=false, require_online=false) at sql/sql_table.cc:6517
#14 0x000000000092ec66 in Alter_table_statement::execute (this=0x3486fd0, thd=0x3383fe0) at sql/sql_alter.cc:106
#15 0x00000000006119d9 in mysql_execute_command (thd=0x3383fe0) at sql/sql_parse.cc:4454
#16 0x0000000000614b7b in mysql_parse (thd=0x3383fe0, rawbuf=0x34866e8 "ALTER TABLE t ADD PARTITION PARTITIONS 2", length=40, parser_state=0x7f5442ea5500) at sql/sql_parse.cc:5731
#17 0x000000000060841f in dispatch_command (command=COM_QUERY, thd=0x3383fe0, packet=0x347eed1 "ALTER TABLE t ADD PARTITION PARTITIONS 2", packet_length=40) at sql/sql_parse.cc:1055
#18 0x00000000006076d6 in do_command (thd=0x3383fe0) at sql/sql_parse.cc:794
#19 0x0000000000707cef in do_handle_one_connection (thd_arg=0x3383fe0) at sql/sql_connect.cc:1253
#20 0x00000000007076da in handle_one_connection (arg=0x3383fe0) at sql/sql_connect.cc:1168
#21 0x0000000000bf6a1b in pfs_spawn_thread (arg=0x35077b0) at storage/perfschema/pfs.cc:1015
#22 0x00007f544e502efc in start_thread (arg=0x7f5442ea6700) at pthread_create.c:304

Query (0x34866e8): ALTER TABLE t ADD PARTITION PARTITIONS 2
Connection ID (thread ID): 2
Status: NOT_KILLED

bzr version-info
revision-id: <email address hidden>
date: 2012-04-21 02:57:28 +0200
build-date: 2012-04-28 03:31:08 +0400
revno: 3388

Not reproducible on MariaDB 5.1, 5.2, 5.3.

# Test case:

CREATE TABLE t ( i INT ) ENGINE=Aria
  PARTITION BY HASH(i) PARTITIONS 2;
ALTER TABLE t ADD PARTITION PARTITIONS 2;

# End of test case

Elena Stepanova (elenst) wrote :

Set to 'High' rather than 'Critical' because it's a debug assertion, no visible problems on a release build (buildbot, same revision).

Elena Stepanova (elenst) wrote :

Also filed in JIRA as MDEV-237

Michael Widenius (monty) wrote :

This was a bug in the partitioning code where ha_extra(table, HA_EXTRA_FORCE_REOPEN) was called on a table that was open multiple times. Fixed by not calling ha_extra() in this case.

Changed in maria:
status: New → Fix Committed
Elena Stepanova (elenst) wrote :

Fix released in 5.5.24

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

Other bug subscribers