diff options
author | Elena Stepanova <elenst@montyprogram.com> | 2017-01-04 23:05:22 +0200 |
---|---|---|
committer | Elena Stepanova <elenst@montyprogram.com> | 2017-01-05 17:32:11 +0200 |
commit | f1ee011a6cbda1069a6ec9b5e2428451a64861fd (patch) | |
tree | 4dd002106112ed881a0e770d9d6fe357e00e579f /mysql-test/t/join_cache.test | |
parent | f4d12c1d3fd79db8d30a7de3de3b851d2fa0a397 (diff) | |
download | mariadb-git-f1ee011a6cbda1069a6ec9b5e2428451a64861fd.tar.gz |
MDEV-11722 main.join_cache fails in buildbot on very slow builders
The guilty part of the test checks for performance degradation on
a query with numerous joins on an empty table. The test expects
the query to take less than 1 second, and fails if it is not so
(which can happen on very slow builders).
The solution is to add more JOINs to the query. On a fixed server,
it should not have any noticeable impact on the query execution,
while on the unfixed version the query would take several times
longer (e.g. 6.5 sec vs 1.5 sec). Thus, we can increase the margin
for the error, and make the test fail when the query takes longer
than 5 seconds.
Diffstat (limited to 'mysql-test/t/join_cache.test')
-rw-r--r-- | mysql-test/t/join_cache.test | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mysql-test/t/join_cache.test b/mysql-test/t/join_cache.test index 1d22de86799..77e8fce0d27 100644 --- a/mysql-test/t/join_cache.test +++ b/mysql-test/t/join_cache.test @@ -3709,9 +3709,11 @@ FROM LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val" LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val" LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val" + LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val" + LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val" ORDER BY col1; -select timestampdiff(second, @init_time, now()) <= 1; +select timestampdiff(second, @init_time, now()) <= 5; set join_cache_level=2; @@ -3744,9 +3746,11 @@ FROM LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val" LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val" LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val" + LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val" + LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val" ORDER BY col1; -select timestampdiff(second, @init_time, now()) <= 1; +select timestampdiff(second, @init_time, now()) <= 5; EXPLAIN SELECT t.* @@ -3777,6 +3781,8 @@ FROM LEFT JOIN t2 c23 ON c23.parent_id = t.id AND c23.col2 = "val" LEFT JOIN t2 c24 ON c24.parent_id = t.id AND c24.col2 = "val" LEFT JOIN t2 c25 ON c25.parent_id = t.id AND c25.col2 = "val" + LEFT JOIN t2 c26 ON c26.parent_id = t.id AND c26.col2 = "val" + LEFT JOIN t2 c27 ON c27.parent_id = t.id AND c27.col2 = "val" ORDER BY col1; |