~james-page/ubuntu/precise/mysql-5.5/misc-fixes

« back to all changes in this revision

Viewing changes to sql/log_event_old.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-06-11 07:34:33 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120611073433-l9za2ni4ipp848y3
Tags: 5.5.24-0ubuntu0.12.04.1
* SECURITY UPDATE: Update to 5.5.24 to fix security issues (LP: #1011371)
  - http://dev.mysql.com/doc/refman/5.5/en/news-5-5-24.html

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
 
127
127
    {
128
128
      RPL_TABLE_LIST *ptr= rli->tables_to_lock;
129
 
      for ( ; ptr ; ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global))
 
129
      for (uint i= 0 ; ptr&& (i< rli->tables_to_lock_count); 
 
130
           ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global), i++)
130
131
      {
 
132
        DBUG_ASSERT(ptr->m_tabledef_valid);
131
133
        TABLE *conv_table;
132
134
        if (!ptr->m_tabledef.compatible_with(thd, const_cast<Relay_log_info*>(rli),
133
135
                                             ptr->table, &conv_table))
158
160
      Old_rows_log_event, we can invalidate the query cache for the
159
161
      associated table.
160
162
     */
161
 
    for (TABLE_LIST *ptr= rli->tables_to_lock ; ptr ; ptr= ptr->next_global)
162
 
    {
 
163
    TABLE_LIST *ptr= rli->tables_to_lock;
 
164
    for (uint i=0; ptr && (i < rli->tables_to_lock_count); ptr= ptr->next_global, i++)
163
165
      const_cast<Relay_log_info*>(rli)->m_table_map.set_table(ptr->table_id, ptr->table);
164
 
    }
165
166
#ifdef HAVE_QUERY_CACHE
166
167
    query_cache.invalidate_locked_for_write(rli->tables_to_lock);
167
168
#endif
1539
1540
 
1540
1541
    {
1541
1542
      RPL_TABLE_LIST *ptr= rli->tables_to_lock;
1542
 
      for ( ; ptr ; ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global))
 
1543
      for (uint i= 0 ; ptr&& (i< rli->tables_to_lock_count);
 
1544
           ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global), i++)
1543
1545
      {
1544
1546
        TABLE *conv_table;
1545
1547
        if (ptr->m_tabledef.compatible_with(thd, const_cast<Relay_log_info*>(rli),