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

Server crashes in Field::set_datetime_warning upon using EITS

    XMLWordPrintable

Details

    Description

      set use_stat_tables= 'PREFERABLY';
       
      CREATE TABLE t (f int);
      INSERT INTO t VALUES (NULL),(1113260032);
      ANALYZE TABLE t PERSISTENT FOR ALL;
      TRUNCATE t;
      ALTER TABLE t MODIFY f DATETIME, ALGORITHM=COPY;
      CREATE TABLE t2 AS SELECT 0 FROM INFORMATION_SCHEMA.STATISTICS WHERE INDEX_TYPE = 'BTREE';
       
      # Cleanup
      DROP TABLE t2, t;
      

      10.4 2e1c532b

      #3  <signal handler called>
      #4  Field::set_datetime_warning (this=0x7fc1b806c4e0, level=Sql_state_errno_level::WARN_LEVEL_WARN, code=1265, str=0x7fc1ca787e30, typestr=0x55af251544e0 "datetime", cuted_increment=1) at /data/src/10.4/sql/field.cc:11346
      #5  0x000055af24465fc8 in Field_temporal::set_warnings (this=0x7fc1b806c4e0, trunc_level=Sql_state_errno_level::WARN_LEVEL_WARN, str=0x7fc1ca787e30, was_cut=1, typestr=0x55af251544e0 "datetime") at /data/src/10.4/sql/field.cc:5680
      #6  0x000055af24481eac in Field_temporal::store_invalid_with_warning (this=0x7fc1b806c4e0, str=0x7fc1ca787e30, was_cut=1, typestr=0x55af251544e0 "datetime") at /data/src/10.4/sql/field.h:2757
      #7  0x000055af244660c2 in Field_datetime::store_TIME_with_warning (this=0x7fc1b806c4e0, dt=0x7fc1ca787e00, str=0x7fc1ca787e30, was_cut=1) at /data/src/10.4/sql/field.cc:5703
      #8  0x000055af244662cd in Field_datetime::store (this=0x7fc1b806c4e0, from=0x7fc1b814f2dd "1113260032", len=10, cs=0x55af258e41a0 <my_charset_bin>) at /data/src/10.4/sql/field.cc:5718
      #9  0x000055af2421834d in Column_stat::get_stat_values (this=0x7fc1ca788560) at /data/src/10.4/sql/sql_statistics.cc:1139
      #10 0x000055af242124fc in read_statistics_for_table (thd=0x7fc1b8000da0, table=0x7fc1b8067aa0, stat_tables=0x7fc1ca788750) at /data/src/10.4/sql/sql_statistics.cc:2931
      #11 0x000055af242133bc in read_statistics_for_tables (thd=0x7fc1b8000da0, tables=0x7fc1b805aec8) at /data/src/10.4/sql/sql_statistics.cc:3222
      #12 0x000055af241fead9 in get_schema_stat_record (thd=0x7fc1b8000da0, tables=0x7fc1b805aec8, table=0x7fc1b807f588, res=false, db_name=0x7fc1b8058dc0, table_name=0x7fc1b8058e08) at /data/src/10.4/sql/sql_show.cc:6764
      #13 0x000055af241f57ea in fill_schema_table_by_open (thd=0x7fc1b8000da0, mem_root=0x7fc1ca78bb70, is_show_fields_or_keys=false, table=0x7fc1b807f588, schema_table=0x55af258aca60 <schema_tables+1984>, orig_db_name=0x7fc1b8058dc0, orig_table_name=0x7fc1b8058e08, open_tables_state_backup=0x7fc1ca78bbc0, can_deadlock=true) at /data/src/10.4/sql/sql_show.cc:4740
      #14 0x000055af241f72bb in get_all_tables (thd=0x7fc1b8000da0, tables=0x7fc1b8015610, cond=0x7fc1b8015ed0) at /data/src/10.4/sql/sql_show.cc:5373
      #15 0x000055af24209cb2 in get_schema_tables_result (join=0x7fc1b8017fb0, executed_place=PROCESSED_BY_JOIN_EXEC) at /data/src/10.4/sql/sql_show.cc:9086
      #16 0x000055af24193446 in JOIN::exec_inner (this=0x7fc1b8017fb0) at /data/src/10.4/sql/sql_select.cc:4547
      #17 0x000055af24192810 in JOIN::exec (this=0x7fc1b8017fb0) at /data/src/10.4/sql/sql_select.cc:4372
      #18 0x000055af2419400f in mysql_select (thd=0x7fc1b8000da0, tables=0x7fc1b8015610, wild_num=0, fields=..., conds=0x7fc1b8015ed0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2953054976, result=0x7fc1b8017eb8, unit=0x7fc1b8004cd8, select_lex=0x7fc1b8015050) at /data/src/10.4/sql/sql_select.cc:4811
      #19 0x000055af24182ddf in handle_select (thd=0x7fc1b8000da0, lex=0x7fc1b8004c18, result=0x7fc1b8017eb8, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:442
      #20 0x000055af24242104 in Sql_cmd_create_table_like::execute (this=0x7fc1b80148f8, thd=0x7fc1b8000da0) at /data/src/10.4/sql/sql_table.cc:11692
      #21 0x000055af24144903 in mysql_execute_command (thd=0x7fc1b8000da0) at /data/src/10.4/sql/sql_parse.cc:6206
      #22 0x000055af24149d83 in mysql_parse (thd=0x7fc1b8000da0, rawbuf=0x7fc1b80147e8 "CREATE TABLE t2 AS SELECT 0 FROM INFORMATION_SCHEMA.STATISTICS WHERE INDEX_TYPE = 'BTREE'", length=89, parser_state=0x7fc1ca78d3c0, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7998
      #23 0x000055af241357b5 in dispatch_command (command=COM_QUERY, thd=0x7fc1b8000da0, packet=0x7fc1b800ac41 "CREATE TABLE t2 AS SELECT 0 FROM INFORMATION_SCHEMA.STATISTICS WHERE INDEX_TYPE = 'BTREE'", packet_length=89, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
      #24 0x000055af2413401c in do_command (thd=0x7fc1b8000da0) at /data/src/10.4/sql/sql_parse.cc:1378
      #25 0x000055af242d49ca in do_handle_one_connection (connect=0x55af268bca00) at /data/src/10.4/sql/sql_connect.cc:1420
      #26 0x000055af242d4732 in handle_one_connection (arg=0x55af268bca00) at /data/src/10.4/sql/sql_connect.cc:1324
      #27 0x000055af24824a48 in pfs_spawn_thread (arg=0x55af26902930) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #28 0x00007fc1d07c8fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #29 0x00007fc1d084966c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.