~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.h

  • Committer: LinuxJedi
  • Date: 2010-08-28 09:23:52 UTC
  • mto: (1738.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1739.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100828092352-oe3zbtdy05kq9dtq
Make exit happen in main thread rather than signal handler thread thus avoiding a segfault due to a double kill of the signal handler thread

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <drizzled/definitions.h>
25
25
#include <drizzled/plugin.h>
26
26
#include <drizzled/handler_structs.h>
27
 
#include <drizzled/message.h>
28
 
#include <drizzled/message/cache.h>
 
27
#include <drizzled/message/schema.pb.h>
 
28
#include <drizzled/message/table.pb.h>
29
29
#include "drizzled/plugin/plugin.h"
30
30
#include "drizzled/sql_string.h"
31
31
#include "drizzled/identifier.h"
252
252
  {
253
253
    return 0;
254
254
  }
255
 
  virtual Cursor *create(Table &)= 0;
 
255
  virtual Cursor *create(TableShare &)= 0;
256
256
  /* args: path */
257
257
  virtual bool flush_logs() { return false; }
258
258
  virtual bool show_status(Session *, stat_print_fn *, enum ha_stat_type)
286
286
 
287
287
  int renameTable(Session &session, const drizzled::TableIdentifier &from, const drizzled::TableIdentifier &to);
288
288
 
 
289
  // @todo move these to protected
 
290
  virtual void doGetTableNames(CachedDirectory &directory,
 
291
                               const drizzled::SchemaIdentifier &schema_identifier,
 
292
                               TableNameList &set_of_names)= 0;
 
293
 
289
294
  virtual void doGetTableIdentifiers(CachedDirectory &directory,
290
295
                                     const drizzled::SchemaIdentifier &schema_identifier,
291
 
                                     TableIdentifier::vector &set_of_identifiers)= 0;
 
296
                                     TableIdentifiers &set_of_identifiers)= 0;
292
297
 
293
298
  virtual int doDropTable(Session &session,
294
299
                          const drizzled::TableIdentifier &identifier)= 0;
299
304
 
300
305
  static int getTableDefinition(Session& session,
301
306
                                const drizzled::TableIdentifier &identifier,
302
 
                                message::table::shared_ptr &table_proto,
 
307
                                message::Table &table_proto,
303
308
                                bool include_temporary_tables= true);
304
309
  static bool doesTableExist(Session &session,
305
310
                             const drizzled::TableIdentifier &identifier,
320
325
                       const drizzled::TableIdentifier &identifier);
321
326
  static void getIdentifiers(Session &session,
322
327
                             const SchemaIdentifier &schema_identifier,
323
 
                             TableIdentifier::vector &set_of_identifiers);
 
328
                             TableIdentifiers &set_of_identifiers);
324
329
 
325
330
  // Check to see if any SE objects to creation.
326
331
  static bool canCreateTable(const drizzled::TableIdentifier &identifier);
328
333
  { (void)identifier;  return true; }
329
334
 
330
335
  // @note All schema methods defined here
331
 
  static void getIdentifiers(Session &session, SchemaIdentifier::vector &schemas);
332
 
  static bool getSchemaDefinition(const drizzled::TableIdentifier &identifier, message::schema::shared_ptr &proto);
333
 
  static bool getSchemaDefinition(const drizzled::SchemaIdentifier &identifier, message::schema::shared_ptr &proto);
 
336
  static void getIdentifiers(Session &session, SchemaIdentifiers &schemas);
 
337
  static bool getSchemaDefinition(const drizzled::TableIdentifier &identifier, message::Schema &proto);
 
338
  static bool getSchemaDefinition(const drizzled::SchemaIdentifier &identifier, message::Schema &proto);
334
339
  static bool doesSchemaExist(const drizzled::SchemaIdentifier &identifier);
335
340
  static const CHARSET_INFO *getSchemaCollation(const drizzled::SchemaIdentifier &identifier);
336
341
  static bool createSchema(const drizzled::message::Schema &schema_message);
338
343
  static bool alterSchema(const drizzled::message::Schema &schema_message);
339
344
 
340
345
  // @note make private/protected
341
 
  virtual void doGetSchemaIdentifiers(SchemaIdentifier::vector&)
 
346
  virtual void doGetSchemaIdentifiers(SchemaIdentifiers&)
342
347
  { }
343
348
 
344
 
  virtual bool doGetSchemaDefinition(const drizzled::SchemaIdentifier&, drizzled::message::schema::shared_ptr&)
 
349
  virtual bool doGetSchemaDefinition(const drizzled::SchemaIdentifier&, drizzled::message::Schema&)
345
350
  { 
346
351
    return false; 
347
352
  }
366
371
 
367
372
  static void removeLostTemporaryTables(Session &session, const char *directory);
368
373
 
369
 
  Cursor *getCursor(Table &share);
 
374
  Cursor *getCursor(TableShare &share);
370
375
 
371
376
  uint32_t max_record_length() const
372
377
  { return std::min((unsigned int)HA_MAX_REC_LENGTH, max_supported_record_length()); }