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

Assertion failures and change in behavior upon using full-text search on a sequence

    XMLWordPrintable

Details

    Description

      Set to "major" only because it's a recent regression, otherwise it is hardly of any importance, being such a meaningless query.

      CREATE SEQUENCE s ENGINE=MyISAM;
      --error 0,ER_ILLEGAL_HA
      DELETE FROM s WHERE MATCH (next_not_cached_value) AGAINST ('1' IN BOOLEAN MODE);
       
      # Cleanup
      DROP SEQUENCE s;
      

      10.3 65b4a2af

      mysqld: /data/src/10.3/sql/sql_delete.cc:887: bool mysql_delete(THD*, TABLE_LIST*, COND*, SQL_I_List<st_order>*, ha_rows, ulonglong, select_result*): Assertion `!return_error || thd->is_error() || thd->killed' failed.
      220920 18:18:36 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007ff558aee662 in __GI___assert_fail (assertion=0x55aec42d2ea0 "!return_error || thd->is_error() || thd->killed", file=0x55aec42d2940 "/data/src/10.3/sql/sql_delete.cc", line=887, function=0x55aec42d2c80 "bool mysql_delete(THD*, TABLE_LIST*, COND*, SQL_I_List<st_order>*, ha_rows, ulonglong, select_result*)") at assert.c:101
      #8  0x000055aec2e64c51 in mysql_delete (thd=0x62a000060270, table_list=0x62b000000408, conds=0x62b000000cb8, order_list=0x62a000064b30, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:887
      #9  0x000055aec22d365c in mysql_execute_command (thd=0x62a000060270) at /data/src/10.3/sql/sql_parse.cc:4708
      #10 0x000055aec22e95fc in mysql_parse (thd=0x62a000060270, rawbuf=0x62b000000290 "DELETE FROM s WHERE MATCH (next_not_cached_value) AGAINST ('1' IN BOOLEAN MODE)", length=80, parser_state=0x7ff54e15aa00, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7871
      #11 0x000055aec22c0ba2 in dispatch_command (command=COM_QUERY, thd=0x62a000060270, packet=0x6290000eb271 "DELETE FROM s WHERE MATCH (next_not_cached_value) AGAINST ('1' IN BOOLEAN MODE)", packet_length=80, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
      #12 0x000055aec22bd77e in do_command (thd=0x62a000060270) at /data/src/10.3/sql/sql_parse.cc:1398
      #13 0x000055aec267eeb6 in do_handle_one_connection (connect=0x611000006230) at /data/src/10.3/sql/sql_connect.cc:1403
      #14 0x000055aec267e7b2 in handle_one_connection (arg=0x611000006230) at /data/src/10.3/sql/sql_connect.cc:1308
      #15 0x000055aec3c297d1 in pfs_spawn_thread (arg=0x616000009ff0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #16 0x00007ff558c87ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x00007ff558bb7def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      CREATE SEQUENCE s ENGINE=MyISAM;
      SELECT * FROM s WHERE MATCH (next_not_cached_value) AGAINST ('1' IN BOOLEAN MODE);
       
      # Cleanup
      DROP SEQUENCE s;
      

      10.3 65b4a2af

      mysqld: /data/src/10.3/sql/protocol.cc:601: void Protocol::end_statement(): Assertion `0' failed.
      220920 18:19:39 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fa66dcca662 in __GI___assert_fail (assertion=0x5571b513f380 "0", file=0x5571b513e8c0 "/data/src/10.3/sql/protocol.cc", line=601, function=0x5571b513f2c0 "void Protocol::end_statement()") at assert.c:101
      #8  0x00005571b32f457a in Protocol::end_statement (this=0x62a000060848) at /data/src/10.3/sql/protocol.cc:601
      #9  0x00005571b357e0b1 in dispatch_command (command=COM_QUERY, thd=0x62a000060270, packet=0x6290000eb271 "SELECT * FROM s WHERE MATCH (next_not_cached_value) AGAINST ('1' IN BOOLEAN MODE)", packet_length=82, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:2410
      #10 0x00005571b357777e in do_command (thd=0x62a000060270) at /data/src/10.3/sql/sql_parse.cc:1398
      #11 0x00005571b3938eb6 in do_handle_one_connection (connect=0x611000006230) at /data/src/10.3/sql/sql_connect.cc:1403
      #12 0x00005571b39387b2 in handle_one_connection (arg=0x611000006230) at /data/src/10.3/sql/sql_connect.cc:1308
      #13 0x00005571b4ee37d1 in pfs_spawn_thread (arg=0x616000009ff0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #14 0x00007fa66de63ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #15 0x00007fa66dd93def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      On non-debug builds the behavior also changed for both test cases.

      For the first one, with DELETE, it used to be

      mysqltest: At line 2: query 'DELETE FROM s WHERE MATCH (next_not_cached_value) AGAINST ('1' IN BOOLEAN MODE)' failed: 1031: Storage engine SEQUENCE of the table `test`.`s` doesn't have this option
      

      and now the query succeeds quietly, not removing anything.

      For the 2nd one, with SELECT, it used to return the sequence row, and now it returns an empty result set.

      Reproducible with MyISAM and Aria, but not InnoDB.

      The changes occurred after this commit in 10.3.36:

      commit f9ec9b6abbce8c88b0cfd1888135b9701415162a
      Author: Thirunarayanan Balathandayuthapani
      Date:   Wed Jul 20 14:14:43 2022 +0530
       
          MDEV-27282      InnoDB: Failing assertion: !query->intersection
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.