Commit 1423cf5e authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

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

parent 83d7e4fa
......@@ -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
......
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;
......@@ -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
......
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;
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment