#include "mysql_priv.h"#include "rpl_filter.h"#include "ha_heap.h"#include "ha_myisam.h"#include "ha_myisammrg.h"#include <myisampack.h>#include <errno.h>Include dependency graph for handler.cc:

Go to the source code of this file.
Classes | |
| struct | xahton_st |
| struct | xarecover_st |
Defines | |
| #define | BITMAP_STACKBUF_SIZE (128/8) |
| #define | SETMSG(nr, msg) errmsgs[(nr) - HA_ERR_FIRST]= (msg) |
| #define | AUTO_INC_DEFAULT_NB_ROWS 1 |
| #define | AUTO_INC_DEFAULT_NB_MAX_BITS 16 |
| #define | AUTO_INC_DEFAULT_NB_MAX ((1 << AUTO_INC_DEFAULT_NB_MAX_BITS) - 1) |
Functions | |
| static handler * | create_default (TABLE_SHARE *table, MEM_ROOT *mem_root) |
| handlerton * | ha_default_handlerton (THD *thd) |
| handlerton * | ha_resolve_by_name (THD *thd, const LEX_STRING *name) |
| const char * | ha_get_storage_engine (enum legacy_db_type db_type) |
| handlerton * | ha_resolve_by_legacy_type (THD *thd, enum legacy_db_type db_type) |
| handlerton * | ha_checktype (THD *thd, enum legacy_db_type database_type, bool no_substitute, bool report_error) |
| handler * | get_new_handler (TABLE_SHARE *share, MEM_ROOT *alloc, handlerton *db_type) |
| static int | ha_init_errors (void) |
| static int | ha_finish_errors (void) |
| int | ha_finalize_handlerton (st_plugin_int *plugin) |
| int | ha_initialize_handlerton (st_plugin_int *plugin) |
| int | ha_init () |
| static my_bool | panic_handlerton (THD *unused1, st_plugin_int *plugin, void *arg) |
| int | ha_panic (enum ha_panic_function flag) |
| static my_bool | dropdb_handlerton (THD *unused1, st_plugin_int *plugin, void *path) |
| void | ha_drop_database (char *path) |
| static my_bool | closecon_handlerton (THD *thd, st_plugin_int *plugin, void *unused) |
| void | ha_close_connection (THD *thd) |
| void | trans_register_ha (THD *thd, bool all, handlerton *ht_arg) |
| int | ha_prepare (THD *thd) |
| int | ha_commit_trans (THD *thd, bool all) |
| int | ha_commit_one_phase (THD *thd, bool all) |
| int | ha_rollback_trans (THD *thd, bool all) |
| int | ha_autocommit_or_rollback (THD *thd, int error) |
| static my_bool | xacommit_handlerton (THD *unused1, st_plugin_int *plugin, void *arg) |
| static my_bool | xarollback_handlerton (THD *unused1, st_plugin_int *plugin, void *arg) |
| int | ha_commit_or_rollback_by_xid (XID *xid, bool commit) |
| static char * | xid_to_str (char *buf, XID *xid) |
| static my_bool | xarecover_handlerton (THD *unused, st_plugin_int *plugin, void *arg) |
| int | ha_recover (HASH *commit_list) |
| bool | mysql_xa_recover (THD *thd) |
| static my_bool | release_temporary_latches (THD *thd, st_plugin_int *plugin, void *unused) |
| int | ha_release_temporary_latches (THD *thd) |
| int | ha_rollback_to_savepoint (THD *thd, SAVEPOINT *sv) |
| int | ha_savepoint (THD *thd, SAVEPOINT *sv) |
| int | ha_release_savepoint (THD *thd, SAVEPOINT *sv) |
| static my_bool | snapshot_handlerton (THD *thd, st_plugin_int *plugin, void *arg) |
| int | ha_start_consistent_snapshot (THD *thd) |
| static my_bool | flush_handlerton (THD *thd, st_plugin_int *plugin, void *arg) |
| bool | ha_flush_logs (handlerton *db_type) |
| int | ha_delete_table (THD *thd, handlerton *table_type, const char *path, const char *db, const char *alias, bool generate_warning) |
| ulonglong | compute_next_insert_id (ulonglong nr, struct system_variables *variables) |
| ulonglong | prev_insert_id (ulonglong nr, struct system_variables *variables) |
| static bool | update_frm_version (TABLE *table, bool needs_lock) |
| int | ha_enable_transaction (THD *thd, bool on) |
| int | ha_create_table (THD *thd, const char *path, const char *db, const char *table_name, HA_CREATE_INFO *create_info, bool update_create_info) |
| int | ha_create_table_from_engine (THD *thd, const char *db, const char *name) |
| int | ha_init_key_cache (const char *name, KEY_CACHE *key_cache) |
| int | ha_resize_key_cache (KEY_CACHE *key_cache) |
| int | ha_change_key_cache_param (KEY_CACHE *key_cache) |
| int | ha_end_key_cache (KEY_CACHE *key_cache) |
| int | ha_change_key_cache (KEY_CACHE *old_key_cache, KEY_CACHE *new_key_cache) |
| int | ha_discover (THD *thd, const char *db, const char *name, const void **frmblob, uint *frmlen) |
| int | ha_find_files (THD *thd, const char *db, const char *path, const char *wild, bool dir, List< char > *files) |
| int | ha_table_exists_in_engine (THD *thd, const char *db, const char *name) |
| static my_bool | exts_handlerton (THD *unused, st_plugin_int *plugin, void *arg) |
| TYPELIB * | ha_known_exts (void) |
| static bool | stat_print (THD *thd, const char *type, uint type_len, const char *file, uint file_len, const char *status, uint status_len) |
| static my_bool | showstat_handlerton (THD *thd, st_plugin_int *plugin, void *arg) |
| bool | ha_show_status (THD *thd, handlerton *db_type, enum ha_stat_type stat) |
| void | signal_log_not_needed (struct handlerton, char *log_file) |
Variables | |
| st_plugin_int * | hton2plugin [MAX_HA] |
| static handlerton * | installed_htons [128] |
| KEY_CREATE_INFO | default_key_create_info = { HA_KEY_ALG_UNDEF, 0, {NullS,0} } |
| static SHOW_COMP_OPTION | have_yes = SHOW_OPTION_YES |
| ulong | total_ha = 0 |
| ulong | total_ha_2pc = 0 |
| ulong | savepoint_alloc_size = 0 |
| static const LEX_STRING | sys_table_aliases [] |
| const char * | ha_row_type [] |
| const char * | tx_isolation_names [] |
| TYPELIB | tx_isolation_typelib |
| static TYPELIB | known_extensions = {0,"known_exts", NULL, NULL} |
| uint | known_extensions_id = 0 |
| #define AUTO_INC_DEFAULT_NB_MAX ((1 << AUTO_INC_DEFAULT_NB_MAX_BITS) - 1) |
| #define AUTO_INC_DEFAULT_NB_MAX_BITS 16 |
| #define AUTO_INC_DEFAULT_NB_ROWS 1 |
| #define BITMAP_STACKBUF_SIZE (128/8) |
Definition at line 56 of file handler.cc.
| #define SETMSG | ( | nr, | |||
| msg | ) | errmsgs[(nr) - HA_ERR_FIRST]= (msg) |
Referenced by ha_init_errors().
| static my_bool closecon_handlerton | ( | THD * | thd, | |
| st_plugin_int * | plugin, | |||
| void * | unused | |||
| ) | [static] |
Definition at line 513 of file handler.cc.
References handlerton::close_connection, st_plugin_int::data, FALSE, SHOW_OPTION_YES, handlerton::slot, and handlerton::state.
Referenced by ha_close_connection().
00515 { 00516 handlerton *hton= (handlerton *)plugin->data; 00517 /* 00518 there's no need to rollback here as all transactions must 00519 be rolled back already 00520 */ 00521 if (hton->state == SHOW_OPTION_YES && hton->close_connection && 00522 thd->ha_data[hton->slot]) 00523 hton->close_connection(thd); 00524 return FALSE; 00525 }
Here is the caller graph for this function:

| ulonglong compute_next_insert_id | ( | ulonglong | nr, | |
| struct system_variables * | variables | |||
| ) | [inline] |
Definition at line 1557 of file handler.cc.
References system_variables::auto_increment_increment, and system_variables::auto_increment_offset.
Referenced by handler::adjust_next_insert_id_after_explicit_value(), and handler::update_auto_increment().
01558 { 01559 if (variables->auto_increment_increment == 1) 01560 return (nr+1); // optimization of the formula below 01561 nr= (((nr+ variables->auto_increment_increment - 01562 variables->auto_increment_offset)) / 01563 (ulonglong) variables->auto_increment_increment); 01564 return (nr* (ulonglong) variables->auto_increment_increment + 01565 variables->auto_increment_offset); 01566 }
Here is the caller graph for this function:

| static handler * create_default | ( | TABLE_SHARE * | table, | |
| MEM_ROOT * | mem_root | |||
| ) | [static] |
Definition at line 182 of file handler.cc.
References handlerton::create, current_thd, ha_default_handlerton(), and NULL.
00183 { 00184 handlerton *hton= ha_default_handlerton(current_thd); 00185 return (hton && hton->create) ? hton->create(table, mem_root) : NULL; 00186 }
Here is the call graph for this function:

| static my_bool dropdb_handlerton | ( | THD * | unused1, | |
| st_plugin_int * | plugin, | |||
| void * | path | |||
| ) | [static] |
Definition at line 497 of file handler.cc.
References st_plugin_int::data, handlerton::drop_database, FALSE, SHOW_OPTION_YES, and handlerton::state.
Referenced by ha_drop_database().
00499 { 00500 handlerton *hton= (handlerton *)plugin->data; 00501 if (hton->state == SHOW_OPTION_YES && hton->drop_database) 00502 hton->drop_database((char *)path); 00503 return FALSE; 00504 }
Here is the caller graph for this function:

| static my_bool exts_handlerton | ( | THD * | unused, | |
| st_plugin_int * | plugin, | |||
| void * | arg | |||
| ) | [static] |
Definition at line 3181 of file handler.cc.
References handlerton::create, current_thd, st_plugin_int::data, FALSE, List< T >::push_back(), List_iterator_fast< T >::rewind(), SHOW_OPTION_YES, handlerton::state, and strcmp().
Referenced by ha_known_exts().
03183 { 03184 List<char> *found_exts= (List<char> *) arg; 03185 handlerton *hton= (handlerton *)plugin->data; 03186 handler *file; 03187 if (hton->state == SHOW_OPTION_YES && hton->create && 03188 (file= hton->create((TABLE_SHARE*) 0, current_thd->mem_root))) 03189 { 03190 List_iterator_fast<char> it(*found_exts); 03191 const char **ext, *old_ext; 03192 03193 for (ext= file->bas_ext(); *ext; ext++) 03194 { 03195 while ((old_ext= it++)) 03196 { 03197 if (!strcmp(old_ext, *ext)) 03198 break; 03199 } 03200 if (!old_ext) 03201 found_exts->push_back((char *) *ext); 03202 03203 it.rewind(); 03204 } 03205 delete file; 03206 } 03207 return FALSE; 03208 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static my_bool flush_handlerton | ( | THD * | thd, | |
| st_plugin_int * | plugin, | |||
| void * | arg | |||
| ) | [static] |
Definition at line 1311 of file handler.cc.
References st_plugin_int::data, FALSE, handlerton::flush_logs, SHOW_OPTION_YES, handlerton::state, and TRUE.
Referenced by ha_flush_logs().
01313 { 01314 handlerton *hton= (handlerton *)plugin->data; 01315 if (hton->state == SHOW_OPTION_YES && hton->flush_logs && hton->flush_logs()) 01316 return TRUE; 01317 return FALSE; 01318 }
Here is the caller graph for this function:

| handler* get_new_handler | ( | TABLE_SHARE * | share, | |
| MEM_ROOT * | alloc, | |||
| handlerton * | db_type | |||
| ) |
Definition at line 238 of file handler.cc.
References handlerton::create, current_thd, DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, get_new_handler(), handler::init(), SHOW_OPTION_YES, and handlerton::state.
Referenced by create_myisam_from_heap(), create_tmp_table(), execute_ddl_log_action(), get_new_handler(), ha_delete_table(), QUICK_RANGE_SELECT::init_ror_merged_scan(), mysql_create_table_internal(), mysql_rename_table(), open_table_error(), open_table_from_share(), and rm_temporary_table().
00240 { 00241 handler *file; 00242 DBUG_ENTER("get_new_handler"); 00243 DBUG_PRINT("enter", ("alloc: 0x%lx", (long) alloc)); 00244 00245 if (db_type && db_type->state == SHOW_OPTION_YES && db_type->create) 00246 { 00247 if ((file= db_type->create(share, alloc))) 00248 file->init(); 00249 DBUG_RETURN(file); 00250 } 00251 /* 00252 Try the default table type 00253 Here the call to current_thd() is ok as we call this function a lot of 00254 times but we enter this branch very seldom. 00255 */ 00256 DBUG_RETURN(get_new_handler(share, alloc, 00257 current_thd->variables.table_type)); 00258 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_autocommit_or_rollback | ( | THD * | thd, | |
| int | error | |||
| ) |
Definition at line 821 of file handler.cc.
References DBUG_ENTER, DBUG_RETURN, ha_commit_stmt, and ha_rollback_stmt.
Referenced by mysql_admin_table(), mysql_delete(), mysql_discard_or_import_tablespace(), mysql_insert(), and mysql_load().
00822 { 00823 DBUG_ENTER("ha_autocommit_or_rollback"); 00824 #ifdef USING_TRANSACTIONS 00825 if (thd->transaction.stmt.nht) 00826 { 00827 if (!error) 00828 { 00829 if (ha_commit_stmt(thd)) 00830 error=1; 00831 } 00832 else 00833 (void) ha_rollback_stmt(thd); 00834 00835 thd->variables.tx_isolation=thd->session_tx_isolation; 00836 } 00837 #endif 00838 DBUG_RETURN(error); 00839 }
Here is the caller graph for this function:

Definition at line 2692 of file handler.cc.
References mi_change_key_cache().
Referenced by reassign_keycache_tables().
02694 { 02695 mi_change_key_cache(old_key_cache, new_key_cache); 02696 return 0; 02697 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_change_key_cache_param | ( | KEY_CACHE * | key_cache | ) |
Definition at line 2669 of file handler.cc.
References change_key_cache_param(), st_key_cache::key_cache_inited, LOCK_global_system_variables, st_key_cache::param_age_threshold, st_key_cache::param_division_limit, pthread_mutex_lock, and pthread_mutex_unlock.
02670 { 02671 if (key_cache->key_cache_inited) 02672 { 02673 pthread_mutex_lock(&LOCK_global_system_variables); 02674 uint division_limit= key_cache->param_division_limit; 02675 uint age_threshold= key_cache->param_age_threshold; 02676 pthread_mutex_unlock(&LOCK_global_system_variables); 02677 change_key_cache_param(key_cache, division_limit, age_threshold); 02678 } 02679 return 0; 02680 }
Here is the call graph for this function:

| handlerton* ha_checktype | ( | THD * | thd, | |
| enum legacy_db_type | database_type, | |||
| bool | no_substitute, | |||
| bool | report_error | |||
| ) |
Definition at line 206 of file handler.cc.
References DB_TYPE_HASH, DB_TYPE_MRG_ISAM, DB_TYPE_MRG_MYISAM, ER_FEATURE_DISABLED, ha_default_handlerton(), ha_get_storage_engine(), ha_resolve_by_legacy_type(), ha_storage_engine_is_enabled(), my_error(), MYF, and NULL.
Referenced by sys_var_thd_storage_engine::check(), check_engine(), create_frm(), mysql_create_table_internal(), and open_binary_frm().
00208 { 00209 handlerton *hton= ha_resolve_by_legacy_type(thd, database_type); 00210 if (ha_storage_engine_is_enabled(hton)) 00211 return hton; 00212 00213 if (no_substitute) 00214 { 00215 if (report_error) 00216 { 00217 const char *engine_name= ha_get_storage_engine(database_type); 00218 my_error(ER_FEATURE_DISABLED,MYF(0),engine_name,engine_name); 00219 } 00220 return NULL; 00221 } 00222 00223 switch (database_type) { 00224 #ifndef NO_HASH 00225 case DB_TYPE_HASH: 00226 return ha_resolve_by_legacy_type(thd, DB_TYPE_HASH); 00227 #endif 00228 case DB_TYPE_MRG_ISAM: 00229 return ha_resolve_by_legacy_type(thd, DB_TYPE_MRG_MYISAM); 00230 default: 00231 break; 00232 } 00233 00234 return ha_default_handlerton(thd); 00235 } /* ha_checktype */
Here is the call graph for this function:

Here is the caller graph for this function:

| void ha_close_connection | ( | THD * | thd | ) |
Definition at line 529 of file handler.cc.
References closecon_handlerton(), MYSQL_STORAGE_ENGINE_PLUGIN, and plugin_foreach().
00530 { 00531 plugin_foreach(thd, closecon_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, 0); 00532 }
Here is the call graph for this function:

| int ha_commit_one_phase | ( | THD * | thd, | |
| bool | all | |||
| ) |
Definition at line 707 of file handler.cc.
References DBUG_ENTER, DBUG_RETURN, ER_ERROR_DURING_COMMIT, err, error, ht, st_thd_trans::ht, Query_cache::invalidate(), LOCK_status, my_error(), MYF, st_thd_trans::nht, st_thd_trans::no_2pc, query_cache, and statistic_increment.
Referenced by ha_commit_trans(), and mysql_execute_command().
00708 { 00709 int error=0; 00710 THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt; 00711 bool is_real_trans=all || thd->transaction.all.nht == 0; 00712 handlerton **ht=trans->ht; 00713 DBUG_ENTER("ha_commit_one_phase"); 00714 #ifdef USING_TRANSACTIONS 00715 if (trans->nht) 00716 { 00717 for (ht=trans->ht; *ht; ht++) 00718 { 00719 int err; 00720 if ((err= (*(*ht)->commit)(thd, all))) 00721 { 00722 my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); 00723 error=1; 00724 } 00725 statistic_increment(thd->status_var.ha_commit_count,&LOCK_status); 00726 *ht= 0; 00727 } 00728 trans->nht=0; 00729 trans->no_2pc=0; 00730 if (is_real_trans) 00731 thd->transaction.xid_state.xid.null(); 00732 if (all) 00733 { 00734 #ifdef HAVE_QUERY_CACHE 00735 if (thd->transaction.changed_tables) 00736 query_cache.invalidate(thd->transaction.changed_tables); 00737 #endif 00738 thd->variables.tx_isolation=thd->session_tx_isolation; 00739 thd->transaction.cleanup(); 00740 } 00741 } 00742 #endif /* USING_TRANSACTIONS */ 00743 DBUG_RETURN(error); 00744 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 872 of file handler.cc.
References MYSQL_STORAGE_ENGINE_PLUGIN, NULL, plugin_foreach(), xahton_st::result, xacommit_handlerton(), xarollback_handlerton(), and xahton_st::xid.
Referenced by mysql_execute_command().
00873 { 00874 struct xahton_st xaop; 00875 xaop.xid= xid; 00876 xaop.result= 1; 00877 00878 plugin_foreach(NULL, commit ? xacommit_handlerton : xarollback_handlerton, 00879 MYSQL_STORAGE_ENGINE_PLUGIN, &xaop); 00880 00881 return xaop.result; 00882 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_commit_trans | ( | THD * | thd, | |
| bool | all | |||
| ) |
Definition at line 625 of file handler.cc.
References abort(), DBUG_ASSERT, DBUG_ENTER, DBUG_EXECUTE_IF, DBUG_RETURN, ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, ER_ERROR_DURING_COMMIT, err, error, ha_commit_one_phase(), ha_rollback_trans(), ht, st_thd_trans::ht, LOCK_status, TC_LOG::log(), my_error(), MYF, st_thd_trans::nht, st_thd_trans::no_2pc, start_waiting_global_read_lock(), statistic_increment, tc_log, TC_LOG::unlog(), and wait_if_global_read_lock().
00626 { 00627 int error= 0, cookie= 0; 00628 THD_TRANS *trans= all ? &thd->transaction.all : &thd->transaction.stmt; 00629 bool is_real_trans= all || thd->transaction.all.nht == 0; 00630 handlerton **ht= trans->ht; 00631 my_xid xid= thd->transaction.xid_state.xid.get_my_xid(); 00632 DBUG_ENTER("ha_commit_trans"); 00633 00634 if (thd->in_sub_stmt) 00635 { 00636 /* 00637 Since we don't support nested statement transactions in 5.0, 00638 we can't commit or rollback stmt transactions while we are inside 00639 stored functions or triggers. So we simply do nothing now. 00640 TODO: This should be fixed in later ( >= 5.1) releases. 00641 */ 00642 if (!all) 00643 DBUG_RETURN(0); 00644 /* 00645 We assume that all statements which commit or rollback main transaction 00646 are prohibited inside of stored functions or triggers. So they should 00647 bail out with error even before ha_commit_trans() call. To be 100% safe 00648 let us throw error in non-debug builds. 00649 */ 00650 DBUG_ASSERT(0); 00651 my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0)); 00652 DBUG_RETURN(2); 00653 } 00654 #ifdef USING_TRANSACTIONS 00655 if (trans->nht) 00656 { 00657 if (is_real_trans && wait_if_global_read_lock(thd, 0, 0)) 00658 { 00659 ha_rollback_trans(thd, all); 00660 DBUG_RETURN(1); 00661 } 00662 DBUG_EXECUTE_IF("crash_commit_before", abort();); 00663 00664 /* Close all cursors that can not survive COMMIT */ 00665 if (is_real_trans) /* not a statement commit */ 00666 thd->stmt_map.close_transient_cursors(); 00667 00668 if (!trans->no_2pc && trans->nht > 1) 00669 { 00670 for (; *ht && !error; ht++) 00671 { 00672 int err; 00673 if ((err= (*(*ht)->prepare)(thd, all))) 00674 { 00675 my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); 00676 error= 1; 00677 } 00678 statistic_increment(thd->status_var.ha_prepare_count,&LOCK_status); 00679 } 00680 DBUG_EXECUTE_IF("crash_commit_after_prepare", abort();); 00681 if (error || (is_real_trans && xid && 00682 (error= !(cookie= tc_log->log(thd, xid))))) 00683 { 00684 ha_rollback_trans(thd, all); 00685 error= 1; 00686 goto end; 00687 } 00688 DBUG_EXECUTE_IF("crash_commit_after_log", abort();); 00689 } 00690 error=ha_commit_one_phase(thd, all) ? cookie ? 2 : 1 : 0; 00691 DBUG_EXECUTE_IF("crash_commit_before_unlog", abort();); 00692 if (cookie) 00693 tc_log->unlog(cookie, xid); 00694 DBUG_EXECUTE_IF("crash_commit_after", abort();); 00695 end: 00696 if (is_real_trans) 00697 start_waiting_global_read_lock(thd); 00698 } 00699 #endif /* USING_TRANSACTIONS */ 00700 DBUG_RETURN(error); 00701 }
Here is the call graph for this function:

| int ha_create_table | ( | THD * | thd, | |
| const char * | path, | |||
| const char * | db, | |||
| const char * | table_name, | |||
| HA_CREATE_INFO * | create_info, | |||
| bool | update_create_info | |||
| ) |
Definition at line 2491 of file handler.cc.
References closefrm(), handler::create(), DBUG_ENTER, DBUG_RETURN, ER_CANT_CREATE_TABLE, err, error, st_table::file, files_charset_info, FN_REFLEN, free_table_share(), HA_FILE_BASED, handler::ha_table_flags(), init_tmp_table_share(), lower_case_table_names, ME_BELL, ME_WAITTANG, my_casedn_str, my_error(), MYF, name, NullS, open_table_def(), open_table_from_share(), st_table_share::path, READ_ALL, LEX_STRING::str, strmov(), strxmov(), TRUE, update_create_info_from_table(), and VOID.
Referenced by mysql_create_like_table(), mysql_truncate(), and rea_create_table().
02495 { 02496 int error= 1; 02497 TABLE table; 02498 char name_buff[FN_REFLEN]; 02499 const char *name; 02500 TABLE_SHARE share; 02501 DBUG_ENTER("ha_create_table"); 02502 02503 init_tmp_table_share(&share, db, 0, table_name, path); 02504 if (open_table_def(thd, &share, 0) || 02505 open_table_from_share(thd, &share, "", 0, (uint) READ_ALL, 0, &table, 02506 TRUE)) 02507 goto err; 02508 02509 if (update_create_info) 02510 update_create_info_from_table(create_info, &table); 02511 02512 name= share.path.str; 02513 if (lower_case_table_names == 2 && 02514 !(table.file->ha_table_flags() & HA_FILE_BASED)) 02515 { 02516 /* Ensure that handler gets name in lower case */ 02517 strmov(name_buff, name); 02518 my_casedn_str(files_charset_info, name_buff); 02519 name= name_buff; 02520 } 02521 02522 error= table.file->create(name, &table, create_info); 02523 VOID(closefrm(&table, 0)); 02524 if (error) 02525 { 02526 strxmov(name_buff, db, ".", table_name, NullS); 02527 my_error(ER_CANT_CREATE_TABLE, MYF(ME_BELL+ME_WAITTANG), name_buff, error); 02528 } 02529 err: 02530 free_table_share(&share); 02531 DBUG_RETURN(error != 0); 02532 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_create_table_from_engine | ( | THD * | thd, | |
| const char * | db, | |||
| const char * | name | |||
| ) |
Definition at line 2547 of file handler.cc.
References bzero, closefrm(), handler::create(), DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, error, FALSE, st_table::file, files_charset_info, FN_REFLEN, free_table_share(), ha_discover(), HA_FILE_BASED, HA_OPTION_CREATE_FROM_ENGINE, handler::ha_table_flags(), init_tmp_table_share(), lower_case_table_names, my_casedn_str, my_free, MYF, mysql_data_home, NullS, open_table_def(), open_table_from_share(), path, strxnmov(), update_create_info_from_table(), VOID, and writefrm().
Referenced by get_table_share_with_create(), mysql_rm_table_part2(), and open_unireg_entry().
02548 { 02549 int error; 02550 const void *frmblob; 02551 uint frmlen; 02552 char path[FN_REFLEN]; 02553 HA_CREATE_INFO create_info; 02554 TABLE table; 02555 TABLE_SHARE share; 02556 DBUG_ENTER("ha_create_table_from_engine"); 02557 DBUG_PRINT("enter", ("name '%s'.'%s'", db, name)); 02558 02559 bzero((char*) &create_info,sizeof(create_info)); 02560 if ((error= ha_discover(thd, db, name, &frmblob, &frmlen))) 02561 { 02562 /* Table could not be discovered and thus not created */ 02563 DBUG_RETURN(error); 02564 } 02565 02566 /* 02567 Table exists in handler and could be discovered 02568 frmblob and frmlen are set, write the frm to disk 02569 */ 02570 02571 (void)strxnmov(path,FN_REFLEN-1,mysql_data_home,"/",db,"/",name,NullS); 02572 // Save the frm file 02573 error= writefrm(path, frmblob, frmlen); 02574 my_free((char*) frmblob, MYF(0)); 02575 if (error) 02576 DBUG_RETURN(2); 02577 02578 init_tmp_table_share(&share, db, 0, name, path); 02579 if (open_table_def(thd, &share, 0)) 02580 { 02581 DBUG_RETURN(3); 02582 } 02583 if (open_table_from_share(thd, &share, "" ,0, 0, 0, &table, FALSE)) 02584 { 02585 free_table_share(&share); 02586 DBUG_RETURN(3); 02587 } 02588 02589 update_create_info_from_table(&create_info, &table); 02590 create_info.table_options|= HA_OPTION_CREATE_FROM_ENGINE; 02591 02592 if (lower_case_table_names == 2 && 02593 !(table.file->ha_table_flags() & HA_FILE_BASED)) 02594 { 02595 /* Ensure that handler gets name in lower case */ 02596 my_casedn_str(files_charset_info, path); 02597 } 02598 error=table.file->create(path,&table,&create_info); 02599 VOID(closefrm(&table, 1)); 02600 02601 DBUG_RETURN(error != 0); 02602 }
Here is the call graph for this function:

Here is the caller graph for this function:

| handlerton* ha_default_handlerton | ( | THD * | thd | ) |
Definition at line 107 of file handler.cc.
References global_system_variables, myisam_hton, NULL, and system_variables::table_type.
Referenced by create_default(), ha_checktype(), ha_resolve_by_legacy_type(), ha_resolve_by_name(), and mysql_alter_tablespace().
00108 { 00109 return (thd->variables.table_type != NULL) ? 00110 thd->variables.table_type : 00111 (global_system_variables.table_type != NULL ? 00112 global_system_variables.table_type : &myisam_hton); 00113 }
Here is the caller graph for this function:

| int ha_delete_table | ( | THD * | thd, | |
| handlerton * | table_type, | |||
| const char * | path, | |||
| const char * | db, | |||
| const char * | alias, | |||
| bool | generate_warning | |||
| ) |
Definition at line 1343 of file handler.cc.
References bzero, DBUG_ENTER, DBUG_RETURN, handler::delete_table(), error, files_charset_info, FN_REFLEN, get_new_handler(), HA_FILE_BASED, handler::ha_table_flags(), lower_case_table_names, my_casedn_str, NULL, handler::print_error(), push_warning(), strlen(), strmake(), strmov(), and MYSQL_ERROR::WARN_LEVEL_ERROR.
Referenced by mysql_rm_table_part2(), and quick_rm_table().
01345 { 01346 handler *file; 01347 char tmp_path[FN_REFLEN]; 01348 int error; 01349 TABLE dummy_table; 01350 TABLE_SHARE dummy_share; 01351 DBUG_ENTER("ha_delete_table"); 01352 01353 bzero((char*) &dummy_table, sizeof(dummy_table)); 01354 bzero((char*) &dummy_share, sizeof(dummy_share)); 01355 dummy_table.s= &dummy_share; 01356 01357 /* DB_TYPE_UNKNOWN is used in ALTER TABLE when renaming only .frm files */ 01358 if (table_type == NULL || 01359 ! (file=get_new_handler(&dummy_share, thd->mem_root, table_type))) 01360 DBUG_RETURN(ENOENT); 01361 01362 if (lower_case_table_names == 2 && !(file->ha_table_flags() & HA_FILE_BASED)) 01363 { 01364 /* Ensure that table handler get path in lower case */ 01365 strmov(tmp_path, path); 01366 my_casedn_str(files_charset_info, tmp_path); 01367 path= tmp_path; 01368 } 01369 if ((error= file->delete_table(path)) && generate_warning) 01370 { 01371 /* 01372 Because file->print_error() use my_error() to generate the error message 01373 we must store the error state in thd, reset it and restore it to 01374 be able to get hold of the error message. 01375 (We should in the future either rewrite handler::print_error() or make 01376 a nice method of this. 01377 */ 01378 bool query_error= thd->query_error; 01379 sp_rcontext *spcont= thd->spcont; 01380 SELECT_LEX *current_select= thd->lex->current_select; 01381 char buff[sizeof(thd->net.last_error)]; 01382 char new_error[sizeof(thd->net.last_error)]; 01383 int last_errno= thd->net.last_errno; 01384 01385 strmake(buff, thd->net.last_error, sizeof(buff)-1); 01386 thd->query_error= 0; 01387 thd->spcont= 0; 01388 thd->lex->current_select= 0; 01389 thd->net.last_error[0]= 0; 01390 01391 /* Fill up strucutures that print_error may need */ 01392 dummy_share.path.str= (char*) path; 01393 dummy_share.path.length= strlen(path); 01394 dummy_share.db.str= (char*) db; 01395 dummy_share.db.length= strlen(db); 01396 dummy_share.table_name.str= (char*) alias; 01397 dummy_share.table_name.length= strlen(alias); 01398 dummy_table.alias= alias; 01399 01400 file->print_error(error, 0); 01401 strmake(new_error, thd->net.last_error, sizeof(buff)-1); 01402 01403 /* restore thd */ 01404 thd->query_error= query_error; 01405 thd->spcont= spcont; 01406 thd->lex->current_select= current_select; 01407 thd->net.last_errno= last_errno; 01408 strmake(thd->net.last_error, buff, sizeof(buff)-1); 01409 push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error, new_error); 01410 } 01411 delete file; 01412 DBUG_RETURN(error); 01413 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_discover | ( | THD * | thd, | |
| const char * | db, | |||
| const char * | name, | |||
| const void ** | frmblob, | |||
| uint * | frmlen | |||
| ) |
Definition at line 2709 of file handler.cc.
References DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, error, have_ndbcluster, is_prefix(), LOCK_status, ndbcluster_discover(), SHOW_OPTION_YES, statistic_increment, and tmp_file_prefix.
Referenced by ha_create_table_from_engine().
02711 { 02712 int error= -1; // Table does not exist in any handler 02713 DBUG_ENTER("ha_discover"); 02714 DBUG_PRINT("enter", ("db: %s, name: %s", db, name)); 02715 if (is_prefix(name,tmp_file_prefix)) /* skip temporary tables */ 02716 DBUG_RETURN(error); 02717 #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE 02718 if (have_ndbcluster == SHOW_OPTION_YES) 02719 error= ndbcluster_discover(thd, db, name, frmblob, frmlen); 02720 #endif 02721 if (!error) 02722 statistic_increment(thd->status_var.ha_discover_count,&LOCK_status); 02723 DBUG_RETURN(error); 02724 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void ha_drop_database | ( | char * | path | ) |
Definition at line 507 of file handler.cc.
References dropdb_handlerton(), MYSQL_STORAGE_ENGINE_PLUGIN, NULL, and plugin_foreach().
Referenced by mysql_rm_db().
00508 { 00509 plugin_foreach(NULL, dropdb_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, path); 00510 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_enable_transaction | ( | THD * | thd, | |
| bool | on | |||
| ) |
Definition at line 2419 of file handler.cc.
References COMMIT, DBUG_ENTER, DBUG_RETURN, end_trans(), error, and ha_commit_stmt.
Referenced by copy_data_between_tables(), mysql_load(), and mysql_truncate().
02420 { 02421 int error=0; 02422 02423 DBUG_ENTER("ha_enable_transaction"); 02424 thd->transaction.on= on; 02425 if (on) 02426 { 02427 /* 02428 Now all storage engines should have transaction handling enabled. 02429 But some may have it enabled all the time - "disabling" transactions 02430 is an optimization hint that storage engine is free to ignore. 02431 So, let's commit an open transaction (if any) now. 02432 */ 02433 if (!(error= ha_commit_stmt(thd))) 02434 error= end_trans(thd, COMMIT); 02435 } 02436 DBUG_RETURN(error); 02437 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_end_key_cache | ( | KEY_CACHE * | key_cache | ) |
Definition at line 2684 of file handler.cc.
References end_key_cache().
Referenced by free_key_cache().
02685 { 02686 end_key_cache(key_cache, 1); // Can never fail 02687 return 0; 02688 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_finalize_handlerton | ( | st_plugin_int * | plugin | ) |
Definition at line 376 of file handler.cc.
References st_plugin_int::data, handlerton::db_type, DBUG_ENTER, DBUG_RETURN, HA_PANIC_CLOSE, installed_htons, NULL, handlerton::panic, SHOW_OPTION_DISABLED, SHOW_OPTION_NO, SHOW_OPTION_YES, and handlerton::state.
Referenced by plugin_finalize().
00377 { 00378 handlerton *hton= (handlerton *)plugin->data; 00379 DBUG_ENTER("ha_finalize_handlerton"); 00380 00381 switch (hton->state) 00382 { 00383 case SHOW_OPTION_NO: 00384 case SHOW_OPTION_DISABLED: 00385 break; 00386 case SHOW_OPTION_YES: 00387 if (installed_htons[hton->db_type] == hton) 00388 installed_htons[hton->db_type]= NULL; 00389 if (hton->panic && hton->panic(HA_PANIC_CLOSE)) 00390 DBUG_RETURN(1); 00391 break; 00392 }; 00393 DBUG_RETURN(0); 00394 }
Here is the caller graph for this function:

| int ha_find_files | ( | THD * | thd, | |
| const char * | db, | |||
| const char * | path, | |||
| const char * | wild, | |||
| bool | dir, | |||
| List< char > * | files | |||
| ) |
Definition at line 2734 of file handler.cc.
References DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, error, files, have_ndbcluster, ndbcluster_find_files(), and SHOW_OPTION_YES.
Referenced by find_files().
02736 { 02737 int error= 0; 02738 DBUG_ENTER("ha_find_files"); 02739 DBUG_PRINT("enter", ("db: %s, path: %s, wild: %s, dir: %d", 02740 db, path, wild, dir)); 02741 #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE 02742 if (have_ndbcluster == SHOW_OPTION_YES) 02743 error= ndbcluster_find_files(thd, db, path, wild, dir, files); 02744 #endif 02745 DBUG_RETURN(error); 02746 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static int ha_finish_errors | ( | void | ) | [static] |
Definition at line 364 of file handler.cc.
References HA_ERR_FIRST, HA_ERR_LAST, my_error_unregister(), my_free, and MYF.
Referenced by ha_panic().
00365 { 00366 const char **errmsgs; 00367 00368 /* Allocate a pointer array for the error message strings. */ 00369 if (! (errmsgs= my_error_unregister(HA_ERR_FIRST, HA_ERR_LAST))) 00370 return 1; 00371 my_free((gptr) errmsgs, MYF(0)); 00372 return 0; 00373 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool ha_flush_logs | ( | handlerton * | db_type | ) |
Definition at line 1321 of file handler.cc.
References FALSE, flush_handlerton(), handlerton::flush_logs, MYSQL_STORAGE_ENGINE_PLUGIN, NULL, plugin_foreach(), SHOW_OPTION_YES, handlerton::state, and TRUE.
Referenced by reload_acl_and_cache().
01322 { 01323 if (db_type == NULL) 01324 { 01325 if (plugin_foreach(NULL, flush_handlerton, 01326 MYSQL_STORAGE_ENGINE_PLUGIN, 0)) 01327 return TRUE; 01328 } 01329 else 01330 { 01331 if (db_type->state != SHOW_OPTION_YES || 01332 (db_type->flush_logs && db_type->flush_logs())) 01333 return TRUE; 01334 } 01335 return FALSE; 01336 }
Here is the call graph for this function:

Here is the caller graph for this function:

| const char* ha_get_storage_engine | ( | enum legacy_db_type | db_type | ) |
Definition at line 166 of file handler.cc.
References DB_TYPE_DEFAULT, DB_TYPE_UNKNOWN, hton2plugin, installed_htons, st_plugin_int::name, handlerton::slot, and LEX_STRING::str.
Referenced by ha_checktype().
00167 { 00168 switch (db_type) { 00169 case DB_TYPE_DEFAULT: 00170 return "DEFAULT"; 00171 default: 00172 if (db_type > DB_TYPE_UNKNOWN && db_type < DB_TYPE_DEFAULT && 00173 installed_htons[db_type]) 00174 return hton2plugin[installed_htons[db_type]->slot]->name.str; 00175 /* fall through */ 00176 case DB_TYPE_UNKNOWN: 00177 return "UNKNOWN"; 00178 } 00179 }
Here is the caller graph for this function:

| int ha_init | ( | void | ) |
Definition at line 452 of file handler.cc.
References DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, error, ha_init_errors(), MAX_HA, opt_bin_log, opt_using_transactions, savepoint_alloc_size, and total_ha.
Referenced by init_server_components().
00453 { 00454 int error= 0; 00455 DBUG_ENTER("ha_init"); 00456 00457 if (ha_init_errors()) 00458 DBUG_RETURN(1); 00459 00460 DBUG_ASSERT(total_ha < MAX_HA); 00461 /* 00462 Check if there is a transaction-capable storage engine besides the 00463 binary log (which is considered a transaction-capable storage engine in 00464 counting total_ha) 00465 */ 00466 opt_using_transactions= total_ha>(ulong)opt_bin_log; 00467 savepoint_alloc_size+= sizeof(SAVEPOINT); 00468 DBUG_RETURN(error); 00469 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static int ha_init_errors | ( | void | ) | [static] |
Definition at line 296 of file handler.cc.
References ER, ER_CANNOT_ADD_FOREIGN, ER_CRASHED_ON_REPAIR, ER_CRASHED_ON_USAGE, ER_DUP_KEY, ER_DUP_UNIQUE, ER_ILLEGAL_HA, ER_KEY_NOT_FOUND, ER_LOCK_DEADLOCK, ER_LOCK_TABLE_FULL, ER_LOCK_WAIT_TIMEOUT, ER_NO_REFERENCED_ROW_2, ER_NOT_KEYFILE, ER_OLD_KEYFILE, ER_OPEN_AS_READONLY, ER_READ_ONLY_TRANSACTION, ER_RECORD_FILE_FULL, ER_ROW_IS_REFERENCED_2, ER_TABLE_DEF_CHANGED, ER_TABLE_EXISTS_ERROR, ER_TABLE_NEEDS_UPGRADE, ER_WRONG_MRG_TABLE, HA_ERR_CANNOT_ADD_FOREIGN, HA_ERR_CRASHED, HA_ERR_CRASHED_ON_REPAIR, HA_ERR_CRASHED_ON_USAGE, HA_ERR_END_OF_FILE, HA_ERR_ERRORS, HA_ERR_FIRST, HA_ERR_FOREIGN_DUPLICATE_KEY, HA_ERR_FOUND_DUPP_KEY, HA_ERR_FOUND_DUPP_UNIQUE, HA_ERR_INDEX_FILE_FULL, HA_ERR_KEY_NOT_FOUND, HA_ERR_LAST, HA_ERR_LOCK_DEADLOCK, HA_ERR_LOCK_TABLE_FULL, HA_ERR_LOCK_WAIT_TIMEOUT, HA_ERR_NO_ACTIVE_RECORD, HA_ERR_NO_CONNECTION, HA_ERR_NO_REFERENCED_ROW, HA_ERR_NO_SAVEPOINT, HA_ERR_NO_SUCH_TABLE, HA_ERR_NON_UNIQUE_BLOCK_SIZE, HA_ERR_NOT_A_TABLE, HA_ERR_OLD_FILE, HA_ERR_OUT_OF_MEM, HA_ERR_READ_ONLY_TRANSACTION, HA_ERR_RECORD_CHANGED, HA_ERR_RECORD_DELETED, HA_ERR_RECORD_FILE_FULL, HA_ERR_ROW_IS_REFERENCED, HA_ERR_TABLE_DEF_CHANGED, HA_ERR_TABLE_EXIST, HA_ERR_TABLE_NEEDS_UPGRADE, HA_ERR_TABLE_READONLY, HA_ERR_TO_BIG_ROW, HA_ERR_UNKNOWN_CHARSET, HA_ERR_UNSUPPORTED, HA_ERR_WRONG_COMMAND, HA_ERR_WRONG_IN_RECORD, HA_ERR_WRONG_INDEX, HA_ERR_WRONG_MRG_TABLE_DEF, HA_WRONG_CREATE_OPTION, my_error_register(), my_malloc(), MY_WME, MY_ZEROFILL, MYF, and SETMSG.
Referenced by ha_init().
00297 { 00298 #define SETMSG(nr, msg) errmsgs[(nr) - HA_ERR_FIRST]= (msg) 00299 const char **errmsgs; 00300 00301 /* Allocate a pointer array for the error message strings. */ 00302 /* Zerofill it to avoid uninitialized gaps. */ 00303 if (! (errmsgs= (const char**) my_malloc(HA_ERR_ERRORS * sizeof(char*), 00304 MYF(MY_WME | MY_ZEROFILL)))) 00305 return 1; 00306 00307 /* Set the dedicated error messages. */ 00308 SETMSG(HA_ERR_KEY_NOT_FOUND, ER(ER_KEY_NOT_FOUND)); 00309 SETMSG(HA_ERR_FOUND_DUPP_KEY, ER(ER_DUP_KEY)); 00310 SETMSG(HA_ERR_RECORD_CHANGED, "Update wich is recoverable"); 00311 SETMSG(HA_ERR_WRONG_INDEX, "Wrong index given to function"); 00312 SETMSG(HA_ERR_CRASHED, ER(ER_NOT_KEYFILE)); 00313 SETMSG(HA_ERR_WRONG_IN_RECORD, ER(ER_CRASHED_ON_USAGE)); 00314 SETMSG(HA_ERR_OUT_OF_MEM, "Table handler out of memory"); 00315 SETMSG(HA_ERR_NOT_A_TABLE, "Incorrect file format '%.64s'"); 00316 SETMSG(HA_ERR_WRONG_COMMAND, "Command not supported"); 00317 SETMSG(HA_ERR_OLD_FILE, ER(ER_OLD_KEYFILE)); 00318 SETMSG(HA_ERR_NO_ACTIVE_RECORD, "No record read in update"); 00319 SETMSG(HA_ERR_RECORD_DELETED, "Intern record deleted"); 00320 SETMSG(HA_ERR_RECORD_FILE_FULL, ER(ER_RECORD_FILE_FULL)); 00321 SETMSG(HA_ERR_INDEX_FILE_FULL, "No more room in index file '%.64s'"); 00322 SETMSG(HA_ERR_END_OF_FILE, "End in next/prev/first/last"); 00323 SETMSG(HA_ERR_UNSUPPORTED, ER(ER_ILLEGAL_HA)); 00324 SETMSG(HA_ERR_TO_BIG_ROW, "Too big row"); 00325 SETMSG(HA_WRONG_CREATE_OPTION, "Wrong create option"); 00326 SETMSG(HA_ERR_FOUND_DUPP_UNIQUE, ER(ER_DUP_UNIQUE)); 00327 SETMSG(HA_ERR_UNKNOWN_CHARSET, "Can't open charset"); 00328 SETMSG(HA_ERR_WRONG_MRG_TABLE_DEF, ER(ER_WRONG_MRG_TABLE)); 00329 SETMSG(HA_ERR_CRASHED_ON_REPAIR, ER(ER_CRASHED_ON_REPAIR)); 00330 SETMSG(HA_ERR_CRASHED_ON_USAGE, ER(ER_CRASHED_ON_USAGE)); 00331 SETMSG(HA_ERR_LOCK_WAIT_TIMEOUT, ER(ER_LOCK_WAIT_TIMEOUT)); 00332 SETMSG(HA_ERR_LOCK_TABLE_FULL, ER(ER_LOCK_TABLE_FULL)); 00333 SETMSG(HA_ERR_READ_ONLY_TRANSACTION, ER(ER_READ_ONLY_TRANSACTION)); 00334 SETMSG(HA_ERR_LOCK_DEADLOCK, ER(ER_LOCK_DEADLOCK)); 00335 SETMSG(HA_ERR_CANNOT_ADD_FOREIGN, ER(ER_CANNOT_ADD_FOREIGN)); 00336 SETMSG(HA_ERR_NO_REFERENCED_ROW, ER(ER_NO_REFERENCED_ROW_2)); 00337 SETMSG(HA_ERR_ROW_IS_REFERENCED, ER(ER_ROW_IS_REFERENCED_2)); 00338 SETMSG(HA_ERR_NO_SAVEPOINT, "No savepoint with that name"); 00339 SETMSG(HA_ERR_NON_UNIQUE_BLOCK_SIZE, "Non unique key block size"); 00340 SETMSG(HA_ERR_NO_SUCH_TABLE, "No such table: '%.64s'"); 00341 SETMSG(HA_ERR_TABLE_EXIST, ER(ER_TABLE_EXISTS_ERROR)); 00342 SETMSG(HA_ERR_NO_CONNECTION, "Could not connect to storage engine"); 00343 SETMSG(HA_ERR_TABLE_DEF_CHANGED, ER(ER_TABLE_DEF_CHANGED)); 00344 SETMSG(HA_ERR_FOREIGN_DUPLICATE_KEY, "FK constraint would lead to duplicate key"); 00345 SETMSG(HA_ERR_TABLE_NEEDS_UPGRADE, ER(ER_TABLE_NEEDS_UPGRADE)); 00346 SETMSG(HA_ERR_TABLE_READONLY, ER(ER_OPEN_AS_READONLY)); 00347 00348 /* Register the error messages for use with my_error(). */ 00349 return my_error_register(errmsgs, HA_ERR_FIRST, HA_ERR_LAST); 00350 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_init_key_cache | ( | const char * | name, | |
| KEY_CACHE * | key_cache | |||
| ) |
Definition at line 2624 of file handler.cc.
References DBUG_ENTER, DBUG_RETURN, init_key_cache(), st_key_cache::key_cache_inited, LOCK_global_system_variables, st_key_cache::param_age_threshold, st_key_cache::param_block_size, st_key_cache::param_buff_size, st_key_cache::param_division_limit, pthread_mutex_lock, and pthread_mutex_unlock.
Referenced by init_server_components(), and sys_var_key_buffer_size::update().
02625 { 02626 DBUG_ENTER("ha_init_key_cache"); 02627 02628 if (!key_cache->key_cache_inited) 02629 { 02630 pthread_mutex_lock(&LOCK_global_system_variables); 02631 long tmp_buff_size= (long) key_cache->param_buff_size; 02632 long tmp_block_size= (long) key_cache->param_block_size; 02633 uint division_limit= key_cache->param_division_limit; 02634 uint age_threshold= key_cache->param_age_threshold; 02635 pthread_mutex_unlock(&LOCK_global_system_variables); 02636 DBUG_RETURN(!init_key_cache(key_cache, 02637 tmp_block_size, 02638 tmp_buff_size, 02639 division_limit, age_threshold)); 02640 } 02641 DBUG_RETURN(0); 02642 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_initialize_handlerton | ( | st_plugin_int * | plugin | ) |
Definition at line 397 of file handler.cc.
References st_plugin_int::data, handlerton::db_type, DB_TYPE_DEFAULT, DB_TYPE_FIRST_DYNAMIC, DB_TYPE_UNKNOWN, DBUG_ENTER, DBUG_RETURN, hton2plugin, st_mysql_plugin::info, installed_htons, int(), st_mysql_plugin::name, st_plugin_int::plugin, handlerton::prepare, savepoint_alloc_size, handlerton::savepoint_offset, SHOW_OPTION_DISABLED, SHOW_OPTION_NO, SHOW_OPTION_YES, handlerton::slot, sql_print_warning(), handlerton::state, total_ha, and total_ha_2pc.
00398 { 00399 handlerton *hton= ((st_mysql_storage_engine *)plugin->plugin->info)->handlerton; 00400 DBUG_ENTER("ha_initialize_handlerton"); 00401 00402 plugin->data= hton; // shortcut for the future 00403 00404 /* 00405 the switch below and hton->state should be removed when 00406 command-line options for plugins will be implemented 00407 */ 00408 switch (hton->state) { 00409 case SHOW_OPTION_NO: 00410 break; 00411 case SHOW_OPTION_YES: 00412 { 00413 uint tmp; 00414 /* now check the db_type for conflict */ 00415 if (hton->db_type <= DB_TYPE_UNKNOWN || 00416 hton->db_type >= DB_TYPE_DEFAULT || 00417 installed_htons[hton->db_type]) 00418 { 00419 int idx= (int) DB_TYPE_FIRST_DYNAMIC; 00420 00421 while (idx < (int) DB_TYPE_DEFAULT && installed_htons[idx]) 00422 idx++; 00423 00424 if (idx == (int) DB_TYPE_DEFAULT) 00425 { 00426 sql_print_warning("Too many storage engines!"); 00427 DBUG_RETURN(1); 00428 } 00429 if (hton->db_type != DB_TYPE_UNKNOWN) 00430 sql_print_warning("Storage engine '%s' has conflicting typecode. " 00431 "Assigning value %d.", plugin->plugin->name, idx); 00432 hton->db_type= (enum legacy_db_type) idx; 00433 } 00434 installed_htons[hton->db_type]= hton; 00435 tmp= hton->savepoint_offset; 00436 hton->savepoint_offset= savepoint_alloc_size; 00437 savepoint_alloc_size+= tmp; 00438 hton->slot= total_ha++; 00439 hton2plugin[hton->slot]=plugin; 00440 if (hton->prepare) 00441 total_ha_2pc++; 00442 break; 00443 } 00444 /* fall through */ 00445 default: 00446 hton->state= SHOW_OPTION_DISABLED; 00447 break; 00448 } 00449 DBUG_RETURN(0); 00450 }
Here is the call graph for this function:

| TYPELIB* ha_known_exts | ( | void | ) |
Definition at line 3210 of file handler.cc.
References st_typelib::count, current_thd, DBUG_ASSERT, base_list::elements, exts_handlerton(), known_extensions, known_extensions_id, MY_FAE, my_once_alloc(), MY_WME, MYF, MYSQL_STORAGE_ENGINE_PLUGIN, mysys_usage_id, NULL, plugin_foreach(), List< T >::push_back(), triggers_file_ext, trigname_file_ext, and st_typelib::type_names.
Referenced by mysql_rm_known_files().
03211 { 03212 MEM_ROOT *mem_root= current_thd->mem_root; 03213 if (!known_extensions.type_names || mysys_usage_id != known_extensions_id) 03214 { 03215 List<char> found_exts; 03216 const char **ext, *old_ext; 03217 03218 known_extensions_id= mysys_usage_id; 03219 found_exts.push_back((char*) triggers_file_ext); 03220 found_exts.push_back((char*) trigname_file_ext); 03221 03222 plugin_foreach(NULL, exts_handlerton, 03223 MYSQL_STORAGE_ENGINE_PLUGIN, &found_exts); 03224 03225 ext= (const char **) my_once_alloc(sizeof(char *)* 03226 (found_exts.elements+1), 03227 MYF(MY_WME | MY_FAE)); 03228 03229 DBUG_ASSERT(ext != 0); 03230 known_extensions.count= found_exts.elements; 03231 known_extensions.type_names= ext; 03232 03233 List_iterator_fast<char> it(found_exts); 03234 while ((old_ext= it++)) 03235 *ext++= old_ext; 03236 *ext= 0; 03237 } 03238 return &known_extensions; 03239 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_panic | ( | enum ha_panic_function | flag | ) |
Definition at line 485 of file handler.cc.
References error, ha_finish_errors(), HA_PANIC_CLOSE, int(), MYSQL_STORAGE_ENGINE_PLUGIN, NULL, panic_handlerton(), and plugin_foreach().
Referenced by clean_up().
00486 { 00487 int error[2]; 00488 00489 error[0]= 0; error[1]= (int)flag; 00490 plugin_foreach(NULL, panic_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, error); 00491 00492 if (flag == HA_PANIC_CLOSE && ha_finish_errors()) 00493 error[0]= 1; 00494 return error[0]; 00495 } /* ha_panic */
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_prepare | ( | THD * | thd | ) |
Definition at line 584 of file handler.cc.
References DBUG_ENTER, DBUG_RETURN, ER, ER_ERROR_DURING_COMMIT, ER_ILLEGAL_HA, err, error, ha_rollback_trans(), ht, st_thd_trans::ht, hton2plugin, LOCK_status, my_error(), MYF, st_plugin_int::name, st_thd_trans::nht, push_warning_printf(), statistic_increment, LEX_STRING::str, and MYSQL_ERROR::WARN_LEVEL_WARN.
Referenced by mysql_execute_command().
00585 { 00586 int error=0, all=1; 00587 THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt; 00588 handlerton **ht=trans->ht; 00589 DBUG_ENTER("ha_prepare"); 00590 #ifdef USING_TRANSACTIONS 00591 if (trans->nht) 00592 { 00593 for (; *ht; ht++) 00594 { 00595 int err; 00596 statistic_increment(thd->status_var.ha_prepare_count,&LOCK_status); 00597 if ((*ht)->prepare) 00598 { 00599 if ((err= (*(*ht)->prepare)(thd, all))) 00600 { 00601 my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); 00602 ha_rollback_trans(thd, all); 00603 error=1; 00604 break; 00605 } 00606 } 00607 else 00608 { 00609 push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 00610 ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), 00611 hton2plugin[(*ht)->slot]->name.str); 00612 } 00613 } 00614 } 00615 #endif /* USING_TRANSACTIONS */ 00616 DBUG_RETURN(error); 00617 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_recover | ( | HASH * | commit_list | ) |
Definition at line 1025 of file handler.cc.
References xarecover_st::commit_list, DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, xarecover_st::dry_run, ER, ER_OUTOFMEMORY, FALSE, xarecover_st::found_foreign_xids, xarecover_st::found_my_xids, xarecover_st::len, xarecover_st::list, MAX_XID_LIST_SIZE, MIN_XID_LIST_SIZE, my_free, my_malloc(), MYF, MYSQL_STORAGE_ENGINE_PLUGIN, NULL, opt_bin_log, opt_tc_log_file, plugin_foreach(), sql_print_error(), sql_print_information(), sql_print_warning(), tc_heuristic_recover, TC_HEURISTIC_RECOVER_ROLLBACK, total_ha_2pc, and xarecover_handlerton().
Referenced by init_server_components(), and TC_LOG::using_heuristic_recover().
01026 { 01027 struct xarecover_st info; 01028 DBUG_ENTER("ha_recover"); 01029 info.found_foreign_xids= info.found_my_xids= 0; 01030 info.commit_list= commit_list; 01031 info.dry_run= (info.commit_list==0 && tc_heuristic_recover==0); 01032 info.list= NULL; 01033 01034 /* commit_list and tc_heuristic_recover cannot be set both */ 01035 DBUG_ASSERT(info.commit_list==0 || tc_heuristic_recover==0); 01036 /* if either is set, total_ha_2pc must be set too */ 01037 DBUG_ASSERT(info.dry_run || total_ha_2pc>(ulong)opt_bin_log); 01038 01039 if (total_ha_2pc <= (ulong)opt_bin_log) 01040 DBUG_RETURN(0); 01041 01042 if (info.commit_list) 01043 sql_print_information("Starting crash recovery..."); 01044 01045 #ifndef WILL_BE_DELETED_LATER 01046 /* 01047 for now, only InnoDB supports 2pc. It means we can always safely 01048 rollback all pending transactions, without risking inconsistent data 01049 */ 01050 DBUG_ASSERT(total_ha_2pc == (ulong) opt_bin_log+1); // only InnoDB and binlog 01051 tc_heuristic_recover= TC_HEURISTIC_RECOVER_ROLLBACK; // forcing ROLLBACK 01052 info.dry_run=FALSE; 01053 #endif 01054 01055 for (info.len= MAX_XID_LIST_SIZE ; 01056 info.list==0 && info.len > MIN_XID_LIST_SIZE; info.len/=2) 01057 { 01058 info.list=(XID *)my_malloc(info.len*sizeof(XID), MYF(0)); 01059 } 01060 if (!info.list) 01061 { 01062 sql_print_error(ER(ER_OUTOFMEMORY), info.len*sizeof(XID)); 01063 DBUG_RETURN(1); 01064 } 01065 01066 plugin_foreach(NULL, xarecover_handlerton, 01067 MYSQL_STORAGE_ENGINE_PLUGIN, &info); 01068 01069 my_free((gptr)info.list, MYF(0)); 01070 if (info.found_foreign_xids) 01071 sql_print_warning("Found %d prepared XA transactions", 01072 info.found_foreign_xids); 01073 if (info.dry_run && info.found_my_xids) 01074 { 01075 sql_print_error("Found %d prepared transactions! It means that mysqld was " 01076 "not shut down properly last time and critical recovery " 01077 "information (last binlog or %s file) was manually deleted " 01078 "after a crash. You have to start mysqld with " 01079 "--tc-heuristic-recover switch to commit or rollback " 01080 "pending transactions.", 01081 info.found_my_xids, opt_tc_log_file); 01082 DBUG_RETURN(1); 01083 } 01084 if (info.commit_list) 01085 sql_print_information("Crash recovery finished."); 01086 DBUG_RETURN(0); 01087 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_release_savepoint | ( | THD * | thd, | |
| SAVEPOINT * | sv | |||
| ) |
Definition at line 1256 of file handler.cc.
References DBUG_ENTER, ER_GET_ERRNO, err, error, ht, st_thd_trans::ht, my_error(), and MYF.
Referenced by mysql_execute_command().
01257 { 01258 int error=0; 01259 THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt : 01260 &thd->transaction.all); 01261 handlerton **ht=trans->ht, **end_ht; 01262 DBUG_ENTER("ha_release_savepoint"); 01263 01264 end_ht=ht+sv->nht; 01265 for (; ht < end_ht; ht++) 01266 { 01267 int err; 01268 if (!(*ht)->savepoint_release) 01269 continue; 01270 if ((err= (*(*ht)->savepoint_release)(thd, (byte *)(sv+1)+(*ht)->savepoint_offset))) 01271 { // cannot happen 01272 my_error(ER_GET_ERRNO, MYF(0), err); 01273 error=1; 01274 } 01275 } 01276 DBUG_RETURN(error); 01277 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_release_temporary_latches | ( | THD * | thd | ) |
Definition at line 1167 of file handler.cc.
References MYSQL_STORAGE_ENGINE_PLUGIN, NULL, plugin_foreach(), and release_temporary_latches().
Referenced by Sensitive_cursor::fetch().
01168 { 01169 plugin_foreach(thd, release_temporary_latches, MYSQL_STORAGE_ENGINE_PLUGIN, 01170 NULL); 01171 01172 return 0; 01173 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_resize_key_cache | ( | KEY_CACHE * | key_cache | ) |
Definition at line 2647 of file handler.cc.
References DBUG_ENTER, DBUG_RETURN, st_key_cache::key_cache_inited, LOCK_global_system_variables, st_key_cache::param_age_threshold, st_key_cache::param_block_size, st_key_cache::param_buff_size, st_key_cache::param_division_limit, pthread_mutex_lock, pthread_mutex_unlock, and resize_key_cache().
Referenced by reassign_keycache_tables(), sys_var_key_cache_long::update(), and sys_var_key_buffer_size::update().
02648 { 02649 DBUG_ENTER("ha_resize_key_cache"); 02650 02651 if (key_cache->key_cache_inited) 02652 { 02653 pthread_mutex_lock(&LOCK_global_system_variables); 02654 long tmp_buff_size= (long) key_cache->param_buff_size; 02655 long tmp_block_size= (long) key_cache->param_block_size; 02656 uint division_limit= key_cache->param_division_limit; 02657 uint age_threshold= key_cache->param_age_threshold; 02658 pthread_mutex_unlock(&LOCK_global_system_variables); 02659 DBUG_RETURN(!resize_key_cache(key_cache, tmp_block_size, 02660 tmp_buff_size, 02661 division_limit, age_threshold)); 02662 } 02663 DBUG_RETURN(0); 02664 }
Here is the call graph for this function:

Here is the caller graph for this function:

| handlerton* ha_resolve_by_legacy_type | ( | THD * | thd, | |
| enum legacy_db_type | db_type | |||
| ) |
Definition at line 189 of file handler.cc.
References DB_TYPE_DEFAULT, DB_TYPE_UNKNOWN, ha_default_handlerton(), installed_htons, and NULL.
Referenced by ha_checktype(), mysql_rm_table_part2(), mysql_truncate(), and rename_tables().
00190 { 00191 switch (db_type) { 00192 case DB_TYPE_DEFAULT: 00193 return ha_default_handlerton(thd); 00194 case DB_TYPE_UNKNOWN: 00195 return NULL; 00196 default: 00197 if (db_type > DB_TYPE_UNKNOWN && db_type < DB_TYPE_DEFAULT) 00198 return installed_htons[db_type]; 00199 return NULL; 00200 } 00201 }
Here is the call graph for this function:

Here is the caller graph for this function:

| handlerton* ha_resolve_by_name | ( | THD * | thd, | |
| const LEX_STRING * | name | |||
| ) |
Definition at line 128 of file handler.cc.
References charset_info_st::coll, st_plugin_int::data, handlerton::flags, ha_default_handlerton(), HTON_NOT_USER_SELECTABLE, LEX_STRING::length, my_charset_latin1, my_strnncoll, MYSQL_STORAGE_ENGINE_PLUGIN, name, plugin_lock(), plugin_unlock(), LEX_STRING::str, STRING_WITH_LEN, my_collation_handler_st::strnncoll, and sys_table_aliases.
Referenced by sys_var_thd_storage_engine::check(), execute_ddl_log_action(), init_server_components(), and open_binary_frm().
00129 { 00130 const LEX_STRING *table_alias; 00131 st_plugin_int *plugin; 00132 00133 redo: 00134 /* my_strnncoll is a macro and gcc doesn't do early expansion of macro */ 00135 if (thd && !my_charset_latin1.coll->strnncoll(&my_charset_latin1, 00136 (const uchar *)name->str, name->length, 00137 (const uchar *)STRING_WITH_LEN("DEFAULT"), 0)) 00138 return ha_default_handlerton(thd); 00139 00140 if ((plugin= plugin_lock(name, MYSQL_STORAGE_ENGINE_PLUGIN))) 00141 { 00142 handlerton *hton= (handlerton *)plugin->data; 00143 if (!(hton->flags & HTON_NOT_USER_SELECTABLE)) 00144 return hton; 00145 plugin_unlock(plugin); 00146 } 00147 00148 /* 00149 We check for the historical aliases. 00150 */ 00151 for (table_alias= sys_table_aliases; table_alias->str; table_alias+= 2) 00152 { 00153 if (!my_strnncoll(&my_charset_latin1, 00154 (const uchar *)name->str, name->length, 00155 (const uchar *)table_alias->str, table_alias->length)) 00156 { 00157 name= table_alias + 1; 00158 goto redo; 00159 } 00160 } 00161 00162 return NULL; 00163 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_rollback_to_savepoint | ( | THD * | thd, | |
| SAVEPOINT * | sv | |||
| ) |
Definition at line 1175 of file handler.cc.
References DBUG_ASSERT, DBUG_ENTER, ER_ERROR_DURING_ROLLBACK, err, error, ht, st_thd_trans::ht, LOCK_status, my_error(), MYF, st_thd_trans::nht, st_thd_trans::no_2pc, and statistic_increment.
Referenced by mysql_execute_command().
01176 { 01177 int error=0; 01178 THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt : 01179 &thd->transaction.all); 01180 handlerton **ht=trans->ht, **end_ht; 01181 DBUG_ENTER("ha_rollback_to_savepoint"); 01182 01183 trans->nht=sv->nht; 01184 trans->no_2pc=0; 01185 end_ht=ht+sv->nht; 01186 /* 01187 rolling back to savepoint in all storage engines that were part of the 01188 transaction when the savepoint was set 01189 */ 01190 for (; ht < end_ht; ht++) 01191 { 01192 int err; 01193 DBUG_ASSERT((*ht)->savepoint_set != 0); 01194 if ((err= (*(*ht)->savepoint_rollback)(thd, (byte *)(sv+1)+(*ht)->savepoint_offset))) 01195 { // cannot happen 01196 my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); 01197 error=1; 01198 } 01199 statistic_increment(thd->status_var.ha_savepoint_rollback_count, 01200 &LOCK_status); 01201 trans->no_2pc|=(*ht)->prepare == 0; 01202 } 01203 /* 01204 rolling back the transaction in all storage engines that were not part of 01205 the transaction when the savepoint was set 01206 */ 01207 for (; *ht ; ht++) 01208 { 01209 int err; 01210 if ((err= (*(*ht)->rollback)(thd, !thd->in_sub_stmt))) 01211 { // cannot happen 01212 my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); 01213 error=1; 01214 } 01215 statistic_increment(thd->status_var.ha_rollback_count,&LOCK_status); 01216 *ht=0; // keep it conveniently zero-filled 01217 } 01218 DBUG_RETURN(error); 01219 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_rollback_trans | ( | THD * | thd, | |
| bool | all | |||
| ) |
Definition at line 747 of file handler.cc.
References DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, ER, ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, ER_ERROR_DURING_ROLLBACK, ER_WARNING_NOT_COMPLETE_ROLLBACK, err, error, ht, st_thd_trans::ht, LOCK_status, my_error(), MYF, st_thd_trans::nht, st_thd_trans::no_2pc, OPTION_STATUS_NO_TRANS_UPDATE, push_warning(), statistic_increment, and MYSQL_ERROR::WARN_LEVEL_WARN.
Referenced by ha_commit_trans(), and ha_prepare().
00748 { 00749 int error=0; 00750 THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt; 00751 bool is_real_trans=all || thd->transaction.all.nht == 0; 00752 DBUG_ENTER("ha_rollback_trans"); 00753 if (thd->in_sub_stmt) 00754 { 00755 /* 00756 If we are inside stored function or trigger we should not commit or 00757 rollback current statement transaction. See comment in ha_commit_trans() 00758 call for more information. 00759 */ 00760 if (!all) 00761 DBUG_RETURN(0); 00762 DBUG_ASSERT(0); 00763 my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0)); 00764 DBUG_RETURN(1); 00765 } 00766 #ifdef USING_TRANSACTIONS 00767 if (trans->nht) 00768 { 00769 /* Close all cursors that can not survive ROLLBACK */ 00770 if (is_real_trans) /* not a statement commit */ 00771 thd->stmt_map.close_transient_cursors(); 00772 00773 for (handlerton **ht=trans->ht; *ht; ht++) 00774 { 00775 int err; 00776 if ((err= (*(*ht)->rollback)(thd, all))) 00777 { // cannot happen 00778 my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); 00779 error=1; 00780 } 00781 statistic_increment(thd->status_var.ha_rollback_count,&LOCK_status); 00782 *ht= 0; 00783 } 00784 trans->nht=0; 00785 trans->no_2pc=0; 00786 if (is_real_trans) 00787 thd->transaction.xid_state.xid.null(); 00788 if (all) 00789 { 00790 thd->variables.tx_isolation=thd->session_tx_isolation; 00791 thd->transaction.cleanup(); 00792 } 00793 } 00794 #endif /* USING_TRANSACTIONS */ 00795 /* 00796 If a non-transactional table was updated, warn; don't warn if this is a 00797 slave thread (because when a slave thread executes a ROLLBACK, it has 00798 been read from the binary log, so it's 100% sure and normal to produce 00799 error ER_WARNING_NOT_COMPLETE_ROLLBACK. If we sent the warning to the 00800 slave SQL thread, it would not stop the thread but just be printed in 00801 the error log; but we don't want users to wonder why they have this 00802 message in the error log, so we don't send it. 00803 */ 00804 if (is_real_trans && (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) && 00805 !thd->slave_thread) 00806 push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 00807 ER_WARNING_NOT_COMPLETE_ROLLBACK, 00808 ER(ER_WARNING_NOT_COMPLETE_ROLLBACK)); 00809 DBUG_RETURN(error); 00810 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_savepoint | ( | THD * | thd, | |
| SAVEPOINT * | sv | |||
| ) |
Definition at line 1227 of file handler.cc.
References DBUG_ENTER, ER_CHECK_NOT_IMPLEMENTED, ER_GET_ERRNO, err, error, ht, st_thd_trans::ht, my_error(), and MYF.
Referenced by mysql_execute_command().
01228 { 01229 int error=0; 01230 THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt : 01231 &thd->transaction.all); 01232 handlerton **ht=trans->ht; 01233 DBUG_ENTER("ha_savepoint"); 01234 #ifdef USING_TRANSACTIONS 01235 for (; *ht; ht++) 01236 { 01237 int err; 01238 if (! (*ht)->savepoint_set) 01239 { 01240 my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "SAVEPOINT"); 01241 error=1; 01242 break; 01243 } 01244 if ((err= (*(*ht)->savepoint_set)(thd, (byte *)(sv+1)+(*ht)->savepoint_offset))) 01245 { // cannot happen 01246 my_error(ER_GET_ERRNO, MYF(0), err); 01247 error=1; 01248 } 01249 statistic_increment(thd->status_var.ha_savepoint_count,&LOCK_status); 01250 } 01251 sv->nht=trans->nht; 01252 #endif /* USING_TRANSACTIONS */ 01253 DBUG_RETURN(error); 01254 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool ha_show_status | ( | THD * | thd, | |
| handlerton * | db_type, | |||
| enum ha_stat_type | stat | |||
| ) |
Definition at line 3268 of file handler.cc.
References FN_REFLEN, hton2plugin, MYSQL_STORAGE_ENGINE_PLUGIN, name, st_plugin_int::name, NULL, plugin_foreach(), List< T >::push_back(), Protocol::SEND_EOF, send_eof(), Protocol::send_fields(), Protocol::SEND_NUM_ROWS, SHOW_OPTION_YES, handlerton::show_status, showstat_handlerton(), handlerton::slot, stat_print(), handlerton::state, and TRUE.
Referenced by mysql_execute_command().
03269 { 03270 List<Item> field_list; 03271 Protocol *protocol= thd->protocol; 03272 bool result; 03273 03274 field_list.push_back(new Item_empty_string("Type",10)); 03275 field_list.push_back(new Item_empty_string("Name",FN_REFLEN)); 03276 field_list.push_back(new Item_empty_string("Status",10)); 03277 03278 if (protocol->send_fields(&field_list, 03279 Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) 03280 return TRUE; 03281 03282 if (db_type == NULL) 03283 { 03284 result= plugin_foreach(thd, showstat_handlerton, 03285 MYSQL_STORAGE_ENGINE_PLUGIN, &stat); 03286 } 03287 else 03288 { 03289 if (db_type->state != SHOW_OPTION_YES) 03290 { 03291 const LEX_STRING *name=&hton2plugin[db_type->slot]->name; 03292 result= stat_print(thd, name->str, name->length, 03293 "", 0, "DISABLED", 8) ? 1 : 0; 03294 } 03295 else 03296 result= db_type->show_status && 03297 db_type->show_status(thd, stat_print, stat) ? 1 : 0; 03298 } 03299 03300 if (!result) 03301 send_eof(thd); 03302 return result; 03303 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_start_consistent_snapshot | ( | THD * | thd | ) |
Definition at line 1293 of file handler.cc.
References ER_UNKNOWN_ERROR, MYSQL_STORAGE_ENGINE_PLUGIN, plugin_foreach(), push_warning(), snapshot_handlerton(), and MYSQL_ERROR::WARN_LEVEL_WARN.
Referenced by begin_trans().
01294 { 01295 bool warn= true; 01296 01297 plugin_foreach(thd, snapshot_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &warn); 01298 01299 /* 01300 Same idea as when one wants to CREATE TABLE in one engine which does not 01301 exist: 01302 */ 01303 if (warn) 01304 push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR, 01305 "This MySQL server does not support any " 01306 "consistent-read capable storage engine"); 01307 return 0; 01308 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int ha_table_exists_in_engine | ( | THD * | thd, | |
| const char * | db, | |||
| const char * | name | |||
| ) |
Definition at line 2758 of file handler.cc.
References DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, error, have_ndbcluster, ndbcluster_table_exists_in_engine(), and SHOW_OPTION_YES.
Referenced by mysql_create_table_internal().
02759 { 02760 int error= 0; 02761 DBUG_ENTER("ha_table_exists_in_engine"); 02762 DBUG_PRINT("enter", ("db: %s, name: %s", db, name)); 02763 #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE 02764 if (have_ndbcluster == SHOW_OPTION_YES) 02765 error= ndbcluster_table_exists_in_engine(thd, db, name); 02766 #endif 02767 DBUG_PRINT("exit", ("error: %d", error)); 02768 DBUG_RETURN(error); 02769 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool mysql_xa_recover | ( | THD * | thd | ) |
Definition at line 1097 of file handler.cc.
References DBUG_ENTER, DBUG_RETURN, FALSE, hash_element(), LOCK_xid_cache, my_charset_bin, Protocol::prepare_for_resend(), pthread_mutex_lock, pthread_mutex_unlock, List< T >::push_back(), send_eof(), Protocol::SEND_EOF, Protocol::send_fields(), Protocol::SEND_NUM_ROWS, Protocol::store(), Protocol::store_longlong(), Protocol::write(), xid_cache, and XIDDATASIZE.
Referenced by mysql_execute_command().
01098 { 01099 List<Item> field_list; 01100 Protocol *protocol= thd->protocol; 01101 int i=0; 01102 XID_STATE *xs; 01103 DBUG_ENTER("mysql_xa_recover"); 01104 01105 field_list.push_back(new Item_int("formatID",0,11)); 01106 field_list.push_back(new Item_int("gtrid_length",0,11)); 01107 field_list.push_back(new Item_int("bqual_length",0,11)); 01108 field_list.push_back(new Item_empty_string("data",XIDDATASIZE)); 01109 01110 if (protocol->send_fields(&field_list, 01111 Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) 01112 DBUG_RETURN(1); 01113 01114 pthread_mutex_lock(&LOCK_xid_cache); 01115 while ((xs= (XID_STATE*)hash_element(&xid_cache, i++))) 01116 { 01117 if (xs->xa_state==XA_PREPARED) 01118 { 01119 protocol->prepare_for_resend(); 01120 protocol->store_longlong((longlong)xs->xid.formatID, FALSE); 01121 protocol->store_longlong((longlong)xs->xid.gtrid_length, FALSE); 01122 protocol->store_longlong((longlong)xs->xid.bqual_length, FALSE); 01123 protocol->store(xs->xid.data, xs->xid.gtrid_length+xs->xid.bqual_length, 01124 &my_charset_bin); 01125 if (protocol->write()) 01126 { 01127 pthread_mutex_unlock(&LOCK_xid_cache); 01128 DBUG_RETURN(1); 01129 } 01130 } 01131 } 01132 01133 pthread_mutex_unlock(&LOCK_xid_cache); 01134 send_eof(thd); 01135 DBUG_RETURN(0); 01136 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static my_bool panic_handlerton | ( | THD * | unused1, | |
| st_plugin_int * | plugin, | |||
| void * | arg | |||
| ) | [static] |
Definition at line 476 of file handler.cc.
References st_plugin_int::data, FALSE, handlerton::panic, SHOW_OPTION_YES, and handlerton::state.
Referenced by ha_panic().
00477 { 00478 handlerton *hton= (handlerton *)plugin->data; 00479 if (hton->state == SHOW_OPTION_YES && hton->panic) 00480 ((int*)arg)[0]|= hton->panic((enum ha_panic_function)((int*)arg)[1]); 00481 return FALSE; 00482 }
Here is the caller graph for this function:

| ulonglong prev_insert_id | ( | ulonglong | nr, | |
| struct system_variables * | variables | |||
| ) | [inline] |
Definition at line 1598 of file handler.cc.
References system_variables::auto_increment_increment, system_variables::auto_increment_offset, DBUG_PRINT, and unlikely.
Referenced by copy_data_between_tables(), handler::update_auto_increment(), and write_record().
01599 { 01600 if (unlikely(nr < variables->auto_increment_offset)) 01601 { 01602 /* 01603 There's nothing good we can do here. That is a pathological case, where 01604 the offset is larger than the column's max possible value, i.e. not even 01605 the first sequence value may be inserted. User will receive warning. 01606 */ 01607 DBUG_PRINT("info",("auto_increment: nr: %lu cannot honour " 01608 "auto_increment_offset: %lu", 01609 nr, variables->auto_increment_offset)); 01610 return nr; 01611 } 01612 if (variables->auto_increment_increment == 1) 01613 return nr; // optimization of the formula below 01614 nr= (((nr - variables->auto_increment_offset)) / 01615 (ulonglong) variables->auto_increment_increment); 01616 return (nr * (ulonglong) variables->auto_increment_increment + 01617 variables->auto_increment_offset); 01618 }
Here is the caller graph for this function:

| static my_bool release_temporary_latches | ( | THD * | thd, | |
| st_plugin_int * | plugin, | |||
| void * | unused | |||
| ) | [static] |
Definition at line 1155 of file handler.cc.
References st_plugin_int::data, FALSE, handlerton::release_temporary_latches, SHOW_OPTION_YES, and handlerton::state.
Referenced by ha_release_temporary_latches().
01157 { 01158 handlerton *hton= (handlerton *)plugin->data; 01159 01160 if (hton->state == SHOW_OPTION_YES && hton->release_temporary_latches) 01161 hton->release_temporary_latches(thd); 01162 01163 return FALSE; 01164 }
Here is the caller graph for this function:

| static my_bool showstat_handlerton | ( | THD * | thd, | |
| st_plugin_int * | plugin, | |||
| void * | arg | |||
| ) | [static] |
Definition at line 3257 of file handler.cc.
References st_plugin_int::data, FALSE, SHOW_OPTION_YES, handlerton::show_status, stat_print(), handlerton::state, and TRUE.
Referenced by ha_show_status().
03259 { 03260 enum ha_stat_type stat= *(enum ha_stat_type *) arg; 03261 handlerton *hton= (handlerton *)plugin->data; 03262 if (hton->state == SHOW_OPTION_YES && hton->show_status && 03263 hton->show_status(thd, stat_print, stat)) 03264 return TRUE; 03265 return FALSE; 03266 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void signal_log_not_needed | ( | struct | handlerton, | |
| char * | log_file | |||
| ) |
Definition at line 3593 of file handler.cc.
References DBUG_ENTER, DBUG_PRINT, and DBUG_VOID_RETURN.
03594 { 03595 DBUG_ENTER("signal_log_not_needed"); 03596 DBUG_PRINT("enter", ("logfile '%s'", log_file)); 03597 DBUG_VOID_RETURN; 03598 }
| static my_bool snapshot_handlerton | ( | THD * | thd, | |
| st_plugin_int * | plugin, | |||
| void * | arg | |||
| ) | [static] |
Definition at line 1280 of file handler.cc.
References st_plugin_int::data, FALSE, SHOW_OPTION_YES, handlerton::start_consistent_snapshot, and handlerton::state.
Referenced by ha_start_consistent_snapshot().
01282 { 01283 handlerton *hton= (handlerton *)plugin->data; 01284 if (hton->state == SHOW_OPTION_YES && 01285 hton->start_consistent_snapshot) 01286 { 01287 hton->start_consistent_snapshot(thd); 01288 *((bool *)arg)= false; 01289 } 01290 return FALSE; 01291 }
Here is the caller graph for this function:

| static bool stat_print | ( | THD * | thd, | |
| const char * | type, | |||
| uint | type_len, | |||
| const char * | file, | |||
| uint | file_len, | |||
| const char * | status, | |||
| uint | status_len | |||
| ) | [static] |
Definition at line 3242 of file handler.cc.
References FALSE, Protocol::prepare_for_resend(), Protocol::store(), system_charset_info, TRUE, and Protocol::write().
Referenced by ha_show_status(), and showstat_handlerton().
03245 { 03246 Protocol *protocol= thd->protocol; 03247 protocol->prepare_for_resend(); 03248 protocol->store(type, type_len, system_charset_info); 03249 protocol->store(file, file_len, system_charset_info); 03250 protocol->store(status, status_len, system_charset_info); 03251 if (protocol->write()) 03252 return TRUE; 03253 return FALSE; 03254 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void trans_register_ha | ( | THD * | thd, | |
| bool | all, | |||
| handlerton * | ht_arg | |||
| ) |
Definition at line 552 of file handler.cc.
References DBUG_ASSERT, DBUG_ENTER, DBUG_PRINT, DBUG_VOID_RETURN, ht, st_thd_trans::ht, st_thd_trans::nht, st_thd_trans::no_2pc, handlerton::prepare, and SERVER_STATUS_IN_TRANS.
Referenced by MYSQL_BIN_LOG::write().
00553 { 00554 THD_TRANS *trans; 00555 handlerton **ht; 00556 DBUG_ENTER("trans_register_ha"); 00557 DBUG_PRINT("enter",("%s", all ? "all" : "stmt")); 00558 00559 if (all) 00560 { 00561 trans= &thd->transaction.all; 00562 thd->server_status|= SERVER_STATUS_IN_TRANS; 00563 } 00564 else 00565 trans= &thd->transaction.stmt; 00566 00567 for (ht=trans->ht; *ht; ht++) 00568 if (*ht == ht_arg) 00569 DBUG_VOID_RETURN; /* already registered, return */ 00570 00571 trans->ht[trans->nht++]=ht_arg; 00572 DBUG_ASSERT(*ht == ht_arg); 00573 trans->no_2pc|=(ht_arg->prepare==0); 00574 if (thd->transaction.xid_state.xid.is_null()) 00575 thd->transaction.xid_state.xid.set(thd->query_id); 00576 DBUG_VOID_RETURN; 00577 }
Here is the caller graph for this function:

Definition at line 2241 of file handler.cc.
References DBUG_ENTER, DBUG_RETURN, err, FN_REFLEN, hash_first(), hash_next(), int4store, key, key_length, LEX_STRING::length, LOCK_open, my_close(), my_open(), my_pwrite(), MY_WME, MYF, MYF_RW, st_table_share::mysql_version, MYSQL_VERSION_ID, st_table_share::normalized_path, NullS, O_BINARY, open_cache, path, pthread_mutex_lock, pthread_mutex_unlock, reg_ext, st_table::s, LEX_STRING::str, strxmov(), st_table_share::table_cache_key, version(), and VOID.
Referenced by handler::ha_check(), and handler::ha_repair().
02242 { 02243 char path[FN_REFLEN]; 02244 File file; 02245 int result= 1; 02246 DBUG_ENTER("update_frm_version"); 02247 02248 if (table->s->mysql_version != MYSQL_VERSION_ID) 02249 DBUG_RETURN(0); 02250 02251 strxmov(path, table->s->normalized_path.str, reg_ext, NullS); 02252 02253 if (needs_lock) 02254 pthread_mutex_lock(&LOCK_open); 02255 02256 if ((file= my_open(path, O_RDWR|O_BINARY, MYF(MY_WME))) >= 0) 02257 { 02258 uchar version[4]; 02259 char *key= table->s->table_cache_key.str; 02260 uint key_length= table->s->table_cache_key.length; 02261 TABLE *entry; 02262 HASH_SEARCH_STATE state; 02263 02264 int4store(version, MYSQL_VERSION_ID); 02265 02266 if ((result= my_pwrite(file,(byte*) version,4,51L,MYF_RW))) 02267 goto err; 02268 02269 for (entry=(TABLE*) hash_first(&open_cache,(byte*) key,key_length, &state); 02270 entry; 02271 entry= (TABLE*) hash_next(&open_cache,(byte*) key,key_length, &state)) 02272 entry->s->mysql_version= MYSQL_VERSION_ID; 02273 } 02274 err: 02275 if (file >= 0) 02276 VOID(my_close(file,MYF(MY_WME))); 02277 if (needs_lock) 02278 pthread_mutex_unlock(&LOCK_open); 02279 DBUG_RETURN(result); 02280 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static my_bool xacommit_handlerton | ( | THD * | unused1, | |
| st_plugin_int * | plugin, | |||
| void * | arg | |||
| ) | [static] |
Definition at line 847 of file handler.cc.
References handlerton::commit_by_xid, st_plugin_int::data, FALSE, handlerton::recover, SHOW_OPTION_YES, and handlerton::state.
Referenced by ha_commit_or_rollback_by_xid().
00849 { 00850 handlerton *hton= (handlerton *)plugin->data; 00851 if (hton->state == SHOW_OPTION_YES && hton->recover) 00852 { 00853 hton->commit_by_xid(((struct xahton_st *)arg)->xid); 00854 ((struct xahton_st *)arg)->result= 0; 00855 } 00856 return FALSE; 00857 }
Here is the caller graph for this function:

| static my_bool xarecover_handlerton | ( | THD * | unused, | |
| st_plugin_int * | plugin, | |||
| void * | arg | |||
| ) | [static] |
Definition at line 966 of file handler.cc.
References buf, handlerton::commit_by_xid, st_plugin_int::data, FALSE, hash_search(), hton2plugin, info, handlerton::recover, handlerton::rollback_by_xid, SHOW_OPTION_YES, handlerton::slot, sql_print_information(), handlerton::state, tc_heuristic_recover, TC_HEURISTIC_RECOVER_COMMIT, x, xid_cache_insert(), xid_to_str(), and XIDDATASIZE.
Referenced by ha_recover().
00968 { 00969 handlerton *hton= (handlerton *)plugin->data; 00970 struct xarecover_st *info= (struct xarecover_st *) arg; 00971 int got; 00972 00973 if (hton->state == SHOW_OPTION_YES && hton->recover) 00974 { 00975 while ((got= hton->recover(info->list, info->len)) > 0 ) 00976 { 00977 sql_print_information("Found %d prepared transaction(s) in %s", 00978 got, hton2plugin[hton->slot]->name.str); 00979 for (int i=0; i < got; i ++) 00980 { 00981 my_xid x=info->list[i].get_my_xid(); 00982 if (!x) // not "mine" - that is generated by external TM 00983 { 00984 #ifndef DBUG_OFF 00985 char buf[XIDDATASIZE*4+6]; // see xid_to_str 00986 sql_print_information("ignore xid %s", xid_to_str(buf, info->list+i)); 00987 #endif 00988 xid_cache_insert(info->list+i, XA_PREPARED); 00989 info->found_foreign_xids++; 00990 continue; 00991 } 00992 if (info->dry_run) 00993 { 00994 info->found_my_xids++; 00995 continue; 00996 } 00997 // recovery mode 00998 if (info->commit_list ? 00999 hash_search(info->commit_list, (byte *)&x, sizeof(x)) != 0 : 01000 tc_heuristic_recover == TC_HEURISTIC_RECOVER_COMMIT) 01001 { 01002 #ifndef DBUG_OFF 01003 char buf[XIDDATASIZE*4+6]; // see xid_to_str 01004 sql_print_information("commit xid %s", xid_to_str(buf, info->list+i)); 01005 #endif 01006 hton->commit_by_xid(info->list+i); 01007 } 01008 else 01009 { 01010 #ifndef DBUG_OFF 01011 char buf[XIDDATASIZE*4+6]; // see xid_to_str 01012 sql_print_information("rollback xid %s", 01013 xid_to_str(buf, info->list+i)); 01014 #endif 01015 hton->rollback_by_xid(info->list+i); 01016 } 01017 } 01018 if (got < info->len) 01019 break; 01020 } 01021 } 01022 return FALSE; 01023 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static my_bool xarollback_handlerton | ( | THD * | unused1, | |
| st_plugin_int * | plugin, | |||
| void * | arg | |||
| ) | [static] |
Definition at line 859 of file handler.cc.
References st_plugin_int::data, FALSE, handlerton::recover, handlerton::rollback_by_xid, SHOW_OPTION_YES, handlerton::state, and xahton_st::xid.
Referenced by ha_commit_or_rollback_by_xid().
00861 { 00862 handlerton *hton= (handlerton *)plugin->data; 00863 if (hton->state == SHOW_OPTION_YES && hton->recover) 00864 { 00865 hton->rollback_by_xid(((struct xahton_st *)arg)->xid); 00866 ((struct xahton_st *)arg)->result= 0; 00867 } 00868 return FALSE; 00869 }
Here is the caller graph for this function:

| static char* xid_to_str | ( | char * | buf, | |
| XID * | xid | |||
| ) | [static] |
Definition at line 887 of file handler.cc.
References xid_t::bqual_length, xid_t::data, FALSE, xid_t::gtrid_length, xahton_st::xid, and XIDDATASIZE.
Referenced by xarecover_handlerton().
00888 { 00889 int i; 00890 char *s=buf; 00891 *s++='\''; 00892 for (i=0; i < xid->gtrid_length+xid->bqual_length; i++) 00893 { 00894 uchar c=(uchar)xid->data[i]; 00895 /* is_next_dig is set if next character is a number */ 00896 bool is_next_dig= FALSE; 00897 if (i < XIDDATASIZE) 00898 { 00899 char ch= xid->data[i+1]; 00900 is_next_dig= (ch >= '0' && ch <='9'); 00901 } 00902 if (i == xid->gtrid_length) 00903 { 00904 *s++='\''; 00905 if (xid->bqual_length) 00906 { 00907 *s++='.'; 00908 *s++='\''; 00909 } 00910 } 00911 if (c < 32 || c > 126) 00912 { 00913 *s++='\\'; 00914 /* 00915 If next character is a number, write current character with 00916 3 octal numbers to ensure that the next number is not seen 00917 as part of the octal number 00918 */ 00919 if (c > 077 || is_next_dig) 00920 *s++=_dig_vec_lower[c >> 6]; 00921 if (c > 007 || is_next_dig) 00922 *s++=_dig_vec_lower[(c >> 3) & 7]; 00923 *s++=_dig_vec_lower[c & 7]; 00924 } 00925 else 00926 { 00927 if (c == '\'' || c == '\\') 00928 *s++='\\'; 00929 *s++=c; 00930 } 00931 } 00932 *s++='\''; 00933 *s=0; 00934 return buf; 00935 }
Here is the caller graph for this function:

| KEY_CREATE_INFO default_key_create_info = { HA_KEY_ALG_UNDEF, 0, {NullS,0} } |
| const char* ha_row_type[] |
Initial value:
{
"", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", "?","?","?"
}
Definition at line 82 of file handler.cc.
Referenced by get_schema_tables_record(), and store_create_info().
SHOW_COMP_OPTION have_yes = SHOW_OPTION_YES [static] |
Definition at line 64 of file handler.cc.
| st_plugin_int* hton2plugin[MAX_HA] |
Definition at line 52 of file handler.cc.
Referenced by check_engine(), ha_get_storage_engine(), ha_initialize_handlerton(), ha_prepare(), ha_resolve_storage_engine_name(), ha_show_status(), mysql_alter_tablespace(), sys_var_thd_storage_engine::value_ptr(), and xarecover_handlerton().
handlerton* installed_htons[128] [static] |
Definition at line 54 of file handler.cc.
Referenced by ha_finalize_handlerton(), ha_get_storage_engine(), ha_initialize_handlerton(), and ha_resolve_by_legacy_type().
TYPELIB known_extensions = {0,"known_exts", NULL, NULL} [static] |
Definition at line 71 of file handler.cc.
Referenced by ha_init(), ha_initialize_handlerton(), and mysql_execute_command().
const LEX_STRING sys_table_aliases[] [static] |
Initial value:
{
{ C_STRING_WITH_LEN("INNOBASE") }, { C_STRING_WITH_LEN("INNODB") },
{ C_STRING_WITH_LEN("NDB") }, { C_STRING_WITH_LEN("NDBCLUSTER") },
{ C_STRING_WITH_LEN("HEAP") }, { C_STRING_WITH_LEN("MEMORY") },
{ C_STRING_WITH_LEN("MERGE") }, { C_STRING_WITH_LEN("MRG_MYISAM") },
{NullS, 0}
}
Definition at line 73 of file handler.cc.
Referenced by ha_resolve_by_name().
| ulong total_ha_2pc = 0 |
Definition at line 69 of file handler.cc.
Referenced by ha_initialize_handlerton(), ha_recover(), and init_server_components().
| const char* tx_isolation_names[] |
Initial value:
{ "READ-UNCOMMITTED", "READ-COMMITTED", "REPEATABLE-READ", "SERIALIZABLE",
NullS}
Definition at line 86 of file handler.cc.
1.4.7

