mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
cannot rotate both by INTERVAL and LIMIT
This commit is contained in:
parent
dfb6f96eaf
commit
62b5427394
3 changed files with 25 additions and 18 deletions
|
@ -281,6 +281,11 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
|
|||
partition p0 history,
|
||||
partition p1 history,
|
||||
partition pn current)' at line 3
|
||||
create table t1 (i int) with system versioning
|
||||
partition by system_time interval 6 day limit 98
|
||||
(partition p0 history, partition ver_pn current);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'limit 98
|
||||
(partition p0 history, partition ver_pn current)' at line 2
|
||||
### ha_partition::update_row() check
|
||||
create or replace table t1 (x int)
|
||||
with system versioning
|
||||
|
|
|
@ -245,6 +245,11 @@ partition by system_time interval 1 second starts 12345 (
|
|||
partition p1 history,
|
||||
partition pn current);
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
create table t1 (i int) with system versioning
|
||||
partition by system_time interval 6 day limit 98
|
||||
(partition p0 history, partition ver_pn current);
|
||||
|
||||
--echo ### ha_partition::update_row() check
|
||||
create or replace table t1 (x int)
|
||||
with system versioning
|
||||
|
|
|
@ -5205,8 +5205,7 @@ part_type_def:
|
|||
{ Lex->part_info->part_type= LIST_PARTITION; }
|
||||
| SYSTEM_TIME_SYM
|
||||
{ if (Lex->part_info->vers_init_info(thd)) MYSQL_YYABORT; }
|
||||
opt_versioning_interval
|
||||
opt_versioning_limit
|
||||
opt_versioning_rotation
|
||||
;
|
||||
|
||||
opt_linear:
|
||||
|
@ -5842,7 +5841,7 @@ opt_part_option:
|
|||
{ Lex->part_info->curr_part_elem->part_comment= $3.str; }
|
||||
;
|
||||
|
||||
opt_versioning_interval:
|
||||
opt_versioning_rotation:
|
||||
/* empty */ {}
|
||||
| INTERVAL_SYM expr interval opt_versioning_interval_start
|
||||
{
|
||||
|
@ -5855,6 +5854,19 @@ opt_versioning_interval:
|
|||
MYSQL_YYABORT;
|
||||
}
|
||||
}
|
||||
| LIMIT ulonglong_num
|
||||
{
|
||||
partition_info *part_info= Lex->part_info;
|
||||
if (part_info->vers_set_limit($2))
|
||||
{
|
||||
my_error(ER_PART_WRONG_VALUE, MYF(0),
|
||||
Lex->create_last_non_select_table->table_name.str,
|
||||
"LIMIT");
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
;
|
||||
|
||||
opt_versioning_interval_start:
|
||||
|
@ -5874,21 +5886,6 @@ opt_versioning_interval_start:
|
|||
}
|
||||
;
|
||||
|
||||
opt_versioning_limit:
|
||||
/* empty */ {}
|
||||
| LIMIT ulonglong_num
|
||||
{
|
||||
partition_info *part_info= Lex->part_info;
|
||||
if (part_info->vers_set_limit($2))
|
||||
{
|
||||
my_error(ER_PART_WRONG_VALUE, MYF(0),
|
||||
Lex->create_last_non_select_table->table_name.str,
|
||||
"LIMIT");
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
/*
|
||||
End of partition parser part
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue