mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-20169: main.partition_innodb fails in buildbot with wrong result
The problem is that background statistics can race with statistics update during INSERT and cause slightly inaccurate `Rows` count in table statistics (this is deliberate to avoid excessive locking overhead). This was seen as occasional .result difference in the test. Mask out the unstable `Rows` column from SHOW TABLE STATUS; the value is not related to what is being tested in this part of the test case. Run ANALYZE TABLE before SHOW EXPLAIN to get stable row count in output. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
@ -214,6 +214,7 @@ INSERT INTO t1 VALUES (90);
|
||||
INSERT INTO t1 VALUES (100);
|
||||
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||
insert INTO t1 VALUES (110);
|
||||
ANALYZE TABLE t1;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 90;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 90;
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 90;
|
||||
@ -426,7 +427,9 @@ partition by key (a);
|
||||
--replace_column 12 Create_time
|
||||
show table status;
|
||||
insert into t1 values (0), (1), (2), (3);
|
||||
--replace_column 12 Create_time 13 Update_time
|
||||
# Mask `Rows`, as it can fluctuate slightly if background statistics are
|
||||
# running simultaneously with insert (MDEV-20169).
|
||||
--replace_column 5 Rows 6 Avg_row_length 12 Create_time 13 Update_time
|
||||
show table status;
|
||||
drop table t1;
|
||||
|
||||
@ -436,10 +439,10 @@ partition by key (a);
|
||||
--replace_column 12 Create_time
|
||||
show table status;
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
--replace_column 12 Create_time 13 Update_time
|
||||
--replace_column 5 Rows 6 Avg_row_length 12 Create_time 13 Update_time
|
||||
show table status;
|
||||
insert into t1 values (NULL), (NULL), (NULL), (NULL);
|
||||
--replace_column 12 Create_time 13 Update_time
|
||||
--replace_column 5 Rows 6 Avg_row_length 12 Create_time 13 Update_time
|
||||
show table status;
|
||||
drop table t1;
|
||||
|
||||
|
Reference in New Issue
Block a user