Crash in ha_partition::create_handlers on ALTER TABLE after DROP PARTITION and ANALYZE PARTITION

Bug #916872 reported by Elena Stepanova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
New
Undecided
Sergei Golubchik

Bug Description

#3 0x081ba181 in handle_segfault (sig=11) at /home/elenst/maria-5.5/sql/mysqld.cc:2921
#4 <signal handler called>
#5 0x0885eeaf in ha_partition::create_handlers (this=0xa1ae838, mem_root=0x826695b8)
    at /home/elenst/maria-5.5/sql/ha_partition.cc:2384
#6 0x0885f947 in ha_partition::setup_engine_array (this=0xa1ae838, mem_root=0x826695b8)
    at /home/elenst/maria-5.5/sql/ha_partition.cc:2608
#7 0x0885fa93 in ha_partition::get_from_handler_file (this=0xa1ae838, name=0x82669857 "./test/#sql-1f3b_2",
    mem_root=0x826695b8, is_clone=false) at /home/elenst/maria-5.5/sql/ha_partition.cc:2649
#8 0x0885ade7 in ha_partition::initialize_partition (this=0xa1ae838, mem_root=0x826695b8)
    at /home/elenst/maria-5.5/sql/ha_partition.cc:403
#9 0x0885a5cf in partition_create_handler (hton=0xa085e48, share=0x82669580, mem_root=0x826695b8)
    at /home/elenst/maria-5.5/sql/ha_partition.cc:116
#10 0x083dfc8a in get_new_handler (share=0x82669580, alloc=0x826695b8, db_type=0xa085e48)
    at /home/elenst/maria-5.5/sql/handler.cc:255
#11 0x08308066 in open_binary_frm (thd=0xa0ab428, share=0x82669580, head=0x82668dd4 "\376\001\t\024\003", file=59)
    at /home/elenst/maria-5.5/sql/table.cc:1251
#12 0x08306773 in open_table_def (thd=0xa0ab428, share=0x82669580, db_flags=0) at /home/elenst/maria-5.5/sql/table.cc:713
#13 0x082e3981 in check_if_created_table_can_be_opened (thd=0xa0ab428, path=0x82669857 "./test/#sql-1f3b_2",
    db=0xa156898 "test", table_name=0x8266b0f0 "#sql-1f3b_2", create_info=0x8266b708, file=0xa157078)
    at /home/elenst/maria-5.5/sql/sql_table.cc:3909
#14 0x082e4b08 in mysql_create_table_no_lock (thd=0xa0ab428, db=0xa156898 "test", table_name=0x8266b0f0 "#sql-1f3b_2",
    create_info=0x8266b708, alter_info=0x8266b7a0, internal_tmp_table=true, select_field_count=0, is_trans=0x0)
    at /home/elenst/maria-5.5/sql/sql_table.cc:4430
#15 0x082e95ab in mysql_alter_table (thd=0xa0ab428, new_db=0xa156898 "test", new_name=0xa156470 "t", create_info=0x8266b708,
    table_list=0xa156498, alter_info=0x8266b7a0, order_num=0, order=0x0, ignore=false, require_online=false)
    at /home/elenst/maria-5.5/sql/sql_table.cc:6574
#16 0x08536363 in Alter_table_statement::execute (this=0xa1568c0, thd=0xa0ab428)
    at /home/elenst/maria-5.5/sql/sql_alter.cc:106
#17 0x0825fcc8 in mysql_execute_command (thd=0xa0ab428) at /home/elenst/maria-5.5/sql/sql_parse.cc:4422
#18 0x08262b02 in mysql_parse (thd=0xa0ab428, rawbuf=0xa1563e8 "ALTER TABLE t COMMENT 'altered'", length=31,
    parser_state=0x8266bdb8) at /home/elenst/maria-5.5/sql/sql_parse.cc:5698
#19 0x08256fb5 in dispatch_command (command=COM_QUERY, thd=0xa0ab428, packet=0xa149f39 "ALTER TABLE t COMMENT 'altered'",
    packet_length=31) at /home/elenst/maria-5.5/sql/sql_parse.cc:1049
#20 0x0825647a in do_command (thd=0xa0ab428) at /home/elenst/maria-5.5/sql/sql_parse.cc:788
#21 0x0833dd18 in do_handle_one_connection (thd_arg=0xa0ab428) at /home/elenst/maria-5.5/sql/sql_connect.cc:1225
#22 0x0833d866 in handle_one_connection (arg=0xa0ab428) at /home/elenst/maria-5.5/sql/sql_connect.cc:1140
#23 0x0855b199 in pfs_spawn_thread (arg=0xa1a6d70) at /home/elenst/maria-5.5/storage/perfschema/pfs.cc:1015
#24 0xb770fb25 in start_thread () from /lib/libpthread.so.0
#25 0xb74df34e in clone () from /lib/libc.so.6

bzr version-info
revision-id: <email address hidden>
date: 2012-01-11 13:35:27 +0100
build-date: 2012-01-15 22:16:18 +0400
revno: 3214
branch-nick: maria-5.5

Also reproducible on MySQL 5.5.20 and filed as http://bugs.mysql.com/bug.php?id=64037.
Not reproducible on Maria 5.3, MySQL 5.1.60 , MySQL 5.6.4.

# Test case:

CREATE TABLE IF NOT EXISTS t ( a INT )
  PARTITION BY RANGE ( a ) (
      PARTITION p0 VALUES LESS THAN ( 0 ),
      PARTITION p1 VALUES LESS THAN MAXVALUE ) ;

ALTER TABLE t DROP PARTITION p1;
ALTER TABLE t ANALYZE PARTITION p0, p1;

ALTER TABLE t COMMENT 'altered';

Revision history for this message
Elena Stepanova (elenst) wrote :

Also filed as JIRA issue MDEV-110

Elena Stepanova (elenst)
Changed in maria:
assignee: nobody → Sergei (sergii)
Elena Stepanova (elenst)
tags: added: crash partitions upstream
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.