List:Commits« Previous MessageNext Message »
From:Sergey Petrunia Date:March 16 2009 5:03pm
Subject:bzr commit into mysql-5.1-bugteam branch (sergefp:2812)
View as plain text  
#At file:///home/spetrunia/dev/mysql-5.1-imerge-disable/ based on revid:sergefp@stripped

 2812 Sergey Petrunia	2009-03-16
      @@optimizer_switch switch from no_xxx to xxx={on|off} syntax:
      - Fix valgrind warning on attempt to run a "SET optimizer_switch=number" statement.
        Need to call c_ptr_safe() as strings returned by non-string items are not 
        necessarily null-terminated.
modified:
  sql/set_var.cc

per-file messages:
  sql/set_var.cc
    @@optimizer_switch switch from no_xxx to xxx={on|off} syntax:
    - Fix valgrind warning on attempt to run a "SET optimizer_switch=number" statement.
      Need to call c_ptr_safe() as strings returned by non-string items are not 
      necessarily null-terminated.
=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	2009-03-14 19:04:31 +0000
+++ b/sql/set_var.cc	2009-03-16 17:02:55 +0000
@@ -3990,7 +3990,7 @@ bool sys_var_thd_optimizer_switch::check
                                optimizer_switch_typelib.count, 
                                thd->variables.optimizer_switch,
                                global_system_variables.optimizer_switch,
-                               res->c_ptr(), res->length(), NULL,
+                               res->c_ptr_safe(), res->length(), NULL,
                                &error, &error_len, &not_used);
   if (error_len)
   {

Thread
bzr commit into mysql-5.1-bugteam branch (sergefp:2812)Sergey Petrunia16 Mar