Commit efc69ba2 authored by unknown's avatar unknown

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
parent 3c0487c4
...@@ -551,7 +551,7 @@ innobase_init(void) ...@@ -551,7 +551,7 @@ innobase_init(void)
if (!innobase_data_file_path) if (!innobase_data_file_path)
{ {
fprintf(stderr, fprinf(stderr,
"Cannot initialize InnoDB as 'innodb_data_file_path' is not set.\n" "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" "If you do not want to use transactional InnoDB tables, add a line\n"
"skip-innodb\n" "skip-innodb\n"
...@@ -821,7 +821,8 @@ ha_innobase::bas_ext() const ...@@ -821,7 +821,8 @@ ha_innobase::bas_ext() const
/********************************************************************* /*********************************************************************
Normalizes a table name string. A normalized name consists of the Normalizes a table name string. A normalized name consists of the
database name catenated to '/' and table name. An example: 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 static
void void
normalize_table_name( normalize_table_name(
...@@ -857,6 +858,17 @@ normalize_table_name( ...@@ -857,6 +858,17 @@ normalize_table_name(
memcpy(norm_name, db_ptr, strlen(name) + 1 - (db_ptr - name)); memcpy(norm_name, db_ptr, strlen(name) + 1 - (db_ptr - name));
norm_name[name_ptr - db_ptr - 1] = '/'; norm_name[name_ptr - db_ptr - 1] = '/';
#ifdef __WIN__
/* Put to lower case */
ptr = norm_name;
while (*ptr != '\0') {
*ptr = tolower(*ptr);
ptr++;
}
#endif
} }
/********************************************************************* /*********************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment