mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
Don't do skip_setup_conds() unless all errors are checked. Fixes following errors: ER_PERIOD_NOT_FOUND ER_VERS_QUERY_IN_PARTITION ER_VERS_ENGINE_UNSUPPORTED ER_VERS_NOT_VERSIONED
This commit is contained in:
@ -504,6 +504,14 @@ delete from t1 where a is not null;
|
||||
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 HY000: SYSTEM_TIME partitions in table `t1` does not support historical query
|
||||
# MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
|
||||
create or replace procedure sp()
|
||||
select * from t1 partition (p0) for system_time all;
|
||||
call sp;
|
||||
ERROR HY000: SYSTEM_TIME partitions in table `t1` does not support historical query
|
||||
call sp;
|
||||
ERROR HY000: SYSTEM_TIME partitions in table `t1` does not support historical query
|
||||
drop procedure sp;
|
||||
# MDEV-15380 Index for versioned table gets corrupt after partitioning and DELETE
|
||||
create or replace table t1 (pk int primary key)
|
||||
engine=myisam
|
||||
|
@ -320,6 +320,21 @@ ERROR HY000: Table `t` is not system-versioned
|
||||
create or replace table t1 (x int) with system versioning engine myisam;
|
||||
select * from t1 for system_time as of transaction 1;
|
||||
ERROR HY000: Transaction-precise system versioning for `t1` is not supported
|
||||
# MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
|
||||
create or replace procedure sp()
|
||||
select * from t1 for system_time as of transaction 1;
|
||||
call sp;
|
||||
ERROR HY000: Transaction-precise system versioning for `t1` is not supported
|
||||
call sp;
|
||||
ERROR HY000: Transaction-precise system versioning for `t1` is not supported
|
||||
create or replace table t1 (a int);
|
||||
create or replace procedure sp()
|
||||
select * from t1 for system_time all;
|
||||
call sp;
|
||||
ERROR HY000: Table `t1` is not system-versioned
|
||||
call sp;
|
||||
ERROR HY000: Table `t1` is not system-versioned
|
||||
drop procedure sp;
|
||||
create or replace table t1 (
|
||||
x int,
|
||||
sys_trx_start bigint unsigned as row start invisible,
|
||||
|
@ -146,7 +146,7 @@ i
|
||||
create or replace view v1 as select * from t1 for system_time as of date_sub(now(), interval 6 second);
|
||||
show create view v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` FOR SYSTEM_TIME AS OF current_timestamp() - interval 6 second latin1 latin1_swedish_ci
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp() - interval 6 second latin1 latin1_swedish_ci
|
||||
drop view v1, vt1, vt12;
|
||||
drop tables t1, t3;
|
||||
#
|
||||
|
@ -455,6 +455,14 @@ delete from t1 where a is not null;
|
||||
create or replace table t1 (i int) with system versioning partition by system_time limit 10 (partition p0 history, partition pn current);
|
||||
--error ER_VERS_QUERY_IN_PARTITION
|
||||
select * from t1 partition (p0) for system_time all;
|
||||
--echo # MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
|
||||
create or replace procedure sp()
|
||||
select * from t1 partition (p0) for system_time all;
|
||||
--error ER_VERS_QUERY_IN_PARTITION
|
||||
call sp;
|
||||
--error ER_VERS_QUERY_IN_PARTITION
|
||||
call sp;
|
||||
drop procedure sp;
|
||||
|
||||
--echo # MDEV-15380 Index for versioned table gets corrupt after partitioning and DELETE
|
||||
create or replace table t1 (pk int primary key)
|
||||
|
@ -202,6 +202,21 @@ for system_time all as t;
|
||||
create or replace table t1 (x int) with system versioning engine myisam;
|
||||
--error ER_VERS_ENGINE_UNSUPPORTED
|
||||
select * from t1 for system_time as of transaction 1;
|
||||
--echo # MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED
|
||||
create or replace procedure sp()
|
||||
select * from t1 for system_time as of transaction 1;
|
||||
--error ER_VERS_ENGINE_UNSUPPORTED
|
||||
call sp;
|
||||
--error ER_VERS_ENGINE_UNSUPPORTED
|
||||
call sp;
|
||||
create or replace table t1 (a int);
|
||||
create or replace procedure sp()
|
||||
select * from t1 for system_time all;
|
||||
--error ER_VERS_NOT_VERSIONED
|
||||
call sp;
|
||||
--error ER_VERS_NOT_VERSIONED
|
||||
call sp;
|
||||
drop procedure sp;
|
||||
|
||||
create or replace table t1 (
|
||||
x int,
|
||||
|
Reference in New Issue
Block a user