List:Commits« Previous MessageNext Message »
From:Petr Chardin Date:March 2 2006 10:50am
Subject:bk commit into 5.1 tree (petr:1.2208)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of cps. When cps 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.2208 06/03/02 12:50:01 petr@stripped +4 -0
  Remove unused thd->options's flag -- OPTION_UPDATE_LOG
  (The update log itself was removed back in 5.0)

  sql/set_var.cc
    1.177 06/03/02 12:49:16 petr@stripped +7 -15
    We never check for OPTION_UPDATE_LOG. So, we should not bother setting it.

  sql/mysqld.cc
    1.542 06/03/02 12:49:15 petr@stripped +2 -3
    Do not set OPTION_UPDATE_LOG. It is not used anymore.

  sql/mysql_priv.h
    1.384 06/03/02 12:49:15 petr@stripped +0 -1
    remove unused define

  sql/log.cc
    1.194 06/03/02 12:49:15 petr@stripped +2 -1
    OPTION_UPDATE_LOG was set in all threads but replication ones.
    So, it seems that the check filtered out slow log records from
    replication threads. Now we do it with explicit check.

# 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:	petr
# Host:	owlet.
# Root:	/home/cps/mysql/devel/5.1-cleanup

--- 1.193/sql/log.cc	2006-02-26 00:20:52 +03:00
+++ 1.194/sql/log.cc	2006-03-02 12:49:15 +03:00
@@ -714,7 +714,8 @@
   {
     current_time= time(NULL);
 
-    if (!(thd->options & OPTION_UPDATE_LOG))
+    /* do not log slow queries from replication threads */
+    if (thd->slave_thread)
       return 0;
 
     lock();

--- 1.383/sql/mysql_priv.h	2006-02-27 11:01:25 +03:00
+++ 1.384/sql/mysql_priv.h	2006-03-02 12:49:15 +03:00
@@ -259,7 +259,6 @@
 #define OPTION_BIG_TABLES       (LL(1) << 8)       // THD, user
 #define OPTION_BIG_SELECTS      (LL(1) << 9)       // THD, user
 #define OPTION_LOG_OFF          (LL(1) << 10)      // THD, user
-#define OPTION_UPDATE_LOG       (LL(1) << 11)      // THD, user, unused
 #define TMP_TABLE_ALL_COLUMNS   (LL(1) << 12)      // SELECT, intern
 #define OPTION_WARNINGS         (LL(1) << 13)      // THD, user
 #define OPTION_AUTO_IS_NULL     (LL(1) << 14)      // THD, user, binlog

--- 1.541/sql/mysqld.cc	2006-02-26 16:12:51 +03:00
+++ 1.542/sql/mysqld.cc	2006-03-02 12:49:15 +03:00
@@ -6982,9 +6982,8 @@
   log_error_file_ptr= log_error_file;
   language_ptr= language;
   mysql_data_home= mysql_real_data_home;
-  thd_startup_options= (OPTION_UPDATE_LOG | OPTION_AUTO_IS_NULL |
-			OPTION_BIN_LOG | OPTION_QUOTE_SHOW_CREATE |
-			OPTION_SQL_NOTES);
+  thd_startup_options= (OPTION_AUTO_IS_NULL | OPTION_BIN_LOG |
+                        OPTION_QUOTE_SHOW_CREATE | OPTION_SQL_NOTES);
   protocol_version= PROTOCOL_VERSION;
   what_to_log= ~ (1L << (uint) COM_TIME);
   refresh_version= flush_version= 1L;	/* Increments on each reload */

--- 1.176/sql/set_var.cc	2006-02-26 00:20:53 +03:00
+++ 1.177/sql/set_var.cc	2006-03-02 12:49:16 +03:00
@@ -140,7 +140,6 @@
 static int  check_log_update(THD *thd, set_var *var);
 static bool set_log_update(THD *thd, set_var *var);
 static int  check_pseudo_thread_id(THD *thd, set_var *var);
-static bool set_log_bin(THD *thd, set_var *var);
 void fix_binlog_format_after_update(THD *thd, enum_var_type type);
 static void fix_low_priority_updates(THD *thd, enum_var_type type);
 static int check_tx_isolation(THD *thd, set_var *var);
@@ -170,7 +169,10 @@
   Variable definition list
 
   These are variables that can be set from the command line, in
-  alphabetic order
+  alphabetic order.
+
+  The variables are linked into the list. A variable is added to
+  it in the constructor (see sys_var class for details).
 */
 
 sys_var *sys_var::first= NULL;
@@ -557,10 +559,10 @@
 static sys_var_thd_bit	sys_log_update("sql_log_update",
                                        check_log_update,
 				       set_log_update,
-				       OPTION_UPDATE_LOG);
+				       OPTION_BIN_LOG);
 static sys_var_thd_bit	sys_log_binlog("sql_log_bin",
                                        check_log_update,
-				       set_log_bin,
+				       set_option_bit,
 				       OPTION_BIN_LOG);
 static sys_var_thd_bit	sys_sql_warnings("sql_warnings", 0,
 					 set_option_bit,
@@ -2775,11 +2777,9 @@
     See sql/mysqld.cc/, comments in function init_server_components() for an
     explaination of the different warnings we send below
   */
-    
+
   if (opt_sql_bin_update)
   {
-    ((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG |
-					       OPTION_UPDATE_LOG);
     push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
                  ER_UPDATE_LOG_DEPRECATED_TRANSLATED,
                  ER(ER_UPDATE_LOG_DEPRECATED_TRANSLATED));
@@ -2792,14 +2792,6 @@
   return 0;
 }
 
-static bool set_log_bin(THD *thd, set_var *var)
-{
-  if (opt_sql_bin_update)
-    ((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG |
-					       OPTION_UPDATE_LOG);
-  set_option_bit(thd, var);
-  return 0;
-}
 
 static int check_pseudo_thread_id(THD *thd, set_var *var)
 {
Thread
bk commit into 5.1 tree (petr:1.2208)Petr Chardin3 Mar