mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
fix tests on windows
This commit is contained in:
@ -347,6 +347,7 @@ now() < sysdate()
|
||||
1
|
||||
create table t1 (a int) with system versioning;
|
||||
insert t1 values (1);
|
||||
set @a=sysdate(6);
|
||||
select * from t1 for system_time as of now(6);
|
||||
a
|
||||
select * from t1 for system_time as of sysdate(6);
|
||||
|
@ -245,6 +245,10 @@ set timestamp=1000000019;
|
||||
select now() < sysdate();
|
||||
create table t1 (a int) with system versioning;
|
||||
insert t1 values (1);
|
||||
|
||||
--source suite/versioning/wait_system_clock.inc
|
||||
set @a=sysdate(6);
|
||||
|
||||
select * from t1 for system_time as of now(6);
|
||||
select * from t1 for system_time as of sysdate(6);
|
||||
|
||||
|
@ -146,6 +146,8 @@ explain partitions select * from t1;
|
||||
set @str= concat('select row_start from t1 partition (pn) into @ts0');
|
||||
prepare stmt from @str; execute stmt; drop prepare stmt;
|
||||
|
||||
--source suite/versioning/wait_system_clock.inc
|
||||
|
||||
set @now= now(6);
|
||||
delete from t1;
|
||||
execute select_p0;
|
||||
@ -158,6 +160,9 @@ select @ts0 = @ts1;
|
||||
|
||||
set @now= now(6);
|
||||
insert into t1 values (2);
|
||||
|
||||
--source suite/versioning/wait_system_clock.inc
|
||||
|
||||
execute select_p0;
|
||||
execute select_pn;
|
||||
|
||||
@ -166,6 +171,9 @@ prepare stmt from @str; execute stmt; drop prepare stmt;
|
||||
|
||||
set @now= now(6);
|
||||
update t1 set x = x + 1;
|
||||
|
||||
--source suite/versioning/wait_system_clock.inc
|
||||
|
||||
execute select_p0;
|
||||
execute select_pn;
|
||||
|
||||
|
10
mysql-test/suite/versioning/wait_system_clock.inc
Normal file
10
mysql-test/suite/versioning/wait_system_clock.inc
Normal file
@ -0,0 +1,10 @@
|
||||
#
|
||||
# windows has a rather low-resolution system clock
|
||||
# wait until the event from the past will actually be in the past
|
||||
#
|
||||
if (`select @@version_compile_os in ("win32","win64","windows")`)
|
||||
{
|
||||
let $_past=`select max(row_start) from t1`;
|
||||
--let $wait_condition=select TIMESTAMP'$_past' < sysdate(6)
|
||||
--source include/wait_condition.inc
|
||||
}
|
Reference in New Issue
Block a user