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

Assertion `cmp_items[(uint)cmp_type]' fails in sql/item_cmpfunc.cc

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 5.5.31
    • None
    • None

    Description

      The failure started happening on maria/5.5 tree from the following revision:

      revno: 3696
      revision-id: sergii@pisem.net-20130313213352-mda1gh0dj1lyscc5
      committer: Sergei Golubchik <sergii@pisem.net>
      branch nick: 5.5
      timestamp: Wed 2013-03-13 22:33:52 +0100
      message:
        MDEV-4265 5.5 is slower than 5.3 because of many str_to_datetime calls

      Test case:

      CREATE TABLE t1 (a VARCHAR(10)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES ('2000-12-03'),('2008-05-03');
      SELECT * FROM t1 WHERE CASE a WHEN ADDDATE( '2012-12-12', 7 ) THEN TRUE END;

      mysqld: 5.5/sql/item_cmpfunc.cc:2827: Item* Item_func_case::find_item(String*): Assertion `cmp_items[(uint)cmp_type]' failed.
      [ERROR] mysqld got signal 6 ;

      #7  0x00007fcbfe597192 in __GI___assert_fail (assertion=0xdb8d03 "cmp_items[(uint)cmp_type]", file=0xdb8a18 "5.5/sql/item_cmpfunc.cc", line=2827, function=0xdb9980 "Item* Item_func_case::find_item(String*)") at assert.c:103
      #8  0x00000000007fd6d0 in Item_func_case::find_item (this=0x7fcbe8008108, str=0x7fcbf3c79120) at 5.5/sql/item_cmpfunc.cc:2827
      #9  0x00000000007fda3c in Item_func_case::val_int (this=0x7fcbe8008108) at 5.5/sql/item_cmpfunc.cc:2867
      #10 0x000000000066671f in evaluate_join_record (join=0x7fcbe8008338, join_tab=0x7fcbe8019c88, error=0) at 5.5/sql/sql_select.cc:16372
      #11 0x0000000000666367 in sub_select (join=0x7fcbe8008338, join_tab=0x7fcbe8019c88, end_of_records=false) at 5.5/sql/sql_select.cc:16277
      #12 0x0000000000665c1e in do_select (join=0x7fcbe8008338, fields=0x312a210, table=0x0, procedure=0x0) at 5.5/sql/sql_select.cc:15947
      #13 0x0000000000645d62 in JOIN::exec (this=0x7fcbe8008338) at 5.5/sql/sql_select.cc:2842
      #14 0x000000000064655f in mysql_select (thd=0x31275f0, rref_pointer_array=0x312a358, tables=0x7fcbe8007720, wild_num=1, fields=..., conds=0x7fcbe8008108, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fcbe8008318, unit=0x3129a28, select_lex=0x312a100) at 5.5/sql/sql_select.cc:3062
      #15 0x000000000063d0d6 in handle_select (thd=0x31275f0, lex=0x3129978, result=0x7fcbe8008318, setup_tables_done_option=0) at 5.5/sql/sql_select.cc:318
      #16 0x0000000000615fce in execute_sqlcom_select (thd=0x31275f0, all_tables=0x7fcbe8007720) at 5.5/sql/sql_parse.cc:4641
      #17 0x000000000060ea81 in mysql_execute_command (thd=0x31275f0) at 5.5/sql/sql_parse.cc:2195
      #18 0x0000000000618852 in mysql_parse (thd=0x31275f0, rawbuf=0x7fcbe80074c8 "SELECT * FROM t1 WHERE CASE a WHEN ADDDATE( '2012-12-12', 7 ) THEN TRUE END", length=75, parser_state=0x7fcbf3c7a500) at 5.5/sql/sql_parse.cc:5756
      #19 0x000000000060bff4 in dispatch_command (command=COM_QUERY, thd=0x31275f0, packet=0x321c691 "", packet_length=75) at 5.5/sql/sql_parse.cc:1068
      #20 0x000000000060b239 in do_command (thd=0x31275f0) at 5.5/sql/sql_parse.cc:794
      #21 0x000000000070f816 in do_handle_one_connection (thd_arg=0x31275f0) at 5.5/sql/sql_connect.cc:1266
      #22 0x000000000070f201 in handle_one_connection (arg=0x31275f0) at 5.5/sql/sql_connect.cc:1181
      #23 0x0000000000a9bc60 in pfs_spawn_thread (arg=0x31a71e0) at 5.5/storage/perfschema/pfs.cc:1015
      #24 0x00007fcbff367e9a in start_thread (arg=0x7fcbf3c7b700) at pthread_create.c:308
      #25 0x00007fcbfe65bcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Stack trace is from the revno 3696.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.