diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-06-15 15:27:11 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-06-15 15:27:11 +0400 |
commit | 765347384af7fd3393ad37567a612d93ed8b3d92 (patch) | |
tree | a2c0a08596142312ec38f33e4e02f353a2730fe1 /mysys | |
parent | 3b1921c714fcb4415cea9058408fb5a626e93b62 (diff) | |
parent | e813fe862226554cfe31754b3dfeafbb2b9a7159 (diff) | |
download | mariadb-git-765347384af7fd3393ad37567a612d93ed8b3d92.tar.gz |
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/lf_alloc-pin.c | 6 | ||||
-rw-r--r-- | mysys/lf_hash.c | 3 | ||||
-rw-r--r-- | mysys/ma_dyncol.c | 2 | ||||
-rw-r--r-- | mysys/waiting_threads.c | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/mysys/lf_alloc-pin.c b/mysys/lf_alloc-pin.c index 6c813333d09..e2073df1e4d 100644 --- a/mysys/lf_alloc-pin.c +++ b/mysys/lf_alloc-pin.c @@ -323,12 +323,6 @@ static int match_pins(LF_PINS *el, void *addr) return 0; } -#if STACK_DIRECTION < 0 -#define available_stack_size(CUR,END) (long) ((char*)(CUR) - (char*)(END)) -#else -#define available_stack_size(CUR,END) (long) ((char*)(END) - (char*)(CUR)) -#endif - #define next_node(P, X) (*((uchar * volatile *)(((uchar *)(X)) + (P)->free_ptr_offset))) #define anext_node(X) next_node(&allocator->pinbox, (X)) diff --git a/mysys/lf_hash.c b/mysys/lf_hash.c index 41174a66ced..430f1007f30 100644 --- a/mysys/lf_hash.c +++ b/mysys/lf_hash.c @@ -550,7 +550,10 @@ static int initialize_bucket(LF_HASH *hash, LF_SLIST * volatile *node, return -1; if (*el == NULL && bucket && unlikely(initialize_bucket(hash, el, parent, pins))) + { + my_free(dummy); return -1; + } dummy->hashnr= my_reverse_bits(bucket) | 0; /* dummy node */ dummy->key= dummy_key; dummy->keylen= 0; diff --git a/mysys/ma_dyncol.c b/mysys/ma_dyncol.c index 155a4367345..125b3a4632d 100644 --- a/mysys/ma_dyncol.c +++ b/mysys/ma_dyncol.c @@ -4038,6 +4038,8 @@ mariadb_dyncol_val_double(double *dbl, DYNAMIC_COLUMN_VALUE *val) *dbl= strtod(str, &end); if (*end != '\0') rc= ER_DYNCOL_TRUNCATED; + free(str); + break; } case DYN_COL_DECIMAL: if (decimal2double(&val->x.decimal.value, dbl) != E_DEC_OK) diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c index 7d8aae032ea..2549bd8a587 100644 --- a/mysys/waiting_threads.c +++ b/mysys/waiting_threads.c @@ -556,7 +556,7 @@ my_bool wt_resource_id_memcmp(const void *a, const void *b) { /* we use the fact that there's no padding in the middle of WT_RESOURCE_ID */ compile_time_assert(offsetof(WT_RESOURCE_ID, type) == sizeof(ulonglong)); - return memcmp(a, b, sizeof_WT_RESOURCE_ID); + return MY_TEST(memcmp(a, b, sizeof_WT_RESOURCE_ID)); } /** |