List:Internals« Previous MessageNext Message »
From:sanja Date:May 26 2005 4:30pm
Subject:bk commit into 4.1 tree (bell:1.2288) BUG#10025
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of bell. When bell does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2288 05/05/26 17:30:12 bell@stripped +3 -0
  fixed problem with long string results of expressions in UNIONS (BUG#10025)

  sql/item.cc
    1.203 05/05/26 17:30:09 bell@stripped +2 -2
    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
    1.84 05/05/26 17:30:09 bell@stripped +11 -0
    test for Bug #10025

  mysql-test/r/union.result
    1.90 05/05/26 17:30:09 bell@stripped +14 -0
    test for Bug #10025

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	bell
# Host:	sanja.is.com.ua
# Root:	/home/bell/mysql/bk/work-4.1

--- 1.202/sql/item.cc	Mon May 16 12:18:53 2005
+++ 1.203/sql/item.cc	Thu May 26 17:30:09 2005
@@ -3099,8 +3099,8 @@
                          enum_set_typelib, collation.collation);
   case MYSQL_TYPE_VAR_STRING:
     table->db_create_options|= HA_OPTION_PACK_RECORD;
-    return new Field_string(max_length, maybe_null, name, table,
-                            collation.collation);
+    fld_type= MYSQL_TYPE_STRING;
+    break;
   default:
     break;
   }

--- 1.89/mysql-test/r/union.result	Sun Apr 10 10:40:13 2005
+++ 1.90/mysql-test/r/union.result	Thu May 26 17:30:09 2005
@@ -1235,3 +1235,17 @@
 Field	Type	Null	Key	Default	Extra
 a	varchar(3)	YES		NULL	
 drop table t2, t1;
+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;
+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;

--- 1.83/mysql-test/t/union.test	Sun Apr 10 10:40:05 2005
+++ 1.84/mysql-test/t/union.test	Thu May 26 17:30:09 2005
@@ -742,3 +742,14 @@
 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;
Thread
bk commit into 4.1 tree (bell:1.2288) BUG#10025sanja27 May