diff options
author | Monty <monty@mariadb.org> | 2016-02-06 18:14:54 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-02-06 18:14:54 +0200 |
commit | b2f8d7b41001a5da11b2d99a055a207c3911a213 (patch) | |
tree | d108ed6d1f38543305235fec6a63228a5a2f08d5 /sql/sql_admin.cc | |
parent | d4b3a199acb0ddcdedff441ae664b0a2cf2fe8d2 (diff) | |
parent | 07b8aefe90ca830d2de068f2966cd2288b158a88 (diff) | |
download | mariadb-git-b2f8d7b41001a5da11b2d99a055a207c3911a213.tar.gz |
Merge branch '10.1' into 10.2
Conflicts:
VERSION
cmake/plugin.cmake
config.h.cmake
configure.cmake
plugin/server_audit/server_audit.c
sql/sql_yacc.yy
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r-- | sql/sql_admin.cc | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 0787aa9e92f..d8ca8633baa 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -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(); } |