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

Assertion `!keyread_enabled()' failed in int handler::ha_start_keyread(uint)

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL)
    • 11.2(EOL)
    • None

    Description

      CREATE TABLE t (f3 CHAR,f4 CHAR,KEY(f4)) ENGINE=MyISAM;
      CREATE TABLE t2 (i INT) ENGINE=MyISAM;
      SELECT * FROM t WHERE (2,0) NOT IN (SELECT MIN(f3)+f3,MIN(f4)+f3+MAX(f4) FROM t2);
      

      Leads to:

      11.3.0 8951f7d940166063db3fe64c35c40a5e5fabcf7d (Debug)

      mariadbd: /test/11.3_dbg/sql/handler.h:3532: int handler::ha_start_keyread(uint): Assertion `!keyread_enabled()' failed.
      

      11.3.0 8951f7d940166063db3fe64c35c40a5e5fabcf7d (Debug)

      Core was generated by `/test/MD240823-mariadb-11.3.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
      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 0x1479b01c9700 (LWP 2314357))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00001479dc987859 in __GI_abort () at abort.c:79
      #2  0x00001479dc987729 in __assert_fail_base (fmt=0x1479dcb1d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x559facefa05d "!keyread_enabled()", file=0x559facef941e "/test/11.3_dbg/sql/handler.h", line=3532, function=<optimized out>) at assert.c:92
      #3  0x00001479dc998fd6 in __GI___assert_fail (assertion=assertion@entry=0x559facefa05d "!keyread_enabled()", file=file@entry=0x559facef941e "/test/11.3_dbg/sql/handler.h", line=line@entry=3532, function=function@entry=0x559facefbc68 "int handler::ha_start_keyread(uint)") at assert.c:101
      #4  0x0000559fac243f72 in handler::ha_start_keyread (idx=0, this=0x1479880207b0) at /test/11.3_dbg/sql/handler.h:3532
      #5  find_key_for_maxmin (prefix_len=0x1479b01c6704, range_fl=0x1479b01c6700, cond=0x0, field=0x147988020538, ref=0x1479b01c6710, max_fl=false) at /test/11.3_dbg/sql/opt_sum.cc:999
      #6  opt_sum_query (thd=0x147988000d48, tables=@0x1479880144e8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14798806f918, last = 0x14798806f918, elements = 1}, <No data fields>}, all_fields=@0x14798806f6c8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x147988070dd0, last = 0x147988015380, elements = 7}, <No data fields>}, conds=0x0) at /test/11.3_dbg/sql/opt_sum.cc:395
      #7  0x0000559fac3c2208 in JOIN::optimize_inner (this=this@entry=0x14798806f318) at /test/11.3_dbg/sql/sql_select.cc:2526
      #8  0x0000559fac3c2927 in JOIN::optimize (this=this@entry=0x14798806f318) at /test/11.3_dbg/sql/sql_select.cc:1944
      #9  0x0000559fac301b59 in st_select_lex::optimize_unflattened_subqueries (this=0x147988013390, const_only=const_only@entry=false) at /test/11.3_dbg/sql/sql_lex.cc:4916
      #10 0x0000559fac4f8669 in JOIN::optimize_unflattened_subqueries (this=this@entry=0x14798806e6a0) at /test/11.3_dbg/sql/opt_subselect.cc:5864
      #11 0x0000559fac3be9f2 in JOIN::optimize_stage2 (this=this@entry=0x14798806e6a0) at /test/11.3_dbg/sql/sql_select.cc:3447
      #12 0x0000559fac3c24d5 in JOIN::optimize_inner (this=this@entry=0x14798806e6a0) at /test/11.3_dbg/sql/sql_select.cc:2644
      #13 0x0000559fac3c2927 in JOIN::optimize (this=this@entry=0x14798806e6a0) at /test/11.3_dbg/sql/sql_select.cc:1944
      #14 0x0000559fac3c2a47 in mysql_select (thd=thd@entry=0x147988000d48, tables=0x1479880139b0, fields=@0x147988013648: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x147988013968, last = 0x14798806efa0, elements = 2}, <No data fields>}, conds=0x147988016690, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x147988017100, unit=0x147988005060, select_lex=0x147988013390) at /test/11.3_dbg/sql/sql_select.cc:5229
      #15 0x0000559fac3c3246 in handle_select (thd=thd@entry=0x147988000d48, lex=lex@entry=0x147988004f80, result=result@entry=0x147988017100, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/11.3_dbg/sql/sql_select.cc:628
      #16 0x0000559fac327850 in execute_sqlcom_select (thd=thd@entry=0x147988000d48, all_tables=0x1479880139b0) at /test/11.3_dbg/sql/sql_parse.cc:6023
      #17 0x0000559fac333b3d in mysql_execute_command (thd=thd@entry=0x147988000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.3_dbg/sql/sql_parse.cc:3922
      #18 0x0000559fac321cf7 in mysql_parse (thd=thd@entry=0x147988000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1479b01c82c0) at /test/11.3_dbg/sql/sql_parse.cc:7760
      #19 0x0000559fac32f302 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x147988000d48, packet=packet@entry=0x14798800af59 "SELECT * FROM t WHERE (2,0) NOT IN (SELECT MIN(f3)+f3,MIN(f4)+f3+MAX(f4) FROM t2)", packet_length=packet_length@entry=81, blocking=blocking@entry=true) at /test/11.3_dbg/sql/sql_class.h:1489
      #20 0x0000559fac3317ba in do_command (thd=0x147988000d48, blocking=blocking@entry=true) at /test/11.3_dbg/sql/sql_parse.cc:1406
      #21 0x0000559fac499623 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559fae7568b8, put_in_cache=put_in_cache@entry=true) at /test/11.3_dbg/sql/sql_connect.cc:1445
      #22 0x0000559fac499af2 in handle_one_connection (arg=0x559fae7568b8) at /test/11.3_dbg/sql/sql_connect.cc:1347
      #23 0x00001479dce98609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #24 0x00001479dca84133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 11.0.3 (dbg), 11.1.2 (dbg), 11.2.2 (dbg), 11.3.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.31 (dbg), 10.4.31 (opt), 10.4.32 (dbg), 10.4.32 (opt), 10.5.22 (dbg), 10.5.22 (opt), 10.6.15 (opt), 10.6.15 (dbg), 10.9.8 (dbg), 10.9.8 (opt), 10.10.6 (dbg), 10.10.6 (opt), 10.11.5 (dbg), 10.11.5 (opt), 11.0.3 (opt), 11.1.2 (opt), 11.2.2 (opt), 11.3.0 (opt)

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.