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

Assertion `res >= 0' fails in JOIN::optimize_inner upon query from CONNECT table

    XMLWordPrintable

Details

    Description

      INSTALL SONAME 'ha_connect';
       
      CREATE TABLE t (k INT NOT NULL, KEY(k)) ENGINE=CONNECT table_type=DOS;
      INSERT INTO t VALUES (1),(2);
      SELECT MAX(k) FROM t WHERE k = 1 OR FALSE;
       
      # Cleanup
      DROP TABLE t;
      UNINSTALL SONAME 'ha_connect';
      

      10.4 1adfdfbd

      2023-09-15  1:39:47 4 [Note] CONNECT: Version 1.07.0003 June 06, 2021
      mysqld: /data/src/10.4/sql/sql_select.cc:2281: int JOIN::optimize_inner(): Assertion `res >= 0' failed.
      230915  1:39:47 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f6d36853df2 in __GI___assert_fail (assertion=0x560608422140 "res >= 0", file=0x5606084206c0 "/data/src/10.4/sql/sql_select.cc", line=2281, function=0x560608422180 "int JOIN::optimize_inner()") at ./assert/assert.c:101
      #10 0x00005606063e4d0f in JOIN::optimize_inner (this=0x62b000064138) at /data/src/10.4/sql/sql_select.cc:2281
      #11 0x00005606063de9a7 in JOIN::optimize (this=0x62b000064138) at /data/src/10.4/sql/sql_select.cc:1711
      #12 0x00005606063ff87b in mysql_select (thd=0x62b00005b208, tables=0x62b000062ac0, wild_num=0, fields=..., conds=0x62b000063690, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x62b000064108, unit=0x62b00005f140, select_lex=0x62b0000622e8) at /data/src/10.4/sql/sql_select.cc:4812
      #13 0x00005606063d05ed in handle_select (thd=0x62b00005b208, lex=0x62b00005f080, result=0x62b000064108, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:442
      #14 0x000056060633fb15 in execute_sqlcom_select (thd=0x62b00005b208, all_tables=0x62b000062ac0) at /data/src/10.4/sql/sql_parse.cc:6475
      #15 0x000056060632d02a in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:3978
      #16 0x0000560606348d65 in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "SELECT MAX(k) FROM t WHERE k = 1 OR FALSE", length=41, parser_state=0x7f6d2eb93860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8012
      #17 0x000056060631eff4 in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x629000230209 "SELECT MAX(k) FROM t WHERE k = 1 OR FALSE", packet_length=41, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
      #18 0x000056060631bb63 in do_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:1378
      #19 0x000056060671b3fc in do_handle_one_connection (connect=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1420
      #20 0x000056060671ad13 in handle_one_connection (arg=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1324
      #21 0x000056060738be7c in pfs_spawn_thread (arg=0x615000003508) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #22 0x00007f6d368a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #23 0x00007f6d369285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            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.