mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
MDEV-15168 Unexpected ER_VERS_ENGINE_UNSUPPORTED upon dropping versioning on a partitioned table
Vers_parse_info::fix_alter_info(): disallow DROP SYSTEM VERSIONING for system_time partitioned tables.
This commit is contained in:
parent
f685604aaa
commit
68c994436a
4 changed files with 25 additions and 2 deletions
|
|
@ -542,6 +542,13 @@ partition by system_time limit 100 (partition p1 history, partition pn current);
|
|||
insert into t1 values (1,10), (2,20);
|
||||
create or replace view v1 as select * from t1;
|
||||
update v1 set f= 30;
|
||||
#
|
||||
# MDEV-15168 Unexpected ER_VERS_ENGINE_UNSUPPORTED upon dropping versioning on a partitioned table
|
||||
#
|
||||
create or replace table t (a int) with system versioning
|
||||
partition by system_time (partition p1 history, partition pn current);
|
||||
alter table t drop system versioning;
|
||||
ERROR HY000: Can not DROP SYSTEM VERSIONING for table `t` partitioned BY SYSTEM_TIME
|
||||
# Test cleanup
|
||||
drop database test;
|
||||
create database test;
|
||||
|
|
|
|||
|
|
@ -454,6 +454,14 @@ insert into t1 values (1,10), (2,20);
|
|||
create or replace view v1 as select * from t1;
|
||||
update v1 set f= 30;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15168 Unexpected ER_VERS_ENGINE_UNSUPPORTED upon dropping versioning on a partitioned table
|
||||
--echo #
|
||||
create or replace table t (a int) with system versioning
|
||||
partition by system_time (partition p1 history, partition pn current);
|
||||
--error ER_DROP_VERSIONING_SYSTEM_TIME_PARTITION
|
||||
alter table t drop system versioning;
|
||||
|
||||
--echo # Test cleanup
|
||||
drop database test;
|
||||
create database test;
|
||||
|
|
|
|||
|
|
@ -7167,6 +7167,14 @@ bool Vers_parse_info::fix_alter_info(THD *thd, Alter_info *alter_info,
|
|||
my_error(ER_VERS_NOT_VERSIONED, MYF(0), table_name);
|
||||
return true;
|
||||
}
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
if (table->part_info &&
|
||||
table->part_info->part_type == VERSIONING_PARTITION)
|
||||
{
|
||||
my_error(ER_DROP_VERSIONING_SYSTEM_TIME_PARTITION, MYF(0), table_name);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7882,8 +7882,8 @@ ER_VERS_NO_TRX_ID
|
|||
ER_VERS_ALTER_SYSTEM_FIELD
|
||||
eng "Can not change system versioning field %`s"
|
||||
|
||||
ER_UNUSED_24
|
||||
eng "You should never see it"
|
||||
ER_DROP_VERSIONING_SYSTEM_TIME_PARTITION
|
||||
eng "Can not DROP SYSTEM VERSIONING for table %`s partitioned BY SYSTEM_TIME"
|
||||
|
||||
ER_NOT_LOG_TABLE
|
||||
eng "Table %`s.%`s is not a log table"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue