43818 - Patch for mysql-5.1-innodb
Avoid handler::info() call for three Information Schema tables; TABLE_CONSTRAINTS, KEY_COLUMN_USAGE, & REFERENTIAL_CONTRAINTS
This commit is contained in:
parent
ac326735a7
commit
66d50854af
@ -4647,9 +4647,10 @@ static int get_schema_constraints_record(THD *thd, TABLE_LIST *tables,
|
|||||||
TABLE *show_table= tables->table;
|
TABLE *show_table= tables->table;
|
||||||
KEY *key_info=show_table->key_info;
|
KEY *key_info=show_table->key_info;
|
||||||
uint primary_key= show_table->s->primary_key;
|
uint primary_key= show_table->s->primary_key;
|
||||||
show_table->file->info(HA_STATUS_VARIABLE |
|
|
||||||
HA_STATUS_NO_LOCK |
|
// This is not needed since no statistics are displayed.
|
||||||
HA_STATUS_TIME);
|
// show_table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_TIME);
|
||||||
|
|
||||||
for (uint i=0 ; i < show_table->s->keys ; i++, key_info++)
|
for (uint i=0 ; i < show_table->s->keys ; i++, key_info++)
|
||||||
{
|
{
|
||||||
if (i != primary_key && !(key_info->flags & HA_NOSAME))
|
if (i != primary_key && !(key_info->flags & HA_NOSAME))
|
||||||
@ -4831,9 +4832,10 @@ static int get_schema_key_column_usage_record(THD *thd,
|
|||||||
TABLE *show_table= tables->table;
|
TABLE *show_table= tables->table;
|
||||||
KEY *key_info=show_table->key_info;
|
KEY *key_info=show_table->key_info;
|
||||||
uint primary_key= show_table->s->primary_key;
|
uint primary_key= show_table->s->primary_key;
|
||||||
show_table->file->info(HA_STATUS_VARIABLE |
|
|
||||||
HA_STATUS_NO_LOCK |
|
// This is not needed since no statistics are displayed.
|
||||||
HA_STATUS_TIME);
|
// show_table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_TIME);
|
||||||
|
|
||||||
for (uint i=0 ; i < show_table->s->keys ; i++, key_info++)
|
for (uint i=0 ; i < show_table->s->keys ; i++, key_info++)
|
||||||
{
|
{
|
||||||
if (i != primary_key && !(key_info->flags & HA_NOSAME))
|
if (i != primary_key && !(key_info->flags & HA_NOSAME))
|
||||||
@ -5562,9 +5564,9 @@ get_referential_constraints_record(THD *thd, TABLE_LIST *tables,
|
|||||||
{
|
{
|
||||||
List<FOREIGN_KEY_INFO> f_key_list;
|
List<FOREIGN_KEY_INFO> f_key_list;
|
||||||
TABLE *show_table= tables->table;
|
TABLE *show_table= tables->table;
|
||||||
show_table->file->info(HA_STATUS_VARIABLE |
|
|
||||||
HA_STATUS_NO_LOCK |
|
// This is not needed since no statistics are displayed.
|
||||||
HA_STATUS_TIME);
|
// show_table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK | HA_STATUS_TIME);
|
||||||
|
|
||||||
show_table->file->get_foreign_key_list(thd, &f_key_list);
|
show_table->file->get_foreign_key_list(thd, &f_key_list);
|
||||||
FOREIGN_KEY_INFO *f_key_info;
|
FOREIGN_KEY_INFO *f_key_info;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user