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

Assertion `file->trn == trn' failed in ha_maria::start_stmt

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t1 (i INT) ENGINE=Aria;
      INSERT INTO t1 VALUES (1),(2);
       
      CREATE TABLE t2 (c CHAR(1)) ENGINE=Aria;
      INSERT INTO t2 VALUES ('a'),('b');
       
      --connect (con1,localhost,root,,test)
      LOCK TABLE t1 WRITE;
      OPTIMIZE TABLE t1;
       
      --connection default
      DELETE FROM t2 WHERE c < 1;
       
      --connection con1
      OPTIMIZE TABLE t1;
       
      # Cleanup
      --disconnect con1
      --connection default
      DROP TABLE t1, t2;
      

      5.5 20089f5a39fa8f6f08113f12ed87c34e844c4fc6

      mysqld: /data/src/5.5/storage/maria/ha_maria.cc:2771: virtual int ha_maria::start_stmt(THD*, thr_lock_type): Assertion `file->trn == trn' failed.
      171216  0:44:06 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fc0ece7eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000000000094d51d in ha_maria::start_stmt (this=0x7fc0e7878078, thd=0x7fc0e8a69060, lock_type=TL_WRITE) at /data/src/5.5/storage/maria/ha_maria.cc:2771
      #9  0x00000000005a70ba in check_lock_and_start_stmt (thd=0x7fc0e8a69060, prelocking_ctx=0x7fc0e8a6c2e0, table_list=0x7fc0e7424148) at /data/src/5.5/sql/sql_base.cc:5522
      #10 0x00000000005a7fc0 in lock_tables (thd=0x7fc0e8a69060, tables=0x7fc0e7424148, count=1, flags=0) at /data/src/5.5/sql/sql_base.cc:5993
      #11 0x00000000005a7751 in open_and_lock_tables (thd=0x7fc0e8a69060, tables=0x7fc0e7424148, derived=true, flags=0, prelocking_strategy=0x7fc0ee8a8610) at /data/src/5.5/sql/sql_base.cc:5741
      #12 0x000000000059abff in open_and_lock_tables (thd=0x7fc0e8a69060, tables=0x7fc0e7424148, derived=true, flags=0) at /data/src/5.5/sql/sql_base.h:525
      #13 0x000000000070cddb in mysql_admin_table(THD *, TABLE_LIST *, HA_CHECK_OPT *, const char *, thr_lock_type, bool, bool, uint, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *), struct {...}, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *)) (thd=0x7fc0e8a69060, tables=0x7fc0e7424148, check_opt=0x7fc0e8a6d190, operator_name=0xd3ebe2 "optimize", lock_type=TL_WRITE, open_for_modify=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x7b577c <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0) at /data/src/5.5/sql/sql_admin.cc:439
      #14 0x000000000070f166 in Optimize_table_statement::execute (this=0x7fc0e7424720, thd=0x7fc0e8a69060) at /data/src/5.5/sql/sql_admin.cc:1138
      #15 0x000000000060658a in mysql_execute_command (thd=0x7fc0e8a69060) at /data/src/5.5/sql/sql_parse.cc:4503
      #16 0x00000000006098ce in mysql_parse (thd=0x7fc0e8a69060, rawbuf=0x7fc0e7424078 "OPTIMIZE TABLE t1", length=17, parser_state=0x7fc0ee8a9640) at /data/src/5.5/sql/sql_parse.cc:5923
      #17 0x00000000005fd5e3 in dispatch_command (command=COM_QUERY, thd=0x7fc0e8a69060, packet=0x7fc0e8a6e061 "", packet_length=17) at /data/src/5.5/sql/sql_parse.cc:1066
      #18 0x00000000005fc7d5 in do_command (thd=0x7fc0e8a69060) at /data/src/5.5/sql/sql_parse.cc:793
      #19 0x00000000006ff7cf in do_handle_one_connection (thd_arg=0x7fc0e8a69060) at /data/src/5.5/sql/sql_connect.cc:1268
      #20 0x00000000006ff55c in handle_one_connection (arg=0x7fc0e8a69060) at /data/src/5.5/sql/sql_connect.cc:1184
      #21 0x0000000000a0d6d9 in pfs_spawn_thread (arg=0x7fc0e9793080) at /data/src/5.5/storage/perfschema/pfs.cc:1015
      #22 0x00007fc0ee525494 in start_thread (arg=0x7fc0ee8aa700) at pthread_create.c:333
      #23 0x00007fc0ecf3b93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              monty Michael Widenius
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: