diff options
author | monty@hundin.mysql.fi <> | 2001-11-07 23:38:33 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2001-11-07 23:38:33 +0200 |
commit | 55180ca1b31eb00c79c370f7cbfb1c706d9d361f (patch) | |
tree | 481aed413c30b6d923843556a11c1b4ed47f4a60 /sql | |
parent | 000d2bbb5fb1daba3289df88235903ab0745de03 (diff) | |
parent | 0798c70cd18166b4a33c3ca394736098bfce983a (diff) | |
download | mariadb-git-55180ca1b31eb00c79c370f7cbfb1c706d9d361f.tar.gz |
Add timeout for shutdown to mysql-test-run
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_innobase.cc | 14 | ||||
-rw-r--r-- | sql/sql_table.cc | 6 |
2 files changed, 19 insertions, 1 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 3ff3e15e88e..f5f93be98a6 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -827,7 +827,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( @@ -863,6 +864,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 } /********************************************************************* diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 7af2afe4c41..b0e319288d9 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1564,6 +1564,12 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, my_free((gptr) new_table,MYF(0)); goto err; } + /* Close lock if this is a transactional table */ + if (thd->lock) + { + mysql_unlock_tables(thd, thd->lock); + thd->lock=0; + } /* Remove link to old table and rename the new one */ close_temporary_table(thd,table->table_cache_key,table_name); if (rename_temporary_table(thd, new_table, new_db, new_name)) |