summaryrefslogtreecommitdiff
path: root/sql/ha_innobase.cc
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2001-11-07 00:52:31 +0200
committerunknown <heikki@donna.mysql.fi>2001-11-07 00:52:31 +0200
commitefc69ba2a7c05eebf48af3b0feeea4d3e1ede498 (patch)
treeb397b25fc90a8a8e79564cb8aefe63f6d14e94a7 /sql/ha_innobase.cc
parent3c0487c4c31c516c745a020f2c1b2e836cb28d86 (diff)
downloadmariadb-git-efc69ba2a7c05eebf48af3b0feeea4d3e1ede498.tar.gz
ha_innobase.cc:
Make database and table names always lower case on Windows sql/ha_innobase.cc: Make database and table names always lower case on Windows
Diffstat (limited to 'sql/ha_innobase.cc')
-rw-r--r--sql/ha_innobase.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index de796dfa01e..5d364d91bb8 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -551,7 +551,7 @@ innobase_init(void)
if (!innobase_data_file_path)
{
- fprintf(stderr,
+ fprinf(stderr,
"Cannot initialize InnoDB as 'innodb_data_file_path' is not set.\n"
"If you do not want to use transactional InnoDB tables, add a line\n"
"skip-innodb\n"
@@ -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
}
/*********************************************************************