mirror of
https://github.com/MariaDB/server.git
synced 2025-12-12 08:01:43 +03:00
branches/zip:
Use innobase_strcasecmp() insteaed of strcasecmp() in i_s.cc and get rid of strings.h (that file is not present on Windows). Move the prototype of innobase_strcasecmp() from ha_innodb.cc and dict0dict.c to ha_prototypes.h. Approved by: Heikki
This commit is contained in:
@@ -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 a<b, >1 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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -6,7 +6,6 @@ InnoDB INFORMATION SCHEMA tables interface to MySQL.
|
||||
Created July 18, 2007 Vasil Dimov
|
||||
*******************************************************/
|
||||
|
||||
#include <strings.h>
|
||||
#include <mysql_priv.h>
|
||||
#include <mysqld_error.h>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 a<b, >1 if a>b */
|
||||
const char* a, /* in: first string to compare */
|
||||
const char* b); /* in: second string to compare */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user