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

Assertion `share->tdc->flushed' failed in void close_all_tables_for_name(THD*, TABLE_SHARE*, ha_extra_function, TABLE*)

    XMLWordPrintable

    Details

      Description

      SET sql_mode=ORACLE;
      CREATE TABLE t1 (a INT, b CHAR(8)) ENGINE=InnoDB;
      LOCK TABLE t1 WRITE WAIT 10;
      INSERT INTO t1 (a) VALUES (GEOMETRYcollection (POINT(10,9), LINESTRING (POINT(2305843009213693955,-1125899906842621), POINT(78,15)), multiPOINT(POINT(-1,3), POINT(4,-6))));
      ALTER TABLE t1 ENGINE=InnoDB PARTITION BY KEY(a) (PARTITION p0 ENGINE=InnoDB, PARTITION p1);
      INSERT INTO t1 VALUES (15, 'b');
      ALTER TABLE t1 CHANGE a a ENUM ('x','y','z','d','e');
      ALTER TABLE t1 ADD UNIQUE INDEX t1_unq_idx (a);
      ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY='/tmp/DATA' INDEX DIRECTORY='/tmp/idx');
      

      Leads to:

      10.11.0 12c236415930c789a422b313c3bd9b9b5fe494af (Debug)

      mysqld: /test/10.11_dbg/sql/sql_base.cc:737: void close_all_tables_for_name(THD*, TABLE_SHARE*, ha_extra_function, TABLE*): Assertion `share->tdc->flushed' failed.
      

      10.11.0 12c236415930c789a422b313c3bd9b9b5fe494af (Debug)

      Core was generated by `/test/MD050922-mariadb-10.11.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14a06d8c6700 (LWP 2336824))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014a086047859 in __GI_abort () at abort.c:79
      #2  0x000014a086047729 in __assert_fail_base (fmt=0x14a0861dd588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55b4673874fd "share->tdc->flushed", file=0x55b467384a98 "/test/10.11_dbg/sql/sql_base.cc", line=737, function=<optimized out>) at assert.c:92
      #3  0x000014a086058fd6 in __GI___assert_fail (assertion=assertion@entry=0x55b4673874fd "share->tdc->flushed", file=file@entry=0x55b467384a98 "/test/10.11_dbg/sql/sql_base.cc", line=line@entry=737, function=function@entry=0x55b467385678 "void close_all_tables_for_name(THD*, TABLE_SHARE*, ha_extra_function, TABLE*)") at assert.c:101
      #4  0x000055b46670d12c in close_all_tables_for_name (thd=thd@entry=0x14a034000d48, share=0x14a03407d690, extra=extra@entry=HA_EXTRA_NOT_USED, skip_table=skip_table@entry=0x0) at /test/10.11_dbg/sql/sql_base.cc:737
      #5  0x000055b4667a8a81 in handle_alter_part_error (lpt=lpt@entry=0x14a06d8c1060, action_completed=action_completed@entry=false, drop_partition=drop_partition@entry=false, frm_install=frm_install@entry=false, reopen=reopen@entry=true) at /test/10.11_dbg/sql/sql_partition.cc:7121
      #6  0x000055b4667b6f01 in fast_alter_partition_table (thd=thd@entry=0x14a034000d48, table=table@entry=0x14a034026918, alter_info=alter_info@entry=0x14a06d8c40f0, alter_ctx=alter_ctx@entry=0x14a06d8c33f0, create_info=create_info@entry=0x14a06d8c41e0, table_list=0x14a034013368) at /test/10.11_dbg/sql/sql_partition.cc:7821
      #7  0x000055b466880d7e in mysql_alter_table (thd=thd@entry=0x14a034000d48, new_db=new_db@entry=0x14a034005820, new_name=new_name@entry=0x14a034005c30, create_info=create_info@entry=0x14a06d8c41e0, table_list=<optimized out>, table_list@entry=0x14a034013368, alter_info=alter_info@entry=0x14a06d8c40f0, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /test/10.11_dbg/sql/sql_table.cc:10870
      #8  0x000055b466907bad in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14a034000d48) at /test/10.11_dbg/sql/structs.h:569
      #9  0x000055b4667a46e7 in mysql_execute_command (thd=thd@entry=0x14a034000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.11_dbg/sql/sql_parse.cc:5997
      #10 0x000055b46678cceb in mysql_parse (thd=thd@entry=0x14a034000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14a06d8c5330) at /test/10.11_dbg/sql/sql_parse.cc:8037
      #11 0x000055b46679a2b6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14a034000d48, packet=packet@entry=0x14a03400aed9 "ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY='/tmp/DATA' INDEX DIRECTORY='/tmp/idx')", packet_length=packet_length@entry=97, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_class.h:1339
      #12 0x000055b46679c9c5 in do_command (thd=0x14a034000d48, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1407
      #13 0x000055b466900756 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55b469a2e2b8, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1418
      #14 0x000055b466900c5f in handle_one_connection (arg=0x55b469a2e2b8) at /test/10.11_dbg/sql/sql_connect.cc:1312
      #15 0x000014a086558609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x000014a086144133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.18 (dbg), 10.6.10 (dbg), 10.7.6 (dbg), 10.8.5 (dbg), 10.9.2 (dbg), 10.10.2 (dbg), 10.11.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.44 (dbg), 10.3.37 (dbg), 10.4.27 (dbg), 10.9.2 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.39 (dbg), 5.7.39 (opt)

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.