diff options
author | unknown <igor@olga.mysql.com> | 2007-03-31 00:23:03 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-03-31 00:23:03 -0700 |
commit | 7887a74491051d67fe0d780e19a62b5f055d07f9 (patch) | |
tree | 30965172fb391f49ca43b269726d625266437a20 /mysql-test/r/row.result | |
parent | 8aa507edb99a6f24553b9a8f773411327307aa0b (diff) | |
download | mariadb-git-7887a74491051d67fe0d780e19a62b5f055d07f9.tar.gz |
Fixed bug #27154: memory corruption when using row equalities in where
conditions.
When allocating memory for KEY_FIELD/SARGABLE_PARAM structures the
function update_ref_and_keys did not take into account the fact that
a single row equality could be replaced by several simple equalities.
Fixed by adjusting the counter cond_count accordingly for each subquery
when performing substitution of a row equality for simple equalities.
mysql-test/r/row.result:
Added a test case for bug #27154.
mysql-test/t/row.test:
Added a test case for bug #27154.
Diffstat (limited to 'mysql-test/r/row.result')
-rw-r--r-- | mysql-test/r/row.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/row.result b/mysql-test/r/row.result index 5b5f8b7b954..faf9b11d7c9 100644 --- a/mysql-test/r/row.result +++ b/mysql-test/r/row.result @@ -306,3 +306,16 @@ a b a b c 1 1 1 2 1 1 2 1 2 1 DROP TABLE t1,t2; +CREATE TABLE t1( +a int, b int, c int, d int, e int, f int, g int, h int, +PRIMARY KEY (a,b,c,d,e,f,g) +); +INSERT INTO t1 VALUES (1,2,3,4,5,6,7,99); +SELECT h FROM t1 WHERE (a,b,c,d,e,f,g)=(1,2,3,4,5,6,7); +h +99 +SET @x:= (SELECT h FROM t1 WHERE (a,b,c,d,e,f,g)=(1,2,3,4,5,6,7)); +SELECT @x; +@x +99 +DROP TABLE t1; |