~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/instance/base.h

  • Committer: Jim Winstead
  • Date: 2008-07-19 02:56:45 UTC
  • mto: (202.1.8 codestyle)
  • mto: This revision was merged to the branch mainline in revision 207.
  • Revision ID: jimw@mysql.com-20080719025645-w2pwytebgzusjzjb
Various fixes to enable compilation on Mac OS X, and remove the glib dependency.
Temporarily disables tab-completion in the drizzle client until an appropriate
autoconf check can be added/enabled.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
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; either version 2 of the License, or
9
 
 *  (at your option) any later version.
10
 
 *
11
 
 *  This program is distributed in the hope that it will be useful,
12
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 *  GNU General Public License for more details.
15
 
 *
16
 
 *  You should have received a copy of the GNU General Public License
17
 
 *  along with this program; if not, write to the Free Software
18
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 */
20
 
 
21
 
/*
22
 
  This class is shared between different table objects. There is one
23
 
  instance of table share per one table in the database.
24
 
*/
25
 
 
26
 
#ifndef DRIZZLED_TABLE_INSTANCE_BASE_H
27
 
#define DRIZZLED_TABLE_INSTANCE_BASE_H
28
 
 
29
 
#include <string>
30
 
 
31
 
#include <boost/unordered_map.hpp>
32
 
#include <boost/thread/condition_variable.hpp>
33
 
#include <boost/dynamic_bitset.hpp>
34
 
#include <boost/shared_ptr.hpp>
35
 
#include <boost/scoped_ptr.hpp>
36
 
 
37
 
#include <drizzled/memory/root.h>
38
 
#include <drizzled/message.h>
39
 
#include <drizzled/util/string.h>
40
 
 
41
 
#include <drizzled/lex_string.h>
42
 
#include <drizzled/key_map.h>
43
 
 
44
 
#include <drizzled/table/cache.h>
45
 
 
46
 
#include <drizzled/field.h>
47
 
 
48
 
 
49
 
namespace drizzled
50
 
{
51
 
 
52
 
const static std::string NO_PROTOBUFFER_AVAILABLE("NO PROTOBUFFER AVAILABLE");
53
 
 
54
 
namespace plugin
55
 
{
56
 
class EventObserverList;
57
 
class StorageEngine;
58
 
}
59
 
 
60
 
namespace table {
61
 
class Singular;
62
 
}
63
 
 
64
 
class Field_blob;
65
 
 
66
 
class TableShare
67
 
{
68
 
  typedef std::vector<std::string> StringVector;
69
 
 
70
 
public:
71
 
  typedef boost::shared_ptr<TableShare> shared_ptr;
72
 
  typedef std::vector <shared_ptr> vector;
73
 
 
74
 
  TableShare(const identifier::Table::Type type_arg);
75
 
 
76
 
  TableShare(const identifier::Table &identifier, const identifier::Table::Key &key); // Used by placeholder
77
 
 
78
 
  TableShare(const identifier::Table &identifier); // Just used during createTable()
79
 
 
80
 
  TableShare(const identifier::Table::Type type_arg,
81
 
             const identifier::Table &identifier,
82
 
             char *path_arg= NULL, uint32_t path_length_arg= 0); // Shares for cache
83
 
 
84
 
  virtual ~TableShare();
85
 
 
86
 
private:
87
 
  /** Category of this table. */
88
 
  enum_table_category table_category;
89
 
 
90
 
public:
91
 
  bool isTemporaryCategory() const
92
 
  {
93
 
    return (table_category == TABLE_CATEGORY_TEMPORARY);
94
 
  }
95
 
 
96
 
  void setTableCategory(enum_table_category arg)
97
 
  {
98
 
    table_category= arg;
99
 
  }
100
 
 
101
 
  /* The following is copied to each Table on OPEN */
102
 
  typedef std::vector<Field *> Fields;
103
 
 
104
 
private:
105
 
  Fields _fields;
106
 
 
107
 
public:
108
 
  const Fields getFields() const
109
 
  {
110
 
    return _fields;
111
 
  }
112
 
 
113
 
  Fields getFields()
114
 
  {
115
 
    return _fields;
116
 
  }
117
 
 
118
 
  Field ** getFields(bool)
119
 
  {
120
 
    return &_fields[0];
121
 
  }
122
 
 
123
 
  void setFields(uint32_t arg)
124
 
  {
125
 
    _fields.resize(arg);
126
 
  }
127
 
 
128
 
  uint32_t positionFields(Field **arg) const
129
 
  {
130
 
    return (arg - (Field **)&_fields[0]);
131
 
  }
132
 
 
133
 
  void pushField(Field *arg)
134
 
  {
135
 
    _field_size++;
136
 
    _fields.push_back(arg);
137
 
  }
138
 
 
139
 
  Field **found_next_number_field;
140
 
 
141
 
private:
142
 
  Field *timestamp_field;               /* Used only during open */
143
 
 
144
 
public:
145
 
 
146
 
  Field *getTimestampField() const               /* Used only during open */
147
 
  {
148
 
    return timestamp_field;
149
 
  }
150
 
 
151
 
  void setTimestampField(Field *arg) /* Used only during open */
152
 
  {
153
 
    timestamp_field= arg;
154
 
  }
155
 
 
156
 
 
157
 
private:
158
 
  KeyInfo  *key_info;                   /* data of keys in database */
159
 
 
160
 
public:
161
 
  KeyInfo &getKeyInfo(uint32_t arg) const
162
 
  {
163
 
    return key_info[arg];
164
 
  }
165
 
  std::vector<uint>     blob_field;                     /* Index to blobs in Field arrray*/
166
 
 
167
 
private:
168
 
  /* hash of field names (contains pointers to elements of field array) */
169
 
  typedef boost::unordered_map < std::string, Field **, util::insensitive_hash, util::insensitive_equal_to> FieldMap;
170
 
  typedef std::pair< std::string, Field ** > FieldMapPair;
171
 
  FieldMap name_hash; /* hash of field names */
172
 
 
173
 
public:
174
 
  size_t getNamedFieldSize() const
175
 
  {
176
 
    return name_hash.size();
177
 
  }
178
 
 
179
 
  Field **getNamedField(const std::string &arg)
180
 
  {
181
 
    FieldMap::iterator iter= name_hash.find(arg);
182
 
 
183
 
    if (iter == name_hash.end())
184
 
        return 0;
185
 
 
186
 
    return (*iter).second;
187
 
  }
188
 
 
189
 
private:
190
 
  memory::Root mem_root;
191
 
 
192
 
  void *alloc_root(size_t arg)
193
 
  {
194
 
    return mem_root.alloc_root(arg);
195
 
  }
196
 
 
197
 
  char *strmake_root(const char *str_arg, size_t len_arg)
198
 
  {
199
 
    return mem_root.strmake_root(str_arg, len_arg);
200
 
  }
201
 
 
202
 
  memory::Root *getMemRoot()
203
 
  {
204
 
    return &mem_root;
205
 
  }
206
 
 
207
 
  std::vector<std::string> _keynames;
208
 
 
209
 
  void addKeyName(std::string arg)
210
 
  {
211
 
    std::transform(arg.begin(), arg.end(),
212
 
                   arg.begin(), ::toupper);
213
 
    _keynames.push_back(arg);
214
 
  }
215
 
 
216
 
public:
217
 
  bool doesKeyNameExist(const char *name_arg, uint32_t name_length, uint32_t &position) const
218
 
  {
219
 
    return doesKeyNameExist(std::string(name_arg, name_length), position);
220
 
  }
221
 
 
222
 
  bool doesKeyNameExist(std::string arg, uint32_t &position) const
223
 
  {
224
 
    std::transform(arg.begin(), arg.end(),
225
 
                   arg.begin(), ::toupper);
226
 
 
227
 
    std::vector<std::string>::const_iterator iter= std::find(_keynames.begin(), _keynames.end(), arg);
228
 
 
229
 
    if (iter == _keynames.end())
230
 
    {
231
 
      position= UINT32_MAX; //historical, required for finding primary key from unique
232
 
      return false;
233
 
    }
234
 
 
235
 
    position= iter -  _keynames.begin();
236
 
 
237
 
    return true;
238
 
  }
239
 
 
240
 
private:
241
 
  std::vector<TYPELIB> intervals;                       /* pointer to interval info */
242
 
 
243
 
public:
244
 
  virtual void lock()
245
 
  { }
246
 
 
247
 
  virtual void unlock()
248
 
  { }
249
 
 
250
 
private:
251
 
  std::vector<unsigned char> default_values;            /* row with default values */
252
 
 
253
 
public:
254
 
  // @note This needs to be made to be const in the future
255
 
  unsigned char *getDefaultValues()
256
 
  {
257
 
    return &default_values[0];
258
 
  }
259
 
  void resizeDefaultValues(size_t arg)
260
 
  {
261
 
    default_values.resize(arg);
262
 
  }
263
 
 
264
 
  const charset_info_st *table_charset; /* Default charset of string fields */
265
 
 
266
 
  boost::dynamic_bitset<> all_set;
267
 
 
268
 
  /*
269
 
    Key which is used for looking-up table in table cache and in the list
270
 
    of thread's temporary tables. Has the form of:
271
 
    "database_name\0table_name\0" + optional part for temporary tables.
272
 
 
273
 
    Note that all three 'table_cache_key', 'db' and 'table_name' members
274
 
    must be set (and be non-zero) for tables in table cache. They also
275
 
    should correspond to each other.
276
 
    To ensure this one can use set_table_cache() methods.
277
 
  */
278
 
private:
279
 
  identifier::Table::Key private_key_for_cache; // This will not exist in the final design.
280
 
  std::vector<char> private_normalized_path; // This will not exist in the final design.
281
 
  LEX_STRING db;                        /* Pointer to db */
282
 
  LEX_STRING table_name;                /* Table name (for open) */
283
 
  LEX_STRING path;      /* Path to table (from datadir) */
284
 
  LEX_STRING normalized_path;           /* unpack_filename(path) */
285
 
 
286
 
public:
287
 
 
288
 
  const char *getNormalizedPath() const
289
 
  {
290
 
    return normalized_path.str;
291
 
  }
292
 
 
293
 
  const char *getPath() const
294
 
  {
295
 
    return path.str;
296
 
  }
297
 
 
298
 
  const identifier::Table::Key& getCacheKey() const // This should never be called when we aren't looking at a cache.
299
 
  {
300
 
    assert(private_key_for_cache.size());
301
 
    return private_key_for_cache;
302
 
  }
303
 
 
304
 
  size_t getCacheKeySize() const
305
 
  {
306
 
    return private_key_for_cache.size();
307
 
  }
308
 
 
309
 
private:
310
 
  void setPath(char *str_arg, uint32_t size_arg)
311
 
  {
312
 
    path.str= str_arg;
313
 
    path.length= size_arg;
314
 
  }
315
 
 
316
 
  void setNormalizedPath(char *str_arg, uint32_t size_arg)
317
 
  {
318
 
    normalized_path.str= str_arg;
319
 
    normalized_path.length= size_arg;
320
 
  }
321
 
 
322
 
public:
323
 
 
324
 
  const char *getTableName() const
325
 
  {
326
 
    return table_name.str;
327
 
  }
328
 
 
329
 
  uint32_t getTableNameSize() const
330
 
  {
331
 
    return table_name.length;
332
 
  }
333
 
 
334
 
  const std::string &getTableName(std::string &name_arg) const
335
 
  {
336
 
    name_arg.clear();
337
 
    name_arg.append(table_name.str, table_name.length);
338
 
 
339
 
    return name_arg;
340
 
  }
341
 
 
342
 
  const char *getSchemaName() const
343
 
  {
344
 
    return db.str;
345
 
  }
346
 
 
347
 
  const std::string &getSchemaName(std::string &schema_name_arg) const
348
 
  {
349
 
    schema_name_arg.clear();
350
 
    schema_name_arg.append(db.str, db.length);
351
 
 
352
 
    return schema_name_arg;
353
 
  }
354
 
 
355
 
  uint32_t   block_size;                   /* create information */
356
 
 
357
 
private:
358
 
  uint64_t   version;
359
 
 
360
 
public:
361
 
  uint64_t getVersion() const
362
 
  {
363
 
    return version;
364
 
  }
365
 
 
366
 
  void refreshVersion();
367
 
 
368
 
  void resetVersion()
369
 
  {
370
 
    version= 0;
371
 
  }
372
 
 
373
 
private:
374
 
  uint32_t   timestamp_offset;          /* Set to offset+1 of record */
375
 
 
376
 
  uint32_t reclength;                   /* Recordlength */
377
 
  uint32_t stored_rec_length;         /* Stored record length*/
378
 
 
379
 
public:
380
 
  uint32_t sizeStoredRecord() const
381
 
  {
382
 
    return stored_rec_length;
383
 
  }
384
 
 
385
 
  uint32_t getRecordLength() const
386
 
  {
387
 
    return reclength;
388
 
  }
389
 
 
390
 
  void setRecordLength(uint32_t arg)
391
 
  {
392
 
    reclength= arg;
393
 
  }
394
 
 
395
 
  const Field_blob *getBlobFieldAt(uint32_t arg) const
396
 
  {
397
 
    if (arg < blob_fields)
398
 
      return (Field_blob*) _fields[blob_field[arg]];
399
 
 
400
 
    return NULL;
401
 
  }
402
 
 
403
 
private:
404
 
  /* Max rows is a hint to HEAP during a create tmp table */
405
 
  uint64_t max_rows;
406
 
 
407
 
  boost::scoped_ptr<message::Table> _table_message;
408
 
 
409
 
public:
410
 
  /*
411
 
    @note Without a _table_message, we assume we are building a STANDARD table.
412
 
    This will be modified once we use Identifiers in the Share itself.
413
 
  */
414
 
  message::Table::TableType getTableType() const
415
 
  {
416
 
    return getTableMessage() ? getTableMessage()->type() : message::Table::STANDARD;
417
 
  }
418
 
 
419
 
  const std::string &getTableTypeAsString() const
420
 
  {
421
 
    if (getTableMessage())
422
 
      return message::type(getTableMessage()->type());
423
 
 
424
 
    return NO_PROTOBUFFER_AVAILABLE;
425
 
  }
426
 
 
427
 
  /* This is only used in one location currently */
428
 
  inline message::Table *getTableMessage() const
429
 
  {
430
 
    return _table_message.get();
431
 
  }
432
 
 
433
 
  void setTableMessage(const message::Table &arg)
434
 
  {
435
 
    assert(not getTableMessage());
436
 
    _table_message.reset(new(std::nothrow) message::Table(arg));
437
 
  }
438
 
 
439
 
  const message::Table::Field &field(int32_t field_position) const
440
 
  {
441
 
    assert(getTableMessage());
442
 
    return getTableMessage()->field(field_position);
443
 
  }
444
 
 
445
 
  inline bool hasComment() const
446
 
  {
447
 
    return (getTableMessage()) ?  getTableMessage()->options().has_comment() : false; 
448
 
  }
449
 
 
450
 
  inline const char *getComment()
451
 
  {
452
 
    return (getTableMessage() && getTableMessage()->has_options()) ?  getTableMessage()->options().comment().c_str() : NULL; 
453
 
  }
454
 
 
455
 
  inline uint32_t getCommentLength() const
456
 
  {
457
 
    return (getTableMessage()) ? getTableMessage()->options().comment().length() : 0; 
458
 
  }
459
 
 
460
 
  inline uint64_t getMaxRows() const
461
 
  {
462
 
    return max_rows;
463
 
  }
464
 
 
465
 
  inline void setMaxRows(uint64_t arg)
466
 
  {
467
 
    max_rows= arg;
468
 
  }
469
 
 
470
 
  /**
471
 
   * Returns true if the supplied Field object
472
 
   * is part of the table's primary key.
473
 
 */
474
 
  bool fieldInPrimaryKey(Field *field) const;
475
 
 
476
 
  plugin::StorageEngine *storage_engine;                        /* storage engine plugin */
477
 
  inline plugin::StorageEngine *db_type() const /* table_type for handler */
478
 
  {
479
 
    return storage_engine;
480
 
  }
481
 
  inline plugin::StorageEngine *getEngine() const       /* table_type for handler */
482
 
  {
483
 
    return storage_engine;
484
 
  }
485
 
 
486
 
private:
487
 
  identifier::Table::Type tmp_table;
488
 
public:
489
 
 
490
 
  identifier::Table::Type getType() const
491
 
  {
492
 
    return tmp_table;
493
 
  }
494
 
 
495
 
private:
496
 
  uint32_t _ref_count;       /* How many Table objects uses this */
497
 
 
498
 
public:
499
 
  uint32_t getTableCount() const
500
 
  {
501
 
    return _ref_count;
502
 
  }
503
 
 
504
 
  void incrementTableCount()
505
 
  {
506
 
    lock();
507
 
    _ref_count++;
508
 
    unlock();
509
 
  }
510
 
 
511
 
  uint32_t decrementTableCount()
512
 
  {
513
 
    return --_ref_count;
514
 
  }
515
 
 
516
 
  uint32_t null_bytes;
517
 
  uint32_t last_null_bit_pos;
518
 
private:
519
 
  uint32_t _field_size;                         /* Number of fields */
520
 
 
521
 
public:
522
 
  void setFieldSize(uint32_t arg)
523
 
  {
524
 
    _field_size= arg;
525
 
  }
526
 
 
527
 
  uint32_t sizeFields() const
528
 
  {
529
 
    return _field_size;
530
 
  }
531
 
 
532
 
  uint32_t rec_buff_length;                 /* Size of table->record[] buffer */
533
 
  uint32_t keys;
534
 
 
535
 
  uint32_t sizeKeys() const
536
 
  {
537
 
    return keys;
538
 
  }
539
 
  uint32_t key_parts;
540
 
  uint32_t max_key_length, max_unique_length, total_key_length;
541
 
  uint32_t uniques;                         /* Number of UNIQUE index */
542
 
  uint32_t null_fields;                 /* number of null fields */
543
 
  uint32_t blob_fields;                 /* number of blob fields */
544
 
private:
545
 
  bool has_variable_width;                  /* number of varchar fields */
546
 
 
547
 
public:
548
 
  bool hasVariableWidth() const
549
 
  {
550
 
    return has_variable_width; // We should calculate this.
551
 
  }
552
 
  void setVariableWidth()
553
 
  {
554
 
    has_variable_width= true;
555
 
  }
556
 
  uint32_t db_create_options;           /* Create options from database */
557
 
  uint32_t db_options_in_use;           /* Options in use */
558
 
  uint32_t db_record_offset;            /* if HA_REC_IN_SEQ */
559
 
  uint32_t rowid_field_offset;          /* Field_nr +1 to rowid field */
560
 
  /**
561
 
   * @TODO 
562
 
   *
563
 
   * Currently the replication services component uses
564
 
   * the primary_key member to determine which field is the table's
565
 
   * primary key.  However, as it exists, because this member is scalar, it
566
 
   * only supports a single-column primary key. Is there a better way
567
 
   * to ask for the fields which are in a primary key?
568
 
 */
569
 
private:
570
 
  uint32_t primary_key;
571
 
public:
572
 
 
573
 
  uint32_t getPrimaryKey() const
574
 
  {
575
 
    return primary_key;
576
 
  }
577
 
 
578
 
  bool hasPrimaryKey() const
579
 
  {
580
 
    return primary_key != MAX_KEY;
581
 
  }
582
 
 
583
 
  /* Index of auto-updated TIMESTAMP field in field array */
584
 
  uint32_t next_number_index;               /* autoincrement key number */
585
 
  uint32_t next_number_key_offset;          /* autoinc keypart offset in a key */
586
 
  uint32_t next_number_keypart;             /* autoinc keypart number in a key */
587
 
  uint32_t error, open_errno, errarg;       /* error from open_table_def() */
588
 
 
589
 
private:
590
 
  uint8_t blob_ptr_size;                        /* 4 or 8 */
591
 
 
592
 
public:
593
 
  uint8_t sizeBlobPtr() const
594
 
  {
595
 
    return blob_ptr_size;
596
 
  }
597
 
 
598
 
  bool db_low_byte_first;               /* Portable row format */
599
 
 
600
 
  /*
601
 
    Set of keys in use, implemented as a Bitmap.
602
 
    Excludes keys disabled by ALTER Table ... DISABLE KEYS.
603
 
  */
604
 
  key_map keys_in_use;
605
 
  key_map keys_for_keyread;
606
 
 
607
 
  /* 
608
 
    event_observers is a class containing all the event plugins that have 
609
 
    registered an interest in this table.
610
 
  */
611
 
  virtual plugin::EventObserverList *getTableObservers() 
612
 
  { 
613
 
    return NULL;
614
 
  }
615
 
  
616
 
  virtual void setTableObservers(plugin::EventObserverList *) 
617
 
  { }
618
 
  
619
 
  /*
620
 
    Set share's identifier information.
621
 
 
622
 
    SYNOPSIS
623
 
    setIdentifier()
624
 
 
625
 
    NOTES
626
 
  */
627
 
 
628
 
  void setIdentifier(const identifier::Table &identifier_arg);
629
 
 
630
 
  /*
631
 
    Initialize share for temporary tables
632
 
 
633
 
    SYNOPSIS
634
 
    init()
635
 
    share       Share to fill
636
 
    key         Table_cache_key, as generated from create_table_def_key.
637
 
    must start with db name.
638
 
    key_length  Length of key
639
 
    table_name  Table name
640
 
    path        Path to table (possible in lower case)
641
 
 
642
 
    NOTES
643
 
    
644
 
  */
645
 
 
646
 
private:
647
 
  void init(const char *new_table_name,
648
 
            const char *new_path);
649
 
 
650
 
protected:
651
 
  void open_table_error(int pass_error, int db_errno, int pass_errarg);
652
 
 
653
 
public:
654
 
 
655
 
  static TableShare::shared_ptr getShareCreate(Session *session, 
656
 
                                               const identifier::Table &identifier,
657
 
                                               int &error);
658
 
 
659
 
  friend std::ostream& operator<<(std::ostream& output, const TableShare &share)
660
 
  {
661
 
    output << "TableShare:(";
662
 
    output <<  share.getSchemaName();
663
 
    output << ", ";
664
 
    output << share.getTableName();
665
 
    output << ", ";
666
 
    output << share.getTableTypeAsString();
667
 
    output << ", ";
668
 
    output << share.getPath();
669
 
    output << ")";
670
 
 
671
 
    return output;  // for multiple << operators.
672
 
  }
673
 
 
674
 
protected:
675
 
  friend class drizzled::table::Singular;
676
 
 
677
 
  Field *make_field(const message::Table::Field &pfield,
678
 
                    unsigned char *ptr,
679
 
                    uint32_t field_length,
680
 
                    bool is_nullable,
681
 
                    unsigned char *null_pos,
682
 
                    unsigned char null_bit,
683
 
                    uint8_t decimals,
684
 
                    enum_field_types field_type,
685
 
                    const charset_info_st * field_charset,
686
 
                    Field::utype unireg_check,
687
 
                    TYPELIB *interval,
688
 
                    const char *field_name);
689
 
 
690
 
  Field *make_field(const message::Table::Field &pfield,
691
 
                    unsigned char *ptr,
692
 
                    uint32_t field_length,
693
 
                    bool is_nullable,
694
 
                    unsigned char *null_pos,
695
 
                    unsigned char null_bit,
696
 
                    uint8_t decimals,
697
 
                    enum_field_types field_type,
698
 
                    const charset_info_st * field_charset,
699
 
                    Field::utype unireg_check,
700
 
                    TYPELIB *interval,
701
 
                    const char *field_name, 
702
 
                    bool is_unsigned);
703
 
 
704
 
public:
705
 
  int open_table_def(Session& session, const identifier::Table &identifier);
706
 
 
707
 
  int open_table_from_share(Session *session,
708
 
                            const identifier::Table &identifier,
709
 
                            const char *alias,
710
 
                            uint32_t db_stat, uint32_t ha_open_flags,
711
 
                            Table &outparam);
712
 
private:
713
 
  int open_table_from_share_inner(Session *session,
714
 
                                  const char *alias,
715
 
                                  uint32_t db_stat,
716
 
                                  Table &outparam);
717
 
  int open_table_cursor_inner(const identifier::Table &identifier,
718
 
                              uint32_t db_stat, uint32_t ha_open_flags,
719
 
                              Table &outparam,
720
 
                              bool &error_reported);
721
 
public:
722
 
  bool parse_table_proto(Session& session, message::Table &table);
723
 
 
724
 
  virtual bool replicate() const
725
 
  {
726
 
    return false;
727
 
  }
728
 
};
729
 
 
730
 
} /* namespace drizzled */
731
 
 
732
 
#endif /* DRIZZLED_TABLE_INSTANCE_BASE_H */