diff options
author | unknown <marko@hundin.mysql.fi> | 2004-06-16 01:55:24 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-06-16 01:55:24 +0300 |
commit | 563920080d9454a530a7c8fa6a6b3cc07e6cbc69 (patch) | |
tree | c6829ca6b60b6bce32f68eb8ddafb7a8d9b91592 | |
parent | b1cecee05509b6f8637eb13b5ad9dbf9e46aaab2 (diff) | |
download | mariadb-git-563920080d9454a530a7c8fa6a6b3cc07e6cbc69.tar.gz |
InnoDB: fix bug in call to innobase_invalidate_query_cache(),
introduced in ChangeSet@1.1843.1.25
InnoDB: fix bug in the error exit of
fil_create_new_single_table_tablespace(), introduced in
ChangeSet@1.1843.1.11
innobase/row/row0ins.c:
row_ins_foreign_check_on_constraint():
the string passed to innobase_invalidate_query_cache() was truncated;
now it is passed correctly again
innobase/fil/fil0fil.c:
fil_create_new_single_table_tablespace():
delete the file if fil_space_create() fails
-rw-r--r-- | innobase/fil/fil0fil.c | 6 | ||||
-rw-r--r-- | innobase/row/row0ins.c | 20 |
2 files changed, 12 insertions, 14 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c index a200116797a..8e655492aa6 100644 --- a/innobase/fil/fil0fil.c +++ b/innobase/fil/fil0fil.c @@ -2220,6 +2220,7 @@ fil_create_new_single_table_tablespace( ut_free(buf2); error_exit: os_file_close(file); + error_exit2: os_file_delete(path); mem_free(path); @@ -2262,10 +2263,7 @@ fil_create_new_single_table_tablespace( os_file_close(file); if (*space_id == ULINT_UNDEFINED) { - os_file_delete(path); - error_exit2: - mem_free(path); - return(DB_ERROR); + goto error_exit2; } success = fil_space_create(path, *space_id, FIL_TABLESPACE); diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index fdd6989479d..004c8482c61 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -42,14 +42,13 @@ extern void innobase_invalidate_query_cache( /*============================*/ - trx_t* trx, /* in: transaction which modifies - the table */ - const char* full_name, /* in: concatenation of database name, - null char '\0', table name, null char - '\0'; NOTE that in Windows this is - always in LOWER CASE! */ - ulint full_name_len); /* in: full name length where also the - null chars count */ + trx_t* trx, /* in: transaction which modifies the table */ + char* full_name, /* in: concatenation of database name, null + char '\0', table name, null char'\0'; + NOTE that in Windows this is always + in LOWER CASE! */ + ulint full_name_len); /* in: full name length where also the null + chars count */ /************************************************************************* @@ -663,11 +662,12 @@ row_ins_foreign_check_on_constraint( ptr = strchr(table->name, '/'); ut_a(ptr); - table_name = mem_strdupl(table->name, ptr - table->name); + table_name = mem_strdup(table->name); + table_name[ptr - table->name] = 0; /* We call a function in ha_innodb.cc */ innobase_invalidate_query_cache(thr_get_trx(thr), table_name, - ptr - table->name + 1); + strlen(table->name) + 1); mem_free(table_name); #endif node = thr->run_node; |