Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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.1958 05/05/17 20:31:26 msvensson@neptunus.(none) +3 -0
BUG#9535 Warning for "create table t as select uuid();"
- Set max_length of Item_func_uuid to max_length*system_charset_info->mbmaxlen
Note! Item_func_uuid should be set to use 'ascii' charset when hex(), format(), md5()
etc will use 'ascii'
sql/item_strfunc.h
1.88 05/05/17 09:51:07 msvensson@neptunus.(none) +6 -1
Multiply max_length of Item_func_uuid with system_charset_info->mbmaxlen
mysql-test/t/func_misc.test
1.12 05/05/17 09:51:07 msvensson@neptunus.(none) +8 -0
Test case
mysql-test/r/func_misc.result
1.18 05/05/17 09:51:07 msvensson@neptunus.(none) +8 -0
Test results
# 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: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug9535
--- 1.87/sql/item_strfunc.h 2005-05-09 11:26:46 +02:00
+++ 1.88/sql/item_strfunc.h 2005-05-17 09:51:07 +02:00
@@ -727,7 +727,12 @@
Item_func_uuid(): Item_str_func() {}
void fix_length_and_dec() {
collation.set(system_charset_info);
- max_length= UUID_LENGTH;
+ /*
+ NOTE! uuid() should be changed to use 'ascii'
+ charset when hex(), format(), md5(), etc, and implicit
+ number-to-string conversion will use 'ascii'
+ */
+ max_length= UUID_LENGTH * system_charset_info->mbmaxlen;
}
const char *func_name() const{ return "uuid"; }
String *val_str(String *);
--- 1.17/mysql-test/r/func_misc.result 2005-04-01 14:04:43 +02:00
+++ 1.18/mysql-test/r/func_misc.result 2005-05-17 09:51:07 +02:00
@@ -51,3 +51,11 @@
a
2004-01-06 12:34:00
drop table t1;
+create table t1 as select uuid(), length(uuid());
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `uuid()` varchar(36) character set utf8 NOT NULL default '',
+ `length(uuid())` int(10) NOT NULL default '0'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
--- 1.11/mysql-test/t/func_misc.test 2005-02-04 07:14:20 +01:00
+++ 1.12/mysql-test/t/func_misc.test 2005-05-17 09:51:07 +02:00
@@ -38,3 +38,11 @@
drop table t1;
+# Test for BUG#9535
+create table t1 as select uuid(), length(uuid());
+show create table t1;
+drop table t1;
+
+
+
+
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.1958) BUG#9535 | msvensson | 17 May |