4488
4488
ST_SCHEMA_TABLE *schema_table;
4490
if ((schema_table= new ST_SCHEMA_TABLE) == NULL)
4492
memset(schema_table, 0, sizeof(ST_SCHEMA_TABLE));
4494
/* Historical Requirement */
4495
plugin->data= schema_table; // shortcut for the future
4496
4490
if (plugin->plugin->init)
4498
schema_table->create_table= create_schema_table;
4499
schema_table->old_format= make_old_format;
4500
schema_table->idx_field1= -1,
4501
schema_table->idx_field2= -1;
4503
/* Make the name available to the init() function. */
4504
schema_table->table_name= plugin->name.str;
4506
if (plugin->plugin->init(schema_table))
4492
if (plugin->plugin->init(&schema_table))
4508
4494
errmsg_printf(ERRMSG_LVL_ERROR,
4509
4495
_("Plugin '%s' init function returned error."),
4510
4496
plugin->name.str);
4514
/* Make sure the plugin name is not set inside the init() function. */
4500
if (schema_table->create_table == NULL)
4501
schema_table->create_table= create_schema_table;
4502
if (schema_table->old_format == NULL)
4503
schema_table->old_format= make_old_format;
4504
if (schema_table->idx_field1 == 0)
4505
schema_table->idx_field1= -1;
4506
if (schema_table->idx_field2)
4507
schema_table->idx_field2= -1;
4509
/*- Make sure the plugin name is not set inside the init() function. */
4515
4510
schema_table->table_name= plugin->name.str;
4513
plugin->data= schema_table;
4520
delete schema_table;
4525
4518
int finalize_schema_table(st_plugin_int *plugin)