summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/ha_innobase.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index de796dfa01e..093d4e91c30 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -821,7 +821,8 @@ ha_innobase::bas_ext() const
/*********************************************************************
Normalizes a table name string. A normalized name consists of the
database name catenated to '/' and table name. An example:
-test/mytable. */
+test/mytable. On Windows normalization puts both the database name and the
+table name always to lower case. */
static
void
normalize_table_name(
@@ -857,6 +858,17 @@ normalize_table_name(
memcpy(norm_name, db_ptr, strlen(name) + 1 - (db_ptr - name));
norm_name[name_ptr - db_ptr - 1] = '/';
+
+#ifdef __WIN__
+ /* Put to lower case */
+
+ ptr = norm_name;
+
+ while (*ptr != '\0') {
+ *ptr = tolower(*ptr);
+ ptr++;
+ }
+#endif
}
/*********************************************************************