63
63
TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"",
64
64
tx_isolation_names, NULL};
66
static TYPELIB known_extensions= {0,"known_exts", NULL, NULL};
67
uint32_t known_extensions_id= 0;
71
68
Register handler error messages for use with my_error().
3456
Returns a list of all known extensions.
3458
No mutexes, worst case race is a minor surplus memory allocation
3459
We have to recreate the extension map if mysqld is restarted (for example
3463
pointer pointer to TYPELIB structure
3465
static bool exts_handlerton(Session *,
3466
st_plugin_int *plugin,
3469
List<char> *found_exts= (List<char> *) arg;
3470
StorageEngine *engine= plugin_data(plugin, StorageEngine *);
3472
if (engine->is_enabled() &&
3473
(file= engine->create((TABLE_SHARE*) 0, current_session->mem_root)))
3475
List_iterator_fast<char> it(*found_exts);
3476
const char **ext, *old_ext;
3478
for (ext= file->bas_ext(); *ext; ext++)
3480
while ((old_ext= it++))
3482
if (!strcmp(old_ext, *ext))
3486
found_exts->push_back((char *) *ext);
3495
TYPELIB *ha_known_exts(void)
3497
if (!known_extensions.type_names || mysys_usage_id != known_extensions_id)
3499
List<char> found_exts;
3500
const char **ext, *old_ext;
3502
known_extensions_id= mysys_usage_id;
3504
plugin_foreach(NULL, exts_handlerton,
3505
DRIZZLE_STORAGE_ENGINE_PLUGIN, &found_exts);
3507
ext= (const char **) malloc(sizeof(char *)*
3508
(found_exts.elements+1));
3512
known_extensions.count= found_exts.elements;
3513
known_extensions.type_names= ext;
3515
List_iterator_fast<char> it(found_exts);
3516
while ((old_ext= it++))
3520
return &known_extensions;
3524
3452
static bool stat_print(Session *session, const char *type, uint32_t type_len,
3525
3453
const char *file, uint32_t file_len,
3526
3454
const char *status, uint32_t status_len)