MCPcopy Create free account
hub / github.com/MariaDB/server / create_handler

Function create_handler

sql/ddl_log.cc:1057–1078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055*/
1056
1057static handler *create_handler(THD *thd, MEM_ROOT *mem_root,
1058 LEX_CSTRING *name)
1059{
1060 handlerton *hton;
1061 handler *file;
1062 plugin_ref plugin= my_plugin_lock_by_name(thd, name,
1063 MYSQL_STORAGE_ENGINE_PLUGIN);
1064 if (!plugin)
1065 {
1066 my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(ME_ERROR_LOG), name->str);
1067 return 0;
1068 }
1069 hton= plugin_hton(plugin);
1070 if (!ha_storage_engine_is_enabled(hton))
1071 {
1072 my_error(ER_STORAGE_ENGINE_DISABLED, MYF(ME_ERROR_LOG), name->str);
1073 return 0;
1074 }
1075 if ((file= hton->create(hton, (TABLE_SHARE*) 0, mem_root)))
1076 file->init();
1077 return file;
1078}
1079
1080
1081/*

Callers 1

ddl_log_execute_actionFunction · 0.70

Calls 5

my_errorFunction · 0.85
plugin_htonFunction · 0.85
createMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected