~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/rpl_tblmap.h

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2005 MySQL AB
2
 
 
3
 
   This program is free software; you can redistribute it and/or modify
4
 
   it under the terms of the GNU General Public License as published by
5
 
   the Free Software Foundation; version 2 of the License.
6
 
 
7
 
   This program is distributed in the hope that it will be useful,
8
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 
   GNU General Public License for more details.
11
 
 
12
 
   You should have received a copy of the GNU General Public License
13
 
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
 
 
16
 
#ifndef TABLE_MAPPING_H
17
 
#define TABLE_MAPPING_H
 
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2008 Sun Microsystems
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; version 2 of the License.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 */
 
19
 
 
20
#ifndef DRIZZLED_RPL_TBLMAP_H
 
21
#define DRIZZLED_RPL_TBLMAP_H
18
22
 
19
23
/* Forward declarations */
20
24
class Table;
38
42
 
39
43
  Note that inheriting from Sql_alloc had no effect: it has effects only when
40
44
  "ptr= new table_mapping" is called, and this is never called. And it would
41
 
  then allocate from thd->mem_root which is a highly volatile object (reset
 
45
  then allocate from session->mem_root which is a highly volatile object (reset
42
46
  from example after executing each query, see dispatch_command(), it has a
43
47
  free_root() at end); as the table_mapping object is supposed to live longer
44
48
  than a query, it was dangerous.
84
88
  entry *find_entry(ulong table_id)
85
89
  {
86
90
    return (entry *)hash_search(&m_table_ids,
87
 
                                (uchar*)&table_id,
 
91
                                (unsigned char*)&table_id,
88
92
                                sizeof(table_id));
89
93
  }
90
94
  int expand();
100
104
  HASH m_table_ids;
101
105
};
102
106
 
103
 
#endif
 
107
#endif /* DRIZZLED_RPL_TBLMAP_H */