summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2005-04-27 03:02:25 +0300
committerheikki@hundin.mysql.fi <>2005-04-27 03:02:25 +0300
commit9eadf2366c46373cf6d6e8f4f8a2f898c9ba06f3 (patch)
tree69897d6ec8685387706fd214d29f39468149cbc0 /innobase
parentd694d5f1c94470efb6b595cdccc80816e8c4347c (diff)
parentbea92e16463d9ada60a975298268fa2c13c4e53f (diff)
downloadmariadb-git-9eadf2366c46373cf6d6e8f4f8a2f898c9ba06f3.tar.gz
Merge hundin.mysql.fi:/home/heikki/mysql-4.1
into hundin.mysql.fi:/home/heikki/mysql-5.0
Diffstat (limited to 'innobase')
-rw-r--r--innobase/dict/dict0dict.c12
-rw-r--r--innobase/fil/fil0fil.c9
-rw-r--r--innobase/include/dict0dict.h7
3 files changed, 27 insertions, 1 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 8c9724da079..0c39defeada 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -199,7 +199,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 e8efdcfbce0..8600f583dbd 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"
/*
@@ -2743,7 +2744,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 56f0a158a20..d9cda402bac 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. */