diff options
author | unknown <mats@romeo.(none)> | 2006-11-03 21:11:58 +0100 |
---|---|---|
committer | unknown <mats@romeo.(none)> | 2006-11-03 21:11:58 +0100 |
commit | 42904cdfdc7726eef06a318f0ffa61f2f381fd63 (patch) | |
tree | 273796578254761e2f534a633a27dea796a31531 /sql | |
parent | ae00d51b7909987148e0268b45a2f9c59a8ac35a (diff) | |
parent | 66a04036020501db8109e99fc057c0bade009f98 (diff) | |
download | mariadb-git-42904cdfdc7726eef06a318f0ffa61f2f381fd63.tar.gz |
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into romeo.(none):/home/bk/b18581-mysql-5.1-new-rpl
sql/log_event.cc:
Auto merged
sql/rpl_rli.h:
Auto merged
sql/sql_class.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.cc | 35 | ||||
-rw-r--r-- | sql/log_event.cc | 1 | ||||
-rw-r--r-- | sql/rpl_rli.h | 16 | ||||
-rw-r--r-- | sql/sql_class.cc | 12 |
4 files changed, 12 insertions, 52 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index ccf1a1ef8d9..fc8bc939961 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -3456,38 +3456,15 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat) declared static, but it works by putting it into an anonymous namespace. */ namespace { - struct st_table_data { - char const *db; - char const *name; - }; - - static int table_name_compare(void const *a, void const *b) - { - st_table_data const *x = (st_table_data const*) a; - st_table_data const *y = (st_table_data const*) b; - - /* Doing lexical compare in order (db,name) */ - int const res= strcmp(x->db, y->db); - return res != 0 ? res : strcmp(x->name, y->name); - } - bool check_table_binlog_row_based(THD *thd, TABLE *table) { - static st_table_data const ignore[] = { - { "mysql", "event" }, - { "mysql", "general_log" }, - { "mysql", "slow_log" } - }; - - my_size_t const ignore_size = sizeof(ignore)/sizeof(*ignore); - st_table_data const item = { table->s->db.str, table->s->table_name.str }; - if (table->s->cached_row_logging_check == -1) - table->s->cached_row_logging_check= - (table->s->tmp_table == NO_TMP_TABLE) && - binlog_filter->db_ok(table->s->db.str) && - bsearch(&item, ignore, ignore_size, - sizeof(st_table_data), table_name_compare) == NULL; + { + int const check(table->s->tmp_table == NO_TMP_TABLE && + binlog_filter->db_ok(table->s->db.str) && + strcmp("mysql", table->s->db.str) != 0); + table->s->cached_row_logging_check= check; + } DBUG_ASSERT(table->s->cached_row_logging_check == 0 || table->s->cached_row_logging_check == 1); diff --git a/sql/log_event.cc b/sql/log_event.cc index d48662f13bf..5e363d1923f 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -5694,7 +5694,6 @@ int Rows_log_event::exec_event(st_relay_log_info *rli) for (ptr= rli->tables_to_lock ; ptr ; ptr= ptr->next_global) { rli->m_table_map.set_table(ptr->table_id, ptr->table); - rli->touching_table(ptr->db, ptr->table_name, ptr->table_id); } #ifdef HAVE_QUERY_CACHE query_cache.invalidate_locked_for_write(rli->tables_to_lock); diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index b8b6f5ebc99..d737055baf2 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -293,22 +293,6 @@ typedef struct st_relay_log_info void cached_charset_invalidate(); bool cached_charset_compare(char *charset); - /* - To reload special tables when they are changes, we introduce a set - of functions that will mark whenever special functions need to be - called after modifying tables. Right now, the tables are either - ACL tables or grants tables. - */ - enum enum_reload_flag - { - RELOAD_NONE_F = 0UL, - RELOAD_GRANT_F = (1UL << 0), - RELOAD_ACCESS_F = (1UL << 1) - }; - - ulong m_reload_flags; - - void touching_table(char const* db, char const* table, ulong table_id); void transaction_end(THD*); void cleanup_context(THD *, bool); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index cf2e462cb68..e96c96cd869 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -2778,6 +2778,12 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, #endif /*HAVE_ROW_BASED_REPLICATION*/ switch (qtype) { + case THD::ROW_QUERY_TYPE: +#ifdef HAVE_ROW_BASED_REPLICATION + if (current_stmt_binlog_row_based) + DBUG_RETURN(0); +#endif + /* Otherwise, we fall through */ case THD::MYSQL_QUERY_TYPE: /* Using this query type is a conveniece hack, since we have been @@ -2787,12 +2793,6 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, Make sure to change in check_table_binlog_row_based() according to how you treat this. */ - case THD::ROW_QUERY_TYPE: -#ifdef HAVE_ROW_BASED_REPLICATION - if (current_stmt_binlog_row_based) - DBUG_RETURN(0); -#endif - /* Otherwise, we fall through */ case THD::STMT_QUERY_TYPE: /* The MYSQL_LOG::write() function will set the STMT_END_F flag and |