MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:May 15 2006 3:05pm
Subject:bk commit into 5.0 tree (aelkin:1.2140) BUG#14157
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of elkin. When elkin 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.2140 06/05/15 18:05:23 aelkin@stripped +2 -0
  BUG#14157: utf8 encoding in binlog without set character_set_client: e.g DROP temporary
  
  specific to 5.0 version of the patch is motivated by the fact that a wrapper over 
  MYSQLLOG::write can not help in 5.0 where query's charset is embedded into event instance in the constructor.

  sql/sql_base.cc
    1.337 06/05/15 18:05:18 aelkin@stripped +4 -1
    No wrapper similar to 4.1's version is done since Query_log_event constructor
    takes care of encodings in 5.0 whereas log::write method does it in 4.1.
    We can introduce an additional constuctor for Query_log_event to pass desired
    (i.e system_character_info) charset different from THD's version.
    But I am delaying this while there are not more bugs similar to this one reported.

  sql/mysql_priv.h
    1.388 06/05/15 18:05:18 aelkin@stripped +0 -13
    this 4.1 specific code does not help in 5.0

# 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:	aelkin
# Host:	dsl-hkigw8-feb0de00-199.dhcp.inet.fi
# Root:	/usr_rh9/home/elkin.rh9/MySQL/Merge/5.0

--- 1.387/sql/mysql_priv.h	2006-05-14 20:31:34 +03:00
+++ 1.388/sql/mysql_priv.h	2006-05-15 18:05:18 +03:00
@@ -1583,19 +1583,6 @@
 }
 
 /*
-  wrapper to use instead of mysql_bin_log.write when
-  query is generated by the server using system_charset encoding
-*/
-
-inline void write_binlog_with_system_charset(THD * thd, Query_log_event * qinfo)
-{
-  CHARSET_INFO * cs_save= thd->variables.character_set_client;
-  thd->variables.character_set_client= system_charset_info;
-  mysql_bin_log.write(qinfo);
-  thd->variables.character_set_client= cs_save;
-}
-
-/*
   is_user_table()
   return true if the table was created explicitly
 */

--- 1.336/sql/sql_base.cc	2006-05-14 20:31:34 +03:00
+++ 1.337/sql/sql_base.cc	2006-05-15 18:05:18 +03:00
@@ -715,9 +715,12 @@
         close_temporary(table, 1);
       }
       thd->clear_error();
+      CHARSET_INFO *cs_save= thd->variables.character_set_client;
+      thd->variables.character_set_client= system_charset_info;
       Query_log_event qinfo(thd, s_query.ptr(),
                             s_query.length() - 1 /* to remove trailing ',' */,
                             0, FALSE);
+      thd->variables.character_set_client= cs_save;
       /*
         Imagine the thread had created a temp table, then was doing a SELECT, and
         the SELECT was killed. Then it's not clever to mark the statement above as
@@ -728,7 +731,7 @@
         rightfully causing the slave to stop.
       */
       qinfo.error_code= 0;
-      write_binlog_with_system_charset(thd, &qinfo);
+      mysql_bin_log.write(&qinfo);
     }
     else
     {
Thread
bk commit into 5.0 tree (aelkin:1.2140) BUG#14157Andrei Elkin15 May