Commit dfc36c88 authored by marko@hundin.mysql.fi's avatar marko@hundin.mysql.fi

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
parent f4dbb250
...@@ -2220,6 +2220,7 @@ fil_create_new_single_table_tablespace( ...@@ -2220,6 +2220,7 @@ fil_create_new_single_table_tablespace(
ut_free(buf2); ut_free(buf2);
error_exit: error_exit:
os_file_close(file); os_file_close(file);
error_exit2:
os_file_delete(path); os_file_delete(path);
mem_free(path); mem_free(path);
...@@ -2262,10 +2263,7 @@ fil_create_new_single_table_tablespace( ...@@ -2262,10 +2263,7 @@ fil_create_new_single_table_tablespace(
os_file_close(file); os_file_close(file);
if (*space_id == ULINT_UNDEFINED) { if (*space_id == ULINT_UNDEFINED) {
os_file_delete(path); goto error_exit2;
error_exit2:
mem_free(path);
return(DB_ERROR);
} }
success = fil_space_create(path, *space_id, FIL_TABLESPACE); success = fil_space_create(path, *space_id, FIL_TABLESPACE);
......
...@@ -42,14 +42,13 @@ extern ...@@ -42,14 +42,13 @@ extern
void void
innobase_invalidate_query_cache( innobase_invalidate_query_cache(
/*============================*/ /*============================*/
trx_t* trx, /* in: transaction which modifies trx_t* trx, /* in: transaction which modifies the table */
the table */ char* full_name, /* in: concatenation of database name, null
const char* full_name, /* in: concatenation of database name, char '\0', table name, null char'\0';
null char '\0', table name, null char NOTE that in Windows this is always
'\0'; NOTE that in Windows this is in LOWER CASE! */
always in LOWER CASE! */ ulint full_name_len); /* in: full name length where also the null
ulint full_name_len); /* in: full name length where also the chars count */
null chars count */
/************************************************************************* /*************************************************************************
...@@ -663,11 +662,12 @@ row_ins_foreign_check_on_constraint( ...@@ -663,11 +662,12 @@ row_ins_foreign_check_on_constraint(
ptr = strchr(table->name, '/'); ptr = strchr(table->name, '/');
ut_a(ptr); 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 */ /* We call a function in ha_innodb.cc */
innobase_invalidate_query_cache(thr_get_trx(thr), table_name, innobase_invalidate_query_cache(thr_get_trx(thr), table_name,
ptr - table->name + 1); strlen(table->name) + 1);
mem_free(table_name); mem_free(table_name);
#endif #endif
node = thr->run_node; node = thr->run_node;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment