1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-9118 ANALYZE TABLE for Engine independent status fetchs blob/text columns without use

Do not include BLOB fields by default.
This commit is contained in:
Oleksandr Byelkin
2015-12-16 19:33:41 +01:00
parent 45920d3d4a
commit 825f51d1aa
11 changed files with 123 additions and 18 deletions

View File

@ -692,10 +692,20 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
if (!lex->column_list)
{
uint fields= 0;
for ( ; *field_ptr; field_ptr++, fields++) ;
bitmap_set_prefix(tab->read_set, fields);
{
bitmap_clear_all(tab->read_set);
for (uint fields= 0; *field_ptr; field_ptr++, fields++)
{
enum enum_field_types type= (*field_ptr)->type();
if (type < MYSQL_TYPE_MEDIUM_BLOB ||
type > MYSQL_TYPE_BLOB)
bitmap_set_bit(tab->read_set, fields);
else
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_NO_EIS_FOR_FIELD,
ER_THD(thd, ER_NO_EIS_FOR_FIELD),
(*field_ptr)->field_name);
}
}
else
{
@ -713,8 +723,17 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
compl_result_code= result_code= HA_ADMIN_INVALID;
break;
}
bitmap_set_bit(tab->read_set, pos-1);
}
pos--;
enum enum_field_types type= tab->field[pos]->type();
if (type < MYSQL_TYPE_MEDIUM_BLOB ||
type > MYSQL_TYPE_BLOB)
bitmap_set_bit(tab->read_set, pos);
else
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_NO_EIS_FOR_FIELD,
ER_THD(thd, ER_NO_EIS_FOR_FIELD),
column_name->str);
}
tab->file->column_bitmaps_signal();
}