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

Assertion `table->versioned(VERS_TRX_ID) || (table->versioned() && table->s->table_category == TABLE_CATEGORY_TEMPORARY)' failed in Field_vers_trx_id::get_date

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE OR REPLACE TABLE t1 (a INT, s BIGINT UNSIGNED AS ROW START, e BIGINT UNSIGNED AS ROW END, PERIOD FOR SYSTEM_TIME(s,e)) WITH SYSTEM VERSIONING ENGINE=InnoDB; 
      CREATE OR REPLACE ALGORITHM=TEMPTABLE VIEW v AS SELECT * FROM t1;
      INSERT INTO t1 (a) VALUES (1);
       
      CREATE OR REPLACE TABLE t2 (f TIMESTAMP);
      INSERT INTO t2 VALUES ('2019-04-01 23:22:12'),('2019-04-01 23:22:12');
      SELECT * from v WHERE s IN (SELECT f FROM t2);
       
      # Cleanup
      DROP VIEW v;
      DROP TABLE t1, t2;
      

      10.3 ed661a0e

      mysqld: /data/src/10.3/sql/field.cc:2096: bool Field_vers_trx_id::get_date(MYSQL_TIME*, ulonglong, ulonglong): Assertion `table->versioned(VERS_TRX_ID) || (table->versioned() && table->s->table_category == TABLE_CATEGORY_TEMPORARY)' failed.
      190402  3:09:22 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f11f7889ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055676aa8d0a6 in Field_vers_trx_id::get_date (this=0x7f11a003fd98, ltime=0x7f11f0bcd9e0, fuzzydate=33554433, trx_id=36) at /data/src/10.3/sql/field.cc:2095
      #9  0x000055676aab9ae2 in Field_vers_trx_id::get_date (this=0x7f11a003fd98, ltime=0x7f11f0bcd9e0, fuzzydate=33554433) at /data/src/10.3/sql/field.h:2353
      #10 0x000055676aaeb3ba in Item_field::get_date (this=0x7f11a0015578, ltime=0x7f11f0bcd9e0, fuzzydate=33554433) at /data/src/10.3/sql/item.cc:3445
      #11 0x000055676a9b3030 in Temporal_with_date::make_from_item (this=0x7f11f0bcd9e0, thd=0x7f11a0000b00, item=0x7f11a0015578, flags=33554433) at /data/src/10.3/sql/sql_type.cc:150
      #12 0x000055676a6c9870 in Temporal_with_date::Temporal_with_date (this=0x7f11f0bcd9e0, thd=0x7f11a0000b00, item=0x7f11a0015578, flags=33554433) at /data/src/10.3/sql/sql_type.h:295
      #13 0x000055676a6c9934 in Datetime::Datetime (this=0x7f11f0bcd9e0, thd=0x7f11a0000b00, item=0x7f11a0015578, flags=33554433) at /data/src/10.3/sql/sql_type.h:370
      #14 0x000055676a6ca58e in Item::val_datetime_packed (this=0x7f11a0015578) at /data/src/10.3/sql/item.h:1521
      #15 0x000055676ab0b8e7 in Arg_comparator::compare_datetime (this=0x7f11a00415e8) at /data/src/10.3/sql/item_cmpfunc.cc:736
      #16 0x000055676ab1fef2 in Arg_comparator::compare (this=0x7f11a00415e8) at /data/src/10.3/sql/item_cmpfunc.h:102
      #17 0x000055676ab0eb2b in Item_func_eq::val_int (this=0x7f11a0041528) at /data/src/10.3/sql/item_cmpfunc.cc:1728
      #18 0x000055676a8d1990 in SQL_SELECT::skip_record (this=0x7f11a0044130, thd=0x7f11a0000b00) at /data/src/10.3/sql/opt_range.h:1658
      #19 0x000055676a97cea9 in JOIN_CACHE::check_match (this=0x7f11a0044300, rec_ptr=0x7f11a00ab981 "") at /data/src/10.3/sql/sql_join_cache.cc:2449
      #20 0x000055676a97896c in JOIN_CACHE::generate_full_extensions (this=0x7f11a0044300, rec_ptr=0x7f11a00ab981 "") at /data/src/10.3/sql/sql_join_cache.cc:2392
      #21 0x000055676a97874c in JOIN_CACHE::join_matching_records (this=0x7f11a0044300, skip_last=false) at /data/src/10.3/sql/sql_join_cache.cc:2292
      #22 0x000055676a978118 in JOIN_CACHE::join_records (this=0x7f11a0044300, skip_last=false) at /data/src/10.3/sql/sql_join_cache.cc:2088
      #23 0x000055676a8440cf in sub_select_cache (join=0x7f11a0019668, join_tab=0x7f11a00460f8, end_of_records=true) at /data/src/10.3/sql/sql_select.cc:19176
      #24 0x000055676a8442dc in sub_select (join=0x7f11a0019668, join_tab=0x7f11a0045d48, end_of_records=true) at /data/src/10.3/sql/sql_select.cc:19347
      #25 0x000055676a843aa4 in do_select (join=0x7f11a0019668, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18938
      #26 0x000055676a81c607 in JOIN::exec_inner (this=0x7f11a0019668) at /data/src/10.3/sql/sql_select.cc:4040
      #27 0x000055676a81ba48 in JOIN::exec (this=0x7f11a0019668) at /data/src/10.3/sql/sql_select.cc:3834
      #28 0x000055676a81cce8 in mysql_select (thd=0x7f11a0000b00, tables=0x7f11a0014f10, wild_num=1, fields=..., conds=0x7f11a00169d0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f11a0019640, unit=0x7f11a00049c8, select_lex=0x7f11a0005138) at /data/src/10.3/sql/sql_select.cc:4239
      #29 0x000055676a80ec08 in handle_select (thd=0x7f11a0000b00, lex=0x7f11a0004900, result=0x7f11a0019640, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:385
      #30 0x000055676a7d95ff in execute_sqlcom_select (thd=0x7f11a0000b00, all_tables=0x7f11a0014f10) at /data/src/10.3/sql/sql_parse.cc:6548
      #31 0x000055676a7cff1e in mysql_execute_command (thd=0x7f11a0000b00) at /data/src/10.3/sql/sql_parse.cc:3821
      #32 0x000055676a7dd59d in mysql_parse (thd=0x7f11a0000b00, rawbuf=0x7f11a0014ce8 "SELECT * from v WHERE s IN (SELECT f FROM t2)", length=45, parser_state=0x7f11f0bcf5f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8091
      #33 0x000055676a7ca86c in dispatch_command (command=COM_QUERY, thd=0x7f11a0000b00, packet=0x7f11a01621d1 "", packet_length=45, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1857
      #34 0x000055676a7c9256 in do_command (thd=0x7f11a0000b00) at /data/src/10.3/sql/sql_parse.cc:1403
      #35 0x000055676a931eef in do_handle_one_connection (connect=0x55676ed03220) at /data/src/10.3/sql/sql_connect.cc:1402
      #36 0x000055676a931c73 in handle_one_connection (arg=0x55676ed03220) at /data/src/10.3/sql/sql_connect.cc:1308
      #37 0x000055676adce589 in pfs_spawn_thread (arg=0x55676ec48140) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #38 0x00007f11f9778494 in start_thread (arg=0x7f11f0bd0700) at pthread_create.c:333
      #39 0x00007f11f794693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      No obvious effect on a non-debug build.

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.