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

Assertion failure in Item_func_hybrid_field_type::val_int() during complex NOT IN query

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.6, 10.11, 11.4, 11.8, 12.2, 11.8.5
    • 10.11, 11.4, 11.8, 12.2
    • Optimizer
    • 11.8.5-MariaDB-debug Ubuntu 22.04

    Description

      CREATE DATABASE database31;
      USE database31;
      CREATE TABLE t0(c0 CHAR(100) NOT NULL) engine=Aria;
      CREATE TABLE IF NOT EXISTS t1 LIKE t0;
      UPDATE LOW_PRIORITY t0 SET c0=-1055196756;
      INSERT INTO t1 VALUES ('');
      TRUNCATE t1 WAIT 1;
      CREATE INDEX ic0 ON t0(c0 ASC);
      INSERT INTO t0 VALUES ('-623761169');
      CHECKSUM TABLE t0, t1 QUICK;
      INSERT INTO t1 VALUES ('');
      ANALYZE TABLE t1, t0;
      INSERT INTO t1 VALUES ('');
      INSERT INTO t1 VALUES ('');
      DELETE LOW_PRIORITY FROM t0 WHERE -1272357075;
      INSERT INTO t0 VALUES ('');
      SELECT t0.c0, t1.c0 FROM t0 NATURAL JOIN t1 WHERE (- ((t0.c0 NOT IN (t1.c0)) NOT IN (t0.c0))) UNION ALL SELECT t0.c0, t1.c0 FROM t0 NATURAL JOIN t1 WHERE (! (- ((t0.c0 NOT IN (t1.c0)) NOT IN (t0.c0)))) UNION ALL SELECT t0.c0, t1.c0 FROM t0 NATURAL JOIN t1 WHERE ((- ((t0.c0 NOT IN (t1.c0)) NOT IN (t0.c0))) IS NULL);
      

      mariadbd: /home/tzx/mariadb-11.8.5/sql/item_func.h:985: virtual longlong Item_func_hybrid_field_type::val_int(): Assertion `!is_cond()' failed.
      260305 16:12:59 [ERROR] /usr/local/mariadb_afl/bin/mariadbd got signal 6 ;
      Sorry, we probably made a mistake, and this is a bug.
       
      Your assistance in bug reporting will enable us to fix this for the next release.
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs about how to report
      a bug on https://jira.mariadb.org/.
       
      Please include the information from the server start above, to the end of the
      information below.
       
      Server version: 11.8.5-MariaDB-debug source revision: a74edc42d080a73e20d5d94e1dd5beea400b507c
       
      The information page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/
      contains instructions to obtain a better version of the backtrace below.
      Following these instructions will help MariaDB developers provide a fix quicker.
       
      Attempting backtrace. Include this in the bug report.
      (note: Retrieving this information may fail)
       
      Thread pointer: 0x7fa4ec000dc8
      stack_bottom = 0x7fa534251000 thread_stack 0x49000
      addr2line: DWARF error: invalid or unhandled FORM value: 0x23
      /usr/local/mariadb_afl/bin/mariadbd(my_print_stacktrace+0x46)[0x560c691e2576]
      /usr/local/mariadb_afl/bin/mariadbd(handle_fatal_signal+0x29f)[0x560c684f7e5f]
      /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fa53831d520]
      /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c)[0x7fa5383719fc]
      /lib/x86_64-linux-gnu/libc.so.6(raise+0x16)[0x7fa53831d476]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0xd3)[0x7fa5383037f3]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2871b)[0x7fa53830371b]
      /lib/x86_64-linux-gnu/libc.so.6(+0x39e96)[0x7fa538314e96]
      addr2line: DWARF error: invalid or unhandled FORM value: 0x23
      /usr/local/mariadb_afl/bin/mariadbd(_ZN27Item_func_hybrid_field_type7val_intEv+0x141)[0x560c67f11951]
      /usr/local/mariadb_afl/bin/mariadbd(_ZN14Item_cache_int11cache_valueEv+0x5b)[0x560c6856897b]
      /usr/local/mariadb_afl/bin/mariadbd(_ZN14Item_cache_int7val_intEv+0x42)[0x560c68568d62]
      /usr/local/mariadb_afl/bin/mariadbd(_ZNK23Type_handler_int_result13Item_val_boolEP4Item+0x1d)[0x560c68373bfd]
      sql_select.cc:0(make_join_select(JOIN*, SQL_SELECT*, Item*))[0x560c67ff6ef6]
      /usr/local/mariadb_afl/bin/mariadbd(_ZN4JOIN15optimize_stage2Ev+0x1bd7)[0x560c67fe12c7]
      /usr/local/mariadb_afl/bin/mariadbd(_ZN4JOIN14optimize_innerEv+0x2763)[0x560c67fde813]
      /usr/local/mariadb_afl/bin/mariadbd(_ZN4JOIN8optimizeEv+0xe8)[0x560c67fdbea8]
      /usr/local/mariadb_afl/bin/mariadbd(_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x691)[0x560c67fcf7d1]
      /usr/local/mariadb_afl/bin/mariadbd(_Z13handle_selectP3THDP3LEXP13select_resulty+0x2c1)[0x560c67fcefc1]
      sql_parse.cc:0(execute_sqlcom_select(THD*, TABLE_LIST*))[0x560c67f475ac]
      /usr/local/mariadb_afl/bin/mariadbd(_Z21mysql_execute_commandP3THDb+0x4b04)[0x560c67f3c634]
      /usr/local/mariadb_afl/bin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x528)[0x560c67f2cba8]
      /usr/local/mariadb_afl/bin/mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x2075)[0x560c67f28205]
      /usr/local/mariadb_afl/bin/mariadbd(_Z10do_commandP3THDb+0x7ad)[0x560c67f2d9dd]
      /usr/local/mariadb_afl/bin/mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x324)[0x560c6821abe4]
      /usr/local/mariadb_afl/bin/mariadbd(handle_one_connection+0x19d)[0x560c6821a7cd]
      /usr/local/mariadb_afl/bin/mariadbd(+0x148f8af)[0x560c689c38af]
      /lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x7fa53836fac3]
      /lib/x86_64-linux-gnu/libc.so.6(+0x1268d0)[0x7fa5384018d0]
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              zxtang Jason Tang
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.