mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-41583 Tests fail on platform-dependent max TIMESTAMP of current row
versioning.partition (MDEV-41543) and main.grant2 (MDEV-41099) print row_end of the current row. Since MDEV-32188 in 11.5 the max TIMESTAMP is 2106-02-07 06:28:15.999999 on 64-bit and 2038-01-19 03:14:07.999999 on 32-bit, so the results recorded on 64-bit fail on 32-bit. The fix prints CURRENT instead of row_end of the current row in versioning.partition (using current_row_ts() from common.inc) and replaces row_end with # in main.grant2, where only the privilege to read it is tested. Affected since 11.8. The fix is committed to the originating 10.11 to minimize conflicts.
This commit is contained in:
@@ -1145,11 +1145,11 @@ connection con1;
|
||||
set time_zone= '+00:00';
|
||||
select row_start, row_end from t;
|
||||
row_start row_end
|
||||
2001-01-01 00:00:00.000000 2038-01-19 03:14:07.999999
|
||||
2001-01-01 00:00:00.000000 #
|
||||
handler t open;
|
||||
handler t read first;
|
||||
id a b row_start row_end DB_ROW_HASH_1
|
||||
1 10 x 2001-01-01 00:00:00.000000 2038-01-19 03:14:07.999999 #
|
||||
1 10 x 2001-01-01 00:00:00.000000 # #
|
||||
handler t close;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
|
||||
@@ -1179,9 +1179,10 @@ connection default;
|
||||
grant select (a) on db.t to u@localhost;
|
||||
connection con1;
|
||||
set time_zone= '+00:00';
|
||||
--replace_column 2 #
|
||||
select row_start, row_end from t;
|
||||
handler t open;
|
||||
--replace_column 6 #
|
||||
--replace_column 5 # 6 #
|
||||
handler t read first;
|
||||
handler t close;
|
||||
disconnect con1;
|
||||
|
||||
@@ -3748,20 +3748,22 @@ alter table t1 add y int partition by system_time interval 1 hour
|
||||
starts '2000-01-01 00:00:00';
|
||||
affected rows: 3
|
||||
info: Records: 3 Duplicates: 0 Warnings: 0
|
||||
select x, y, row_end from t1 for system_time all order by x;
|
||||
select x, y, if(current_row_ts(row_end), 'CURRENT', row_end) as row_end
|
||||
from t1 for system_time all order by x;
|
||||
x y row_end
|
||||
0 NULL 2000-01-01 01:30:00.000000
|
||||
1 NULL 2000-01-01 02:30:00.000000
|
||||
2 NULL 2038-01-19 03:14:07.999999
|
||||
2 NULL CURRENT
|
||||
# LIMIT with DROP COLUMN: the table is rebuilt
|
||||
alter table t1 drop y partition by system_time limit 100;
|
||||
affected rows: 3
|
||||
info: Records: 3 Duplicates: 0 Warnings: 0
|
||||
select x, row_end from t1 for system_time all order by x;
|
||||
select x, if(current_row_ts(row_end), 'CURRENT', row_end) as row_end
|
||||
from t1 for system_time all order by x;
|
||||
x row_end
|
||||
0 2000-01-01 01:30:00.000000
|
||||
1 2000-01-01 02:30:00.000000
|
||||
2 2038-01-19 03:14:07.999999
|
||||
2 CURRENT
|
||||
set timestamp= default;
|
||||
set time_zone= default;
|
||||
drop table t1;
|
||||
|
||||
@@ -2945,12 +2945,14 @@ select x, row_end from t1 partition (p2);
|
||||
alter table t1 add y int partition by system_time interval 1 hour
|
||||
starts '2000-01-01 00:00:00';
|
||||
--disable_info
|
||||
select x, y, row_end from t1 for system_time all order by x;
|
||||
select x, y, if(current_row_ts(row_end), 'CURRENT', row_end) as row_end
|
||||
from t1 for system_time all order by x;
|
||||
--echo # LIMIT with DROP COLUMN: the table is rebuilt
|
||||
--enable_info
|
||||
alter table t1 drop y partition by system_time limit 100;
|
||||
--disable_info
|
||||
select x, row_end from t1 for system_time all order by x;
|
||||
select x, if(current_row_ts(row_end), 'CURRENT', row_end) as row_end
|
||||
from t1 for system_time all order by x;
|
||||
set timestamp= default;
|
||||
set time_zone= default;
|
||||
drop table t1;
|
||||
|
||||
Reference in New Issue
Block a user