mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Tests: moved concat_execN() to common.inc
This commit is contained in:
committed by
Eugene Kosov
parent
f79c4469ff
commit
75bc483d7a
@ -66,6 +66,20 @@ begin
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
delimiter ;~~
|
delimiter ;~~
|
||||||
|
|
||||||
let $default_engine= `select default_engine()`;
|
let $default_engine= `select default_engine()`;
|
||||||
|
@ -3,3 +3,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -309,6 +309,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create or replace table t(
|
create or replace table t(
|
||||||
a int
|
a int
|
||||||
) engine=innodb;
|
) engine=innodb;
|
||||||
@ -578,3 +590,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create procedure test_01(
|
create procedure test_01(
|
||||||
sys_type varchar(255),
|
sys_type varchar(255),
|
||||||
engine varchar(255),
|
engine varchar(255),
|
||||||
@ -184,3 +196,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create table t1(
|
create table t1(
|
||||||
id int auto_increment primary key)
|
id int auto_increment primary key)
|
||||||
with system versioning
|
with system versioning
|
||||||
@ -156,3 +168,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
create function if not exists non_default_engine()
|
create function if not exists non_default_engine()
|
||||||
returns varchar(255)
|
returns varchar(255)
|
||||||
|
@ -169,8 +169,6 @@ insert into t values (1);
|
|||||||
update t set a=2 where a=1;
|
update t set a=2 where a=1;
|
||||||
alter table t add column b int, algorithm=inplace;
|
alter table t add column b int, algorithm=inplace;
|
||||||
set versioning_alter_history = keep;
|
set versioning_alter_history = keep;
|
||||||
drop procedure concat_exec2;
|
|
||||||
drop procedure concat_exec3;
|
|
||||||
drop function get_historical_table_name;
|
drop function get_historical_table_name;
|
||||||
drop procedure drop_last_historical;
|
drop procedure drop_last_historical;
|
||||||
select * from mysql.vtmd_template;
|
select * from mysql.vtmd_template;
|
||||||
@ -208,3 +206,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create or replace procedure test_01(
|
create or replace procedure test_01(
|
||||||
sys_type varchar(255),
|
sys_type varchar(255),
|
||||||
engine varchar(255),
|
engine varchar(255),
|
||||||
@ -357,3 +369,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create procedure test_01(
|
create procedure test_01(
|
||||||
sys_type varchar(255),
|
sys_type varchar(255),
|
||||||
engine varchar(255),
|
engine varchar(255),
|
||||||
@ -354,3 +366,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create table t1 (x int)
|
create table t1 (x int)
|
||||||
with system versioning
|
with system versioning
|
||||||
partition by range columns (x) (
|
partition by range columns (x) (
|
||||||
@ -361,3 +373,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create or replace table t1 (
|
create or replace table t1 (
|
||||||
x int unsigned,
|
x int unsigned,
|
||||||
y int unsigned
|
y int unsigned
|
||||||
@ -381,3 +393,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create procedure test_01()
|
create procedure test_01()
|
||||||
begin
|
begin
|
||||||
declare engine varchar(255) default default_engine();
|
declare engine varchar(255) default default_engine();
|
||||||
@ -424,3 +436,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create procedure test_01(
|
create procedure test_01(
|
||||||
sys_type varchar(255),
|
sys_type varchar(255),
|
||||||
engine varchar(255),
|
engine varchar(255),
|
||||||
@ -577,3 +589,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -60,6 +60,18 @@ select * from tmp;
|
|||||||
drop table tmp;
|
drop table tmp;
|
||||||
end if;
|
end if;
|
||||||
end~~
|
end~~
|
||||||
|
create procedure concat_exec2(a varchar(255), b varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
|
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
||||||
|
begin
|
||||||
|
prepare stmt from concat(a, b, c);
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
end~~
|
||||||
create table t1 (x int) with system versioning engine innodb;
|
create table t1 (x int) with system versioning engine innodb;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
select now(6) into @t1;
|
select now(6) into @t1;
|
||||||
@ -200,3 +212,5 @@ drop procedure innodb_verify_vtq;
|
|||||||
drop function default_engine;
|
drop function default_engine;
|
||||||
drop function sys_commit_ts;
|
drop function sys_commit_ts;
|
||||||
drop function sys_datatype;
|
drop function sys_datatype;
|
||||||
|
drop procedure concat_exec2;
|
||||||
|
drop procedure concat_exec3;
|
||||||
|
@ -1,21 +1,6 @@
|
|||||||
-- source suite/versioning/common.inc
|
-- source suite/versioning/common.inc
|
||||||
|
|
||||||
delimiter ~~;
|
delimiter ~~;
|
||||||
|
|
||||||
create procedure concat_exec2(a varchar(255), b varchar(255))
|
|
||||||
begin
|
|
||||||
prepare stmt from concat(a, b);
|
|
||||||
execute stmt;
|
|
||||||
deallocate prepare stmt;
|
|
||||||
end~~
|
|
||||||
|
|
||||||
create procedure concat_exec3(a varchar(255), b varchar(255), c varchar(255))
|
|
||||||
begin
|
|
||||||
prepare stmt from concat(a, b, c);
|
|
||||||
execute stmt;
|
|
||||||
deallocate prepare stmt;
|
|
||||||
end~~
|
|
||||||
|
|
||||||
create function get_historical_table_name(table_name_arg varchar(255))
|
create function get_historical_table_name(table_name_arg varchar(255))
|
||||||
returns varchar(255)
|
returns varchar(255)
|
||||||
begin
|
begin
|
||||||
@ -27,7 +12,6 @@ create procedure drop_last_historical(table_name_arg varchar(255))
|
|||||||
begin
|
begin
|
||||||
call concat_exec2('drop table ', get_historical_table_name(table_name_arg));
|
call concat_exec2('drop table ', get_historical_table_name(table_name_arg));
|
||||||
end~~
|
end~~
|
||||||
|
|
||||||
delimiter ;~~
|
delimiter ;~~
|
||||||
|
|
||||||
set versioning_alter_history= survive;
|
set versioning_alter_history= survive;
|
||||||
@ -108,8 +92,6 @@ alter table t add column b int, algorithm=inplace;
|
|||||||
|
|
||||||
set versioning_alter_history = keep;
|
set versioning_alter_history = keep;
|
||||||
|
|
||||||
drop procedure concat_exec2;
|
|
||||||
drop procedure concat_exec3;
|
|
||||||
drop function get_historical_table_name;
|
drop function get_historical_table_name;
|
||||||
drop procedure drop_last_historical;
|
drop procedure drop_last_historical;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user