summaryrefslogtreecommitdiff
path: root/sql/rpl_filter.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-11-25 18:17:28 +0100
committerSergei Golubchik <sergii@pisem.net>2010-11-25 18:17:28 +0100
commit65ca700def99289cc31a7040537f5aa6e12bf485 (patch)
tree97b3a07299b626c519da0e80c122b5b79b933914 /sql/rpl_filter.cc
parent2ab57de38d13d927ddff2d51aed4af34e13998f5 (diff)
parent6e5bcca7935d3c62f84bb640e5357664a210ee12 (diff)
downloadmariadb-git-65ca700def99289cc31a7040537f5aa6e12bf485.tar.gz
merge.
checkpoint. does not compile.
Diffstat (limited to 'sql/rpl_filter.cc')
-rw-r--r--sql/rpl_filter.cc21
1 files changed, 18 insertions, 3 deletions
diff --git a/sql/rpl_filter.cc b/sql/rpl_filter.cc
index 42a9a034efd..6dfaa1bf253 100644
--- a/sql/rpl_filter.cc
+++ b/sql/rpl_filter.cc
@@ -48,6 +48,7 @@ Rpl_filter::~Rpl_filter()
}
+#ifndef MYSQL_CLIENT
/*
Returns true if table should be logged/replicated
@@ -94,7 +95,7 @@ Rpl_filter::tables_ok(const char* db, TABLE_LIST* tables)
for (; tables; tables= tables->next_global)
{
- char hash_key[2*NAME_LEN+2];
+ char hash_key[SAFE_NAME_LEN*2+2];
char *end;
uint len;
@@ -132,6 +133,7 @@ Rpl_filter::tables_ok(const char* db, TABLE_LIST* tables)
!do_table_inited && !wild_do_table_inited);
}
+#endif
/*
Checks whether a db matches some do_db and ignore_db rules
@@ -158,8 +160,10 @@ Rpl_filter::db_ok(const char* db)
and db was not selected, do not replicate.
*/
if (!db)
+ {
+ DBUG_PRINT("exit", ("Don't replicate"));
DBUG_RETURN(0);
-
+ }
if (!do_db.is_empty()) // if the do's are not empty
{
I_List_iterator<i_string> it(do_db);
@@ -170,6 +174,7 @@ Rpl_filter::db_ok(const char* db)
if (!strcmp(tmp->ptr, db))
DBUG_RETURN(1); // match
}
+ DBUG_PRINT("exit", ("Don't replicate"));
DBUG_RETURN(0);
}
else // there are some elements in the don't, otherwise we cannot get here
@@ -180,7 +185,10 @@ Rpl_filter::db_ok(const char* db)
while ((tmp=it++))
{
if (!strcmp(tmp->ptr, db))
+ {
+ DBUG_PRINT("exit", ("Don't replicate"));
DBUG_RETURN(0); // match
+ }
}
DBUG_RETURN(1);
}
@@ -222,7 +230,7 @@ Rpl_filter::db_ok_with_wild_table(const char *db)
{
DBUG_ENTER("Rpl_filter::db_ok_with_wild_table");
- char hash_key[NAME_LEN+2];
+ char hash_key[SAFE_NAME_LEN+2];
char *end;
int len;
end= strmov(hash_key, db);
@@ -517,6 +525,13 @@ Rpl_filter::get_wild_ignore_table(String* str)
}
+bool
+Rpl_filter::rewrite_db_is_empty()
+{
+ return rewrite_db.is_empty();
+}
+
+
const char*
Rpl_filter::get_rewrite_db(const char* db, size_t *new_len)
{