diff options
author | Georgi Kodinov <joro@sun.com> | 2010-01-29 17:04:37 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2010-01-29 17:04:37 +0200 |
commit | 6d38c898a6c69c2c7f862d40a323f7feec8934d5 (patch) | |
tree | 1878d495d8135589ef763899da62d853133a53c5 /mysql-test/t/innodb_mysql.test | |
parent | b8eaa81dd95259a0a77ecc6fe9a5d736dc1dfcd6 (diff) | |
download | mariadb-git-6d38c898a6c69c2c7f862d40a323f7feec8934d5.tar.gz |
Bug #49324: more valgrind errors in test_if_skip_sort_order
Fixed 2 problems :
1. test_if_order_by_key() was continuing on the primary key
as if it has a primary key suffix (as the secondary keys do).
This leads to crashes in ORDER BY <pk>,<pk>.
Fixed by not treating the primary key as the secondary one
and not depending on it being clustered with a primary key.
2. The cost calculation was trying to read the records
per key when operating on ORDER BYs that order on all of the
secondary key + some of the primary key.
This leads to crashes because of out-of-bounds array access.
Fixed by assuming we'll find 1 record per key in such cases.
Diffstat (limited to 'mysql-test/t/innodb_mysql.test')
-rw-r--r-- | mysql-test/t/innodb_mysql.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index a2a1113598d..d9fecccfbdc 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -536,4 +536,14 @@ DROP PROCEDURE p1; DROP VIEW v1; DROP TABLE t1,t2; + +--echo # +--echo # Bug #49324: more valgrind errors in test_if_skip_sort_order +--echo # +CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb ; +--echo #should not cause valgrind warnings +SELECT 1 FROM t1 JOIN t1 a USING(a) GROUP BY t1.a,t1.a; +DROP TABLE t1; + + --echo End of 5.1 tests |