diff options
author | unknown <heikki@hundin.mysql.fi> | 2005-04-27 02:57:19 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2005-04-27 02:57:19 +0300 |
commit | 705d1631248a0b3159b58572a0b8c9e35e0598cc (patch) | |
tree | 06d55d68b7c473de883a83d748946d8816970036 /innobase | |
parent | 1faa742b86727245ad07e150be19670033adeee7 (diff) | |
download | mariadb-git-705d1631248a0b3159b58572a0b8c9e35e0598cc.tar.gz |
dict0dict.c, dict0dict.h, fil0fil.c:
Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
innobase/fil/fil0fil.c:
Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
innobase/include/dict0dict.h:
Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
innobase/dict/dict0dict.c:
Fix a problem in crash recovery of .ibd files on Windows if the user used lower_case_table_names=0 or 2; the directory scan in crash recovery forgot to put all paths to lower case, so that the tablespace name would be consistent with the internal data dictionary of InnoDB; remember that InnoDB puts internally all database names and table names to lower case on Windows, regardless of the value of lower_case_table_names
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/dict/dict0dict.c | 12 | ||||
-rw-r--r-- | innobase/fil/fil0fil.c | 9 | ||||
-rw-r--r-- | innobase/include/dict0dict.h | 7 |
3 files changed, 27 insertions, 1 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index bbc47fe9c2b..b0327f77fd3 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -197,7 +197,17 @@ FILE* dict_foreign_err_file = NULL; mutex_t dict_foreign_err_mutex; /* mutex protecting the foreign and unique error buffers */ - +/********************************************************************** +Makes all characters in a NUL-terminated UTF-8 string lower case. */ + +void +dict_casedn_str( +/*============*/ + char* a) /* in/out: string to put in lower case */ +{ + innobase_casedn_str(a); +} + /************************************************************************ Checks if the database name in two table names is the same. */ diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c index 773bd709fb7..9d5def718a6 100644 --- a/innobase/fil/fil0fil.c +++ b/innobase/fil/fil0fil.c @@ -25,6 +25,7 @@ Created 10/25/1995 Heikki Tuuri #include "srv0start.h" #include "mtr0mtr.h" #include "mtr0log.h" +#include "dict0dict.h" /* @@ -2732,7 +2733,15 @@ fil_load_single_table_tablespace( sprintf(filepath, "%s/%s/%s", fil_path_to_mysql_datadir, dbname, filename); srv_normalize_path_for_win(filepath); +#ifdef __WIN__ + /* If lower_case_table_names is 0 or 2, then MySQL allows database + directory names with upper case letters. On Windows, all table and + database names in InnoDB are internally always in lower case. Put the + file path to lower case, so that we are consistent with InnoDB's + internal data dictionary. */ + dict_casedn_str(filepath); +#endif file = os_file_create_simple_no_error_handling(filepath, OS_FILE_OPEN, OS_FILE_READ_ONLY, &success); if (!success) { diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h index 745a776bda1..3333385ec56 100644 --- a/innobase/include/dict0dict.h +++ b/innobase/include/dict0dict.h @@ -26,6 +26,13 @@ Created 1/8/1996 Heikki Tuuri #include "ut0byte.h" #include "trx0types.h" +/********************************************************************** +Makes all characters in a NUL-terminated UTF-8 string lower case. */ + +void +dict_casedn_str( +/*============*/ + char* a); /* in/out: string to put in lower case */ /************************************************************************ Get the database name length in a table name. */ |