summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2000-11-13 23:43:02 -0700
committerunknown <sasha@mysql.sashanet.com>2000-11-13 23:43:02 -0700
commit3c82b81154da0bb35b004a44689ce03b83046d8d (patch)
tree401cbc03a4aff0a1d3a85fa57dc15bdb822d0e8e /sql/sql_parse.cc
parentdba4c4a8fcdd953d07e9693e67ceca5eb1874131 (diff)
downloadmariadb-git-3c82b81154da0bb35b004a44689ce03b83046d8d.tar.gz
repl-tests/test-repl-ts/repl-timestamp.master.reject
this file needs to be deleted sql/log_event.cc fixed warnings sql/log_event.h fixed () #define bug sql/mysqlbinlog.cc fixed length argument - was supposed to be one less sql/mysqld.cc replicate-do/ignore-table now works, wild does not yet sql/mysql_priv.h updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/slave.cc changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h changes for replicate-do/ignore-table sql/sql_class.cc slave_thread variable to THD sql/sql_class.h added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc updating argument to add_tables_to_list() sql/sql_table.cc fixed bug in mysql_rm_table() sql/sql_yacc.yy fixed up add_table_to_list() calls to accept updating argument sql/table.h added updating to TABLE_LIST repl-tests/test-repl-ts/repl-timestamp.master.reject: this file needs to be deleted sql/log_event.cc: fixed warnings sql/log_event.h: fixed () #define bug sql/mysql_priv.h: updating argument to add_table_to_list() -- needed for replicate-do/ignore table sql/mysqlbinlog.cc: fixed length argument - was supposed to be one less sql/mysqld.cc: replicate-do/ignore-table now works, wild does not yet sql/slave.cc: changes fore replicate-do/ignore-table close the socket before going to sleep sleeping after error bad event was being freed too early sql/slave.h: changes for replicate-do/ignore-table sql/sql_class.cc: slave_thread variable to THD sql/sql_class.h: added slave_thread to THD, fixed bug in end_time() sql/sql_parse.cc: updating argument to add_tables_to_list() sql/sql_table.cc: fixed bug in mysql_rm_table() sql/sql_yacc.yy: fixed up add_table_to_list() calls to accept updating argument sql/table.h: added updating to TABLE_LIST
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 066885ef30a..acf055b5c74 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -843,6 +843,11 @@ mysql_execute_command(void)
TABLE_LIST *tables=(TABLE_LIST*) lex->table_list.first;
DBUG_ENTER("mysql_execute_command");
+ if(thd->slave_thread && table_rules_on && tables && !tables_ok(thd,tables))
+ DBUG_VOID_RETURN; // skip if we are in the slave thread, some table
+ // rules have been given and the table list says the query should not be
+ // replicated
+
switch (lex->sql_command) {
case SQLCOM_SELECT:
{
@@ -2344,9 +2349,11 @@ bool add_to_list(SQL_LIST &list,Item *item,bool asc)
TABLE_LIST *add_table_to_list(Table_ident *table, LEX_STRING *alias,
+ bool updating,
thr_lock_type flags,
List<String> *use_index,
- List<String> *ignore_index)
+ List<String> *ignore_index
+ )
{
register TABLE_LIST *ptr;
THD *thd=current_thd;
@@ -2378,6 +2385,7 @@ TABLE_LIST *add_table_to_list(Table_ident *table, LEX_STRING *alias,
ptr->real_name=table->table.str;
ptr->name=alias_str;
ptr->lock_type=flags;
+ ptr->updating=updating;
if (use_index)
ptr->use_index=(List<String> *) thd->memdup((gptr) use_index,
sizeof(*use_index));