Browse Source

fix MDEV-16026 MDEV-16481 embedded server results and rests

bb-10.3-mdev-24523
Oleksandr Byelkin 4 years ago
parent
commit
1423cf5e3d
  1. 2
      mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
  2. 30
      mysql-test/suite/versioning/r/sysvars-notembedded.result
  3. 21
      mysql-test/suite/versioning/r/sysvars.result
  4. 31
      mysql-test/suite/versioning/t/sysvars-notembedded.test
  5. 18
      mysql-test/suite/versioning/t/sysvars.test

2
mysql-test/suite/sys_vars/r/sysvars_server_embedded.result

@ -3279,7 +3279,7 @@ VARIABLE_COMMENT Default value for the FOR SYSTEM_TIME AS OF clause
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST DEFAULT
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME TABLE_DEFINITION_CACHE

30
mysql-test/suite/versioning/r/sysvars-notembedded.result

@ -0,0 +1,30 @@
create table t (a int) with system versioning;
set @before= UNIX_TIMESTAMP(now(6));
insert into t values (1);
set @after= UNIX_TIMESTAMP(now(6));
update t set a= 2;
set global system_versioning_asof= FROM_UNIXTIME(@after);
set system_versioning_asof= FROM_UNIXTIME(@after);
select * from t as nonempty;
a
1
connect subcon,127.0.0.1,root,,,$SERVER_MYPORT_1;
connection subcon;
select * from t as nonempty;
a
1
disconnect subcon;
connection default;
set global system_versioning_asof= FROM_UNIXTIME(@before);
select * from t as nonempty;
a
1
connect subcon,127.0.0.1,root,,,$SERVER_MYPORT_1;
connection subcon;
select * from t as empty;
a
disconnect subcon;
connection default;
drop table t;
set global system_versioning_asof= DEFAULT;
set system_versioning_asof= DEFAULT;

21
mysql-test/suite/versioning/r/sysvars.result

@ -190,27 +190,6 @@ set system_versioning_asof= FROM_UNIXTIME(@after);
select * from t as nonempty;
a
1
set global system_versioning_asof= FROM_UNIXTIME(@after);
select * from t as nonempty;
a
1
connect subcon,127.0.0.1,root,,,$SERVER_MYPORT_1;
connection subcon;
select * from t as nonempty;
a
1
disconnect subcon;
connection default;
set global system_versioning_asof= FROM_UNIXTIME(@before);
select * from t as nonempty;
a
1
connect subcon,127.0.0.1,root,,,$SERVER_MYPORT_1;
connection subcon;
select * from t as empty;
a
disconnect subcon;
connection default;
# MDEV-16481: set global system_versioning_asof=sf() crashes in specific case
# Using global variable inside a stored function should not crash
create or replace function now_global() returns timestamp

31
mysql-test/suite/versioning/t/sysvars-notembedded.test

@ -0,0 +1,31 @@
source include/not_embedded.inc;
create table t (a int) with system versioning;
set @before= UNIX_TIMESTAMP(now(6));
insert into t values (1);
set @after= UNIX_TIMESTAMP(now(6));
update t set a= 2;
set global system_versioning_asof= FROM_UNIXTIME(@after);
set system_versioning_asof= FROM_UNIXTIME(@after);
select * from t as nonempty;
--connect (subcon,127.0.0.1,root,,,$SERVER_MYPORT_1)
--connection subcon
select * from t as nonempty;
--disconnect subcon
--connection default
set global system_versioning_asof= FROM_UNIXTIME(@before);
select * from t as nonempty;
--connect (subcon,127.0.0.1,root,,,$SERVER_MYPORT_1)
--connection subcon
select * from t as empty;
--disconnect subcon
--connection default
drop table t;
set global system_versioning_asof= DEFAULT;
set system_versioning_asof= DEFAULT;

18
mysql-test/suite/versioning/t/sysvars.test

@ -137,24 +137,6 @@ select * from t as empty;
set system_versioning_asof= FROM_UNIXTIME(@after);
select * from t as nonempty;
set global system_versioning_asof= FROM_UNIXTIME(@after);
select * from t as nonempty;
--connect (subcon,127.0.0.1,root,,,$SERVER_MYPORT_1)
--connection subcon
select * from t as nonempty;
--disconnect subcon
--connection default
set global system_versioning_asof= FROM_UNIXTIME(@before);
select * from t as nonempty;
--connect (subcon,127.0.0.1,root,,,$SERVER_MYPORT_1)
--connection subcon
select * from t as empty;
--disconnect subcon
--connection default
--echo # MDEV-16481: set global system_versioning_asof=sf() crashes in specific case
--echo # Using global variable inside a stored function should not crash
create or replace function now_global() returns timestamp

Loading…
Cancel
Save