summaryrefslogtreecommitdiff
path: root/innobase/row
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2004-10-07 20:53:20 +0300
committerunknown <heikki@hundin.mysql.fi>2004-10-07 20:53:20 +0300
commit7efa215e254dc21ec89a30578669d31064d15f9c (patch)
tree6f703fce19246e6df6d180aa783050b5119d5b15 /innobase/row
parent5a390c9c70c8f28ea481870bf8ee6c5daabe00bc (diff)
downloadmariadb-git-7efa215e254dc21ec89a30578669d31064d15f9c.tar.gz
Many files:
Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) sql/ha_innodb.cc: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/row/row0mysql.c: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/fil/fil0fil.c: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/dict/dict0crea.c: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/dict/dict0dict.c: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/dict/dict0load.c: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/dict/dict0mem.c: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/include/mem0mem.ic: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/include/dict0mem.h: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/include/fil0fil.h: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/include/mem0mem.h: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1) innobase/mem/mem0mem.c: Fix bug #5137: if innodb_file_per_table was specified, CREATE TEMPORARY TABLE ... TYPE=InnoDB said that cannot find path specified, and made mysqld to exit(1)
Diffstat (limited to 'innobase/row')
-rw-r--r--innobase/row/row0mysql.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index 88227d61f1d..b38fab45a8e 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -2243,14 +2243,17 @@ row_drop_table_for_mysql(
ulint err;
const char* table_name;
ulint namelen;
+ char* dir_path_of_temp_table = NULL;
ibool success;
ibool locked_dictionary = FALSE;
char* quoted_name;
char* sql;
+
/* We use the private SQL parser of Innobase to generate the
query graphs needed in deleting the dictionary data from system
tables in Innobase. Deleting a row from SYS_INDEXES table also
frees the file segments of the B-tree associated with the index. */
+
static const char str1[] =
"PROCEDURE DROP_TABLE_PROC () IS\n"
"table_name CHAR;\n"
@@ -2509,7 +2512,21 @@ row_drop_table_for_mysql(
ut_error;
} else {
+ ibool is_path;
+ const char* name_or_path;
+
space_id = table->space;
+
+ if (table->dir_path_of_temp_table != NULL) {
+ dir_path_of_temp_table =
+ mem_strdup(table->dir_path_of_temp_table);
+ is_path = TRUE;
+ name_or_path = dir_path_of_temp_table;
+ } else {
+ is_path = FALSE;
+ name_or_path = name;
+ }
+
dict_table_remove_from_cache(table);
if (dict_load_table(name) != NULL) {
@@ -2525,7 +2542,9 @@ row_drop_table_for_mysql(
wrong: we do not want to delete valuable data of the user */
if (err == DB_SUCCESS && space_id > 0) {
- if (!fil_space_for_table_exists_in_mem(space_id, name,
+ if (!fil_space_for_table_exists_in_mem(space_id,
+ name_or_path,
+ is_path,
FALSE, TRUE)) {
err = DB_ERROR;
@@ -2551,6 +2570,10 @@ funct_exit:
row_mysql_unlock_data_dictionary(trx);
}
+ if (dir_path_of_temp_table) {
+ mem_free(dir_path_of_temp_table);
+ }
+
que_graph_free(graph);
trx_commit_for_mysql(trx);