List:Commits« Previous MessageNext Message »
From:Marc Alff Date:July 14 2010 3:53pm
Subject:bzr commit into mysql-trunk-bugfixing branch (marc.alff:3104)
View as plain text  
#At file:///home/malff/BZR_TREE/mysql-trunk-bugfixing-55087/ based on revid:marc.alff@stripped

 3104 Marc Alff	2010-07-14 [merge]
      local merge

    modified:
      client/mysqlbinlog.cc
      client/mysqltest.cc
      libmysql/Makefile.shared
      mysql-test/include/ctype_numconv.inc
      mysql-test/r/ctype_binary.result
      mysql-test/r/ctype_cp1251.result
      mysql-test/r/ctype_latin1.result
      mysql-test/r/ctype_ucs.result
      sql/filesort.cc
      sql/item_strfunc.cc
=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc	2010-07-08 21:20:08 +0000
+++ b/client/mysqlbinlog.cc	2010-07-09 11:24:18 +0000
@@ -2032,6 +2032,7 @@ int main(int argc, char** argv)
   {
     usage();
     free_defaults(defaults_argv);
+    my_end(my_end_arg);
     exit(1);
   }
 

=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2010-07-08 21:20:08 +0000
+++ b/client/mysqltest.cc	2010-07-09 01:19:57 +0000
@@ -6338,7 +6338,7 @@ void free_win_path_patterns()
   for (i=0 ; i < patterns.elements ; i++)
   {
     const char** pattern= dynamic_element(&patterns, i, const char**);
-    my_free(*pattern);
+    my_free((void *) *pattern);
   }
   delete_dynamic(&patterns);
 }

=== modified file 'libmysql/Makefile.shared'
--- a/libmysql/Makefile.shared	2010-07-08 21:20:08 +0000
+++ b/libmysql/Makefile.shared	2010-07-09 11:18:36 +0000
@@ -52,7 +52,7 @@ mystringsextra= 	strto.c
 dbugobjects =		dbug.lo
 mysysheaders =		mysys_priv.h my_static.h
 vioheaders =		vio_priv.h
-mysysobjects1 =		my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
+mysysobjects1 =		my_init.lo my_static.lo my_malloc.lo \
 			my_create.lo my_delete.lo mf_tempfile.lo my_open.lo \
 			my_file.lo my_read.lo my_write.lo errors.lo \
 			my_error.lo my_getwd.lo my_div.lo \

=== modified file 'mysql-test/include/ctype_numconv.inc'
--- a/mysql-test/include/ctype_numconv.inc	2010-07-07 06:00:46 +0000
+++ b/mysql-test/include/ctype_numconv.inc	2010-07-09 05:39:41 +0000
@@ -1607,6 +1607,25 @@ drop function f1;
 --echo #
 
 --echo #
+--echo # Bug#54668 User variable assignments get wrong type
+--echo #
+SET @x=md5('a');
+SELECT charset(@x), collation(@x);
+SET @x=old_password('a');
+SELECT charset(@x), collation(@x);
+SET @x=password('a');
+SELECT charset(@x), collation(@x);
+SET @x=sha('a');
+SELECT charset(@x), collation(@x);
+SET @x=sha1('a');
+SELECT charset(@x), collation(@x);
+SET @x=astext(point(1,2));
+SELECT charset(@x), collation(@x);
+SET @x=aswkt(point(1,2));
+SELECT charset(@x), collation(@x);
+
+
+--echo #
 --echo # Bug#52159 returning time type from function and empty left join causes debug assertion
 --echo #
 CREATE FUNCTION f1() RETURNS TIME RETURN 1;

=== modified file 'mysql-test/r/ctype_binary.result'
--- a/mysql-test/r/ctype_binary.result	2010-07-07 06:00:46 +0000
+++ b/mysql-test/r/ctype_binary.result	2010-07-09 05:39:41 +0000
@@ -2567,6 +2567,37 @@ drop function f1;
 # End of WL#2649 Number-to-string conversions
 #
 #
+# Bug#54668 User variable assignments get wrong type
+#
+SET @x=md5('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+binary	binary
+SET @x=old_password('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+binary	binary
+SET @x=password('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+binary	binary
+SET @x=sha('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+binary	binary
+SET @x=sha1('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+binary	binary
+SET @x=astext(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+binary	binary
+SET @x=aswkt(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+binary	binary
+#
 # Bug#52159 returning time type from function and empty left join causes debug assertion
 #
 CREATE FUNCTION f1() RETURNS TIME RETURN 1;

=== modified file 'mysql-test/r/ctype_cp1251.result'
--- a/mysql-test/r/ctype_cp1251.result	2010-07-07 06:00:46 +0000
+++ b/mysql-test/r/ctype_cp1251.result	2010-07-09 05:39:41 +0000
@@ -2649,6 +2649,37 @@ drop function f1;
 # End of WL#2649 Number-to-string conversions
 #
 #
+# Bug#54668 User variable assignments get wrong type
+#
+SET @x=md5('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+cp1251	cp1251_general_ci
+SET @x=old_password('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+cp1251	cp1251_general_ci
+SET @x=password('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+cp1251	cp1251_general_ci
+SET @x=sha('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+cp1251	cp1251_general_ci
+SET @x=sha1('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+cp1251	cp1251_general_ci
+SET @x=astext(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+cp1251	cp1251_general_ci
+SET @x=aswkt(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+cp1251	cp1251_general_ci
+#
 # Bug#52159 returning time type from function and empty left join causes debug assertion
 #
 CREATE FUNCTION f1() RETURNS TIME RETURN 1;

=== modified file 'mysql-test/r/ctype_latin1.result'
--- a/mysql-test/r/ctype_latin1.result	2010-07-07 06:00:46 +0000
+++ b/mysql-test/r/ctype_latin1.result	2010-07-09 05:39:41 +0000
@@ -2977,6 +2977,37 @@ drop function f1;
 # End of WL#2649 Number-to-string conversions
 #
 #
+# Bug#54668 User variable assignments get wrong type
+#
+SET @x=md5('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+latin1	latin1_swedish_ci
+SET @x=old_password('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+latin1	latin1_swedish_ci
+SET @x=password('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+latin1	latin1_swedish_ci
+SET @x=sha('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+latin1	latin1_swedish_ci
+SET @x=sha1('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+latin1	latin1_swedish_ci
+SET @x=astext(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+latin1	latin1_swedish_ci
+SET @x=aswkt(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+latin1	latin1_swedish_ci
+#
 # Bug#52159 returning time type from function and empty left join causes debug assertion
 #
 CREATE FUNCTION f1() RETURNS TIME RETURN 1;

=== modified file 'mysql-test/r/ctype_ucs.result'
--- a/mysql-test/r/ctype_ucs.result	2010-07-07 06:00:46 +0000
+++ b/mysql-test/r/ctype_ucs.result	2010-07-09 05:39:41 +0000
@@ -3809,6 +3809,37 @@ drop function f1;
 # End of WL#2649 Number-to-string conversions
 #
 #
+# Bug#54668 User variable assignments get wrong type
+#
+SET @x=md5('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+ucs2	ucs2_general_ci
+SET @x=old_password('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+ucs2	ucs2_general_ci
+SET @x=password('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+ucs2	ucs2_general_ci
+SET @x=sha('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+ucs2	ucs2_general_ci
+SET @x=sha1('a');
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+ucs2	ucs2_general_ci
+SET @x=astext(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+ucs2	ucs2_general_ci
+SET @x=aswkt(point(1,2));
+SELECT charset(@x), collation(@x);
+charset(@x)	collation(@x)
+ucs2	ucs2_general_ci
+#
 # Bug#52159 returning time type from function and empty left join causes debug assertion
 #
 CREATE FUNCTION f1() RETURNS TIME RETURN 1;

=== modified file 'sql/filesort.cc'
--- a/sql/filesort.cc	2010-07-08 21:20:08 +0000
+++ b/sql/filesort.cc	2010-07-09 01:19:57 +0000
@@ -355,7 +355,7 @@ void filesort_free_buffers(TABLE *table,
     table->sort.sort_keys= NULL;
     my_free(table->sort.buffpek);
     table->sort.buffpek= NULL;
-    table->sort.buffpek_len= NULL;
+    table->sort.buffpek_len= 0;
   }
 
   my_free(table->sort.addon_buf);

=== modified file 'sql/item_strfunc.cc'
--- a/sql/item_strfunc.cc	2010-07-07 06:38:11 +0000
+++ b/sql/item_strfunc.cc	2010-07-09 05:39:41 +0000
@@ -72,7 +72,12 @@ String *Item_str_ascii_func::val_str(Str
   DBUG_ASSERT(fixed == 1);
 
   if (!(collation.collation->state & MY_CS_NONASCII))
-    return val_str_ascii(str);
+  {
+    String *res= val_str_ascii(str);
+    if (res)
+      res->set_charset(collation.collation);
+    return res;
+  }
   
   DBUG_ASSERT(str != &ascii_buf);
   


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20100714155344-01pf0kvvmoh22sxs.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (marc.alff:3104) Marc Alff14 Jul