1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#49501 Inefficient information_schema check (system collation)

added check_length optimization for I_S_NAME comparison
This commit is contained in:
Sergey Glukhov
2010-01-19 13:03:40 +04:00
parent 22cff39274
commit baacdf1dae
9 changed files with 49 additions and 41 deletions

View File

@ -212,10 +212,7 @@ TABLE_CATEGORY get_table_category(const LEX_STRING *db, const LEX_STRING *name)
DBUG_ASSERT(db != NULL);
DBUG_ASSERT(name != NULL);
if ((db->length == INFORMATION_SCHEMA_NAME.length) &&
(my_strcasecmp(system_charset_info,
INFORMATION_SCHEMA_NAME.str,
db->str) == 0))
if (is_schema_db(db->str, db->length))
{
return TABLE_CATEGORY_INFORMATION;
}