From 81391bd00c5b3e577fc88e142406eb288a26a0ff 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/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 --- sql/mysql_priv.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sql/mysql_priv.h') diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index c04b1f5ae38..2be3b8f1f20 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1415,8 +1415,12 @@ bool get_schema_tables_result(JOIN *join, enum enum_schema_table_state executed_place); enum enum_schema_tables get_schema_table_idx(ST_SCHEMA_TABLE *schema_table); -#define is_schema_db(X) \ - !my_strcasecmp(system_charset_info, INFORMATION_SCHEMA_NAME.str, (X)) +inline bool is_schema_db(const char *name, size_t len) +{ + return (INFORMATION_SCHEMA_NAME.length == len && + !my_strcasecmp(system_charset_info, + INFORMATION_SCHEMA_NAME.str, name)); +} /* sql_prepare.cc */ -- cgit v1.2.1 From 132b46e96eb48b8d9d993583ed7b9ecd87e53674 Mon Sep 17 00:00:00 2001 From: Magne Mahre Date: Thu, 21 Jan 2010 09:10:05 +0100 Subject: WL#5154 Remove deprecated 4.1 features Several items said to be deprecated in the 4.1 manual have never been removed. This worklog adds deprecation warnings when these items are used, and warns the user that the items will be removed in MySQL 5.6. A couple of previously deprecation decision have been reversed (see single file comments) client/client_priv.h: Macro similar to the one in the server (mysql_priv.h) for printing a deprecation warning message client/mysql.cc: no-auto-rehash will not be deprecated skip-line-numbers will not be deprecated skip-column-names will not be deprecated no-pager is deprecated set-variable is deprecated no-named-commands is deprecated client/mysqladmin.cc: set-variable is deprecated client/mysqlbinlog.cc: position is deprecated client/mysqldump.c: first-slave is deprecated no-set-names is deprecated set-variable is deprecated mysql-test/r/mysqlbinlog.result: Adding the [Warning] to the test case, just to show that the deprecation works. The test case will be changed in Celosia to use --start-position. mysys/my_getopt.c: set-variable (include -O) is deprecated scripts/mysqld_multi.sh: Warning for mysqld_multi sql/mysqld.cc: default-collation is deprecated log-bin-trust-routine-creators is deprecated set-variable is deprecated default-character-set is deprecated safe-show-database is deprecated sql/share/errmsg.txt: Added version number for sql_log_update deprecation message. --- sql/mysql_priv.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sql/mysql_priv.h') diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 2be3b8f1f20..76edbf1dea3 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -111,6 +111,10 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); #define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1)) #define all_bits_set(A,B) ((A) & (B) != (B)) +/* Version numbers for deprecation messages */ +#define VER_BETONY "5.5" +#define VER_CELOSIA "5.6" + #define WARN_DEPRECATED(Thd,Ver,Old,New) \ do { \ DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0); \ -- cgit v1.2.1 From 4a10f7b46c9ebbd9af89f37f64df40981459b788 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Fri, 22 Jan 2010 14:58:21 +0400 Subject: Bug#49501 Inefficient information_schema check (system collation), addon removed wrongly introduced strlen calls sql/events.cc: removed wrongly introduced strlen calls sql/mysql_priv.h: removed wrongly introduced strlen calls sql/repl_failsafe.cc: removed wrongly introduced strlen calls sql/sql_db.cc: removed wrongly introduced strlen calls sql/sql_parse.cc: removed wrongly introduced strlen calls sql/sql_show.cc: removed wrongly introduced strlen calls --- sql/mysql_priv.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sql/mysql_priv.h') diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 76edbf1dea3..abc50cd8063 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1426,6 +1426,12 @@ inline bool is_schema_db(const char *name, size_t len) INFORMATION_SCHEMA_NAME.str, name)); } +inline bool is_schema_db(const char *name) +{ + return !my_strcasecmp(system_charset_info, + INFORMATION_SCHEMA_NAME.str, name); +} + /* sql_prepare.cc */ void mysqld_stmt_prepare(THD *thd, const char *packet, uint packet_length); -- cgit v1.2.1