diff options
author | unknown <igor@olga.mysql.com> | 2007-03-12 01:39:57 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-03-12 01:39:57 -0700 |
commit | 91abf15ed29a33fd6e02f00ad5088d7f8d041bc2 (patch) | |
tree | 9b06c8a058e605c8893af791037327accfeee04b /mysql-test/t/subselect.test | |
parent | d00731db77ee8a96e917f3447b5895b5f13bb06c (diff) | |
download | mariadb-git-91abf15ed29a33fd6e02f00ad5088d7f8d041bc2.tar.gz |
Fixed bug #26738: incomplete string values in a result set column
when the column is to be read from a derived table column which
was specified as a concatenation of string literals.
The bug happened because the Item_string::append did not adjust the
value of Item_string::max_length. As a result of it the temporary
table column defined to store the concatenation of literals was
not wide enough to hold the whole value.
mysql-test/r/subselect.result:
Added a test case for bug #26738.
mysql-test/t/subselect.test:
Added a test case for bug #26738.
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r-- | mysql-test/t/subselect.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 1deda2a4382..1655422c51e 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -2729,3 +2729,16 @@ DROP TABLE t1; DROP TABLE t2; DROP TABLE t1xt2; +# +# Bug #26728: derived table with concatanation of literals in select list +# + +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (3), (1), (2); + +SELECT 'this is ' 'a test.' AS col1, a AS col2 FROM t1; +SELECT * FROM (SELECT 'this is ' 'a test.' AS col1, a AS t2 FROM t1) t; + +DROP table t1; + + |