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

Assertion Failed at /mariadb-11.3.0/sql/item_subselect.cc:1455

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.4, 10.5, 10.6, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3.0
    • N/A
    • Optimizer, Server
    • None
    • Ubuntu 20.04

    Description

      Run these queries in debug build:

      CREATE TABLE x ( x INT ) ;
      INSERT INTO x ( x ) VALUES ( 1 ) ;
      UPDATE x SET x = 1 WHERE x = 1 ;
      INSERT INTO x ( x ) VALUES ( 1 ) , ( 1 ) ;
      SELECT x = 'x' AND x > 1 , 'x' , NULL , 'x' FROM x GROUP BY x HAVING ( x IN ( ( SELECT x FROM x AS x GROUP BY x IN ( 1 , 'x' , 1 , 1 , 1 ) HAVING ( ( SELECT 1 FROM x WHERE ( 'x' ^ 1.000000 = 1 AND x AND x ) NOT LIKE CASE WHEN ( SELECT x ) + x IS NOT NULL = 1 THEN 1 ELSE x + 1 END ) NOT IN ( SELECT * FROM x ) AND x = 1 ) ) IN ( SELECT x FROM x ) ) ) ;

      Will trigger Assertion Failed.
      GDB info:
      #0 0x00007ffff6c0c00b in raise () from /lib/x86_64-linux-gnu/libc.so.6
      #1 0x00007ffff6beb859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #2 0x00007ffff6beb729 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
      #3 0x00007ffff6bfcfd6 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #4 0x0000555557daf9fd in Item_singlerow_subselect::val_int (this=0x629000182950) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:1455
      #5 0x0000555556e14b78 in Item::val_int_result (this=0x629000182950) at /home/wx/mariadb-11.3.0/sql/item.h:1793
      #6 0x0000555557bc30d8 in Item_cache_int::cache_value (this=0x629000193f40) at /home/wx/mariadb-11.3.0/sql/item.cc:10161
      #7 0x0000555557bf3310 in Item_in_optimizer::val_int (this=0x629000193e68) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:1577
      #8 0x00005555578cc1de in Type_handler_int_result::Item_eq_value (this=0x55555b7b6a00 <type_handler_slonglong>, thd=0x62c0001e0288, attr=0x62d000076338, a=0x629000193e68, b=0x629000193e68) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:8689
      #9 0x0000555557c235d4 in Item_equal::add_const (this=0x62d000076288, thd=0x62c0001e0288, c=0x629000193e68) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:6849
      #10 0x0000555557c23c81 in Item_equal::merge_with_check (this=0x62d000076288, thd=0x62c0001e0288, item=0x62d000076288, save_merged=true) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:6974
      #11 0x00005555573410d3 in propagate_new_equalities (thd=0x62c0001e0288, cond=0x62d000076288, new_equalities=0x62d000076420, inherited=0x0, is_simplifiable_cond=0x7fffd111b900) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:19844
      #12 0x00005555577ba9a8 in and_new_conditions_to_optimized_cond (thd=0x62c0001e0288, cond=0x62d000076288, cond_eq=0x629000186770, new_conds=..., cond_value=0x629000186648) at /home/wx/mariadb-11.3.0/sql/opt_subselect.cc:6331
      #13 0x00005555572c0873 in JOIN::optimize_inner (this=0x6290001862a8) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:2384
      #14 0x00005555572bbba6 in JOIN::optimize (this=0x6290001862a8) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:1944
      #15 0x00005555572dd9ba in mysql_select (thd=0x62c0001e0288, tables=0x6290000f6690, fields=..., conds=0x0, og_num=1, order=0x0, group=0x6290000f6f08, having=0x6290001843c0, proc_param=0x0, select_options=2165049856, result=0x629000184f70, unit=0x62c0001e46d8, select_lex=0x6290000f55d0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:5235
      #16 0x00005555572ad18a in handle_select (thd=0x62c0001e0288, lex=0x62c0001e45f8, result=0x629000184f70, setup_tables_done_option=0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:628
      #17 0x00005555571ce583 in execute_sqlcom_select (thd=0x62c0001e0288, all_tables=0x6290000f6690) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:6013
      #18 0x00005555571becf6 in mysql_execute_command (thd=0x62c0001e0288, is_called_from_prepared_stmt=false) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:3912
      #19 0x00005555571d95e2 in mysql_parse (thd=0x62c0001e0288, rawbuf=0x6290000f52a8 "SELECT x = 'x' AND x > 1 , 'x' , NULL , 'x' FROM x GROUP BY x HAVING ( x IN ( ( SELECT x FROM x AS x GROUP BY x IN ( 1 , 'x' , 1 , 1 , 1 ) HAVING ( ( SELECT 1 FROM x WHERE ( 'x' ^ 1.000000 = 1 AND x A"..., length=350, parser_state=0x7fffd111d870) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:7734
      #20 0x00005555571b1237 in dispatch_command (command=COM_QUERY, thd=0x62c0001e0288, packet=0x6290000fa289 " SELECT x = 'x' AND x > 1 , 'x' , NULL , 'x' FROM x GROUP BY x HAVING ( x IN ( ( SELECT x FROM x AS x GROUP BY x IN ( 1 , 'x' , 1 , 1 , 1 ) HAVING ( ( SELECT 1 FROM x WHERE ( 'x' ^ 1.000000 = 1 AND x "..., packet_length=354, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1893
      #21 0x00005555571adf7c in do_command (thd=0x62c0001e0288, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1406
      #22 0x000055555768e557 in do_handle_one_connection (connect=0x611000051608, put_in_cache=true) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1445
      #23 0x000055555768deb4 in handle_one_connection (arg=0x6110000514c8) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1347
      #24 0x00005555582fa350 in pfs_spawn_thread (arg=0x618000005508) at /home/wx/mariadb-11.3.0/storage/perfschema/pfs.cc:2201
      #25 0x00007ffff7115609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      #26 0x00007ffff6ce8133 in clone () from /lib/x86_64-linux-gnu/libc.so.6

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Xin Wen Xin Wen
              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.