List:Internals« Previous MessageNext Message »
From:Lars Thalmann Date:March 10 2005 1:36pm
Subject:bk commit into 5.1 tree (lars:1.1775)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of lars. When lars 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1775 05/03/10 14:36:48 lars@stripped +12 -0
  WL#2472: Addendum: Fixes after Mats review

  sql/table_filter.h
    1.2 05/03/10 14:36:42 lars@stripped +3 -1
    WL#2472: Addendum: Fixes after Mats review

  sql/table_filter.cc
    1.2 05/03/10 14:36:42 lars@stripped +14 -16
    WL#2472: Addendum: Fixes after Mats review

  sql/sql_repl.h
    1.37 05/03/10 14:36:42 lars@stripped +3 -0
    WL#2472: Addendum: Fixes after Mats review

  sql/sql_repl.cc
    1.127 05/03/10 14:36:42 lars@stripped +0 -2
    WL#2472: Addendum: Fixes after Mats review

  sql/sql_parse.cc
    1.395 05/03/10 14:36:42 lars@stripped +0 -2
    WL#2472: Addendum: Fixes after Mats review

  sql/sql_acl.h
    1.31 05/03/10 14:36:42 lars@stripped +3 -0
    WL#2472: Addendum: Fixes after Mats review

  sql/sql_acl.cc
    1.132 05/03/10 14:36:42 lars@stripped +0 -4
    WL#2472: Addendum: Fixes after Mats review

  sql/slave.h
    1.84 05/03/10 14:36:41 lars@stripped +4 -0
    WL#2472: Addendum: Fixes after Mats review

  sql/slave.cc
    1.234 05/03/10 14:36:41 lars@stripped +0 -2
    WL#2472: Addendum: Fixes after Mats review

  sql/repl_failsafe.cc
    1.55 05/03/10 14:36:41 lars@stripped +0 -2
    WL#2472: Addendum: Fixes after Mats review

  sql/log_event.cc
    1.154 05/03/10 14:36:41 lars@stripped +0 -1
    WL#2472: Addendum: Fixes after Mats review

  sql/log.cc
    1.138 05/03/10 14:36:41 lars@stripped +0 -2
    WL#2472: Addendum: Fixes after Mats review

# 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:	lars
# Host:	goldfish.(none)
# Root:	/home/bk/w2472-5.1

--- 1.137/sql/log.cc	Tue Mar  8 21:11:15 2005
+++ 1.138/sql/log.cc	Thu Mar 10 14:36:41 2005
@@ -35,8 +35,6 @@
 #include "message.h"
 #endif
 
-extern Table_filter *binlog_filter;
-
 MYSQL_LOG mysql_log, mysql_slow_log, mysql_bin_log;
 ulong sync_binlog_counter= 0;
 

--- 1.153/sql/log_event.cc	Tue Mar  8 21:11:15 2005
+++ 1.154/sql/log_event.cc	Thu Mar 10 14:36:41 2005
@@ -23,7 +23,6 @@
 #include "slave.h"
 #include "table_filter.h"
 #include <my_dir.h>
-extern Table_filter *rpl_filter;
 #endif /* MYSQL_CLIENT */
 
 #define log_cs	&my_charset_latin1

--- 1.233/sql/slave.cc	Tue Mar  8 21:11:15 2005
+++ 1.234/sql/slave.cc	Thu Mar 10 14:36:41 2005
@@ -28,8 +28,6 @@
 #include <my_dir.h>
 #include <sql_common.h>
 
-extern Table_filter *rpl_filter;
-
 bool use_slave_mask = 0;
 MY_BITMAP slave_error_mask;
 

--- 1.131/sql/sql_acl.cc	Tue Mar  8 21:11:16 2005
+++ 1.132/sql/sql_acl.cc	Thu Mar 10 14:36:42 2005
@@ -27,10 +27,6 @@
 
 #include "mysql_priv.h"
 #include "hash_filo.h"
-#ifdef HAVE_REPLICATION
-#include "table_filter.h" //for tables_ok()
-extern Table_filter *rpl_filter;
-#endif
 #include <m_ctype.h>
 #include <stdarg.h>
 #include "sp_head.h"

--- 1.30/sql/sql_acl.h	Thu Jan  6 23:07:22 2005
+++ 1.31/sql/sql_acl.h	Thu Mar 10 14:36:42 2005
@@ -14,6 +14,9 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#include "slave.h" // for tables_ok(), rpl_filter
+extern Table_filter *rpl_filter;
+
 #define SELECT_ACL	(1L << 0)
 #define INSERT_ACL	(1L << 1)
 #define UPDATE_ACL	(1L << 2)

--- 1.394/sql/sql_parse.cc	Tue Mar  8 21:11:16 2005
+++ 1.395/sql/sql_parse.cc	Thu Mar 10 14:36:42 2005
@@ -22,8 +22,6 @@
 #include <myisam.h>
 #include <my_dir.h>
 
-extern Table_filter *rpl_filter;
-
 #ifdef HAVE_INNOBASE_DB
 #include "ha_innodb.h"
 #endif

--- 1.1/sql/table_filter.cc	Tue Mar  8 21:11:16 2005
+++ 1.2/sql/table_filter.cc	Thu Mar 10 14:36:42 2005
@@ -20,18 +20,13 @@
 #define TABLE_RULE_HASH_SIZE   16
 #define TABLE_RULE_ARR_SIZE   16
 
-Table_filter::Table_filter()
+Table_filter::Table_filter() : 
+  table_rules_on(0), do_table_inited(0), ignore_table_inited(0),
+  wild_do_table_inited(0), wild_ignore_table_inited(0)
 {
-  do_table_inited= 0;
-  ignore_table_inited= 0;
-  wild_do_table_inited= 0;
-  wild_ignore_table_inited= 0;
-
   do_db.empty();
   ignore_db.empty();
   rewrite_db.empty();
-
-  table_rules_on= 0;
 }
 
 
@@ -324,8 +319,8 @@
   e->tbl_name= e->db + (dot - table_spec) + 1;
   e->key_len= len;
   memcpy(e->db, table_spec, len);
-  (void)my_hash_insert(h, (byte*)e);
-  return 0;
+
+  return my_hash_insert(h, (byte*)e);
 }
 
 
@@ -367,16 +362,20 @@
 }
 
 
-static byte* get_table_key(TABLE_RULE_ENT* e, uint* len,
-			   my_bool not_used __attribute__((unused)))
+static byte* get_table_key(const byte* a, uint* len,
+			   my_bool __attribute__((unused)))
 {
+  TABLE_RULE_ENT *e= (TABLE_RULE_ENT *) a;
+
   *len= e->key_len;
   return (byte*)e->db;
 }
 
 
-static void free_table_ent(TABLE_RULE_ENT* e)
+static void free_table_ent(void* a)
 {
+  TABLE_RULE_ENT *e= (TABLE_RULE_ENT *) a;
+  
   my_free((gptr) e, MYF(0));
 }
 
@@ -385,8 +384,7 @@
 Table_filter::init_table_rule_hash(HASH* h, bool* h_inited)
 {
   hash_init(h, system_charset_info,TABLE_RULE_HASH_SIZE,0,0,
-	    (hash_get_key) get_table_key,
-	    (hash_free_key) free_table_ent, 0);
+	    get_table_key, free_table_ent, 0);
   *h_inited = 1;
 }
 
@@ -517,7 +515,7 @@
   {
     if (!strcmp(tmp->key, db))
     {
-      *new_len= (uint32)strlen(tmp->val);
+      *new_len= strlen(tmp->val);
       return tmp->val;
     }
   }

--- 1.1/sql/table_filter.h	Tue Mar  8 21:11:16 2005
+++ 1.2/sql/table_filter.h	Thu Mar 10 14:36:42 2005
@@ -39,7 +39,9 @@
 public:
   Table_filter();
   ~Table_filter();
-
+  Table_filter(Table_filter const&);
+  Table_filter& operator=(Table_filter const&);
+ 
   /* Checks - returns true if ok to replicate/log */
 
   bool tables_ok(const char* db, TABLE_LIST* tables);

--- 1.83/sql/slave.h	Tue Mar  8 21:11:16 2005
+++ 1.84/sql/slave.h	Thu Mar 10 14:36:41 2005
@@ -21,9 +21,13 @@
 
 #include "mysql.h"
 #include "my_list.h"
+#include "table_filter.h"
+
 #define SLAVE_NET_TIMEOUT  3600
 #define MAX_SLAVE_ERRMSG   1024
 #define MAX_SLAVE_ERROR    2000
+
+extern Table_filter *rpl_filter;
 
 /*****************************************************************************
 

--- 1.54/sql/repl_failsafe.cc	Tue Mar  8 21:11:15 2005
+++ 1.55/sql/repl_failsafe.cc	Thu Mar 10 14:36:41 2005
@@ -24,8 +24,6 @@
 #include "log_event.h"
 #include <mysql.h>
 
-extern Table_filter *rpl_filter;
-
 #define SLAVE_LIST_CHUNK 128
 #define SLAVE_ERRMSG_SIZE (FN_REFLEN+64)
 

--- 1.126/sql/sql_repl.cc	Tue Mar  8 21:11:16 2005
+++ 1.127/sql/sql_repl.cc	Thu Mar 10 14:36:42 2005
@@ -22,8 +22,6 @@
 #include "table_filter.h"
 #include <my_dir.h>
 
-extern Table_filter *binlog_filter;
-
 int max_binlog_dump_events = 0; // unlimited
 my_bool opt_sporadic_binlog_dump_fail = 0;
 static int binlog_dump_count = 0;

--- 1.36/sql/sql_repl.h	Tue Mar  8 21:11:16 2005
+++ 1.37/sql/sql_repl.h	Thu Mar 10 14:36:42 2005
@@ -17,6 +17,9 @@
 #ifdef HAVE_REPLICATION
 #include "slave.h"
 
+extern Table_filter *binlog_filter;
+extern Table_filter *rpl_filter;
+
 typedef struct st_slave_info
 {
   uint32 server_id;
Thread
bk commit into 5.1 tree (lars:1.1775)Lars Thalmann10 Mar