From baacdf1dae688fc148967acf20bf1ef79b3f7c01 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Tue, 19 Jan 2010 13:03:40 +0400 Subject: Bug#49501 Inefficient information_schema check (system collation) added check_length optimization for I_S_NAME comparison --- sql/table.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sql/table.cc') diff --git a/sql/table.cc b/sql/table.cc index 752b6ba0bd4..c06ecf99926 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -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; } -- cgit v1.2.1