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

Assertion `((Item_cond *) cond)->functype() == ((Item_cond *) new_item)->functype()' fails on a query with LEFT JOIN and <date> IS NULL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 10.0.5, 5.5.33, 5.3.13
    • None
    • None

    Description

      It's the same assertion failure as in MDEV-4908, and appeared with the same revno 3676, but the fix for MDEV-4908 is already in the tree, and this test case still fails.

      bzr version-info

      revision-id: bar@mariadb.org-20130822112027-wew8m2o6f38qqukw
      revno: 3682
      branch-nick: 5.3

      Version: '5.3.13-MariaDB-debug-log'  
      mysqld: sql_select.cc:13356: COND* remove_eq_conds(THD*, COND*, Item::cond_result*): Assertion `((Item_cond *) cond)->functype() == ((Item_cond *) new_item)->functype()' failed.
      [ERROR] mysqld got signal 6 ;

      #6  0x00007f7890d720ee in __assert_fail_base (fmt=<optimized out>, assertion=0xd2fa90 "((Item_cond *) cond)->functype() == ((Item_cond *) new_item)->functype()", file=0xd2ebbf "sql_select.cc", line=<optimized out>, function=<optimized out>) at assert.c:94
      #7  0x00007f7890d72192 in __GI___assert_fail (assertion=0xd2fa90 "((Item_cond *) cond)->functype() == ((Item_cond *) new_item)->functype()", file=0xd2ebbf "sql_select.cc", line=13356, function=0xd31480 "COND* remove_eq_conds(THD*, COND*, Item::cond_result*)") at assert.c:103
      #8  0x00000000007277c4 in remove_eq_conds (thd=0x1bb48c8, cond=0x7f787401a5f8, cond_value=0x7f787401aae0) at sql_select.cc:13355
      #9  0x00000000007271af in optimize_cond (join=0x7f787401a7f0, conds=0x7f787401a5f8, join_list=0x1bb74d0, ignore_on_conds=false, cond_value=0x7f787401aae0, cond_equal=0x7f787401ac00) at sql_select.cc:13142
      #10 0x0000000000707bb4 in JOIN::optimize (this=0x7f787401a7f0) at sql_select.cc:1019
      #11 0x000000000070ef81 in mysql_select (thd=0x1bb48c8, rref_pointer_array=0x1bb75b8, tables=0x7f7874019190, wild_num=1, fields=..., conds=0x7f787401a5f8, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x7f787401a7d0, unit=0x1bb6e58, select_lex=0x1bb7360) at sql_select.cc:2990
      #12 0x0000000000705989 in handle_select (thd=0x1bb48c8, lex=0x1bb6db8, result=0x7f787401a7d0, setup_tables_done_option=0) at sql_select.cc:288
      #13 0x0000000000691c62 in execute_sqlcom_select (thd=0x1bb48c8, all_tables=0x7f7874019190) at sql_parse.cc:5172
      #14 0x0000000000688a2a in mysql_execute_command (thd=0x1bb48c8) at sql_parse.cc:2305
      #15 0x00000000006946ec in mysql_parse (thd=0x1bb48c8, rawbuf=0x7f7874018f40 "SELECT * FROM t1 LEFT JOIN t2 ON i1 = i2 WHERE d1 IS NULL AND d2 IS NULL", length=72, found_semicolon=0x7f7883d497e0) at sql_parse.cc:6173
      #16 0x0000000000686147 in dispatch_command (command=COM_QUERY, thd=0x1bb48c8, packet=0x1c2eb29 "SELECT * FROM t1 LEFT JOIN t2 ON i1 = i2 WHERE d1 IS NULL AND d2 IS NULL", packet_length=72) at sql_parse.cc:1243
      #17 0x00000000006853b8 in do_command (thd=0x1bb48c8) at sql_parse.cc:923
      #18 0x0000000000682252 in handle_one_connection (arg=0x1bb48c8) at sql_connect.cc:1231
      #19 0x00007f789190de9a in start_thread (arg=0x7f7883d4a700) at pthread_create.c:308
      #20 0x00007f7890e36cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      CREATE TABLE t1 ( i1 INT, d1 DATE );
      INSERT INTO t1 VALUES (1,'2001-06-26'), (2,'2000-11-16');
       
      CREATE TABLE t2 ( i2 INT, d2 DATE NOT NULL );
      INSERT INTO t2 VALUES (3,'2000-03-06'), (4,'2007-09-25');
       
      SELECT * FROM t1 LEFT JOIN t2 ON i1 = i2 WHERE d1 IS NULL AND d2 IS NULL;

      Attachments

        Activity

          People

            igor Igor Babaev
            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.