List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:January 9 2009 7:03pm
Subject:bzr push into mysql-6.0-bugteam branch (joro:2956 to 2958)
View as plain text  
 2958 Georgi Kodinov	2009-01-09 [merge]
      merged 5.1-bugteam -> 6.0-bugteam
modified:
  client/mysqltest.c

 2957 Georgi Kodinov	2009-01-09 [merge]
      merged 41437 to 6.0-bugteam
modified:
  mysql-test/r/mysql.result
  mysql-test/t/mysql.test
  sql/item_strfunc.cc

 2956 Mattias Jonsson	2009-01-09 [merge]
      merge
modified:
  sql/sql_partition.cc

=== modified file 'client/mysqltest.c'
--- a/client/mysqltest.c	2009-01-07 20:53:39 +0000
+++ b/client/mysqltest.c	2009-01-09 18:45:39 +0000
@@ -1345,7 +1345,7 @@ int diff_check()
 {
  char buf[512]= {0};
  FILE *res_file;
- char *cmd = "diff -v";
+ const char *cmd = "diff -v";
  int have_diff = 0;
 
   if (!(res_file= popen(cmd, "r")))

=== modified file 'mysql-test/r/mysql.result'
--- a/mysql-test/r/mysql.result	2009-01-06 10:38:47 +0000
+++ b/mysql-test/r/mysql.result	2009-01-09 18:43:23 +0000
@@ -186,6 +186,8 @@ delimiter
 2
 2
 2
+@z:='1'	@z=database()
+1	NULL
 End of 5.0 tests
 WARNING: --server-arg option not supported in this configuration.
 *************************** 1. row ***************************

=== modified file 'mysql-test/t/mysql.test'
--- a/mysql-test/t/mysql.test	2008-12-11 17:52:45 +0000
+++ b/mysql-test/t/mysql.test	2009-01-09 18:43:23 +0000
@@ -310,6 +310,11 @@ EOF
 --exec $MYSQL -c < $MYSQLTEST_VARDIR/tmp/bug38158.sql 2>&1
 remove_file $MYSQLTEST_VARDIR/tmp/bug38158.sql;
 
+#
+# Bug #41437: Value stored in 'case' lacks charset, causees segfault
+#
+--exec $MYSQL -e "select @z:='1',@z=database()"
+
 --echo End of 5.0 tests
 
 #

=== modified file 'sql/item_strfunc.cc'
--- a/sql/item_strfunc.cc	2008-12-09 12:08:02 +0000
+++ b/sql/item_strfunc.cc	2009-01-09 18:43:23 +0000
@@ -1926,6 +1926,12 @@ Item *Item_func_sysconst::safe_charset_c
   Item_string *conv;
   uint conv_errors;
   String tmp, cstr, *ostr= val_str(&tmp);
+  if (null_value)
+  {
+    Item *null_item= new Item_null((char *) fully_qualified_func_name());
+    null_item->collation.set (tocs);
+    return null_item;
+  }
   cstr.copy(ostr->ptr(), ostr->length(), ostr->charset(), tocs, &conv_errors);
   if (conv_errors ||
       !(conv= new Item_static_string_func(fully_qualified_func_name(),

Thread
bzr push into mysql-6.0-bugteam branch (joro:2956 to 2958) Georgi Kodinov9 Jan