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

Assertion `sel->quick' failed in JOIN::make_range_rowid_filters

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4(EOL)
    • 10.4.4
    • Optimizer
    • None

    Description

      Reproducible on 10.4 with MyIsam, not with Innodb.

      set optimizer_switch='rowid_filter=on';
       
      CREATE TABLE t1 (pk int) engine=myisam ;
      INSERT INTO t1 VALUES (1),(2);  #
       
      CREATE TABLE t2 (pk int auto_increment PRIMARY KEY, i1 int, i2 int , c2 varchar(1), KEY (i1),KEY (i2)) engine=myisam;
      INSERT INTO t2 VALUES(1,8,6,'t'),(2,5,7,'i'),(3,4,4,'h'),(4,207,38,'d'),(5,183,206,'b'),(6,7,null,'o'),(7,1,2,'j'),(8,17,36,'s'),(9,4,5,'q'),(10,0,6,'l'),(11,1,9,'j'),(12,5,6,'y'),(13,null,0,'i'),(14,7,7,'x'),(15,5,2,'u');
       
      SELECT 1 FROM (SELECT pk FROM t1) AS a1
        JOIN (((SELECT t2.* FROM (t2 JOIN t1 ON (t1.pk = t2.pk))) AS a2 JOIN t1 ON (t1.pk = a2.pk))) ON (a1.pk = a2.pk)
      HAVING 'b' = ANY(SELECT 1 FROM (t1 JOIN t1 as tt1 
                ON (tt1.pk = t1.pk OR (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3))));
       
      DROP TABLE t1,t2;
      

      10.4 9c7299365f04faf1b3963a2d891c8

      /10.4/sql/sql_select.cc:1620: bool JOIN::make_range_rowid_filters(): Assertion `sel->quick' failed.
      190318 11:22:44 [ERROR] mysqld got signal 6 ;
       
      assert/assert.c:92(__assert_fail_base)[0x7fe2f209cbd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7fe2f209cc82]
      sql/sql_select.cc:1622(JOIN::make_range_rowid_filters())[0x55d18bae66d0]
      sql/sql_select.cc:2224(JOIN::optimize_stage2())[0x55d18baec4cf]
      sql/sql_select.cc:2200(JOIN::optimize_inner())[0x55d18baec0b2]
      sql/sql_select.cc:1551(JOIN::optimize())[0x55d18bae5f87]
      sql/sql_lex.cc:4151(st_select_lex::optimize_unflattened_subqueries(bool))[0x55d18b9e5a66]
      sql/opt_subselect.cc:5415(JOIN::optimize_constant_subqueries())[0x55d18be8bae3]
      sql/sql_select.cc:1867(JOIN::optimize_inner())[0x55d18bae894b]
      sql/sql_select.cc:1551(JOIN::optimize())[0x55d18bae5f87]
      sql/sql_lex.cc:4151(st_select_lex::optimize_unflattened_subqueries(bool))[0x55d18b9e5a66]
      sql/opt_subselect.cc:5415(JOIN::optimize_constant_subqueries())[0x55d18be8bae3]
      sql/sql_select.cc:1867(JOIN::optimize_inner())[0x55d18bae894b]
      sql/sql_select.cc:1551(JOIN::optimize())[0x55d18bae5f87]
      sql/sql_select.cc:4571(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55d18bb03083]
      sql/sql_select.cc:424(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55d18bada112]
      sql/sql_parse.cc:6652(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55d18ba5ebba]
      sql/sql_parse.cc:3889(mysql_execute_command(THD*))[0x55d18ba4b9aa]
      sql/sql_parse.cc:8205(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55d18ba67047]
      sql/sql_parse.cc:1831(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55d18ba3f807]
      sql/sql_parse.cc:1358(do_command(THD*))[0x55d18ba3c752]
      sql/sql_connect.cc:1399(do_handle_one_connection(CONNECT*))[0x55d18bdb113d]
      sql/sql_connect.cc:1303(handle_one_connection)[0x55d18bdb0b07]
      perfschema/pfs.cc:1864(pfs_spawn_thread)[0x55d18d16b8cb]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fe2f2ee56ba]
      x86_64/clone.S:111(clone)[0x7fe2f217641d]
       
      Query (0x62b00007e288): SELECT 1 FROM (SELECT pk FROM t1) AS a1 JOIN (((SELECT t2.* FROM (t2 JOIN t1 ON (t1.pk = t2.pk))) AS a2 JOIN t1 ON (t1.pk = a2.pk))) ON (a1.pk = a2.pk) HAVING 'b' = ANY(SELECT 1 FROM (t1 JOIN t1 as tt1  ON (tt1.pk = t1.pk OR (7, 9) IN (SELECT t2.i1, t2.i2 FROM t2 WHERE t2.i1 = 3))))
      

      Attachments

        Activity

          People

            igor Igor Babaev
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.