~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/rpl_tblmap.cc

Removed dead variable, sorted authors file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
 
#include <drizzled/server_includes.h>
 
16
#include "mysql_priv.h"
 
17
 
 
18
#ifdef HAVE_REPLICATION
17
19
 
18
20
#include "rpl_tblmap.h"
19
21
 
44
46
  free_root(&m_mem_root, MYF(0));
45
47
}
46
48
 
47
 
Table* table_mapping::get_table(ulong table_id)
 
49
st_table* table_mapping::get_table(ulong table_id)
48
50
{
49
51
  entry *e= find_entry(table_id);
50
52
  if (e) 
81
83
  return 0;
82
84
}
83
85
 
84
 
int table_mapping::set_table(ulong table_id, Table* table)
 
86
int table_mapping::set_table(ulong table_id, TABLE* table)
85
87
{
86
88
  entry *e= find_entry(table_id);
87
89
  if (e == 0)
92
94
    m_free= m_free->next;
93
95
  }
94
96
  else
95
 
    hash_delete(&m_table_ids,(unsigned char *)e);
 
97
    hash_delete(&m_table_ids,(uchar *)e);
96
98
 
97
99
  e->table_id= table_id;
98
100
  e->table= table;
99
 
  my_hash_insert(&m_table_ids,(unsigned char *)e);
 
101
  my_hash_insert(&m_table_ids,(uchar *)e);
100
102
 
101
103
  return(0);            // All OK
102
104
}
106
108
  entry *e= find_entry(table_id);
107
109
  if (e)
108
110
  {
109
 
    hash_delete(&m_table_ids,(unsigned char *)e);
 
111
    hash_delete(&m_table_ids,(uchar *)e);
110
112
    /* we add this entry to the chain of free (free for use) entries */
111
113
    e->next= m_free;
112
114
    m_free= e;
121
123
*/
122
124
void table_mapping::clear_tables()
123
125
{
124
 
  for (uint32_t i= 0; i < m_table_ids.records; i++)
 
126
  for (uint i= 0; i < m_table_ids.records; i++)
125
127
  {
126
128
    entry *e= (entry *)hash_element(&m_table_ids, i);
127
129
    e->next= m_free;
130
132
  my_hash_reset(&m_table_ids);
131
133
  return;
132
134
}
 
135
 
 
136
#endif