From 34514477ff319d958a0e940981f93deb383e21ea Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 May 2005 17:30:12 +0300 Subject: fixed problem with long string results of expressions in UNIONS (BUG#10025) mysql-test/r/union.result: test for Bug #10025 mysql-test/t/union.test: test for Bug #10025 sql/item.cc: set HA_OPTION_PACK_RECORD and change type to MYSQL_TYPE_STRING, to allow correct field creation in case of length more then 255 (creation STRING field with length more then 255) --- mysql-test/t/union.test | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mysql-test/t/union.test') diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index b0446e1ea4a..ffc7e718e9d 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -742,3 +742,14 @@ create table t2 select a from t1 union select c from t1; create table t2 select a from t1 union select b from t1; show columns from t2; drop table t2, t1; + +# +# correct conversion long string to TEXT (BUG#10025) +# +CREATE TABLE t1 (a mediumtext); +CREATE TABLE t2 (b varchar(20)); +INSERT INTO t1 VALUES ('a'),('b'); +SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2; +create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2; +show create table t3; +drop tables t1,t2,t3; -- cgit v1.2.1