MySQL:如何编写Information Schema Plugin(13)
table->field[COLUMN_RESULT_BLOCKS_SIZE_USED]->store(result_blocks_size_used , 0 );
/* 将记录存储到表中*/
status = schema_table_store_record(thd, table);
if (status) {
status= 1;
goto cleanup;
}
}
status = 0;
cleanup:
query_cache.unlock();
return status;
}
static intmysql_is_cached_queries_plugin_init(void *p)
{
ST_SCHEMA_TABLE *schema= (ST_SCHEMA_TABLE *)p;
schema->fields_info= mysql_is_cached_queries_fields;
schema->fill_table= mysql_is_cached_queries_fill_table;
return 0;
}
static int mysql_is_cached_queries_plugin_deinit(void*p)
{
return0;
}
struct st_mysql_information_schemamysql_is_cached_queries_plugin=
{MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION };
/*
Plugin library descriptor
*/
mysql_declare_plugin(mysql_is_cached_queries)
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
&mysql_is_cached_queries_plugin,
"MYSQL_CACHED_QUERIES",
"Roland Bouman",
"Lists all queries in the query cache.",
PLUGIN_LICENSE_GPL,
相关新闻>>
- 发表评论
-
- 最新评论 更多>>