diff options
author | unknown <monty@mysql.com> | 2006-05-04 06:28:24 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2006-05-04 06:28:24 +0300 |
commit | 79d87430db7aac8e9b763d63a2e51cc9946bdc8d (patch) | |
tree | f9bdf22894017186b47db65bd16339e2f5b9646a /mysys/my_file.c | |
parent | 26fe4bf90b1a5ad3056a095e7950e0965af3eb5c (diff) | |
download | mariadb-git-79d87430db7aac8e9b763d63a2e51cc9946bdc8d.tar.gz |
After merge fixes
Remove compiler warnings
Fix some broken tests
Workaround for syncronization bug in NDB (Bug #16445)
client/mysqltest.c:
Added more information to output from abort_not_supported_test()
Removed compiler warnings
include/my_sys.h:
Added function to print names of open files
include/mysys_err.h:
Print names of open files
mysql-test/include/have_ndb.inc:
Added comment
mysql-test/lib/mtr_report.pl:
Only print warning once
mysql-test/r/mysqldump.result:
After merge fix
mysql-test/r/ndb_basic.result:
Workaround for syncronization bug in NDB
mysql-test/r/ndb_config.result:
Remove not portable test
mysql-test/t/ndb_basic.test:
Workaround for syncronization bug in NDB
mysql-test/t/ndb_config.test:
Remove not portable test
mysys/errors.c:
Print names of open files
mysys/my_file.c:
Ensure that structs are cleared and copyied properly so that my_print_open_files() works.
mysys/my_init.c:
In case of EXTRA_DEBUG, print names of open files
mysys/my_open.c:
Added function to print names of open files
sql/sql_table.cc:
Fixed file-not-closed error
Diffstat (limited to 'mysys/my_file.c')
-rw-r--r-- | mysys/my_file.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mysys/my_file.c b/mysys/my_file.c index 4c333c7d7db..0abc031a195 100644 --- a/mysys/my_file.c +++ b/mysys/my_file.c @@ -107,7 +107,10 @@ uint my_set_max_open_files(uint files) DBUG_RETURN(MY_NFILE); /* Copy any initialized files */ - memcpy((char*) tmp, (char*) my_file_info, sizeof(*tmp) * my_file_limit); + memcpy((char*) tmp, (char*) my_file_info, + sizeof(*tmp) * min(my_file_limit, files)); + bzero((char*) (tmp + my_file_limit), + max((int) (files- my_file_limit), 0)*sizeof(*tmp)); my_free_open_file_info(); /* Free if already allocated */ my_file_info= tmp; my_file_limit= files; @@ -121,8 +124,12 @@ void my_free_open_file_info() DBUG_ENTER("my_free_file_info"); if (my_file_info != my_file_info_default) { + /* Copy data back for my_print_open_files */ + memcpy((char*) my_file_info_default, my_file_info, + sizeof(*my_file_info_default)* MY_NFILE); my_free((char*) my_file_info, MYF(0)); my_file_info= my_file_info_default; + my_file_limit= MY_NFILE; } DBUG_VOID_RETURN; } |