List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:February 18 2011 2:18pm
Subject:bzr push into mysql-5.1 branch (alexander.barkov:3600 to 3601)
View as plain text  
 3601 Alexander Barkov	2011-02-18
      A post-fix for b58036.

    modified:
      tests/mysql_client_test.c
 3600 Alexander Barkov	2011-02-18
      Bug#11765108 (Bug#58036) client utf32, utf16, ucs2 should be disallowed, they crash server
      
      A separate fix for 5.1 (as 5.1 and 5.5 have seriously
      differged in the related pieces of the code).
      A patch for 5.5 was approved earlier.
      
      Problem: ucs2 was correctly disallowed in "SET NAMES" only,
      while mysql_real_connect() and mysql_change_user() still allowed
      to use ucs2, which made server crash.
      
      Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user().
      
        @ sql/sql_priv.h
          - changing return type for thd_init_client_charset() to bool,
            to return errors to the caller
      
        @ sql/sql_var.cc
          - using new function
      
        @ sql/sql_connect.cc
          - thd_client_charset_init:
            in case of unsupported client character set send error and return true;
            in case of success return false
          - check_connection:
            Return error if character set initialization failed
      
        @ sql/sql_parse.cc
          - check charset in the very beginnig of the CMD_CHANGE_USER handling code
      
        @ tests/mysql_client_test.c
          - adding tests

    modified:
      sql/mysql_priv.h
      sql/set_var.cc
      sql/sql_connect.cc
      sql/sql_parse.cc
      tests/mysql_client_test.c
=== modified file 'tests/mysql_client_test.c'
--- a/tests/mysql_client_test.c	2011-02-18 13:12:36 +0000
+++ b/tests/mysql_client_test.c	2011-02-18 14:17:37 +0000
@@ -18417,7 +18417,7 @@ static void test_bug58036()
     if (!opt_silent)
       printf("mysql_real_connect() succeeded (failure expected)\n");
     mysql_close(conn);
-    DIE();
+    DIE("");
   }
 
   if (!opt_silent)
@@ -18443,7 +18443,7 @@ static void test_bug58036()
       printf("mysql_real_connect() failed: %s (%d)\n",
              mysql_error(conn), mysql_errno(conn));
     mysql_close(conn);
-    DIE();
+    DIE("");
   }
 
   mysql_options(conn, MYSQL_SET_CHARSET_NAME, "ucs2");
@@ -18452,7 +18452,7 @@ static void test_bug58036()
     if (!opt_silent)
       printf("mysql_change_user() succedded, error expected!");
     mysql_close(conn);
-    DIE();
+    DIE("");
   }
 
   if (!opt_silent)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (alexander.barkov:3600 to 3601) Alexander Barkov18 Feb