[MDEV-14823] Wrong error message upon selecting from a system_time partition Created: 2017-12-30  Updated: 2018-05-12  Resolved: 2018-05-12

Status: Closed
Project: MariaDB Server
Component/s: Partitioning, Versioned Tables
Affects Version/s: N/A
Fix Version/s: 10.3.7

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Aleksey Midenkov
Resolution: Fixed Votes: 0
Labels: None


 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.



 Comments   
Comment by Aleksey Midenkov [ 2018-04-24 ]

#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

Comment by Aleksey Midenkov [ 2018-04-24 ]

Fixed:

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

Generated at Thu Feb 08 08:16:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.