3829 kevin.lewis@stripped 2012-04-02
Fix PB2 and valgrind errors of recent patch changes.
modified:
mysql-test/suite/innodb/t/innodb-tablespace.test
storage/innobase/dict/dict0load.cc
storage/innobase/fil/fil0fil.cc
3828 kevin.lewis@stripped 2012-03-31
local commit
modified:
mysql-test/suite/innodb/r/innodb-restart.result
mysql-test/suite/innodb/r/innodb-tablespace.result
mysql-test/suite/innodb/t/innodb-restart.test
mysql-test/suite/innodb/t/innodb-tablespace.test
=== modified file 'mysql-test/suite/innodb/t/innodb-tablespace.test'
--- a/mysql-test/suite/innodb/t/innodb-tablespace.test revid:kevin.lewis@stripped
+++ b/mysql-test/suite/innodb/t/innodb-tablespace.test revid:kevin.lewis@stripped
@@ -149,7 +149,7 @@ SELECT name,n_cols,file_format,row_forma
FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%';
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces;
---replace_result ./ MYSQLD_DATADIR/ $MYSQL_TMP_DIR MYSQL_TMP_DIR
+--replace_result ./ MYSQLD_DATADIR/ $MYSQLD_DATADIR MYSQLD_DATADIR $MYSQL_TMP_DIR MYSQL_TMP_DIR
SELECT path FROM information_schema.innodb_sys_datafiles;
--file_exists $MYSQLD_DATADIR/test/t3.ibd
--error 1
=== modified file 'storage/innobase/dict/dict0load.cc'
--- a/storage/innobase/dict/dict0load.cc revid:kevin.lewis@stripped
+++ b/storage/innobase/dict/dict0load.cc revid:kevin.lewis@stripped
@@ -961,6 +961,7 @@ dict_get_first_path(
" SET PATH = :remote_path\n"
" WHERE SPACE = :space;\n"
"END;\n", FALSE, trx);
+ mem_free(dict_filepath);
} else {
/* A record for this space ID was not found in
SYS_DATAFILES. Assume the record is also missing in
@@ -973,6 +974,7 @@ dict_get_first_path(
space, remote_filepath, trx);
}
trx_commit_for_mysql(trx);
+ trx_free_for_background(trx);
/* We just updated SYS_DATAFILES due to the contents in a link
file. Make a note that we did this. */
=== modified file 'storage/innobase/fil/fil0fil.cc'
--- a/storage/innobase/fil/fil0fil.cc revid:kevin.lewis@stripped
+++ b/storage/innobase/fil/fil0fil.cc revid:kevin.lewis@stripped
@@ -3192,7 +3192,7 @@ fil_create_new_single_table_tablespace(
goto error_exit_2;
}
- if (has_data_dir) {
+ if (has_data_dir && link_filepath) {
/* Now that the IBD file is created, make the ISL file. */
err = fil_create_link_file(link_filepath, path);
if (err != DB_SUCCESS) {
@@ -3209,9 +3209,6 @@ fil_create_new_single_table_tablespace(
fil_node_create(path, size, space_id, FALSE);
- /* Function does not fail after this point. */
- os_file_close(file);
-
#ifndef UNIV_HOTBACKUP
{
mtr_t mtr;
@@ -3232,11 +3229,11 @@ fil_create_new_single_table_tablespace(
mtr_commit(&mtr);
}
#endif
- mem_free(path);
- return(DB_SUCCESS);
+ err = DB_SUCCESS;
- /* Exit with Error: These labels reflect the order in which
- variables are assigned or actions are done. */
+ /* Error code is set. Cleanup the various variables used.
+ These labels reflect the order in which variables are assigned or
+ actions are done. */
error_exit_1:
if (has_data_dir) {
fil_delete_link_file(tablename);
@@ -3246,7 +3243,7 @@ error_exit_2:
os_file_delete(path);
error_exit_3:
mem_free(path);
- if (has_data_dir) {
+ if (link_filepath) {
mem_free(link_filepath);
}
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (kevin.lewis:3828 to 3829) | kevin.lewis | 2 Apr |