summaryrefslogtreecommitdiff
path: root/mysys/hash.c
diff options
context:
space:
mode:
authorunknown <istruewing@chilla.local>2007-04-18 14:37:57 +0200
committerunknown <istruewing@chilla.local>2007-04-18 14:37:57 +0200
commitc43979f554196ebef8520fd4956f6917e257f3bf (patch)
tree1653b207aa13cae46b02effb0b8e3cebb75948f8 /mysys/hash.c
parentdcef028f713d84135013d6b9edd7c007818ad3fc (diff)
downloadmariadb-git-c43979f554196ebef8520fd4956f6917e257f3bf.tar.gz
WL#2936 - Falcon & MySQL plugin interface: server variables
Fixed a compiler dependent expression to be more portable. Initialized 'dummy' in construct_help_options() so that loaded plugin show themselves as TRUE in the help output. mysys/hash.c: WL#2936 - Falcon & MySQL plugin interface: server variables Fixed a compiler dependent expression to be more portable. sql/handler.cc: WL#2936 - Falcon & MySQL plugin interface: server variables Added a DBUG_PRINT. sql/sql_plugin.cc: WL#2936 - Falcon & MySQL plugin interface: server variables Initialized 'dummy' in construct_help_options() so that loaded plugin show themselves as TRUE in the help output. Fixed a DBUG_ENTER, added a DBUG_PRINT. Added comments.
Diffstat (limited to 'mysys/hash.c')
-rw-r--r--mysys/hash.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mysys/hash.c b/mysys/hash.c
index ab875848989..964ba6b1ca3 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -315,9 +315,12 @@ my_bool my_hash_insert(HASH *info,const byte *record)
LINT_INIT(gpos); LINT_INIT(gpos2);
LINT_INIT(ptr_to_rec); LINT_INIT(ptr_to_rec2);
- if (HASH_UNIQUE & info->flags &&
- hash_search(info, hash_key(info, record, &idx, 1), idx))
- return(TRUE); /* Duplicate entry */
+ if (HASH_UNIQUE & info->flags)
+ {
+ byte *key= (byte*) hash_key(info, record, &idx, 1);
+ if (hash_search(info, key, idx))
+ return(TRUE); /* Duplicate entry */
+ }
flag=0;
if (!(empty=(HASH_LINK*) alloc_dynamic(&info->array)))