summaryrefslogtreecommitdiff
path: root/storage/tokudb/hatoku_defines.h
diff options
context:
space:
mode:
authorRich Prohaska <prohaska@tokutek.com>2014-11-08 08:59:55 -0500
committerRich Prohaska <prohaska@tokutek.com>2014-11-08 08:59:55 -0500
commit0a4446d72b9b1b5b5ce7325b5badbb24c1f9db2c (patch)
tree43bcdac8e0a97e7b6f2fa30be383086678391f48 /storage/tokudb/hatoku_defines.h
parentab064a1c40168e0b3f85bdc74e4ca56a4000007a (diff)
downloadmariadb-git-0a4446d72b9b1b5b5ce7325b5badbb24c1f9db2c.tar.gz
DB-756 set cardinality data for partitioned tokudb tables
Diffstat (limited to 'storage/tokudb/hatoku_defines.h')
-rw-r--r--storage/tokudb/hatoku_defines.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/tokudb/hatoku_defines.h b/storage/tokudb/hatoku_defines.h
index 91f717379d5..47ba0fe33f5 100644
--- a/storage/tokudb/hatoku_defines.h
+++ b/storage/tokudb/hatoku_defines.h
@@ -441,6 +441,8 @@ static inline void *tokudb_my_malloc(size_t s, myf flags) {
}
static inline void *tokudb_my_realloc(void *p, size_t s, myf flags) {
+ if (s == 0)
+ return p;
#if 50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799
return my_realloc(0, p, s, flags);
#else
@@ -449,7 +451,8 @@ static inline void *tokudb_my_realloc(void *p, size_t s, myf flags) {
}
static inline void tokudb_my_free(void *ptr) {
- my_free(ptr);
+ if (ptr)
+ my_free(ptr);
}
static inline char *tokudb_my_strdup(const char *p, myf flags) {