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

LP:737450 - Second Assertion `item->null_value' failed in 5.1-micro

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Even after the fix for bug#737092 , the assertion still happens:

      mysqld: item_cmpfunc.cc:846: longlong get_datetime_value(THD*, Item**, Item, Item, bool*): Assertion `item->null_value' failed.

      backtrace:

      #8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
      #9 0x081e3434 in get_datetime_value (thd=0x9a98090, item_arg=0xb6ea6b04, cache_arg=0x0, warn_item=0xb6b04ba0, is_null=0xb6ea6b03) at item_cmpfunc.cc:846
      #10 0x081d2807 in Item_func_min_max::cmp_datetimes (this=0xb6b04d58, ltime=0xb6ea6b44) at item_func.cc:2284
      #11 0x081d2e9c in Item_func_min_max::val_int (this=0xb6b04d58) at item_func.cc:2415
      #12 0x082e371a in make_join_select (join=0xb6b04e78, select=0xb6b0b938, cond=0xb6b04d58) at sql_select.cc:6272
      #13 0x082d5526 in JOIN::optimize (this=0xb6b04e78) at sql_select.cc:1147
      #14 0x082da0dd in mysql_select (thd=0x9a98090, rref_pointer_array=0x9a99570, tables=0xb6b047b0, wild_num=1, fields=..., conds=0xb6b04d58, og_num=0,
      order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xb6b04e60, unit=0x9a99208, select_lex=0x9a99478)
      at sql_select.cc:2530
      #15 0x082d2b4e in handle_select (thd=0x9a98090, lex=0x9a991ac, result=0xb6b04e60, setup_tables_done_option=0) at sql_select.cc:269
      #16 0x0827ac8f in execute_sqlcom_select (thd=0x9a98090, all_tables=0xb6b047b0) at sql_parse.cc:5129
      #17 0x08271b46 in mysql_execute_command (thd=0x9a98090) at sql_parse.cc:2278
      #18 0x0827ce48 in mysql_parse (thd=0x9a98090, rawbuf=0xb6b04628 "SELECT * FROM t1 WHERE LEAST( GREATEST( f3 , f2 , f4 ) , f5 )", length=61,
      found_semicolon=0xb6ea8210) at sql_parse.cc:6054
      #19 0x0826f7a0 in dispatch_command (command=COM_QUERY, thd=0x9a98090, packet=0x9add539 "SELECT * FROM t1 WHERE LEAST( GREATEST( f3 , f2 , f4 ) , f5 )",
      packet_length=61) at sql_parse.cc:1249
      #20 0x0826e9d0 in do_command (thd=0x9a98090) at sql_parse.cc:889
      #21 0x0826cd15 in handle_one_connection (arg=0x9a98090) at sql_connect.cc:1136
      #22 0x00821919 in start_thread () from /lib/libpthread.so.0
      #23 0x0076acce in clone () from /lib/libc.so.6

      test case:

      CREATE TABLE t1 ( f2 time NOT NULL , f3 datetime, f4 int NOT NULL , f5 timestamp) ;
      INSERT IGNORE INTO t1 VALUES ('04:38:11','0000-00-00 00:00:00',0,'0000-00-00 00:00:00');

      SELECT * FROM t1 WHERE LEAST( GREATEST( f3 , f2 , f4 ) , f5 );

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 737450

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 737450

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: