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
This commit is contained in:
parent
3c0487c4c3
commit
efc69ba2a7
@ -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
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user