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

Assertion `0' failed in subselect_hash_sj_engine::init

    XMLWordPrintable

Details

    • 5.5.47-1, 5.5.48-0

    Description

      The bug report was initially reported upstream as http://bugs.mysql.com/bug.php?id=74889. On MariaDB 5.5/10.0, the same test case causes a different assertion failure.

      Even if it's related, the upstream issue is said to be fixed in 5.6.22 (it's not public yet, so couldn't check), and since it's not InnoDB, the bugfix won't be automatically merged to 10.0.

      5.5/sql/item_subselect.cc:4334: bool subselect_hash_sj_engine::init(List<Item>*, uint): Assertion `0' failed.
      141117 15:23:25 [ERROR] mysqld got signal 6 ;

      #6  0x00007f68cdf706f1 in *__GI___assert_fail (assertion=0xe1b1d8 "0", file=<optimized out>, line=4334, function=0xe1d620 "bool subselect_hash_sj_engine::init(List<Item>*, uint)") at assert.c:81
      #7  0x0000000000885b5f in subselect_hash_sj_engine::init (this=0x7f68c898b5f0, tmp_columns=0x7f68c8a87a98, subquery_id=2) at /home/elenst/bzr/5.5/sql/item_subselect.cc:4334
      #8  0x0000000000882633 in Item_in_subselect::setup_mat_engine (this=0x7f68c8a88c58) at /home/elenst/bzr/5.5/sql/item_subselect.cc:2766
      #9  0x000000000077ba23 in JOIN::choose_subquery_plan (this=0x7f68c8968698, join_tables=1) at /home/elenst/bzr/5.5/sql/opt_subselect.cc:5539
      #10 0x000000000066e626 in make_join_statistics (join=0x7f68c8968698, tables_list=..., conds=0x0, keyuse_array=0x7f68c89689a0) at /home/elenst/bzr/5.5/sql/sql_select.cc:3826
      #11 0x00000000006654ce in JOIN::optimize (this=0x7f68c8968698) at /home/elenst/bzr/5.5/sql/sql_select.cc:1229
      #12 0x000000000087c95c in Item_in_subselect::optimize (this=0x7f68c8a88c58, out_rows=0x7f68c93b4518, cost=0x7f68c93b4510) at /home/elenst/bzr/5.5/sql/item_subselect.cc:689
      #13 0x000000000077ad5b in setup_jtbm_semi_joins (join=0x7f68c8968078, join_list=0x7f68c9953bd0, join_where=0x7f68c8968490) at /home/elenst/bzr/5.5/sql/opt_subselect.cc:5181
      #14 0x0000000000664c56 in JOIN::optimize (this=0x7f68c8968078) at /home/elenst/bzr/5.5/sql/sql_select.cc:1084
      #15 0x000000000066bd37 in mysql_select (thd=0x7f68c9950060, rref_pointer_array=0x7f68c9953cc8, tables=0x7f68c8a87298, wild_num=1, fields=..., conds=0x7f68c8a88c58, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f68c8a88ed8, unit=0x7f68c9953380, select_lex=0x7f68c9953a58) at /home/elenst/bzr/5.5/sql/sql_select.cc:3080
      #16 0x0000000000662899 in handle_select (thd=0x7f68c9950060, lex=0x7f68c99532d0, result=0x7f68c8a88ed8, setup_tables_done_option=0) at /home/elenst/bzr/5.5/sql/sql_select.cc:319
      #17 0x000000000063bee0 in execute_sqlcom_select (thd=0x7f68c9950060, all_tables=0x7f68c8a87298) at /home/elenst/bzr/5.5/sql/sql_parse.cc:4689
      #18 0x00000000006350c2 in mysql_execute_command (thd=0x7f68c9950060) at /home/elenst/bzr/5.5/sql/sql_parse.cc:2234
      #19 0x000000000063e5ee in mysql_parse (thd=0x7f68c9950060, rawbuf=0x7f68c8a87078 "SELECT * FROM t1 WHERE a IN(SELECT MIN(a)FROM t1)", length=49, parser_state=0x7f68c93b5630) at /home/elenst/bzr/5.5/sql/sql_parse.cc:5800
      #20 0x0000000000632609 in dispatch_command (command=COM_QUERY, thd=0x7f68c9950060, packet=0x7f68c9a07061 "SELECT * FROM t1 WHERE a IN(SELECT MIN(a)FROM t1)", packet_length=49) at /home/elenst/bzr/5.5/sql/sql_parse.cc:1079
      #21 0x0000000000631795 in do_command (thd=0x7f68c9950060) at /home/elenst/bzr/5.5/sql/sql_parse.cc:793
      #22 0x00000000007338f2 in do_handle_one_connection (thd_arg=0x7f68c9950060) at /home/elenst/bzr/5.5/sql/sql_connect.cc:1266
      #23 0x00000000007333b1 in handle_one_connection (arg=0x7f68c9950060) at /home/elenst/bzr/5.5/sql/sql_connect.cc:1181
      #24 0x0000000000b6b28d in pfs_spawn_thread (arg=0x7f68c9971ca0) at /home/elenst/bzr/5.5/storage/perfschema/pfs.cc:1015
      #25 0x00007f68cfd6ab50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #26 0x00007f68ce02120d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Test case

      SET SESSION big_tables=1;
      CREATE TABLE t1(a char(255)DEFAULT'',KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
      INSERT INTO t1 VALUES(0),(0),(0);
      SELECT * FROM t1 WHERE a IN(SELECT MIN(a)FROM t1);

      Stack trace from 5.5

      revision-id: sanja@askmonty.org-20141115211833-waisauprym8dbgzi
      date: 2014-11-15 22:18:33 +0100
      build-date: 2014-11-17 16:09:29 +0400
      revno: 4350
      branch-nick: 5.5

      Attachments

        Activity

          People

            cvicentiu Vicențiu Ciorbaru
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.