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

Assertion `i >= 0' failed on setting default_tmp_storage_engine to 'DEFAULT' in 10.7

    XMLWordPrintable

Details

    Description

      SET GLOBAL default_tmp_storage_engine='DEFAULT';
      

      Leads to:

      10.7.0 71ed8c136fa203b9b3a678a6d5cc72235ef73ef7 (Debug)

      mysqld: /test/10.7_dbg/sql/sql_plugin.cc:1385: void intern_plugin_unlock(LEX*, plugin_ref): Assertion `i >= 0' failed.
      

      10.7.0 71ed8c136fa203b9b3a678a6d5cc72235ef73ef7 (Debug)

      Core was generated by `/test/MD200721-mariadb-10.7.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 0x14eb3c63b700 (LWP 263804))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014eb3da9f859 in __GI_abort () at abort.c:79
      #2  0x000014eb3da9f729 in __assert_fail_base (fmt=0x14eb3dc35588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x559e49106b96 "i >= 0", file=0x559e49107380 "/test/10.7_dbg/sql/sql_plugin.cc", line=1385, function=<optimized out>) at assert.c:92
      #3  0x000014eb3dab0f36 in __GI___assert_fail (assertion=assertion@entry=0x559e49106b96 "i >= 0", file=file@entry=0x559e49107380 "/test/10.7_dbg/sql/sql_plugin.cc", line=line@entry=1385, function=function@entry=0x559e49107568 "void intern_plugin_unlock(LEX*, plugin_ref)") at assert.c:101
      #4  0x0000559e484a1417 in intern_plugin_unlock (lex=lex@entry=0x14eae4005068, plugin=plugin@entry=0x14eae4013a18) at /test/10.7_dbg/sql/sql_plugin.cc:1385
      #5  0x0000559e484a551e in plugin_unlock (thd=thd@entry=0x14eae4000db8, plugin=plugin@entry=0x14eae4013a18) at /test/10.7_dbg/sql/sql_plugin.cc:1413
      #6  0x0000559e48614faa in check_engine_supports_temporary (self=<optimized out>, thd=0x14eae4000db8, var=<optimized out>) at /test/10.7_dbg/sql/sys_vars.cc:763
      #7  0x0000559e48384c60 in sys_var::check (this=0x559e49a6cae0 <Sys_default_tmp_storage_engine>, thd=thd@entry=0x14eae4000db8, var=var@entry=0x14eae4013f58) at /test/10.7_dbg/sql/set_var.cc:246
      #8  0x0000559e48385c94 in set_var::check (this=0x14eae4013f58, thd=0x14eae4000db8) at /test/10.7_dbg/sql/set_var.cc:810
      #9  0x0000559e483863a4 in sql_set_variables (thd=thd@entry=0x14eae4000db8, var_list=var_list@entry=0x14eae4006038, free=free@entry=true) at /test/10.7_dbg/sql/set_var.cc:738
      #10 0x0000559e4848a821 in mysql_execute_command (thd=thd@entry=0x14eae4000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:5037
      #11 0x0000559e48473ead in mysql_parse (thd=thd@entry=0x14eae4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14eb3c63a400) at /test/10.7_dbg/sql/sql_parse.cc:8026
      #12 0x0000559e484829f8 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14eae4000db8, packet=packet@entry=0x14eae400b749 "SET GLOBAL default_tmp_storage_engine='DEFAULT'", packet_length=packet_length@entry=47, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1340
      #13 0x0000559e48485e05 in do_command (thd=0x14eae4000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1404
      #14 0x0000559e485fbf48 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559e4c7d3a98, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1410
      #15 0x0000559e485fc54d in handle_one_connection (arg=arg@entry=0x559e4c7d3a98) at /test/10.7_dbg/sql/sql_connect.cc:1312
      #16 0x0000559e48a645b2 in pfs_spawn_thread (arg=0x559e4c6fca48) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
      #17 0x000014eb3dfae609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #18 0x000014eb3db9c293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.6.4 (and 10.6.3 @ 891a927e804c5a3a582f6137c2f316ef7abb25ca as well) do not fail:

      10.6.4 42b9daaea7ece6155558f7c3bf638e8e175a7ff7 (Debug)

      10.6.4-dbg>SET GLOBAL default_tmp_storage_engine='DEFAULT';
      Query OK, 0 rows affected (0.000 sec)
       
      10.6.4-dbg>SELECT @@GLOBAL.default_tmp_storage_engine;
      +-------------------------------------+
      | @@GLOBAL.default_tmp_storage_engine |
      +-------------------------------------+
      | InnoDB                              |
      +-------------------------------------+
      1 row in set (0.000 sec)
      

      Setting it directly to InnoDB does not fail:

      10.7.0 71ed8c136fa203b9b3a678a6d5cc72235ef73ef7 (Debug)

      10.7.0-dbg>SET GLOBAL default_tmp_storage_engine='InnoDB';
      Query OK, 0 rows affected (0.000 sec)
      

      10.7 Optimized build does not fail:

      10.7.0 71ed8c136fa203b9b3a678a6d5cc72235ef73ef7 (Optimized)

      10.7.0-opt>SET GLOBAL default_tmp_storage_engine='DEFAULT';
      Query OK, 0 rows affected (0.000 sec)
      

      Confirmed that InnoDB is correctly listed as DEFAULT in 10.7:

      10.7.0 71ed8c136fa203b9b3a678a6d5cc72235ef73ef7 (Debug)

      10.7.0-dbg>show engines;
      +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+
      | Engine             | Support | Comment                                                                                         | Transactions | XA   | Savepoints |
      +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+
      | CSV                | YES     | Stores tables as CSV files                                                                      | NO           | NO   | NO         |
      | MRG_MyISAM         | YES     | Collection of identical MyISAM tables                                                           | NO           | NO   | NO         |
      | MEMORY             | YES     | Hash based, stored in memory, useful for temporary tables                                       | NO           | NO   | NO         |
      | Aria               | YES     | Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables | NO           | NO   | NO         |
      | MyISAM             | YES     | Non-transactional engine with good performance and small data footprint                         | NO           | NO   | NO         |
      | SEQUENCE           | YES     | Generated tables filled with sequential values                                                  | YES          | NO   | YES        |
      | InnoDB             | DEFAULT | Supports transactions, row-level locking, foreign keys and encryption for tables                | YES          | YES  | YES        |
      | PERFORMANCE_SCHEMA | YES     | Performance Schema                                                                              | NO           | NO   | NO         |
      +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+
      8 rows in set (0.001 sec)
      

      Bug confirmed present in:
      MariaDB: 10.7.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.39 (dbg), 10.2.39 (opt), 10.3.30 (dbg), 10.3.30 (opt), 10.4.20 (dbg), 10.4.20 (opt), 10.5.11 (dbg), 10.5.11 (opt), 10.6.4 (dbg), 10.6.4 (opt), 10.7.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt)

      Attachments

        Issue Links

          Activity

            People

              cvicentiu Vicențiu Ciorbaru
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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