diff options
author | Michael Widenius <monty@askmonty.org> | 2010-06-23 03:48:11 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-06-23 03:48:11 +0300 |
commit | 5a2f40d48a6fda6b83f788a0f849299bd44b621e (patch) | |
tree | 0c1bb17e3c52203b6b3a4ace5ccbb77a5c23a40b /include | |
parent | cfbee9359c4282cbff7426d6e71994205964f2df (diff) | |
download | mariadb-git-5a2f40d48a6fda6b83f788a0f849299bd44b621e.tar.gz |
Fixes for Opensolaris (to get buildbot green)
- Fixed memory leaks in mysqldump
- Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
- Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris
client/mysqldump.c:
Fixed memory leaks
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
client/mysqltest.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
include/my_global.h:
Added simple macro val_or_null() to simplify detecting of NULL strings for printf
sql/handler.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
sql/sql_db.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
Removed testing of 'new_db_name' as this is guranteed never NULL
sql/sql_show.cc:
Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
storage/csv/ha_tina.cc:
Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris
(OpenSolaris default malloc() can't handle a lot of reallocs() of strings that are growing one byte at a time)
This did speed up logging to cvs with a magnitude for large strings.
Diffstat (limited to 'include')
-rw-r--r-- | include/my_global.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/my_global.h b/include/my_global.h index a32db3c87b6..9d9daf5aa1a 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -90,6 +90,9 @@ #define IF_WIN(A,B) (B) #endif +/* Make it easier to print null strings */ +#define val_or_null(A) ((A) ? (const char*) (A) : "(null)") + #ifndef EMBEDDED_LIBRARY #ifdef WITH_NDB_BINLOG #define HAVE_NDB_BINLOG 1 |