~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.h

  • Committer: Monty Taylor
  • Date: 2008-11-06 22:10:09 UTC
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: monty@inaugust.com-20081106221009-76yap6xcnilqmh0t
Moved stuff to handlerton.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
339
339
    Number of rows in table. It will only be called if
340
340
    (table_flags() & (HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT)) != 0
341
341
  */
342
 
  virtual ha_rows records() { return stats.records; }
 
342
  virtual ha_rows records();
343
343
  /**
344
344
    Return upper bound of current number of records in the table
345
345
    (max. of how many records one will retrieve when doing a full table scan)
1181
1181
#define ha_commit(session) (ha_commit_trans((session), true))
1182
1182
#define ha_rollback(session) (ha_rollback_trans((session), true))
1183
1183
 
1184
 
/* lookups */
1185
 
handlerton *ha_default_handlerton(Session *session);
1186
 
plugin_ref ha_resolve_by_name(Session *session, const LEX_STRING *name);
1187
 
plugin_ref ha_lock_engine(Session *session, handlerton *hton);
1188
 
handlerton *ha_resolve_by_legacy_type(Session *session, enum legacy_db_type db_type);
1189
 
handler *get_new_handler(TABLE_SHARE *share, MEM_ROOT *alloc,
1190
 
                         handlerton *db_type);
1191
 
handlerton *ha_checktype(Session *session, enum legacy_db_type database_type,
1192
 
                          bool no_substitute, bool report_error);
1193
 
 
1194
 
 
1195
 
static inline enum legacy_db_type ha_legacy_type(const handlerton *db_type)
1196
 
{
1197
 
  return (db_type == NULL) ? DB_TYPE_UNKNOWN : db_type->db_type;
1198
 
}
1199
 
 
1200
 
static inline const char *ha_resolve_storage_engine_name(const handlerton *db_type)
1201
 
{
1202
 
  return db_type == NULL ? "UNKNOWN" : hton2plugin[db_type->slot]->name.str;
1203
 
}
1204
 
 
1205
 
static inline bool ha_check_storage_engine_flag(const handlerton *db_type, uint32_t flag)
1206
 
{
1207
 
  return db_type == NULL ? false : test(db_type->flags & flag);
1208
 
}
1209
 
 
1210
 
static inline bool ha_storage_engine_is_enabled(const handlerton *db_type)
1211
 
{
1212
 
  return (db_type && db_type->create) ?
1213
 
         (db_type->state == SHOW_OPTION_YES) : false;
1214
 
}
1215
 
 
1216
1184
/* basic stuff */
1217
1185
int ha_init_errors(void);
1218
1186
int ha_init(void);