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

LP:839387 - Assertion `(Item_result)i != TIME_RESULT' failed with CASE + datetime in maria-5.3

    XMLWordPrintable

Details

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

    Description

      reported by user.

      backtrace:

      mysqld: item_cmpfunc.cc:2954: virtual void Item_func_case::fix_length_and_dec(): Assertion `(Item_result)i != TIME_RESULT' failed.

      #8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
      #9 0x08211702 in Item_func_case::fix_length_and_dec (this=0xae612870) at item_cmpfunc.cc:2954
      #10 0x081f3683 in Item_func::fix_fields (this=0xae612870, thd=0xa93c6b8, ref=0xae61296c) at item_func.cc:209
      #11 0x082112ea in Item_func_case::fix_fields (this=0xae612870, thd=0xa93c6b8, ref=0xae61296c) at item_cmpfunc.cc:2869
      #12 0x08304459 in setup_fields (thd=0xa93c6b8, ref_pointer_array=0xae612cf8, fields=..., mark_used_columns=MARK_COLUMNS_READ, sum_func_list=0xae625bfc,
          allow_sum_func=true) at sql_base.cc:7672
      #13 0x0831860f in JOIN::prepare (this=0xae620aa0, rref_pointer_array=0xa93e238, tables_init=0xae612a18, wild_num=0, conds_init=0x0, og_num=0,
          order_init=0x0, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0xa93e0fc, unit_arg=0xa93de1c) at sql_select.cc:572
      #14 0x0831ff54 in mysql_select (thd=0xa93c6b8, rref_pointer_array=0xa93e238, tables=0xae612a18, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0,
          group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xae612cd8, unit=0xa93de1c, select_lex=0xa93e0fc) at sql_select.cc:2879
      #15 0x08317deb in handle_select (thd=0xa93c6b8, lex=0xa93ddc0, result=0xae612cd8, setup_tables_done_option=0) at sql_select.cc:283
      #16 0x082b31b9 in execute_sqlcom_select (thd=0xa93c6b8, all_tables=0xae612a18) at sql_parse.cc:5090
      #17 0x082a9fbd in mysql_execute_command (thd=0xa93c6b8) at sql_parse.cc:2234
      #18 0x082b57f5 in mysql_parse (thd=0xa93c6b8, rawbuf=0xae6125f0 "SELECT CASE t1.f1 when '00:00:00' then NULL END FROM t1", length=55,
          found_semicolon=0xae983228) at sql_parse.cc:6091
      #19 0x082a7c3a in dispatch_command (command=COM_QUERY, thd=0xa93c6b8, packet=0xa995549 "SELECT CASE t1.f1 when '00:00:00' then NULL END FROM t1",
          packet_length=55) at sql_parse.cc:1211
      #20 0x082a7095 in do_command (thd=0xa93c6b8) at sql_parse.cc:906
      #21 0x082a40fd in handle_one_connection (arg=0xa93c6b8) at sql_connect.cc:1186
      #22 0x00821919 in start_thread () from /lib/libpthread.so.0
      #23 0x0076acce in clone () from /lib/libc.so.6

      test case:

      CREATE TABLE t1 ( f1 time) ;

      SELECT CASE t1.f1 when '00:00:00' then NULL END FROM t1;

       bzr version-info
      revision-id: <email address hidden>
      date: 2011-08-29 18:16:18 +0300
      build-date: 2011-09-02 11:35:31 +0300
      revno: 3169
      branch-nick: maria-5.3

      not repeatable in maria-5.2.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.