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

Assertion failure upon using session variable as INTERVAL parameter

    XMLWordPrintable

Details

    Description

      Reproduce

      set @a= 1;
      create or replace table t1 (i int) with system versioning
      partition by system_time interval @a day
      (partition p0 history, partition pn current);
      

      Result

      mysqld: /home/midenok/src/mariadb/10.3/src/sql/item_func.cc:5284: virtual longlong Item_func_get_user_var::val_int(): Assertion `fixed == 1' failed.
      

      #3  0x00007ffff6d14142 in __GI___assert_fail (assertion=0x15d05f1 "fixed == 1", file=0x15c837e "/home/midenok/src/mariadb/10.3/src/sql/item_func.cc", line=5284, function=0x15c9f9e "virtual longlong Item_func_get_user_var::val_int()") at assert.c:101
      #4  0x0000000000b7b2e9 in Item_func_get_user_var::val_int (this=0x7fff84015830) at /home/midenok/src/mariadb/10.3/src/sql/item_func.cc:5284
      #5  0x0000000000bf8e15 in get_interval_value (args=0x7fff84015830, int_type=INTERVAL_DAY, interval=0x7fff840157c8) at /home/midenok/src/mariadb/10.3/src/sql/item_timefunc.cc:1338
      #6  0x0000000000a2698a in partition_info::vers_set_interval (this=0x7fff84015580, item=0x7fff84015830, int_type=INTERVAL_DAY, start=1549965985) at /home/midenok/src/mariadb/10.3/src/sql/partition_info.h:403
      #7  0x00000000009f4d83 in MYSQLparse (thd=0x7fff84000cf8) at /home/midenok/src/mariadb/10.3/src/sql/sql_yacc.yy:6066
      #8  0x000000000079477a in parse_sql (thd=0x7fff84000cf8, parser_state=0x7ffff4ab5640, creation_ctx=0x0, do_pfs_digest=true) at /home/midenok/src/mariadb/10.3/src/sql/sql_parse.cc:10106
      #9  0x000000000077fc40 in mysql_parse (thd=0x7fff84000cf8, rawbuf=0x7fff84014c50 "create or replace table t1 (i int) with system versioning partition by system_time interval @a day (partition p0 history, partition pn current)", length=143, parser_state=0x7ffff4ab5640, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/10.3/src/sql/sql_parse.cc:8048
      

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              midenok Aleksey Midenkov
              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.