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

Assertion `is_valid_time_slow()' failed in Time::valid_MYSQL_TIME_to_valid_value

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t1 (a time);
      INSERT INTO t1 VALUES ('00:00:00'),('21:21:21'); # Optional, fails either way
      CREATE ALGORITHM=TEMPTABLE VIEW v1 AS SELECT * FROM t1;
      SELECT * FROM v1 WHERE '2007-03-03 07:25:35' BETWEEN '18:48:20' AND a;
       
      # Cleanup
      DROP VIEW v1;
      DROP TABLE t1;
      

      10.3 da88e1ec

      mysqld: /data/src/10.3/sql/sql_type.h:211: void Time::valid_MYSQL_TIME_to_valid_value(Time::Options): Assertion `is_valid_time_slow()' failed.
      210221  2:35:11 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f9a798fef36 in __GI___assert_fail (assertion=0x558745650ac2 "is_valid_time_slow()", file=0x558745650a53 "/data/src/10.3/sql/sql_type.h", line=211, function=0x558745650ad8 "void Time::valid_MYSQL_TIME_to_valid_value(Time::Options)") at assert.c:101
      #8  0x0000558744bb0f80 in Time::valid_MYSQL_TIME_to_valid_value (this=0x7f9a74122f70, opt=...) at /data/src/10.3/sql/sql_type.h:211
      #9  0x0000558744ba1bc0 in Time::make_from_item (this=0x7f9a74122f70, item=0x7f9a580173f0, opt=...) at /data/src/10.3/sql/sql_type.cc:166
      #10 0x000055874488af7b in Time::Time (this=0x7f9a74122f70, item=0x7f9a580173f0, opt=...) at /data/src/10.3/sql/sql_type.h:219
      #11 0x000055874488c0fc in Item::val_time_packed (this=0x7f9a580173f0) at /data/src/10.3/sql/item.h:1592
      #12 0x0000558744d2855e in Item::val_temporal_packed (this=0x7f9a580173f0, f_type=MYSQL_TYPE_TIME) at /data/src/10.3/sql/item.h:1606
      #13 0x0000558744d17953 in Item_func_between::val_int_cmp_temporal (this=0x7f9a580172b0) at /data/src/10.3/sql/item_cmpfunc.cc:2145
      #14 0x0000558744baa2c0 in Type_handler_temporal_result::Item_func_between_val_int (this=0x558745df59a8 <type_handler_time>, func=0x7f9a580172b0) at /data/src/10.3/sql/sql_type.cc:3803
      #15 0x0000558744e62f29 in Item_func_between::val_int (this=0x7f9a580172b0) at /data/src/10.3/sql/item_cmpfunc.h:904
      #16 0x0000558744a1d436 in evaluate_join_record (join=0x7f9a580164d0, join_tab=0x7f9a580a54e8, error=0) at /data/src/10.3/sql/sql_select.cc:19806
      #17 0x0000558744a1d035 in sub_select (join=0x7f9a580164d0, join_tab=0x7f9a580a54e8, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19711
      #18 0x0000558744a1c507 in do_select (join=0x7f9a580164d0, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19251
      #19 0x00005587449f34cf in JOIN::exec_inner (this=0x7f9a580164d0) at /data/src/10.3/sql/sql_select.cc:4124
      #20 0x00005587449f288e in JOIN::exec (this=0x7f9a580164d0) at /data/src/10.3/sql/sql_select.cc:3918
      #21 0x00005587449f3bab in mysql_select (thd=0x7f9a58000d90, tables=0x7f9a58015250, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f9a580163e8, unit=0x7f9a580139c0, select_lex=0x7f9a58014148) at /data/src/10.3/sql/sql_select.cc:4323
      #22 0x0000558744953ba6 in mysql_derived_fill (thd=0x7f9a58000d90, lex=0x7f9a58004b98, derived=0x7f9a58012d08) at /data/src/10.3/sql/sql_derived.cc:1157
      #23 0x0000558744951405 in mysql_handle_single_derived (lex=0x7f9a58004b98, derived=0x7f9a58012d08, phases=96) at /data/src/10.3/sql/sql_derived.cc:199
      #24 0x0000558744a0b307 in st_join_table::preread_init (this=0x7f9a580a7520) at /data/src/10.3/sql/sql_select.cc:12847
      #25 0x0000558744a1ce95 in sub_select (join=0x7f9a58015e80, join_tab=0x7f9a580a7520, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19679
      #26 0x0000558744a1c507 in do_select (join=0x7f9a58015e80, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19251
      #27 0x00005587449f34cf in JOIN::exec_inner (this=0x7f9a58015e80) at /data/src/10.3/sql/sql_select.cc:4124
      #28 0x00005587449f288e in JOIN::exec (this=0x7f9a58015e80) at /data/src/10.3/sql/sql_select.cc:3918
      #29 0x00005587449f3bab in mysql_select (thd=0x7f9a58000d90, tables=0x7f9a58012d08, wild_num=1, fields=..., conds=0x7f9a58013628, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f9a58015e58, unit=0x7f9a58004c58, select_lex=0x7f9a580053e0) at /data/src/10.3/sql/sql_select.cc:4323
      #30 0x00005587449e513e in handle_select (thd=0x7f9a58000d90, lex=0x7f9a58004b98, result=0x7f9a58015e58, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:370
      #31 0x00005587449ab804 in execute_sqlcom_select (thd=0x7f9a58000d90, all_tables=0x7f9a58012d08) at /data/src/10.3/sql/sql_parse.cc:6316
      #32 0x00005587449a2011 in mysql_execute_command (thd=0x7f9a58000d90) at /data/src/10.3/sql/sql_parse.cc:3847
      #33 0x00005587449afb88 in mysql_parse (thd=0x7f9a58000d90, rawbuf=0x7f9a58012ab8 "SELECT * FROM v1 WHERE '2007-03-03 07:25:35' BETWEEN '18:48:20' AND a", length=69, parser_state=0x7f9a741245c0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7840
      #34 0x000055874499c2ec in dispatch_command (command=COM_QUERY, thd=0x7f9a58000d90, packet=0x7f9a58008f11 "", packet_length=69, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
      #35 0x000055874499ac8c in do_command (thd=0x7f9a58000d90) at /data/src/10.3/sql/sql_parse.cc:1398
      #36 0x0000558744b19295 in do_handle_one_connection (connect=0x5587485c0090) at /data/src/10.3/sql/sql_connect.cc:1403
      #37 0x0000558744b18ff1 in handle_one_connection (arg=0x5587485c0090) at /data/src/10.3/sql/sql_connect.cc:1308
      #38 0x00005587454e5061 in pfs_spawn_thread (arg=0x5587485a3460) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #39 0x00007f9a79e0e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #40 0x00007f9a799ea293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Reproducible on 10.3 with at least MyISAM and InnoDB.
      No obvious problem on a non-debug build.
      Couldn't reproduce on 10.2 or 10.4. It may have been fixed in 10.4 in the scope of MDEV-18876 (I didn't check).

      Set to Minor since it's a debug-only failure on an older version.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration