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

Assertion `inited == NONE' failed in handler::ha_reset from mark_used_tables_as_free_for_reuse on UPDATE of Spider table

    XMLWordPrintable

    Details

      Description

      INSTALL PLUGIN Spider SONAME 'ha_spider.so';
      CREATE USER Spider@localhost IDENTIFIED BY 'PWD1';
      CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock',DATABASE 'test',user 'Spider',PASSWORD 'PWD1');
      CREATE TABLE t (c INT);
      CREATE TABLE ts (c INT KEY,c2 INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"' PARTITION BY RANGE (c) (PARTITION p VALUES LESS THAN (1),PARTITION p2 VALUES LESS THAN (300),PARTITION p3 VALUES LESS THAN (400));
      CREATE TRIGGER t_bi BEFORE INSERT ON ts FOR EACH ROW SET @a=1;
      UPDATE ts SET c2=1;
      

      Leads to:

      10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug)

      mysqld: /test/10.11_dbg/sql/handler.cc:7139: int handler::ha_reset(): Assertion `inited == NONE' failed.
      

      10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug)

      Core was generated by `/test/MD190922-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 0x15095bb31700 (LWP 3448917))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000015098cab7859 in __GI_abort () at abort.c:79
      #2  0x000015098cab7729 in __assert_fail_base (fmt=0x15098cc4d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x56466ae9c1f8 "inited == NONE", file=0x56466afd6a38 "/test/10.11_dbg/sql/handler.cc", line=7139, function=<optimized out>) at assert.c:92
      #3  0x000015098cac8fd6 in __GI___assert_fail (assertion=assertion@entry=0x56466ae9c1f8 "inited == NONE", file=file@entry=0x56466afd6a38 "/test/10.11_dbg/sql/handler.cc", line=line@entry=7139, function=function@entry=0x56466afd6788 "int handler::ha_reset()") at assert.c:101
      #4  0x000056466a54a0a5 in handler::ha_reset (this=0x15092409c2f0) at /test/10.11_dbg/sql/handler.cc:7139
      #5  0x000056466a7ec858 in ha_partition::reset (this=0x1509240e3aa0) at /test/10.11_dbg/include/my_bitmap.h:106
      #6  0x000056466a549f44 in handler::ha_reset (this=0x1509240e3aa0) at /test/10.11_dbg/sql/handler.cc:7161
      #7  0x000056466a1c126c in mark_used_tables_as_free_for_reuse (table=0x15092406d3c8, thd=0x150924000d48) at /test/10.11_dbg/sql/sql_base.cc:695
      #8  close_thread_tables (thd=thd@entry=0x150924000d48) at /test/10.11_dbg/sql/sql_base.cc:911
      #9  0x000056466a1c1392 in close_thread_tables_for_query (thd=thd@entry=0x150924000d48) at /test/10.11_dbg/sql/sql_base.cc:790
      #10 0x000056466a25a3f8 in mysql_execute_command (thd=thd@entry=0x150924000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.11_dbg/sql/sql_parse.cc:6063
      #11 0x000056466a24203c in mysql_parse (thd=thd@entry=0x150924000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15095bb30330) at /test/10.11_dbg/sql/sql_parse.cc:8037
      #12 0x000056466a24f66d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150924000d48, packet=packet@entry=0x15092400aed9 "UPDATE ts SET c2=1", packet_length=packet_length@entry=18, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_class.h:1345
      #13 0x000056466a251d97 in do_command (thd=0x150924000d48, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1407
      #14 0x000056466a3b5fb9 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x56466c82f628, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1416
      #15 0x000056466a3b64c3 in handle_one_connection (arg=0x56466c82f628) at /test/10.11_dbg/sql/sql_connect.cc:1318
      #16 0x000015098cfc8609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x000015098cbb4133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

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

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.27 (opt), 10.5.18 (opt), 10.6.10 (opt), 10.7.6 (opt), 10.8.5 (opt), 10.9.3 (opt), 10.10.0 (opt), 10.10.2 (opt), 10.11.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.38 (dbg), 5.7.38 (opt), 8.0.29 (dbg), 8.0.29 (opt)

        Attachments

          Activity

            People

            Assignee:
            nayuta-yanagisawa Nayuta Yanagisawa
            Reporter:
            Roel Roel Van de Paar
            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.