mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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)
This commit is contained in:
@ -3353,7 +3353,15 @@ create_table_def(
|
||||
trx_t* trx, /* in: InnoDB transaction handle */
|
||||
TABLE* form, /* in: information on table
|
||||
columns and indexes */
|
||||
const char* table_name) /* in: table name */
|
||||
const char* table_name, /* in: table name */
|
||||
const char* path_of_temp_table)/* in: if this is a table explicitly
|
||||
created by the user with the
|
||||
TEMPORARY keyword, then this
|
||||
parameter is the dir path where the
|
||||
table should be placed if we create
|
||||
an .ibd file for it (no .ibd extension
|
||||
in the path, though); otherwise this
|
||||
is NULL */
|
||||
{
|
||||
Field* field;
|
||||
dict_table_t* table;
|
||||
@ -3376,6 +3384,11 @@ create_table_def(
|
||||
|
||||
table = dict_mem_table_create((char*) table_name, 0, n_cols);
|
||||
|
||||
if (path_of_temp_table) {
|
||||
table->dir_path_of_temp_table =
|
||||
mem_heap_strdup(table->heap, path_of_temp_table);
|
||||
}
|
||||
|
||||
for (i = 0; i < n_cols; i++) {
|
||||
field = form->field[i];
|
||||
|
||||
@ -3456,8 +3469,7 @@ create_index(
|
||||
|
||||
ind_type = 0;
|
||||
|
||||
if (key_num == form->primary_key)
|
||||
{
|
||||
if (key_num == form->primary_key) {
|
||||
ind_type = ind_type | DICT_CLUSTERED;
|
||||
}
|
||||
|
||||
@ -3622,7 +3634,7 @@ ha_innobase::create(
|
||||
srv_lower_case_table_names = FALSE;
|
||||
}
|
||||
|
||||
fn_format(name2, name, "", "",2); // Remove the .frm extension
|
||||
fn_format(name2, name, "", "", 2); // Remove the .frm extension
|
||||
|
||||
normalize_table_name(norm_name, name2);
|
||||
|
||||
@ -3634,8 +3646,13 @@ ha_innobase::create(
|
||||
|
||||
/* Create the table definition in InnoDB */
|
||||
|
||||
error = create_table_def(trx, form, norm_name);
|
||||
|
||||
if (create_info->options & HA_LEX_CREATE_TMP_TABLE) {
|
||||
|
||||
error = create_table_def(trx, form, norm_name, name2);
|
||||
} else {
|
||||
error = create_table_def(trx, form, norm_name, NULL);
|
||||
}
|
||||
|
||||
if (error) {
|
||||
innobase_commit_low(trx);
|
||||
|
||||
@ -3710,8 +3727,8 @@ ha_innobase::create(
|
||||
}
|
||||
|
||||
if (current_thd->query != NULL) {
|
||||
|
||||
LEX_STRING q;
|
||||
|
||||
if (thd->convert_string(&q, system_charset_info,
|
||||
current_thd->query,
|
||||
current_thd->query_length,
|
||||
|
Reference in New Issue
Block a user