diff options
author | Joerg Bruehe <joerg.bruehe@oracle.com> | 2012-05-07 22:20:42 +0200 |
---|---|---|
committer | Joerg Bruehe <joerg.bruehe@oracle.com> | 2012-05-07 22:20:42 +0200 |
commit | 5be07ceaddcae282a1c41b62fb3222715c773577 (patch) | |
tree | fd4bc4e87a0385cd676cd34fe9ba93dd57358f2e /sql/log_event_old.cc | |
parent | 1d47bbe3bf80f5fbd2770d56c97f788f8401ffa0 (diff) | |
parent | 83d455be90a06e8fc1293a611061bd9529ed8536 (diff) | |
download | mariadb-git-5be07ceaddcae282a1c41b62fb3222715c773577.tar.gz |
Merge 5.5.24 back into main 5.5.
This is a weave merge, but without any conflicts.
In 14 source files, the copyright year needed to be updated to 2012.
Diffstat (limited to 'sql/log_event_old.cc')
-rw-r--r-- | sql/log_event_old.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 4aa8c0959b1..d68c474d00a 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -126,8 +126,10 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, const Relay_log_info { RPL_TABLE_LIST *ptr= rli->tables_to_lock; - for ( ; ptr ; ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global)) + for (uint i= 0 ; ptr&& (i< rli->tables_to_lock_count); + ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global), i++) { + DBUG_ASSERT(ptr->m_tabledef_valid); TABLE *conv_table; if (!ptr->m_tabledef.compatible_with(thd, const_cast<Relay_log_info*>(rli), ptr->table, &conv_table)) @@ -158,10 +160,9 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, const Relay_log_info Old_rows_log_event, we can invalidate the query cache for the associated table. */ - for (TABLE_LIST *ptr= rli->tables_to_lock ; ptr ; ptr= ptr->next_global) - { + TABLE_LIST *ptr= rli->tables_to_lock; + for (uint i=0; ptr && (i < rli->tables_to_lock_count); ptr= ptr->next_global, i++) const_cast<Relay_log_info*>(rli)->m_table_map.set_table(ptr->table_id, ptr->table); - } #ifdef HAVE_QUERY_CACHE query_cache.invalidate_locked_for_write(rli->tables_to_lock); #endif @@ -1539,7 +1540,8 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) { RPL_TABLE_LIST *ptr= rli->tables_to_lock; - for ( ; ptr ; ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global)) + for (uint i= 0 ; ptr&& (i< rli->tables_to_lock_count); + ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global), i++) { TABLE *conv_table; if (ptr->m_tabledef.compatible_with(thd, const_cast<Relay_log_info*>(rli), |