~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Brian Aker
  • Date: 2011-04-21 21:09:08 UTC
  • mfrom: (2281.4.3 prune)
  • Revision ID: brian@tangent.org-20110421210908-qfoyfsfmqn6b1ocd
Merge in Olaf prune tree (with comment on set_db)

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
#include <drizzled/internal/my_sys.h>
51
51
#include <drizzled/table_proto.h>
52
52
#include <drizzled/plugin/event_observer.h>
53
 
#include <drizzled/internal_error_handler.h>
54
53
#include <drizzled/table/shell.h>
55
54
#include <drizzled/message/cache.h>
56
55
#include <drizzled/key.h>
61
60
 
62
61
static bool shutdown_has_begun= false; // Once we put in the container for the vector/etc for engines this will go away.
63
62
 
64
 
namespace drizzled
65
 
{
66
 
 
67
 
namespace plugin
68
 
{
 
63
namespace drizzled {
 
64
namespace plugin {
69
65
 
70
66
static EngineVector vector_of_engines;
71
67
static EngineVector vector_of_schema_engines;
398
394
  return table_message;
399
395
}
400
396
 
401
 
/**
402
 
  An interceptor to hijack the text of the error message without
403
 
  setting an error in the thread. We need the text to present it
404
 
  in the form of a warning to the user.
405
 
*/
406
 
 
407
 
class Ha_delete_table_error_handler: public Internal_error_handler
408
 
{
409
 
public:
410
 
  Ha_delete_table_error_handler() : Internal_error_handler() {}
411
 
  virtual bool handle_error(drizzled::error_t sql_errno,
412
 
                            const char *message,
413
 
                            DRIZZLE_ERROR::enum_warning_level level,
414
 
                            Session *session);
415
 
  char buff[DRIZZLE_ERRMSG_SIZE];
416
 
};
417
 
 
418
 
 
419
 
bool
420
 
Ha_delete_table_error_handler::
421
 
handle_error(drizzled::error_t ,
422
 
             const char *message,
423
 
             DRIZZLE_ERROR::enum_warning_level ,
424
 
             Session *)
425
 
{
426
 
  /* Grab the error message */
427
 
  strncpy(buff, message, sizeof(buff)-1);
428
 
  return true;
429
 
}
430
 
 
431
397
class DropTableByIdentifier: public std::unary_function<EngineVector::value_type, bool>
432
398
{
433
399
  Session& session;