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

LP:737496 - Assertion `(was_cut & 1) == 0' failed in Field_temporal::store_TIME_with_warning() in 5.1-micro

    Details

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

      Description

      Not repeatable in mysql-5.1

      assertion:

      mysqld: field.cc:5195: int Field_temporal::store_TIME_with_warning(MYSQL_TIME*, const Lazy_string*, int, int): Assertion `(was_cut & 1) == 0' failed.

      backtrace:

      #8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
      #9 0x08234369 in Field_temporal::store_TIME_with_warning (this=0xb69054b0, ltime=0xb6ae6b24, str=0xb6ae6b48, was_cut=1, have_smth_to_conv=1)
          at field.cc:5195
      #10 0x08234555 in Field_temporal::store (this=0xb69054b0, from=0xb6ae6b9c "06''0''12''6''14:58:56", len=22, cs=0x8869480) at field.cc:5245
      #11 0x081b1fa7 in Item::save_in_field (this=0xb692bf80, field=0xb69054b0, no_conversions=true) at item.cc:5186
      #12 0x081a874b in Item::save_in_field_no_warnings (this=0xb692bf80, field=0xb69054b0, no_conversions=true) at item.cc:1053
      #13 0x0837317b in get_mm_leaf (param=0xb6ae751c, conf_func=0xb692d460, field=0xb69054b0, key_part=0xb6906b58, type=Item_func::EQ_FUNC, value=0xb692bf80)
          at opt_range.cc:5823
      #14 0x08372a33 in get_mm_parts (param=0xb6ae751c, cond_func=0xb692d460, field=0xb69054b0, type=Item_func::EQ_FUNC, value=0xb692bf80, cmp_type=TIME_RESULT)
          at opt_range.cc:5618
      #15 0x08372563 in get_mm_tree (param=0xb6ae751c, cond=0xb692d460) at opt_range.cc:5564
      #16 0x0836b738 in SQL_SELECT::test_quick_select (this=0xb6909540, thd=0xa409090, keys_to_use=..., prev_tables=0, limit=18446744073709551615,
          force_quick_range=false) at opt_range.cc:2321
      #17 0x082da3ea in get_quick_record_count (thd=0xa409090, select=0xb6909540, table=0xb69044d8, keys=0xb692d6a4, limit=18446744073709551615)
          at sql_select.cc:2591
      #18 0x082dbe2f in make_join_statistics (join=0xb692c178, tables_arg=0xb692bad8, conds=0xb692d460, keyuse_array=0xb692d27c) at sql_select.cc:3023
      #19 0x082d4baa in JOIN::optimize (this=0xb692c178) at sql_select.cc:1020
      #20 0x082da0dd in mysql_select (thd=0xa409090, rref_pointer_array=0xa40a570, tables=0xb692bad8, wild_num=1, fields=..., conds=0xb692c018, og_num=0,
          order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xb692c160, unit=0xa40a208, select_lex=0xa40a478)
          at sql_select.cc:2530
      #21 0x082d2b4e in handle_select (thd=0xa409090, lex=0xa40a1ac, result=0xb692c160, setup_tables_done_option=0) at sql_select.cc:269
      #22 0x0827ac8f in execute_sqlcom_select (thd=0xa409090, all_tables=0xb692bad8) at sql_parse.cc:5129
      #23 0x08271b46 in mysql_execute_command (thd=0xa409090) at sql_parse.cc:2278
      #24 0x0827ce48 in mysql_parse (thd=0xa409090, rawbuf=0xb692b930 "SELECT * FROM t1 WHERE f1 = FROM_UNIXTIME( 2002190336 , \"%m''%w''%d''%c''%T\" )",
          length=78, found_semicolon=0xb6aeb210) at sql_parse.cc:6054
      #25 0x0826f7a0 in dispatch_command (command=COM_QUERY, thd=0xa409090,
          packet=0xa44e539 "SELECT * FROM t1 WHERE f1 = FROM_UNIXTIME( 2002190336 , \"%m''%w''%d''%c''%T\" )", packet_length=78) at sql_parse.cc:1249
      #26 0x0826e9d0 in do_command (thd=0xa409090) at sql_parse.cc:889
      #27 0x0826cd15 in handle_one_connection (arg=0xa409090) at sql_connect.cc:1136
      #28 0x00821919 in start_thread () from /lib/libpthread.so.0
      #29 0x0076acce in clone () from /lib/libc.so.6

      test case:

      CREATE TABLE t1 ( f1 date, KEY (f1)) ;
      INSERT IGNORE INTO t1 VALUES (NULL),(NULL);

      SELECT * FROM t1 WHERE f1 = FROM_UNIXTIME( 2002190336 , "%m''%w''%d''%c''%T" );

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment -

            Assertion `(was_cut & 1) == 0' failed in Field_temporal::store_TIME_with_warning() in 5.1-micro
            assertion:

            mysqld: field.cc:5195: int Field_temporal::store_TIME_with_warning(MYSQL_TIME*, const Lazy_string*, int, int): Assertion `(was_cut & 1) == 0' failed.

            backtrace:

            #8 0x006b0d98 in __assert_fail () from /lib/libc.so.6
            #9 0x08234369 in Field_temporal::store_TIME_with_warning (this=0xb69054b0, ltime=0xb6ae6b24, str=0xb6ae6b48, was_cut=1, have_smth_to_conv=1)
            at field.cc:5195
            #10 0x08234555 in Field_temporal::store (this=0xb69054b0, from=0xb6ae6b9c "06''0''12''6''14:58:56", len=22, cs=0x8869480) at field.cc:5245
            #11 0x081b1fa7 in Item::save_in_field (this=0xb692bf80, field=0xb69054b0, no_conversions=true) at item.cc:5186
            #12 0x081a874b in Item::save_in_field_no_warnings (this=0xb692bf80, field=0xb69054b0, no_conversions=true) at item.cc:1053
            #13 0x0837317b in get_mm_leaf (param=0xb6ae751c, conf_func=0xb692d460, field=0xb69054b0, key_part=0xb6906b58, type=Item_func::EQ_FUNC, value=0xb692bf80)
            at opt_range.cc:5823
            #14 0x08372a33 in get_mm_parts (param=0xb6ae751c, cond_func=0xb692d460, field=0xb69054b0, type=Item_func::EQ_FUNC, value=0xb692bf80, cmp_type=TIME_RESULT)
            at opt_range.cc:5618
            #15 0x08372563 in get_mm_tree (param=0xb6ae751c, cond=0xb692d460) at opt_range.cc:5564
            #16 0x0836b738 in SQL_SELECT::test_quick_select (this=0xb6909540, thd=0xa409090, keys_to_use=..., prev_tables=0, limit=18446744073709551615,
            force_quick_range=false) at opt_range.cc:2321
            #17 0x082da3ea in get_quick_record_count (thd=0xa409090, select=0xb6909540, table=0xb69044d8, keys=0xb692d6a4, limit=18446744073709551615)
            at sql_select.cc:2591
            #18 0x082dbe2f in make_join_statistics (join=0xb692c178, tables_arg=0xb692bad8, conds=0xb692d460, keyuse_array=0xb692d27c) at sql_select.cc:3023
            #19 0x082d4baa in JOIN::optimize (this=0xb692c178) at sql_select.cc:1020
            #20 0x082da0dd in mysql_select (thd=0xa409090, rref_pointer_array=0xa40a570, tables=0xb692bad8, wild_num=1, fields=..., conds=0xb692c018, og_num=0,
            order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xb692c160, unit=0xa40a208, select_lex=0xa40a478)
            at sql_select.cc:2530
            #21 0x082d2b4e in handle_select (thd=0xa409090, lex=0xa40a1ac, result=0xb692c160, setup_tables_done_option=0) at sql_select.cc:269
            #22 0x0827ac8f in execute_sqlcom_select (thd=0xa409090, all_tables=0xb692bad8) at sql_parse.cc:5129
            #23 0x08271b46 in mysql_execute_command (thd=0xa409090) at sql_parse.cc:2278
            #24 0x0827ce48 in mysql_parse (thd=0xa409090, rawbuf=0xb692b930 "SELECT * FROM t1 WHERE f1 = FROM_UNIXTIME( 2002190336 , \"%m''%w''%d''%c''%T\" )",
            length=78, found_semicolon=0xb6aeb210) at sql_parse.cc:6054
            #25 0x0826f7a0 in dispatch_command (command=COM_QUERY, thd=0xa409090,
            packet=0xa44e539 "SELECT * FROM t1 WHERE f1 = FROM_UNIXTIME( 2002190336 , \"%m''%w''%d''%c''%T\" )", packet_length=78) at sql_parse.cc:1249
            #26 0x0826e9d0 in do_command (thd=0xa409090) at sql_parse.cc:889
            #27 0x0826cd15 in handle_one_connection (arg=0xa409090) at sql_connect.cc:1136
            #28 0x00821919 in start_thread () from /lib/libpthread.so.0
            #29 0x0076acce in clone () from /lib/libc.so.6

            test case:

            CREATE TABLE t1 ( f1 date, KEY (f1)) ;
            INSERT IGNORE INTO t1 VALUES (NULL),(NULL);

            SELECT * FROM t1 WHERE f1 = FROM_UNIXTIME( 2002190336 , "%m''%w''%d''%c''%T" );

            Show
            philipstoev Philip Stoev added a comment - Assertion `(was_cut & 1) == 0' failed in Field_temporal::store_TIME_with_warning() in 5.1-micro assertion: mysqld: field.cc:5195: int Field_temporal::store_TIME_with_warning(MYSQL_TIME*, const Lazy_string*, int, int): Assertion `(was_cut & 1) == 0' failed. backtrace: #8 0x006b0d98 in __assert_fail () from /lib/libc.so.6 #9 0x08234369 in Field_temporal::store_TIME_with_warning (this=0xb69054b0, ltime=0xb6ae6b24, str=0xb6ae6b48, was_cut=1, have_smth_to_conv=1) at field.cc:5195 #10 0x08234555 in Field_temporal::store (this=0xb69054b0, from=0xb6ae6b9c "06''0''12''6''14:58:56", len=22, cs=0x8869480) at field.cc:5245 #11 0x081b1fa7 in Item::save_in_field (this=0xb692bf80, field=0xb69054b0, no_conversions=true) at item.cc:5186 #12 0x081a874b in Item::save_in_field_no_warnings (this=0xb692bf80, field=0xb69054b0, no_conversions=true) at item.cc:1053 #13 0x0837317b in get_mm_leaf (param=0xb6ae751c, conf_func=0xb692d460, field=0xb69054b0, key_part=0xb6906b58, type=Item_func::EQ_FUNC, value=0xb692bf80) at opt_range.cc:5823 #14 0x08372a33 in get_mm_parts (param=0xb6ae751c, cond_func=0xb692d460, field=0xb69054b0, type=Item_func::EQ_FUNC, value=0xb692bf80, cmp_type=TIME_RESULT) at opt_range.cc:5618 #15 0x08372563 in get_mm_tree (param=0xb6ae751c, cond=0xb692d460) at opt_range.cc:5564 #16 0x0836b738 in SQL_SELECT::test_quick_select (this=0xb6909540, thd=0xa409090, keys_to_use=..., prev_tables=0, limit=18446744073709551615, force_quick_range=false) at opt_range.cc:2321 #17 0x082da3ea in get_quick_record_count (thd=0xa409090, select=0xb6909540, table=0xb69044d8, keys=0xb692d6a4, limit=18446744073709551615) at sql_select.cc:2591 #18 0x082dbe2f in make_join_statistics (join=0xb692c178, tables_arg=0xb692bad8, conds=0xb692d460, keyuse_array=0xb692d27c) at sql_select.cc:3023 #19 0x082d4baa in JOIN::optimize (this=0xb692c178) at sql_select.cc:1020 #20 0x082da0dd in mysql_select (thd=0xa409090, rref_pointer_array=0xa40a570, tables=0xb692bad8, wild_num=1, fields=..., conds=0xb692c018, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xb692c160, unit=0xa40a208, select_lex=0xa40a478) at sql_select.cc:2530 #21 0x082d2b4e in handle_select (thd=0xa409090, lex=0xa40a1ac, result=0xb692c160, setup_tables_done_option=0) at sql_select.cc:269 #22 0x0827ac8f in execute_sqlcom_select (thd=0xa409090, all_tables=0xb692bad8) at sql_parse.cc:5129 #23 0x08271b46 in mysql_execute_command (thd=0xa409090) at sql_parse.cc:2278 #24 0x0827ce48 in mysql_parse (thd=0xa409090, rawbuf=0xb692b930 "SELECT * FROM t1 WHERE f1 = FROM_UNIXTIME( 2002190336 , \"%m''%w''%d''%c''%T\" )", length=78, found_semicolon=0xb6aeb210) at sql_parse.cc:6054 #25 0x0826f7a0 in dispatch_command (command=COM_QUERY, thd=0xa409090, packet=0xa44e539 "SELECT * FROM t1 WHERE f1 = FROM_UNIXTIME( 2002190336 , \"%m''%w''%d''%c''%T\" )", packet_length=78) at sql_parse.cc:1249 #26 0x0826e9d0 in do_command (thd=0xa409090) at sql_parse.cc:889 #27 0x0826cd15 in handle_one_connection (arg=0xa409090) at sql_connect.cc:1136 #28 0x00821919 in start_thread () from /lib/libpthread.so.0 #29 0x0076acce in clone () from /lib/libc.so.6 test case: CREATE TABLE t1 ( f1 date, KEY (f1)) ; INSERT IGNORE INTO t1 VALUES (NULL),(NULL); SELECT * FROM t1 WHERE f1 = FROM_UNIXTIME( 2002190336 , "%m''%w''%d''%c''%T" );
            Hide
            philipstoev Philip Stoev added a comment -

            Re: Assertion `(was_cut & 1) == 0' failed in Field_temporal::store_TIME_with_warning() in 5.1-micro
            Also repeatable with a more realistic format:

            FROM_UNIXTIME( 2002190336 , CONCAT_WS( ':' , '%m' , '%w' , '%d' , '%c' , '%T' ) )

            Show
            philipstoev Philip Stoev added a comment - Re: Assertion `(was_cut & 1) == 0' failed in Field_temporal::store_TIME_with_warning() in 5.1-micro Also repeatable with a more realistic format: FROM_UNIXTIME( 2002190336 , CONCAT_WS( ':' , '%m' , '%w' , '%d' , '%c' , '%T' ) )
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 737496

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

              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: