diff options
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/versioning/common.inc | 2 | ||||
-rw-r--r-- | mysql-test/suite/versioning/common_finish.inc | 2 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/alter.result | 75 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/auto_increment.result | 82 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/commit_id.result | 82 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/create.result | 75 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/delete.result | 75 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/insert.result | 82 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/partition.result | 82 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/select.result | 82 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/select_sp.result | 82 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/update.result | 75 | ||||
-rw-r--r-- | mysql-test/suite/versioning/r/view.result | 75 |
13 files changed, 4 insertions, 867 deletions
diff --git a/mysql-test/suite/versioning/common.inc b/mysql-test/suite/versioning/common.inc index c7b254c4311..830203f251f 100644 --- a/mysql-test/suite/versioning/common.inc +++ b/mysql-test/suite/versioning/common.inc @@ -1,3 +1,4 @@ +--disable_query_log set @@session.time_zone='+00:00'; select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; set @test_start=now(6); @@ -85,3 +86,4 @@ delimiter ;~~ let $default_engine= `select default_engine()`; let sys_datatype= `select sys_datatype()`; +--enable_query_log diff --git a/mysql-test/suite/versioning/common_finish.inc b/mysql-test/suite/versioning/common_finish.inc index 9a746f5a98c..3113c01af2e 100644 --- a/mysql-test/suite/versioning/common_finish.inc +++ b/mysql-test/suite/versioning/common_finish.inc @@ -1,3 +1,4 @@ +--disable_query_log drop procedure verify_vtq; drop procedure innodb_verify_vtq; drop function default_engine; @@ -5,3 +6,4 @@ drop function sys_commit_ts; drop function sys_datatype; drop procedure concat_exec2; drop procedure concat_exec3; +--enable_query_log diff --git a/mysql-test/suite/versioning/r/alter.result b/mysql-test/suite/versioning/r/alter.result index f45c479a70b..27c49820231 100644 --- a/mysql-test/suite/versioning/r/alter.result +++ b/mysql-test/suite/versioning/r/alter.result @@ -255,81 +255,6 @@ t CREATE TABLE `t` ( `sys_trx_end` timestamp(6) GENERATED ALWAYS AS ROW END, PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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; diff --git a/mysql-test/suite/versioning/r/auto_increment.result b/mysql-test/suite/versioning/r/auto_increment.result index d8202132015..0c0f0035b07 100644 --- a/mysql-test/suite/versioning/r/auto_increment.result +++ b/mysql-test/suite/versioning/r/auto_increment.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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), @@ -192,10 +117,3 @@ No A B C D 10 1 1 1 1 11 1 1 1 1 drop procedure test_01; -drop procedure verify_vtq; -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; diff --git a/mysql-test/suite/versioning/r/commit_id.result b/mysql-test/suite/versioning/r/commit_id.result index 0aa3a589f0f..3e4bac10790 100644 --- a/mysql-test/suite/versioning/r/commit_id.result +++ b/mysql-test/suite/versioning/r/commit_id.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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 @@ -167,10 +92,3 @@ No A B C D 6 1 1 1 1 7 1 1 1 1 8 1 1 1 1 -drop procedure verify_vtq; -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; diff --git a/mysql-test/suite/versioning/r/create.result b/mysql-test/suite/versioning/r/create.result index b0003bf46ac..857b283fbaa 100644 --- a/mysql-test/suite/versioning/r/create.result +++ b/mysql-test/suite/versioning/r/create.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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) diff --git a/mysql-test/suite/versioning/r/delete.result b/mysql-test/suite/versioning/r/delete.result index 09a4ad1ea37..cafb321ddd4 100644 --- a/mysql-test/suite/versioning/r/delete.result +++ b/mysql-test/suite/versioning/r/delete.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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), diff --git a/mysql-test/suite/versioning/r/insert.result b/mysql-test/suite/versioning/r/insert.result index 33ae4b14bcd..38e224ae5e3 100644 --- a/mysql-test/suite/versioning/r/insert.result +++ b/mysql-test/suite/versioning/r/insert.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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), @@ -377,10 +302,3 @@ drop procedure test_02; drop procedure test_03; drop procedure test_04; drop procedure test_05; -drop procedure verify_vtq; -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; diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index 9ea7d7297e4..3c6445eeb8d 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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) ( @@ -363,10 +288,3 @@ select * from t1 partition (p1sp1) for system_time all; x 2 drop table t1; -drop procedure verify_vtq; -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; diff --git a/mysql-test/suite/versioning/r/select.result b/mysql-test/suite/versioning/r/select.result index 7571af25bcd..3b0d4b74286 100644 --- a/mysql-test/suite/versioning/r/select.result +++ b/mysql-test/suite/versioning/r/select.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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 @@ -405,10 +330,3 @@ No A B C D 26 1 1 1 1 27 1 1 1 1 28 1 1 1 1 -drop procedure verify_vtq; -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; diff --git a/mysql-test/suite/versioning/r/select_sp.result b/mysql-test/suite/versioning/r/select_sp.result index 2e990f84e7d..b40dbf75a28 100644 --- a/mysql-test/suite/versioning/r/select_sp.result +++ b/mysql-test/suite/versioning/r/select_sp.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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(); @@ -432,10 +357,3 @@ No A B C D 27 1 1 1 1 drop procedure test_01; drop procedure test_02; -drop procedure verify_vtq; -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; diff --git a/mysql-test/suite/versioning/r/update.result b/mysql-test/suite/versioning/r/update.result index a22e2383ae6..7505bec0d80 100644 --- a/mysql-test/suite/versioning/r/update.result +++ b/mysql-test/suite/versioning/r/update.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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), diff --git a/mysql-test/suite/versioning/r/view.result b/mysql-test/suite/versioning/r/view.result index 520e5df96b3..8557121d786 100644 --- a/mysql-test/suite/versioning/r/view.result +++ b/mysql-test/suite/versioning/r/view.result @@ -1,78 +1,3 @@ -set @@session.time_zone='+00:00'; -select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; -set @test_start=now(6); -create procedure if not exists verify_vtq() -begin -set @i= 0; -select -@i:= @i + 1 as No, -transaction_id > 0 as A, -commit_id > transaction_id as B, -begin_timestamp > @test_start as C, -commit_timestamp >= begin_timestamp as D -from mysql.transaction_registry -where transaction_id > @start_trx_id; -select ifnull(max(transaction_id), 0) -into @start_trx_id -from mysql.transaction_registry; -end~~ -create function if not exists default_engine() -returns varchar(255) -deterministic -begin -declare e varchar(255); -select lower(engine) from information_schema.engines where support='DEFAULT' into e; -return e; -end~~ -create function if not exists sys_datatype() -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return 'bigint unsigned'; -elseif default_engine() = 'myisam' then -return 'timestamp(6)'; -end if; -return NULL; -end~~ -create function if not exists sys_commit_ts(sys_field varchar(255)) -returns varchar(255) -deterministic -begin -if default_engine() = 'innodb' then -return concat('vtq_commit_ts(', sys_field, ')'); -elseif default_engine() = 'myisam' then -return sys_field; -end if; -return NULL; -end~~ -create procedure if not exists innodb_verify_vtq(recs int) -begin -declare i int default 1; -if default_engine() = 'innodb' then -call verify_vtq; -elseif default_engine() = 'myisam' then -create temporary table tmp (No int, A bool, B bool, C bool, D bool); -while i <= recs do -insert into tmp values (i, 1, 1, 1, 1); -set i= i + 1; -end while; -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) with system versioning; insert into t1 values (1); select now(6) into @t1; |