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

Assertion `!check_datetime_range(ltime)' failed in TIME_to_longlong_datetime_packed

    XMLWordPrintable

    Details

      Description

      CREATE  TABLE t1 (a DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP);
      INSERT INTO t1 VALUES ('2012-12-12 12:12:12'),('2011-12-12 12:12:12');
      SET SQL_MODE= 'NO_ZERO_IN_DATE';
      SELECT a FROM t1 GROUP BY a ORDER BY DEFAULT(a);
       
      # Cleanup
      DROP TABLE t1;
      

      10.2 2d6719d7

      mysqld: /data/src/10.2/sql/compat56.cc:241: longlong TIME_to_longlong_datetime_packed(const MYSQL_TIME*): Assertion `!check_datetime_range(ltime)' failed.
      190927 18:31:10 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fa6d6784f12 in __GI___assert_fail (assertion=0x555cef177518 "!check_datetime_range(ltime)", file=0x555cef177480 "/data/src/10.2/sql/compat56.cc", line=241, function=0x555cef1776e0 <TIME_to_longlong_datetime_packed(st_mysql_time const*)::__PRETTY_FUNCTION__> "longlong TIME_to_longlong_datetime_packed(const MYSQL_TIME*)") at assert.c:101
      #8  0x0000555cee86bd7f in TIME_to_longlong_datetime_packed (ltime=0x7fa6d0ab6950) at /data/src/10.2/sql/compat56.cc:241
      #9  0x0000555cee88529f in Field_datetimef::store_TIME (this=0x7fa6c01767e8, ltime=0x7fa6d0ab6950) at /data/src/10.2/sql/field.cc:7015
      #10 0x0000555cee87fe3c in Field_temporal_with_date::store_TIME_with_warning (this=0x7fa6c01767e8, ltime=0x7fa6d0ab6950, str=0x7fa6d0ab6980, was_cut=0, have_smth_to_conv=1) at /data/src/10.2/sql/field.cc:5766
      #11 0x0000555cee880311 in Field_temporal_with_date::store_time_dec (this=0x7fa6c01767e8, ltime=0x7fa6d0ab6bd0, dec=0) at /data/src/10.2/sql/field.cc:5835
      #12 0x0000555cee8994c7 in Field::do_field_temporal (copy=0x7fa6c0015430) at /data/src/10.2/sql/field_conv.cc:434
      #13 0x0000555cee69faf8 in copy_fields (param=0x7fa6c0015390) at /data/src/10.2/sql/sql_select.cc:23482
      #14 0x0000555cee697be5 in end_write (join=0x7fa6c0013168, join_tab=0x7fa6c0014870, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:20257
      #15 0x0000555cee6a90b6 in AGGR_OP::put_record (this=0x7fa6c0015520, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:26781
      #16 0x0000555cee6aebc3 in AGGR_OP::put_record (this=0x7fa6c0015520) at /data/src/10.2/sql/sql_select.h:973
      #17 0x0000555cee693f70 in sub_select_postjoin_aggr (join=0x7fa6c0013168, join_tab=0x7fa6c0014870, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18575
      #18 0x0000555cee694ba4 in evaluate_join_record (join=0x7fa6c0013168, join_tab=0x7fa6c00144c0, error=0) at /data/src/10.2/sql/sql_select.cc:19074
      #19 0x0000555cee694490 in sub_select (join=0x7fa6c0013168, join_tab=0x7fa6c00144c0, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18854
      #20 0x0000555cee693a17 in do_select (join=0x7fa6c0013168, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:18398
      #21 0x0000555cee66d40b in JOIN::exec_inner (this=0x7fa6c0013168) at /data/src/10.2/sql/sql_select.cc:3623
      #22 0x0000555cee66c8c6 in JOIN::exec (this=0x7fa6c0013168) at /data/src/10.2/sql/sql_select.cc:3418
      #23 0x0000555cee66da7c in mysql_select (thd=0x7fa6c0000b00, tables=0x7fa6c0012688, wild_num=0, fields=..., conds=0x0, og_num=2, order=0x7fa6c0013028, group=0x7fa6c0012dc0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fa6c0013148, unit=0x7fa6c0004700, select_lex=0x7fa6c0004e40) at /data/src/10.2/sql/sql_select.cc:3818
      #24 0x0000555cee661ce8 in handle_select (thd=0x7fa6c0000b00, lex=0x7fa6c0004638, result=0x7fa6c0013148, setup_tables_done_option=0) at /data/src/10.2/sql/sql_select.cc:361
      #25 0x0000555cee62ceb1 in execute_sqlcom_select (thd=0x7fa6c0000b00, all_tables=0x7fa6c0012688) at /data/src/10.2/sql/sql_parse.cc:6225
      #26 0x0000555cee623892 in mysql_execute_command (thd=0x7fa6c0000b00) at /data/src/10.2/sql/sql_parse.cc:3532
      #27 0x0000555cee630d64 in mysql_parse (thd=0x7fa6c0000b00, rawbuf=0x7fa6c0012468 "SELECT a FROM t1 GROUP BY a ORDER BY DEFAULT(a)", length=47, parser_state=0x7fa6d0ab8200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7759
      #28 0x0000555cee61f06d in dispatch_command (command=COM_QUERY, thd=0x7fa6c0000b00, packet=0x7fa6c008d561 "", packet_length=47, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1831
      #29 0x0000555cee61d9c1 in do_command (thd=0x7fa6c0000b00) at /data/src/10.2/sql/sql_parse.cc:1384
      #30 0x0000555cee772c19 in do_handle_one_connection (connect=0x555cf23e8900) at /data/src/10.2/sql/sql_connect.cc:1336
      #31 0x0000555cee772984 in handle_one_connection (arg=0x555cf23e8900) at /data/src/10.2/sql/sql_connect.cc:1241
      #32 0x0000555ceefa37fa in pfs_spawn_thread (arg=0x555cf240bbb0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #33 0x00007fa6d82f94a4 in start_thread (arg=0x7fa6d0ab9700) at pthread_create.c:456
      #34 0x00007fa6d6841d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible with MyISAM, InnoDB, Aria.
      Reproducible on 10.2, 10.3.
      Couldn't reproduce on 10.1, 10.4, 10.5.

        Attachments

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration