diff options
author | unknown <heikki@hundin.mysql.fi> | 2004-12-10 17:15:23 +0200 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2004-12-10 17:15:23 +0200 |
commit | 80e9d865fd7c4639dedb1ab354067b2da881c552 (patch) | |
tree | bea14b8c2d9404cd5fa2d6c36eda6b4713b56b76 /innobase | |
parent | 117af520552735ef2dd1b24fe69a1fa5c702c48e (diff) | |
parent | e641e53fa0b1bf8b6069555131c4ce1ea55b14e4 (diff) | |
download | mariadb-git-80e9d865fd7c4639dedb1ab354067b2da881c552.tar.gz |
Merge
innobase/dict/dict0dict.c:
Auto merged
innobase/include/dict0dict.h:
Auto merged
sql/log.cc:
Auto merged
sql/ha_innodb.cc:
SCCS merged
sql/sql_class.cc:
SCCS merged
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/dict/dict0dict.c | 41 | ||||
-rw-r--r-- | innobase/include/dict0dict.h | 2 |
2 files changed, 34 insertions, 9 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index 2e6504cac11..e3aac1f70ad 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -27,6 +27,8 @@ Created 1/8/1996 Heikki Tuuri #include "que0que.h" #include "rem0cmp.h" +ibool dict_char_0xA0_is_space = FALSE; /* A special fix for 4.0 */ + dict_sys_t* dict_sys = NULL; /* the dictionary system */ rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve @@ -196,7 +198,28 @@ and unique key errors */ FILE* dict_foreign_err_file = NULL; mutex_t dict_foreign_err_mutex; /* mutex protecting the foreign and unique error buffers */ - +/************************************************************************ +Checks if a byte is considered space in the current charset of MySQL. +TODO: find out if this works correctly in multibyte charsets. */ +static +ibool +dict_isspace( +/*=========*/ + /* out: TRUE if considered space */ + char c) /* in: one-byte character */ +{ + if (isspace(c)) { + + return(TRUE); + } + + if (dict_char_0xA0_is_space && (byte)c == (byte)0xA0) { + + return(TRUE); + } + + return(FALSE); +} /************************************************************************ Checks if the database name in two table names is the same. */ @@ -2324,7 +2347,7 @@ dict_accept( *success = FALSE; - while (isspace(*ptr)) { + while (dict_isspace(*ptr)) { ptr++; } @@ -2369,7 +2392,7 @@ dict_scan_id( *id = NULL; - while (isspace(*ptr)) { + while (dict_isspace(*ptr)) { ptr++; } @@ -2400,7 +2423,7 @@ dict_scan_id( len++; } } else { - while (!isspace(*ptr) && *ptr != '(' && *ptr != ')' + while (!dict_isspace(*ptr) && *ptr != '(' && *ptr != ')' && (accept_also_dot || *ptr != '.') && *ptr != ',' && *ptr != '\0') { @@ -2904,11 +2927,11 @@ loop: ut_a(success); - if (!isspace(*ptr) && *ptr != '"' && *ptr != '`') { + if (!dict_isspace(*ptr) && *ptr != '"' && *ptr != '`') { goto loop; } - while (isspace(*ptr)) { + while (dict_isspace(*ptr)) { ptr++; } @@ -2934,7 +2957,7 @@ loop: ptr = dict_accept(ptr, "FOREIGN", &success); - if (!isspace(*ptr)) { + if (!dict_isspace(*ptr)) { goto loop; } @@ -3022,7 +3045,7 @@ col_loop1: } ptr = dict_accept(ptr, "REFERENCES", &success); - if (!success || !isspace(*ptr)) { + if (!success || !dict_isspace(*ptr)) { dict_foreign_report_syntax_err(name, start_of_latest_foreign, ptr); return(DB_CANNOT_ADD_CONSTRAINT); @@ -3403,7 +3426,7 @@ loop: ptr = dict_accept(ptr, "DROP", &success); - if (!isspace(*ptr)) { + if (!dict_isspace(*ptr)) { goto loop; } diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h index ca632691450..b29905c8b96 100644 --- a/innobase/include/dict0dict.h +++ b/innobase/include/dict0dict.h @@ -26,6 +26,8 @@ Created 1/8/1996 Heikki Tuuri #include "ut0byte.h" #include "trx0types.h" +extern ibool dict_char_0xA0_is_space; + /************************************************************************ Get the database name length in a table name. */ |