Commit c8648fa3 authored by unknown's avatar unknown

Post-merge fixes, and disable buggy test case on embedded


mysql-test/t/query_cache.test:
  Disable query_cache test on embedded, due to bug 30710.
sql/log_event_old.cc:
  Post-merge fix, change RELAY_LOG_INFO to Relay_log_info.
parent 48193af4
-- source include/have_query_cache.inc -- source include/have_query_cache.inc
# Disabled on embedded due to bug #30710, "query_cache.test fails on
# embedded w/ per-column privs test". Please re-enable when that bug
# is resolved.
-- source include/not_embedded.inc
# #
# Tests with query cache # Tests with query cache
# #
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// Old implementation of do_apply_event() // Old implementation of do_apply_event()
int int
Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli) Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli)
{ {
DBUG_ENTER("Rows_log_event::do_apply_event(st_relay_log_info*)"); DBUG_ENTER("Rows_log_event::do_apply_event(st_relay_log_info*)");
int error= 0; int error= 0;
...@@ -32,7 +32,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -32,7 +32,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
*/ */
DBUG_ASSERT(ev->get_flags(Rows_log_event::STMT_END_F)); DBUG_ASSERT(ev->get_flags(Rows_log_event::STMT_END_F));
const_cast<RELAY_LOG_INFO*>(rli)->clear_tables_to_lock(); const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
close_thread_tables(thd); close_thread_tables(thd);
thd->clear_error(); thd->clear_error();
DBUG_RETURN(0); DBUG_RETURN(0);
...@@ -88,7 +88,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -88,7 +88,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
"Error in %s event: when locking tables", "Error in %s event: when locking tables",
ev->get_type_str()); ev->get_type_str());
} }
const_cast<RELAY_LOG_INFO*>(rli)->clear_tables_to_lock(); const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
DBUG_RETURN(error); DBUG_RETURN(error);
} }
...@@ -125,7 +125,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -125,7 +125,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
"unexpected success or fatal error")); "unexpected success or fatal error"));
thd->query_error= 1; thd->query_error= 1;
} }
const_cast<RELAY_LOG_INFO*>(rli)->clear_tables_to_lock(); const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
DBUG_RETURN(error); DBUG_RETURN(error);
} }
} }
...@@ -147,7 +147,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -147,7 +147,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
mysql_unlock_tables(thd, thd->lock); mysql_unlock_tables(thd, thd->lock);
thd->lock= 0; thd->lock= 0;
thd->query_error= 1; thd->query_error= 1;
const_cast<RELAY_LOG_INFO*>(rli)->clear_tables_to_lock(); const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
DBUG_RETURN(Rows_log_event::ERR_BAD_TABLE_DEF); DBUG_RETURN(Rows_log_event::ERR_BAD_TABLE_DEF);
} }
} }
...@@ -169,14 +169,14 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -169,14 +169,14 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
*/ */
for (TABLE_LIST *ptr= rli->tables_to_lock ; ptr ; ptr= ptr->next_global) for (TABLE_LIST *ptr= rli->tables_to_lock ; ptr ; ptr= ptr->next_global)
{ {
const_cast<RELAY_LOG_INFO*>(rli)->m_table_map.set_table(ptr->table_id, ptr->table); const_cast<Relay_log_info*>(rli)->m_table_map.set_table(ptr->table_id, ptr->table);
} }
#ifdef HAVE_QUERY_CACHE #ifdef HAVE_QUERY_CACHE
query_cache.invalidate_locked_for_write(rli->tables_to_lock); query_cache.invalidate_locked_for_write(rli->tables_to_lock);
#endif #endif
} }
TABLE* table= const_cast<RELAY_LOG_INFO*>(rli)->m_table_map.get_table(ev->m_table_id); TABLE* table= const_cast<Relay_log_info*>(rli)->m_table_map.get_table(ev->m_table_id);
if (table) if (table)
{ {
...@@ -221,7 +221,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -221,7 +221,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
inside a statement and halting abruptly might cause problems inside a statement and halting abruptly might cause problems
when restarting. when restarting.
*/ */
const_cast<RELAY_LOG_INFO*>(rli)->set_flag(RELAY_LOG_INFO::IN_STMT); const_cast<Relay_log_info*>(rli)->set_flag(Relay_log_info::IN_STMT);
error= do_before_row_operations(table); error= do_before_row_operations(table);
while (error == 0 && row_start < ev->m_rows_end) while (error == 0 && row_start < ev->m_rows_end)
...@@ -262,7 +262,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -262,7 +262,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
row_start= row_end; row_start= row_end;
} }
DBUG_EXECUTE_IF("STOP_SLAVE_after_first_Rows_event", DBUG_EXECUTE_IF("STOP_SLAVE_after_first_Rows_event",
const_cast<RELAY_LOG_INFO*>(rli)->abort_slave= 1;); const_cast<Relay_log_info*>(rli)->abort_slave= 1;);
error= do_after_row_operations(table, error); error= do_after_row_operations(table, error);
if (!ev->cache_stmt) if (!ev->cache_stmt)
{ {
...@@ -276,7 +276,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -276,7 +276,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
The table def is needed in unpack_row(). The table def is needed in unpack_row().
*/ */
if (rli->tables_to_lock && ev->get_flags(Rows_log_event::STMT_END_F)) if (rli->tables_to_lock && ev->get_flags(Rows_log_event::STMT_END_F))
const_cast<RELAY_LOG_INFO*>(rli)->clear_tables_to_lock(); const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
if (error) if (error)
{ /* error has occured during the transaction */ { /* error has occured during the transaction */
...@@ -299,7 +299,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -299,7 +299,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
rollback at the caller along with sbr. rollback at the caller along with sbr.
*/ */
thd->reset_current_stmt_binlog_row_based(); thd->reset_current_stmt_binlog_row_based();
const_cast<RELAY_LOG_INFO*>(rli)->cleanup_context(thd, error); const_cast<Relay_log_info*>(rli)->cleanup_context(thd, error);
thd->query_error= 1; thd->query_error= 1;
DBUG_RETURN(error); DBUG_RETURN(error);
} }
...@@ -329,7 +329,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli ...@@ -329,7 +329,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const RELAY_LOG_INFO *rli
problem. When WL#2975 is implemented, just remove the member problem. When WL#2975 is implemented, just remove the member
st_relay_log_info::last_event_start_time and all its occurences. st_relay_log_info::last_event_start_time and all its occurences.
*/ */
const_cast<RELAY_LOG_INFO*>(rli)->last_event_start_time= my_time(0); const_cast<Relay_log_info*>(rli)->last_event_start_time= my_time(0);
} }
DBUG_RETURN(0); DBUG_RETURN(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment