25 int myrg_extra(
MYRG_INFO *info,
enum ha_extra_function
function,
28 int error,save_error=0;
30 DBUG_ENTER(
"myrg_extra");
31 DBUG_PRINT(
"info",(
"function: %lu", (ulong)
function));
33 if (!info->children_attached)
35 if (
function == HA_EXTRA_CACHE)
38 info->cache_size= (extra_arg ? *(ulong*) extra_arg :
39 my_default_record_cache_size);
43 if (
function == HA_EXTRA_NO_CACHE ||
44 function == HA_EXTRA_PREPARE_FOR_UPDATE)
46 if (
function == HA_EXTRA_RESET_STATE)
48 info->current_table=0;
49 info->last_used_table=info->open_tables;
51 for (file=info->open_tables ; file != info->end_table ; file++)
53 if ((error=mi_extra(file->table,
function, extra_arg)))
57 DBUG_RETURN(save_error);
61 void myrg_extrafunc(
MYRG_INFO *info, invalidator_by_filename inv)
64 DBUG_ENTER(
"myrg_extrafunc");
66 for (file=info->open_tables ; file != info->end_table ; file++)
67 file->table->s->invalidator = inv;
77 DBUG_ENTER(
"myrg_reset");
80 info->current_table=0;
81 info->last_used_table= info->open_tables;
87 if (!info->children_attached)
90 for (file=info->open_tables ; file != info->end_table ; file++)
93 if ((error= mi_reset(file->table)))
96 DBUG_RETURN(save_error);