Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.1929 05/08/31 22:06:34 evgen@stripped +4 -0
create.test, create.result, sql_select.cc, item.cc:
After merge fix for bug #12537
mysql-test/t/create.test
1.60 05/08/31 22:05:52 evgen@stripped +1 -2
After merge fix for bug #12537
mysql-test/r/create.result
1.99 05/08/31 22:05:40 evgen@stripped +2 -3
After merge fix for bug #12537
sql/sql_select.cc
1.364 05/08/31 22:05:02 evgen@stripped +2 -1
After merge fix for bug #12537
sql/item.cc
1.169 05/08/31 22:04:26 evgen@stripped +2 -1
After merge fix for bug #12537
# 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: evgen
# Host: moonbone.local
# Root: /work/12537-bug-5.0-mysql
--- 1.168/sql/item.cc 2005-08-31 21:24:23 +04:00
+++ 1.169/sql/item.cc 2005-08-31 22:04:26 +04:00
@@ -3648,7 +3648,8 @@
Field *Item::make_string_field(TABLE *table)
{
- if (max_length > CONVERT_IF_BIGGER_TO_BLOB)
+ DBUG_ASSERT(collation.collation);
+ if (max_length/collation.collation->mbmaxlen > CONVERT_IF_BIGGER_TO_BLOB)
return new Field_blob(max_length, maybe_null, name, table,
collation.collation);
if (max_length > 0)
--- 1.363/sql/sql_select.cc 2005-08-31 21:24:23 +04:00
+++ 1.364/sql/sql_select.cc 2005-08-31 22:05:02 +04:00
@@ -7963,7 +7963,8 @@
if ((type= item->field_type()) == MYSQL_TYPE_DATETIME ||
type == MYSQL_TYPE_TIME || type == MYSQL_TYPE_DATE)
new_field= item->tmp_table_field_from_field_type(table);
- else if (item->max_length > 255 && convert_blob_length)
+ else if (item->max_length/item->collation.collation->mbmaxlen > 255
&&
+ convert_blob_length)
new_field= new Field_varstring(convert_blob_length, maybe_null,
item->name, table,
item->collation.collation);
--- 1.98/mysql-test/r/create.result 2005-08-31 21:22:28 +04:00
+++ 1.99/mysql-test/r/create.result 2005-08-31 22:05:40 +04:00
@@ -597,11 +597,10 @@
create table t2(test.t2.name int);
drop table t1,t2;
CREATE TABLE t1 (f1 VARCHAR(255) CHARACTER SET utf8);
-CREATE TABLE t2 AS SELECT LEFT(f1,86) AS f2 FROM t1 UNION SELECT LEFT(f1,86)
-AS f2 FROM t1;
+CREATE TABLE t2 AS SELECT LEFT(f1,171) AS f2 FROM t1 UNION SELECT LEFT(f1,171) AS f2 FROM
t1;
DESC t2;
Field Type Null Key Default Extra
-f2 varchar(86) YES NULL
+f2 varchar(171) YES NULL
DROP TABLE t1,t2;
create database mysqltest;
use mysqltest;
--- 1.59/mysql-test/t/create.test 2005-08-31 21:22:28 +04:00
+++ 1.60/mysql-test/t/create.test 2005-08-31 22:05:52 +04:00
@@ -507,8 +507,7 @@
# Bug #12537: UNION produces longtext instead of varchar
#
CREATE TABLE t1 (f1 VARCHAR(255) CHARACTER SET utf8);
-CREATE TABLE t2 AS SELECT LEFT(f1,86) AS f2 FROM t1 UNION SELECT LEFT(f1,86)
-AS f2 FROM t1;
+CREATE TABLE t2 AS SELECT LEFT(f1,171) AS f2 FROM t1 UNION SELECT LEFT(f1,171) AS f2 FROM
t1;
DESC t2;
DROP TABLE t1,t2;
| Thread |
|---|
| • bk commit into 5.0 tree (evgen:1.1929) BUG#12537 | eugene | 31 Aug |