summaryrefslogtreecommitdiff
path: root/mysql-test/r/union.result
diff options
context:
space:
mode:
authorunknown <jani@a88-112-41-254.elisa-laajakaista.fi>2006-09-26 13:19:25 +0300
committerunknown <jani@a88-112-41-254.elisa-laajakaista.fi>2006-09-26 13:19:25 +0300
commit770e9b4b5ea146b5c5ee053b139ed79075bcf28f (patch)
treef2d09d05c37f785d2d46a0dcb043b95a399a60f7 /mysql-test/r/union.result
parent207fd3fa03324f26c2226d8a9ce37291c3f225c4 (diff)
downloadmariadb-git-770e9b4b5ea146b5c5ee053b139ed79075bcf28f.tar.gz
Fix for bug#20208
A better fix for bug#10025. Fixed test case plus added new tests. After fixing Bug#20208 "Blobs greater than 8K are being truncated to 8K" the fix to bug#10025 "Misleading error with COLLATE mediumtext and UNION" became more accurate. Earlier mediumtext got converted to longtext, although mediumtext was enough to contain the results. Now it converts correctly to mediumtext, if the length does not exceed that and if none of the original fields were type longtext. Type longtext still converts correctly to type longtext, as the extra tests prove. mysql-test/r/union.result: Fixed an earlier test case plus added two new tests. mysql-test/t/union.test: Fixed an earlier test case plus added two new tests.
Diffstat (limited to 'mysql-test/r/union.result')
-rw-r--r--mysql-test/r/union.result29
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 05870d23ed6..fd01133afbc 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -1284,9 +1284,38 @@ create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
+ `left(a,100000000)` mediumtext
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop tables t1,t2,t3;
+CREATE TABLE t1 (a longtext);
+CREATE TABLE t2 (b varchar(20));
+INSERT INTO t1 VALUES ('a'),('b');
+SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
+left(a,100000000)
+a
+b
+create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
+show create table t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
`left(a,100000000)` longtext
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop tables t1,t2,t3;
+SELECT @tmp_max:= @@max_allowed_packet;
+@tmp_max:= @@max_allowed_packet
+1048576
+SET max_allowed_packet=25000000;
+CREATE TABLE t1 (a mediumtext);
+CREATE TABLE t2 (b varchar(20));
+INSERT INTO t1 VALUES ('a');
+CREATE TABLE t3 SELECT REPEAT(a,20000000) AS a FROM t1 UNION SELECT b FROM t2;
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `a` longtext
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLES t1,t2,t3;
+SET max_allowed_packet:= @tmp_max;
create table t1 ( id int not null auto_increment, primary key (id), col1 int);
insert into t1 (col1) values (2),(3),(4),(5),(6);
select 99 union all select id from t1 order by 1;