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

Assertion `ts_type != MYSQL_TIMESTAMP_TIME' failed upon inserting into TIME field

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (t TIME);
      SET SESSION SQL_MODE='TRADITIONAL';
      INSERT INTO t1 VALUES ('0000-00-00 00:00:00'),('0000-00-00 00:00:00');
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 492998c0d80

      mysqld: /data/src/10.4/sql/field.h:2619: int Field_temporal::store_invalid_with_warning(const ErrConv*, int, timestamp_type): Assertion `ts_type != MYSQL_TIMESTAMP_TIME' failed.
      180928 15:25:46 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fc615bf1ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000562c71e882e4 in Field_temporal::store_invalid_with_warning (this=0x7fc5f4121b78, str=0x7fc610598610, was_cut=0, ts_type=MYSQL_TIMESTAMP_TIME) at /data/src/10.4/sql/field.h:2619
      #9  0x0000562c71e70965 in Field_time::store_TIME_with_warning (this=0x7fc5f4121b78, t=0x7fc6105985e0, str=0x7fc610598610, warn=0) at /data/src/10.4/sql/field.cc:5687
      #10 0x0000562c71e70c5c in Field_time::store (this=0x7fc5f4121b78, from=0x7fc5f4015a68 "0000-00-00 00:00:00", len=19, cs=0x562c731e1740 <my_charset_latin1>) at /data/src/10.4/sql/field.cc:5712
      #11 0x0000562c71eafa9f in Item::save_str_value_in_field (this=0x7fc5f4015a80, field=0x7fc5f4121b78, result=0x7fc5f4015ab0) at /data/src/10.4/sql/item.cc:340
      #12 0x0000562c71ec22c4 in Item_string::save_in_field (this=0x7fc5f4015a80, field=0x7fc5f4121b78, no_conversions=false) at /data/src/10.4/sql/item.cc:6614
      #13 0x0000562c71b1d25e in fill_record (thd=0x7fc5f4000b00, table=0x7fc5f4138040, ptr=0x7fc5f4121b70, values=..., ignore_errors=false, use_value=false) at /data/src/10.4/sql/sql_base.cc:8490
      #14 0x0000562c71b1d4b1 in fill_record_n_invoke_before_triggers (thd=0x7fc5f4000b00, table=0x7fc5f4138040, ptr=0x7fc5f4121b68, values=..., ignore_errors=false, event=TRG_EVENT_INSERT) at /data/src/10.4/sql/sql_base.cc:8543
      #15 0x0000562c71b5fed0 in mysql_insert (thd=0x7fc5f4000b00, table_list=0x7fc5f4014fd0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/10.4/sql/sql_insert.cc:1006
      #16 0x0000562c71ba54c1 in mysql_execute_command (thd=0x7fc5f4000b00) at /data/src/10.4/sql/sql_parse.cc:4730
      #17 0x0000562c71baffb5 in mysql_parse (thd=0x7fc5f4000b00, rawbuf=0x7fc5f4014e98 "INSERT INTO t1 VALUES ('0000-00-00 00:00:00'),('0000-00-00 00:00:00')", length=69, parser_state=0x7fc6105995f0, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8085
      #18 0x0000562c71b9d3b0 in dispatch_command (command=COM_QUERY, thd=0x7fc5f4000b00, packet=0x7fc5f411d231 "INSERT INTO t1 VALUES ('0000-00-00 00:00:00'),('0000-00-00 00:00:00')", packet_length=69, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1850
      #19 0x0000562c71b9bdd4 in do_command (thd=0x7fc5f4000b00) at /data/src/10.4/sql/sql_parse.cc:1395
      #20 0x0000562c71d02e7f in do_handle_one_connection (connect=0x562c75c45750) at /data/src/10.4/sql/sql_connect.cc:1402
      #21 0x0000562c71d02c03 in handle_one_connection (arg=0x562c75c45750) at /data/src/10.4/sql/sql_connect.cc:1308
      #22 0x0000562c7219da75 in pfs_spawn_thread (arg=0x562c75cdafb0) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #23 0x00007fc6178c8494 in start_thread (arg=0x7fc61059a700) at pthread_create.c:333
      #24 0x00007fc615cae93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.3 returns ER_TRUNCATED_WRONG_VALUE instead, and so does 10.4 non-debug build.

      Attachments

        Activity

          People

            bar Alexander Barkov
            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.