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

LP:609045 - RQG: close_thread_table(THD*, TABLE**): Assertion `table->key_read == 0' failed with subquery cache

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Immediately after executing the following statement with subquery cache enabled:

      SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
      SELECT SUBQUERY2_t1 .`col_int_key`
      FROM B SUBQUERY2_t1 JOIN CC ON SUBQUERY2_t1 .`col_int_key`
      WHERE table1 .`col_varchar_key` ) , table2 .`col_varchar_nokey` field10
      FROM D table1 JOIN ( C table2 STRAIGHT_JOIN C table3 ON table2 .`pk` ) ON table3 .`col_varchar_key` = table2 .`col_varchar_key`
      GROUP BY field10 ;

      the server asserts as follows:

      mysqld: sql_base.cc:1380: bool close_thread_table(THD*, TABLE**): Assertion `table->key_read == 0' failed.

      #8 0x00897de8 in __assert_fail () from /lib/libc.so.6
      #9 0x082dd22f in close_thread_table (thd=0xae6ee90, table_ptr=0xae6eedc) at sql_base.cc:1380
      #10 0x082dcd7b in close_open_tables (thd=0xae6ee90) at sql_base.cc:1203
      #11 0x082dd0db in close_thread_tables (thd=0xae6ee90) at sql_base.cc:1355
      #12 0x0828fb23 in dispatch_command (command=COM_QUERY, thd=0xae6ee90, packet=0xae87271 "", packet_length=379) at sql_parse.cc:1613
      #13 0x0828dea8 in do_command (thd=0xae6ee90) at sql_parse.cc:890
      #14 0x0828b008 in handle_one_connection (arg=0xae6ee90) at sql_connect.cc:1153
      #15 0x00a08919 in start_thread () from /lib/libpthread.so.0
      #16 0x00951e5e in clone () from /lib/libc.so.6

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.