From 8799820faf2a10b6ed406bde7df885caf144548a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Nov 2009 21:22:17 +0100 Subject: Use C comments in C code --- mysys/typelib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysys') diff --git a/mysys/typelib.c b/mysys/typelib.c index a0fe8a96a89..cb72c91e20d 100644 --- a/mysys/typelib.c +++ b/mysys/typelib.c @@ -184,7 +184,7 @@ my_ulonglong find_typeset(char *x, TYPELIB *lib, int *err) i= x; while (*x && *x != field_separator) x++; - if (x[0] && x[1]) // skip separator if found + if (x[0] && x[1]) /* skip separator if found */ x++; if ((find= find_type(i, lib, 2 | 8) - 1) < 0) DBUG_RETURN(0); -- cgit v1.2.1 From 0a686030589dae2fe6bf99f4c3d4a73d4268a491 Mon Sep 17 00:00:00 2001 From: Kristofer Pettersson Date: Fri, 20 Nov 2009 16:18:01 +0100 Subject: Bug#45613 handle failures from my_hash_insert Not all my_hash_insert() calls are checked for return value. This patch adds appropriate checks and failure responses where needed. mysys/hash.c: * Debug hook for testing failures in my_hash_insert() --- mysys/hash.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mysys') diff --git a/mysys/hash.c b/mysys/hash.c index 9c1957bf0aa..48ac122fa34 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -334,6 +334,7 @@ my_bool my_hash_insert(HASH *info, const uchar *record) size_t idx,halfbuff,hash_nr,first_index; uchar *UNINIT_VAR(ptr_to_rec),*UNINIT_VAR(ptr_to_rec2); HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; + DBUG_EXECUTE("fail_hash_insert",return(TRUE);); if (HASH_UNIQUE & info->flags) { -- cgit v1.2.1 From d4db598110fbf2a4ae92a7d4549e9f7f11fa42a6 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Mon, 23 Nov 2009 17:32:10 +0200 Subject: Additional fix for bug #45613: handle failures from my_hash_insert Testing for presence of stuff in a hash inside the function that's filling in the hash creates chicken-and-egg type of problems. This results in test suite failures in mysql-pe in debug mode and adds bad initialization dependency in 5.1. Fixed by removing the debug code. --- mysys/hash.c | 1 - 1 file changed, 1 deletion(-) (limited to 'mysys') diff --git a/mysys/hash.c b/mysys/hash.c index 48ac122fa34..9c1957bf0aa 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -334,7 +334,6 @@ my_bool my_hash_insert(HASH *info, const uchar *record) size_t idx,halfbuff,hash_nr,first_index; uchar *UNINIT_VAR(ptr_to_rec),*UNINIT_VAR(ptr_to_rec2); HASH_LINK *data,*empty,*UNINIT_VAR(gpos),*UNINIT_VAR(gpos2),*pos; - DBUG_EXECUTE("fail_hash_insert",return(TRUE);); if (HASH_UNIQUE & info->flags) { -- cgit v1.2.1