Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9471

Server crashes or returns an error while trying to alter partitioning on a table moved from Windows to Linux

    Details

      Description

      • take the attached archive from MDEV-9233 ;
      • start server on Linux with --lower-case-table-names=1;
      • try to run

        alter table t1 partition by range (to_days(creation_time)) 
        (partition FirstPart VALUES LESS THAN (1), partition LastPart VALUES LESS THAN MAXVALUE);

      Results on different versions differ.

      5.5 (as of commit 9c9d10b441fe79b111509949ca40afe1a6284c0f) survives, but throws an error:

      MariaDB [test]> alter table t1 partition by range (to_days(creation_time)) (partition FirstPart VALUES LESS THAN (1), partition LastPart VALUES LESS THAN MAXVALUE);
      ERROR 1025 (HY000): Error on rename of './test/t1' to './test/#sql2-7743-2' (errno: 155)

      10.0 (as of commit 74b1af19e9270a932f9e5f907eff53852984a7d3) and 10.1 go down with an assertion failure:

      2016-01-26 20:50:13 7f06e2fc2700  InnoDB: Assertion failure in thread 139667554707200 in file lock0lock.cc line 4843
      InnoDB: Failing assertion: trx->dict_operation != TRX_DICT_OP_NONE

      #5  0x00007f06e0f36538 in abort () from /lib64/libc.so.6
      #6  0x0000000000a5c676 in lock_release (trx=0x7f06b72b2f78) at /src/10.0/storage/xtradb/lock/lock0lock.cc:4843
      #7  0x0000000000a61dd3 in lock_trx_release_locks (trx=0x7f06b72b2f78) at /src/10.0/storage/xtradb/lock/lock0lock.cc:7145
      #8  0x0000000000b7d2d2 in trx_commit_in_memory (trx=0x7f06b72b2f78, lsn=1639251) at /src/10.0/storage/xtradb/trx/trx0trx.cc:1406
      #9  0x0000000000b7dd85 in trx_commit_low (trx=0x7f06b72b2f78, mtr=0x7f06e2fbc1d0) at /src/10.0/storage/xtradb/trx/trx0trx.cc:1621
      #10 0x0000000000b7ddf6 in trx_commit (trx=0x7f06b72b2f78) at /src/10.0/storage/xtradb/trx/trx0trx.cc:1642
      #11 0x0000000000b7e75f in trx_commit_for_mysql (trx=0x7f06b72b2f78) at /src/10.0/storage/xtradb/trx/trx0trx.cc:1902
      #12 0x0000000000b04003 in row_rename_table_for_mysql (old_name=0x7f06e2fbce80 "test/t1#p#lastpart", new_name=0x7f06e2fbca80 "test/#sql2-77c0-e#P#LastPart", trx=0x7f06b72b2f78, commit=true) at /src/10.0/storage/xtradb/row/row0mysql.cc:5232
      #13 0x0000000000a0c959 in innobase_rename_table (trx=0x7f06b72b2f78, from=0x7f06e2fbd8b0 "./test/t1#P#LastPart", to=0x7f06e2fbdab0 "./test/#sql2-77c0-e#P#LastPart") at /src/10.0/storage/xtradb/handler/ha_innodb.cc:11417
      #14 0x0000000000a0cb00 in ha_innobase::rename_table (this=0x7f06c8430088, from=0x7f06e2fbd8b0 "./test/t1#P#LastPart", to=0x7f06e2fbdab0 "./test/#sql2-77c0-e#P#LastPart") at /src/10.0/storage/xtradb/handler/ha_innodb.cc:11495
      #15 0x0000000000864097 in handler::ha_rename_table (this=0x7f06c8430088, from=0x7f06e2fbd8b0 "./test/t1#P#LastPart", to=0x7f06e2fbdab0 "./test/#sql2-77c0-e#P#LastPart") at /src/10.0/sql/handler.cc:4280
      #16 0x0000000000e05028 in ha_partition::del_ren_table (this=0x7f06c842edc0, from=0x7f06e2fbe370 "./test/t1", to=0x7f06e2fbe580 "./test/#sql2-77c0-e") at /src/10.0/sql/ha_partition.cc:2318
      #17 0x0000000000e01243 in ha_partition::rename_table (this=0x7f06c842edc0, from=0x7f06e2fbe370 "./test/t1", to=0x7f06e2fbe580 "./test/#sql2-77c0-e") at /src/10.0/sql/ha_partition.cc:587
      #18 0x0000000000864097 in handler::ha_rename_table (this=0x7f06c842edc0, from=0x7f06e2fbe370 "./test/t1", to=0x7f06e2fbe580 "./test/#sql2-77c0-e") at /src/10.0/sql/handler.cc:4280
      #19 0x000000000071ae4a in mysql_rename_table (base=0x7f06cf5ec870, old_db=0x7f06c842b840 "test", old_name=0x7f06c842b228 "t1", new_db=0x7f06c842b840 "test", new_name=0x7f06e2fbf240 "#sql2-77c0-e", flags=2) at /src/10.0/sql/sql_table.cc:5197
      #20 0x0000000000723f0f in mysql_alter_table (thd=0x7f06b9df9e70, new_db=0x7f06c842b840 "test", new_name=0x0, create_info=0x7f06e2fc04c0, table_list=0x7f06c842b260, alter_info=0x7f06e2fc0430, order_num=0, order=0x0, ignore=false) at /src/10.0/sql/sql_table.cc:9041
      #21 0x000000000078bb1b in Sql_cmd_alter_table::execute (this=0x7f06c842bf78, thd=0x7f06b9df9e70) at /src/10.0/sql/sql_alter.cc:312
      #22 0x0000000000673eb8 in mysql_execute_command (thd=0x7f06b9df9e70) at /src/10.0/sql/sql_parse.cc:5125
      #23 0x00000000006771f3 in mysql_parse (thd=0x7f06b9df9e70, rawbuf=0x7f06c842b088 "alter table t1 partition by range (to_days(creation_time)) (partition FirstPart VALUES LESS THAN (1), partition LastPart VALUES LESS THAN MAXVALUE)", length=147, parser_state=0x7f06e2fc16a0) at /src/10.0/sql/sql_parse.cc:6565
      #24 0x0000000000669cbf in dispatch_command (command=COM_QUERY, thd=0x7f06b9df9e70, packet=0x7f06b9d84db1 "", packet_length=147) at /src/10.0/sql/sql_parse.cc:1308
      #25 0x0000000000668f8c in do_command (thd=0x7f06b9df9e70) at /src/10.0/sql/sql_parse.cc:998
      #26 0x00000000007872c5 in do_handle_one_connection (thd_arg=0x7f06b9df9e70) at /src/10.0/sql/sql_connect.cc:1377
      #27 0x0000000000787037 in handle_one_connection (arg=0x7f06b9df9e70) at /src/10.0/sql/sql_connect.cc:1292
      #28 0x00007f06e2c510a4 in start_thread () from /lib64/libpthread.so.0
      #29 0x00007f06e0fe504d in clone () from /lib64/libc.so.6

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jplindst Jan Lindström
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: