diff --git a/dict/dict0dict.c b/dict/dict0dict.c index 7f393ba1433..2c3f61f24be 100644 --- a/dict/dict0dict.c +++ b/dict/dict0dict.c @@ -82,19 +82,6 @@ innobase_convert_from_id( ulint len); /* in: length of 'to', in bytes; should be at least 3 * strlen(to) + 1 */ /********************************************************************** -Compares NUL-terminated UTF-8 strings case insensitively. - -NOTE: the prototype of this function is copied from ha_innodb.cc! If you change -this function, you MUST change also the prototype here! */ -UNIV_INTERN -int -innobase_strcasecmp( -/*================*/ - /* out: 0 if a=b, <0 if a1 if a>b */ - const char* a, /* in: first string to compare */ - const char* b); /* in: second string to compare */ - -/********************************************************************** Makes all characters in a NUL-terminated UTF-8 string lower case. NOTE: the prototype of this function is copied from ha_innodb.cc! If you change diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index a07a8f60763..a7a6078cf0b 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -813,10 +813,7 @@ innobase_convert_from_id( } /********************************************************************** -Compares NUL-terminated UTF-8 strings case insensitively. - -NOTE that the exact prototype of this function has to be in -/innobase/dict/dict0dict.c! */ +Compares NUL-terminated UTF-8 strings case insensitively. */ extern "C" UNIV_INTERN int innobase_strcasecmp( diff --git a/handler/i_s.cc b/handler/i_s.cc index a83d68d0e93..b924875f649 100644 --- a/handler/i_s.cc +++ b/handler/i_s.cc @@ -6,7 +6,6 @@ InnoDB INFORMATION SCHEMA tables interface to MySQL. Created July 18, 2007 Vasil Dimov *******************************************************/ -#include #include #include @@ -931,7 +930,7 @@ trx_i_s_common_fill_table( trx_i_s_cache_start_read(cache); - if (strcasecmp(table_name, "innodb_trx") == 0) { + if (innobase_strcasecmp(table_name, "innodb_trx") == 0) { if (fill_innodb_trx_from_cache( cache, thd, tables->table) != 0) { @@ -939,7 +938,7 @@ trx_i_s_common_fill_table( ret = 1; } - } else if (strcasecmp(table_name, "innodb_locks") == 0) { + } else if (innobase_strcasecmp(table_name, "innodb_locks") == 0) { if (fill_innodb_locks_from_cache( cache, thd, tables->table) != 0) { @@ -947,7 +946,7 @@ trx_i_s_common_fill_table( ret = 1; } - } else if (strcasecmp(table_name, "innodb_lock_waits") == 0) { + } else if (innobase_strcasecmp(table_name, "innodb_lock_waits") == 0) { if (fill_innodb_lock_waits_from_cache( cache, thd, tables->table) != 0) { diff --git a/include/ha_prototypes.h b/include/ha_prototypes.h index 436d030bc2c..5f971406139 100644 --- a/include/ha_prototypes.h +++ b/include/ha_prototypes.h @@ -126,5 +126,15 @@ innobase_get_cset_width( ulint cset, /* in: MySQL charset-collation code */ ulint* mbminlen, /* out: minimum length of a char (in bytes) */ ulint* mbmaxlen); /* out: maximum length of a char (in bytes) */ + +/********************************************************************** +Compares NUL-terminated UTF-8 strings case insensitively. */ +UNIV_INTERN +int +innobase_strcasecmp( +/*================*/ + /* out: 0 if a=b, <0 if a1 if a>b */ + const char* a, /* in: first string to compare */ + const char* b); /* in: second string to compare */ #endif #endif