Skip to content

Commit

Permalink
Tests: moved concat_execN() to common.inc
Browse files Browse the repository at this point in the history
  • Loading branch information
midenok authored and kevgs committed Sep 25, 2017
1 parent f79c446 commit 75bc483
Show file tree
Hide file tree
Showing 15 changed files with 170 additions and 20 deletions.
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@ begin
drop table tmp;
end if;
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 ;~~

let $default_engine= `select default_engine()`;
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/versioning/common_finish.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/alter.result
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,18 @@ select * from tmp;
drop table tmp;
end if;
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(
a int
) engine=innodb;
Expand Down Expand Up @@ -578,3 +590,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/auto_increment.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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(
sys_type varchar(255),
engine varchar(255),
Expand Down Expand Up @@ -184,3 +196,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/commit_id.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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(
id int auto_increment primary key)
with system versioning
Expand Down Expand Up @@ -156,3 +168,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
12 changes: 12 additions & 0 deletions mysql-test/suite/versioning/r/create.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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;
create function if not exists non_default_engine()
returns varchar(255)
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/versioning/r/ddl.result
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ insert into t values (1);
update t set a=2 where a=1;
alter table t add column b int, algorithm=inplace;
set versioning_alter_history = keep;
drop procedure concat_exec2;
drop procedure concat_exec3;
drop function get_historical_table_name;
drop procedure drop_last_historical;
select * from mysql.vtmd_template;
Expand Down Expand Up @@ -208,3 +206,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/delete.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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(
sys_type varchar(255),
engine varchar(255),
Expand Down Expand Up @@ -357,3 +369,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/insert.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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(
sys_type varchar(255),
engine varchar(255),
Expand Down Expand Up @@ -354,3 +366,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/partition.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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
partition by range columns (x) (
Expand Down Expand Up @@ -361,3 +373,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/select.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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 (
x int unsigned,
y int unsigned
Expand Down Expand Up @@ -381,3 +393,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/select_sp.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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()
begin
declare engine varchar(255) default default_engine();
Expand Down Expand Up @@ -424,3 +436,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/update.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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(
sys_type varchar(255),
engine varchar(255),
Expand Down Expand Up @@ -577,3 +589,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
14 changes: 14 additions & 0 deletions mysql-test/suite/versioning/r/view.result
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ select * from tmp;
drop table tmp;
end if;
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;
insert into t1 values (1);
select now(6) into @t1;
Expand Down Expand Up @@ -200,3 +212,5 @@ drop procedure innodb_verify_vtq;
drop function default_engine;
drop function sys_commit_ts;
drop function sys_datatype;
drop procedure concat_exec2;
drop procedure concat_exec3;
18 changes: 0 additions & 18 deletions mysql-test/suite/versioning/t/ddl.test
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
-- source suite/versioning/common.inc

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))
returns varchar(255)
begin
Expand All @@ -27,7 +12,6 @@ create procedure drop_last_historical(table_name_arg varchar(255))
begin
call concat_exec2('drop table ', get_historical_table_name(table_name_arg));
end~~

delimiter ;~~

set versioning_alter_history= survive;
Expand Down Expand Up @@ -108,8 +92,6 @@ alter table t add column b int, algorithm=inplace;

set versioning_alter_history = keep;

drop procedure concat_exec2;
drop procedure concat_exec3;
drop function get_historical_table_name;
drop procedure drop_last_historical;

Expand Down

0 comments on commit 75bc483

Please sign in to comment.