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

Assertion `!check_datetime_range(ltime)' failed in TIME_to_longlong_datetime_packed

    XMLWordPrintable

Details

    Description

      mysqld: /data/src/10.2/sql/compat56.cc:241: longlong TIME_to_longlong_datetime_packed(const MYSQL_TIME*): Assertion `!check_datetime_range(ltime)' failed.
      161219 14:16:33 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007ffb01358312 in __GI___assert_fail (assertion=0x7ffb03edfb87 "!check_datetime_range(ltime)", file=0x7ffb03edfb00 "/data/src/10.2/sql/compat56.cc", line=241, function=0x7ffb03edfe00 <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  0x00007ffb036b1c55 in TIME_to_longlong_datetime_packed (ltime=ltime@entry=0x7ffb044ea640) at /data/src/10.2/sql/compat56.cc:241
      #9  0x00007ffb036b7cfc in Field_datetimef::store_TIME (this=0x7ffadb218990, ltime=0x7ffb044ea640) at /data/src/10.2/sql/field.cc:6801
      #10 0x00007ffb036cad11 in Field_temporal_with_date::store_TIME_with_warning (this=this@entry=0x7ffadb218990, ltime=ltime@entry=0x7ffb044ea640, str=str@entry=0x7ffb044ea670, was_cut=0, have_smth_to_conv=<optimized out>) at /data/src/10.2/sql/field.cc:5559
      #11 0x00007ffb036cb22d in Field_temporal_with_date::store_time_dec (this=this@entry=0x7ffadb218990, ltime=ltime@entry=0x7ffb044ea8c0, dec=<optimized out>) at /data/src/10.2/sql/field.cc:5628
      #12 0x00007ffb036ce51c in Field_temporal::save_in_field (this=0x7ffadb02a288, to=0x7ffadb218990) at /data/src/10.2/sql/field.h:2280
      #13 0x00007ffb036cd9e1 in Field::store_field (this=<optimized out>, from=<optimized out>) at /data/src/10.2/sql/field.h:806
      #14 0x00007ffb036d154d in field_conv_incompatible (to=to@entry=0x7ffadb218990, from=from@entry=0x7ffadb02a288) at /data/src/10.2/sql/field_conv.cc:814
      #15 0x00007ffb036d2875 in field_conv (to=to@entry=0x7ffadb218990, from=from@entry=0x7ffadb02a288) at /data/src/10.2/sql/field_conv.cc:827
      #16 0x00007ffb036ec666 in save_field_in_field (from=0x7ffadb02a288, null_value=0x7ffadb219c12, to=0x7ffadb218990, no_conversions=<optimized out>) at /data/src/10.2/sql/item.cc:6173
      #17 0x00007ffb036ec6dd in Item_field::save_in_field (this=<optimized out>, to=<optimized out>, no_conversions=<optimized out>) at /data/src/10.2/sql/item.cc:6219
      #18 0x00007ffb035c461d in TABLE::update_virtual_field (this=this@entry=0x7ffadb0d9470, vf=0x7ffadb218990) at /data/src/10.2/sql/table.cc:7373
      #19 0x00007ffb038d6695 in innobase_get_computed_value (row=row@entry=0x7ffadb22d128, col=<optimized out>, index=<optimized out>, local_heap=local_heap@entry=0x7ffb044ebca0, heap=heap@entry=0x0, ifield=ifield@entry=0x7ffadb0f0298, thd=0x7ffadb016070, mysql_table=0x7ffadb0d9470, old_table=0x7ffadb165688, parent_update=0x0, foreign=0x0) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:23810
      #20 0x00007ffb039e7084 in row_merge_buf_add (buf=buf@entry=0x7ffadb04fc08, fts_index=fts_index@entry=0x0, old_table=old_table@entry=0x7ffadb165688, new_table=new_table@entry=0x7ffadb165688, psort_info=psort_info@entry=0x0, row=row@entry=0x7ffadb22d128, ext=0x0, doc_id=0x7ffb044ebca8, conv_heap=0x0, err=0x7ffb044ebc64, v_heap=0x7ffb044ebca0, my_table=0x7ffadb0d9470, trx=0x7ffaf98008e8) at /data/src/10.2/storage/innobase/row/row0merge.cc:693
      #21 0x00007ffb039f23c5 in row_merge_read_clustered_index (eval_table=0x7ffadb0d9470, crypt_block=0x0, crypt_data=0x0, pct_cost=<optimized out>, stage=0x7ffadb1f20b0, tmpfd=0x7ffb044ebc60, skip_pk_sort=<optimized out>, block=0x7ffafb0ff000 <error: Cannot access memory at address 0x7ffafb0ff000>, sequence=..., add_autoinc=18446744073709551615, col_map=0x0, add_v=0x0, add_cols=0x0, n_index=1, key_numbers=0x7ffadb02a9d8, files=0x7ffadb0562c0, psort_info=0x0, fts_sort_idx=0x0, index=0x7ffadb02a9d0, online=true, new_table=<optimized out>, old_table=0x7ffadb165688, table=0x7ffadb0d9470, trx=0x7ffaf98008e8) at /data/src/10.2/storage/innobase/row/row0merge.cc:2352
      #22 row_merge_build_indexes (trx=0x7ffaf98008e8, old_table=0x7ffadb165688, new_table=<optimized out>, online=true, indexes=0x7ffadb02a9d0, key_numbers=0x7ffadb02a9d8, n_indexes=1, table=0x7ffadb0d9470, add_cols=0x0, col_map=0x0, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=false, stage=0x7ffadb1f20b0, add_v=0x0, eval_table=0x7ffadb0d9470) at /data/src/10.2/storage/innobase/row/row0merge.cc:4822
      #23 0x00007ffb038ff76d in ha_innobase::inplace_alter_table (this=0x7ffadb0b5088, altered_table=0x7ffadb0d9470, ha_alter_info=0x7ffb044ecc50) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:6514
      #24 0x00007ffb035915ea in ha_inplace_alter_table (ha_alter_info=0x7ffb044ecc50, altered_table=0x7ffadb0d9470, this=<optimized out>) at /data/src/10.2/sql/handler.h:3744
      #25 mysql_inplace_alter_table (thd=thd@entry=0x7ffadb016070, table_list=0x7ffadb064180, table=table@entry=0x7ffadb0d7c70, altered_table=altered_table@entry=0x7ffadb0d9470, ha_alter_info=ha_alter_info@entry=0x7ffb044ecc50, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7ffb044ecd30, alter_ctx=0x7ffb044edb10) at /data/src/10.2/sql/sql_table.cc:7290
      #26 0x00007ffb03599132 in mysql_alter_table (thd=thd@entry=0x7ffadb016070, new_db=<optimized out>, new_name=<optimized out>, create_info=create_info@entry=0x7ffb044ee710, table_list=table_list@entry=0x7ffadb064180, alter_info=alter_info@entry=0x7ffb044ee660, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9219
      #27 0x00007ffb035f48f9 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x7ffadb016070) at /data/src/10.2/sql/sql_alter.cc:324
      #28 0x00007ffb034fc92b in mysql_execute_command (thd=thd@entry=0x7ffadb016070) at /data/src/10.2/sql/sql_parse.cc:6116
      #29 0x00007ffb034fe2d2 in mysql_parse (thd=thd@entry=0x7ffadb016070, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7ffb044f08e0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:7790
      #30 0x00007ffb0350055b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7ffadb016070, packet=packet@entry=0x7ffadb058071 "ALTER TABLE t1 ADD INDEX(vcol_datetime)", packet_length=packet_length@entry=39, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1799
      #31 0x00007ffb0350308d in do_command (thd=0x7ffadb016070) at /data/src/10.2/sql/sql_parse.cc:1359
      #32 0x00007ffb035f0f4a in do_handle_one_connection (connect=connect@entry=0x7ffb00871f70) at /data/src/10.2/sql/sql_connect.cc:1354
      #33 0x00007ffb035f1133 in handle_one_connection (arg=arg@entry=0x7ffb00871f70) at /data/src/10.2/sql/sql_connect.cc:1260
      #34 0x00007ffb0389f1bf in pfs_spawn_thread (arg=0x7ffaeb3f44f0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #35 0x00007ffb02bf20a4 in start_thread (arg=0x7ffb044f2300) at pthread_create.c:309
      #36 0x00007ffb0141287d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      --source include/have_innodb.inc
       
      CREATE TABLE t1 ( 
       pk INT AUTO_INCREMENT,
       col_varchar VARCHAR(847) NOT NULL DEFAULT '',
       col_int BIGINT(15) UNSIGNED ZEROFILL NULL,
       col_datetime DATETIME(3) NOT NULL DEFAULT '1900-01-01 00:00:00',
       col_time TIME(5) NOT NULL DEFAULT '00:00:00',
       col_blob TEXT NULL,
       col_bit BIT(34) NULL,
       col_year YEAR NULL,
       col_char CHAR(10) NULL,
       col_dec DECIMAL(18,9) NOT NULL DEFAULT 0,
       col_enum ENUM('','a','b','c','d','e','f','foo','bar') NOT NULL DEFAULT '',
       col_date DATE NOT NULL DEFAULT '1900-01-01',
       col_timestamp TIMESTAMP(3) NOT NULL DEFAULT '1971-01-01 00:00:00',
       vcol_datetime DATETIME AS (col_datetime) VIRTUAL,
       vcol_dec DECIMAL(18,9) ZEROFILL AS (col_dec) VIRTUAL,
       vcol_bit BIT(63) AS (col_bit) VIRTUAL,
       vcol_char BINARY(51) AS (col_char) VIRTUAL,
       vcol_timestamp TIMESTAMP(5) AS (col_timestamp) VIRTUAL,
       vcol_enum ENUM('','a','b','c','d','e','f','foo','bar') AS (col_enum) VIRTUAL,
       vcol_int TINYINT(48) ZEROFILL AS (col_int) VIRTUAL,
       vcol_time TIME(4) AS (col_time) VIRTUAL,
       vcol_varchar VARBINARY(3873) AS (col_varchar) VIRTUAL,
       vcol_year YEAR AS (col_year) VIRTUAL,
       vcol_date DATE AS (col_date) VIRTUAL,
       vcol_blob LONGTEXT AS (col_blob) VIRTUAL,
       PRIMARY KEY(pk)
       ) ENGINE=InnoDB;
       
      INSERT INTO t1 (col_varchar,col_int,col_datetime,col_time,col_blob,col_bit,col_year,col_char,col_dec,col_enum,col_date,col_timestamp) VALUES
       ('foo',1,'2010-05-08 13:08:12.034783','18:32:14','foo',b'0111110101001001',1992,'f',0.2,'','1994-12-26','2019-01-11 00:00:00'),
       ('bar',6,'1900-01-01 00:00:00','00:00:00','bar',b'10011000001101011000101',1985,'b',0.7,'','2028-04-06','1971-01-01 00:00:00');
       
      ALTER TABLE t1 ADD INDEX(vcol_datetime);
      

      No crash on a non-debug build.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.