diff options
author | unknown <gshchepa/uchum@host.loc> | 2008-02-13 19:32:19 +0400 |
---|---|---|
committer | unknown <gshchepa/uchum@host.loc> | 2008-02-13 19:32:19 +0400 |
commit | 247efb9cf060f0cd8d8eb7e4ecd084b9a202a395 (patch) | |
tree | b271e106f7200ee1759c75b179213ab22125297d /mysql-test/t/select.test | |
parent | b825be1bf81e68658ff39d1e6075489a84f4c8bf (diff) | |
download | mariadb-git-247efb9cf060f0cd8d8eb7e4ecd084b9a202a395.tar.gz |
Fixed bug#33764: Wrong result with IN(), CONCAT() and implicit
type conversion.
Instead of copying of whole character string from a temporary
buffer, the server copied a short-living pointer to that string
into a long-living structure. That has been fixed.
mysql-test/r/select.result:
Added test case for bug#33764.
mysql-test/t/select.test:
Added test case for bug#33764.
sql/item_cmpfunc.cc:
Fixed bug#33764.
Copying of a pointer has been replaced with an optional copying of
a whole array to a newly allocated memory space in case of a
functional source item.
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r-- | mysql-test/t/select.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index c48f2771aa8..4b52dac680c 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -3672,4 +3672,15 @@ DROP TABLE t1; --echo +########################################################################### + +# +# Bug #33764: Wrong result with IN(), CONCAT() and implicit type conversion +# + +CREATE TABLE t1 (a VARCHAR(10) NOT NULL PRIMARY KEY); +INSERT INTO t1 (a) VALUES ('foo0'), ('bar0'), ('baz0'); +SELECT * FROM t1 WHERE a IN (CONCAT('foo', 0), 'bar'); +DROP TABLE t1; + --echo End of 5.0 tests |