diff options
author | unknown <heikki@hundin.mysql.fi> | 2004-10-07 20:53:20 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2004-10-07 20:53:20 +0300 |
commit | 7efa215e254dc21ec89a30578669d31064d15f9c (patch) | |
tree | 6f703fce19246e6df6d180aa783050b5119d5b15 /innobase/dict | |
parent | 5a390c9c70c8f28ea481870bf8ee6c5daabe00bc (diff) | |
download | mariadb-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/dict')
-rw-r--r-- | innobase/dict/dict0crea.c | 15 | ||||
-rw-r--r-- | innobase/dict/dict0dict.c | 12 | ||||
-rw-r--r-- | innobase/dict/dict0load.c | 4 | ||||
-rw-r--r-- | innobase/dict/dict0mem.c | 1 |
4 files changed, 27 insertions, 5 deletions
diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c index c887d821a3f..137964b26c1 100644 --- a/innobase/dict/dict0crea.c +++ b/innobase/dict/dict0crea.c @@ -205,6 +205,8 @@ dict_build_table_def_step( dict_table_t* cluster_table; dtuple_t* row; ulint error; + const char* path_or_name; + ibool is_path; mtr_t mtr; #ifdef UNIV_SYNC_DEBUG @@ -245,8 +247,19 @@ dict_build_table_def_step( table->space = 0; /* reset to zero for the call below */ + if (table->dir_path_of_temp_table) { + /* We place tables created with CREATE TEMPORARY + TABLE in the tmp dir of mysqld server */ + + path_or_name = table->dir_path_of_temp_table; + is_path = TRUE; + } else { + path_or_name = table->name; + is_path = FALSE; + } + error = fil_create_new_single_table_tablespace( - &(table->space), table->name, + &(table->space), path_or_name, is_path, FIL_IBD_FILE_INITIAL_SIZE); if (error != DB_SUCCESS) { diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index aa7e90700f8..fd98538d2ad 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -943,8 +943,16 @@ dict_table_rename_in_cache( .ibd file */ if (table->space != 0) { - success = fil_rename_tablespace(table->name, table->space, - new_name); + if (table->dir_path_of_temp_table != NULL) { + fprintf(stderr, +"InnoDB: Error: trying to rename a table %s (%s) created with CREATE\n" +"InnoDB: TEMPORARY TABLE\n", table->name, table->dir_path_of_temp_table); + success = FALSE; + } else { + success = fil_rename_tablespace(table->name, + table->space, new_name); + } + if (!success) { return(FALSE); diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c index 9293b117899..1866921c589 100644 --- a/innobase/dict/dict0load.c +++ b/innobase/dict/dict0load.c @@ -262,7 +262,7 @@ loop: exists; print a warning to the .err log if not */ fil_space_for_table_exists_in_mem(space_id, name, - TRUE, TRUE); + FALSE, TRUE, TRUE); } mem_free(name); @@ -761,7 +761,7 @@ dict_load_table( /* Check if the tablespace exists and has the right name */ if (space != 0) { if (fil_space_for_table_exists_in_mem(space, name, FALSE, - FALSE)) { + FALSE, FALSE)) { /* Ok; (if we did a crash recovery then the tablespace can already be in the memory cache) */ } else { diff --git a/innobase/dict/dict0mem.c b/innobase/dict/dict0mem.c index 8f05475df47..1d45585aac1 100644 --- a/innobase/dict/dict0mem.c +++ b/innobase/dict/dict0mem.c @@ -50,6 +50,7 @@ dict_mem_table_create( table->type = DICT_TABLE_ORDINARY; table->name = mem_heap_strdup(heap, name); + table->dir_path_of_temp_table = NULL; table->space = space; table->ibd_file_missing = FALSE; table->tablespace_discarded = FALSE; |