~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log_event.cc

  • Committer: Brian Aker
  • Date: 2008-08-19 15:11:04 UTC
  • mfrom: (327.2.6 drizzle-good)
  • Revision ID: brian@gir.tangent.org-20080819151104-uxk5lgoaj0fwgx9z
Merge of Brian's tree to main tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3571
3571
    */
3572
3572
    drizzle_reset_errors(thd, 0);
3573
3573
 
3574
 
    TABLE_LIST tables;
 
3574
    TableList tables;
3575
3575
    memset(&tables, 0, sizeof(tables));
3576
3576
    tables.db= thd->strmake(thd->db, thd->db_length);
3577
3577
    tables.alias = tables.table_name = (char*) table_name;
6224
6224
        need to add code to assert that is the case.
6225
6225
       */
6226
6226
      thd->binlog_flush_pending_rows_event(false);
6227
 
      TABLE_LIST *tables= rli->tables_to_lock;
 
6227
      TableList *tables= rli->tables_to_lock;
6228
6228
      close_tables_for_reopen(thd, &tables);
6229
6229
 
6230
6230
      uint tables_count= rli->tables_to_lock_count;
6253
6253
      ensure that they still have the correct type.
6254
6254
 
6255
6255
      We can use a down cast here since we know that every table added
6256
 
      to the tables_to_lock is a RPL_TABLE_LIST.
 
6256
      to the tables_to_lock is a RPL_TableList.
6257
6257
    */
6258
6258
 
6259
6259
    {
6260
 
      RPL_TABLE_LIST *ptr= rli->tables_to_lock;
6261
 
      for ( ; ptr ; ptr= static_cast<RPL_TABLE_LIST*>(ptr->next_global))
 
6260
      RPL_TableList *ptr= rli->tables_to_lock;
 
6261
      for ( ; ptr ; ptr= static_cast<RPL_TableList*>(ptr->next_global))
6262
6262
      {
6263
6263
        if (ptr->m_tabledef.compatible_with(rli, ptr->table))
6264
6264
        {
6285
6285
      Rows_log_event, we can invalidate the query cache for the
6286
6286
      associated table.
6287
6287
     */
6288
 
    for (TABLE_LIST *ptr= rli->tables_to_lock ; ptr ; ptr= ptr->next_global)
 
6288
    for (TableList *ptr= rli->tables_to_lock ; ptr ; ptr= ptr->next_global)
6289
6289
    {
6290
6290
      const_cast<Relay_log_info*>(rli)->m_table_map.set_table(ptr->table_id, ptr->table);
6291
6291
    }
6959
6959
#if !defined(DRIZZLE_CLIENT) && defined(HAVE_REPLICATION)
6960
6960
int Table_map_log_event::do_apply_event(Relay_log_info const *rli)
6961
6961
{
6962
 
  RPL_TABLE_LIST *table_list;
 
6962
  RPL_TableList *table_list;
6963
6963
  char *db_mem, *tname_mem;
6964
6964
  size_t dummy_len;
6965
6965
  void *memory;
6971
6971
  pthread_mutex_unlock(&LOCK_thread_count);
6972
6972
 
6973
6973
  if (!(memory= my_multi_malloc(MYF(MY_WME),
6974
 
                                &table_list, (uint) sizeof(RPL_TABLE_LIST),
 
6974
                                &table_list, (uint) sizeof(RPL_TableList),
6975
6975
                                &db_mem, (uint) NAME_LEN + 1,
6976
6976
                                &tname_mem, (uint) NAME_LEN + 1,
6977
6977
                                NullS)))
7019
7019
      table map.  Note that for any table that should not be
7020
7020
      replicated, a filter is needed.
7021
7021
 
7022
 
      The creation of a new TABLE_LIST is used to up-cast the
7023
 
      table_list consisting of RPL_TABLE_LIST items. This will work
 
7022
      The creation of a new TableList is used to up-cast the
 
7023
      table_list consisting of RPL_TableList items. This will work
7024
7024
      since the only case where the argument to open_tables() is
7025
7025
      changed, is when thd->lex->query_tables == table_list, i.e.,
7026
7026
      when the statement requires prelocking. Since this is not
7034
7034
    */
7035
7035
    uint count;
7036
7036
    assert(thd->lex->query_tables != table_list);
7037
 
    TABLE_LIST *tmp_table_list= table_list;
 
7037
    TableList *tmp_table_list= table_list;
7038
7038
    if ((error= open_tables(thd, &tmp_table_list, &count, 0)))
7039
7039
    {
7040
7040
      if (thd->is_slave_error || thd->is_fatal_error)