summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2010-01-19 13:03:40 +0400
committerSergey Glukhov <Sergey.Glukhov@sun.com>2010-01-19 13:03:40 +0400
commit81391bd00c5b3e577fc88e142406eb288a26a0ff (patch)
tree4e5206090a5587437984eb53af8aaa3622c76dd1 /sql/table.cc
parentd1d16f9c3f4310f3ab11fc85b47866d79243a471 (diff)
downloadmariadb-git-81391bd00c5b3e577fc88e142406eb288a26a0ff.tar.gz
Bug#49501 Inefficient information_schema check (system collation)
added check_length optimization for I_S_NAME comparison sql/event_data_objects.cc: added check_length optimization for I_S_NAME comparison sql/events.cc: added check_length optimization for I_S_NAME comparison sql/mysql_priv.h: added check_length optimization for I_S_NAME comparison sql/repl_failsafe.cc: added check_length optimization for I_S_NAME comparison sql/sql_db.cc: added check_length optimization for I_S_NAME comparison sql/sql_parse.cc: added check_length optimization for I_S_NAME comparison sql/sql_show.cc: added check_length optimization for I_S_NAME comparison sql/sql_view.cc: added check_length optimization for I_S_NAME comparison sql/table.cc: added check_length optimization for I_S_NAME comparison
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc5
1 files changed, 1 insertions, 4 deletions
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;
}