Details
-
Bug
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.5, 10.6, 10.4(EOL), 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
Description
"information_schema.partitions" contains incorrect data about partitions for tables with engine=Spider (table_rows). Also request "select * from t_sp1 partition (p0)" returns data from current partition not from historical
Test:
--source include/have_innodb.inc
|
--source include/have_partition.inc
|
|
install soname 'ha_spider'; |
set spider_same_server_link= on; |
|
eval create server s foreign data wrapper mysql options |
(host '127.0.0.1', database 'test', user 'root', port $MASTER_MYPORT); |
|
CREATE TABLE t2( |
x INT, |
y INT, |
row_start TIMESTAMP(6), |
row_end TIMESTAMP(6) |
);
|
|
create or replace table t_sp1 (x int,y int) |
engine=Spider COMMENT='wrapper "mysql", srv "s", table "t2"' |
with system versioning partition by system_time ( |
PARTITION p0 HISTORY,
|
PARTITION pn CURRENT |
);
|
|
insert into t_sp1 values (1,1),(2,2),(3,3),(4,4),(5,5); |
|
delete from t_sp1 where x=1; |
|
select * from t_sp1; |
select * from t_sp1 partition (p0); |
|
select partition_name, table_rows from information_schema.partitions where table_name = 't_sp1'; |
|
drop tables t2, t_sp1; |
Actual result:
select * from t_sp1; |
x y
|
2 2
|
3 3
|
4 4
|
5 5
|
select * from t_sp1 partition (p0); |
x y
|
2 2
|
3 3
|
4 4
|
5 5
|
select partition_name, table_rows from information_schema.partitions where table_name = 't_sp1'; |
partition_name table_rows
|
p0 2
|
pn 2
|
Expected result:
select * from t_sp1; |
x y
|
2 2
|
3 3
|
4 4
|
5 5
|
select * from t_sp1 partition (p0); |
x y
|
1 1
|
select partition_name, table_rows from information_schema.partitions where table_name = 't_sp1'; |
partition_name table_rows
|
p0 1
|
pn 4
|
Attachments
Issue Links
- relates to
-
MDEV-29829 System versioning does not work with federation-like engines - disable if not supported
- Open
-
MDEV-17554 Auto-create history partitions for system-versioned tables
- Closed