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

Wrong error message upon selecting from a system_time partition

Details

    Description

      create or replace table t1 (i int) with system versioning partition by system_time limit 10 (partition p0 history, partition pn current);
      select * from t1 partition (p0) for system_time all;
      

      ERROR 4129 (HY000): Table `t1 PARTITION (p0)` is not system-versioned
      

      As it turns out, the idea is that SELECT .. FOR system_time should work for normal partitions, but not for system_time partitions. It's impossible to understand that from the error message.

      Attachments

        Activity

          #0  my_error (nr=4124, MyFlags=0) at /home/midenok/src/mariadb/trunk/src/mysys/my_error.c:113
          #1  0x00000000007f926c in st_select_lex::vers_setup_conds (this=0x7fff7c005300, thd=0x7fff7c000d50, tables=0x7fff7c013c00, where_expr=0x7fff7c014750) at /home/midenok/src/mariadb/trunk/src/sql/sql_select.cc:819
          #2  0x00000000007fb77b in JOIN::prepare (this=0x7fff7c014348, tables_init=0x7fff7c013c00, wild_num=1, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7fff7c005300, unit_arg=0x7fff7c004b88) at /home/midenok/src/mariadb/trunk/src/sql/sql_select.cc:1078
          #3  0x00000000007f7df9 in mysql_select (thd=0x7fff7c000d50, tables=0x7fff7c013c00, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fff7c014328, unit=0x7fff7c004b88, select_lex=0x7fff7c005300) at /home/midenok/src/mariadb/trunk/src/sql/sql_select.cc:4180
          #4  0x00000000007f7773 in handle_select (thd=0x7fff7c000d50, lex=0x7fff7c004ac0, result=0x7fff7c014328, setup_tables_done_option=0) at /home/midenok/src/mariadb/trunk/src/sql/sql_select.cc:370
          #5  0x00000000007b907f in execute_sqlcom_select (thd=0x7fff7c000d50, all_tables=0x7fff7c013c00) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:6564
          #6  0x00000000007adee0 in mysql_execute_command (thd=0x7fff7c000d50) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:3775
          #7  0x00000000007a89a3 in mysql_parse (thd=0x7fff7c000d50, rawbuf=0x7fff7c013978 "select * from t1 partition (p0) for system_time all", length=51, parser_state=0x7fffe52ae640, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:8021
          

          midenok Aleksey Midenkov added a comment - #0 my_error (nr=4124, MyFlags=0) at /home/midenok/src/mariadb/trunk/src/mysys/my_error.c:113 #1 0x00000000007f926c in st_select_lex::vers_setup_conds (this=0x7fff7c005300, thd=0x7fff7c000d50, tables=0x7fff7c013c00, where_expr=0x7fff7c014750) at /home/midenok/src/mariadb/trunk/src/sql/sql_select.cc:819 #2 0x00000000007fb77b in JOIN::prepare (this=0x7fff7c014348, tables_init=0x7fff7c013c00, wild_num=1, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7fff7c005300, unit_arg=0x7fff7c004b88) at /home/midenok/src/mariadb/trunk/src/sql/sql_select.cc:1078 #3 0x00000000007f7df9 in mysql_select (thd=0x7fff7c000d50, tables=0x7fff7c013c00, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fff7c014328, unit=0x7fff7c004b88, select_lex=0x7fff7c005300) at /home/midenok/src/mariadb/trunk/src/sql/sql_select.cc:4180 #4 0x00000000007f7773 in handle_select (thd=0x7fff7c000d50, lex=0x7fff7c004ac0, result=0x7fff7c014328, setup_tables_done_option=0) at /home/midenok/src/mariadb/trunk/src/sql/sql_select.cc:370 #5 0x00000000007b907f in execute_sqlcom_select (thd=0x7fff7c000d50, all_tables=0x7fff7c013c00) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:6564 #6 0x00000000007adee0 in mysql_execute_command (thd=0x7fff7c000d50) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:3775 #7 0x00000000007a89a3 in mysql_parse (thd=0x7fff7c000d50, rawbuf=0x7fff7c013978 "select * from t1 partition (p0) for system_time all", length=51, parser_state=0x7fffe52ae640, is_com_multi=false, is_next_command=false) at /home/midenok/src/mariadb/trunk/src/sql/sql_parse.cc:8021

          Fixed:

          ERROR 4143 (HY000): SYSTEM_TIME partition `p0` in table `t1` does not support historical query
          

          midenok Aleksey Midenkov added a comment - Fixed: ERROR 4143 (HY000): SYSTEM_TIME partition `p0` in table `t1` does not support historical query

          People

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