1- /* Copyright (c) 2006, 2015 , Oracle and/or its affiliates. All rights reserved.
1+ /* Copyright (c) 2006, 2016 , Oracle and/or its affiliates. All rights reserved.
22
33 This program is free software; you can redistribute it and/or modify
44 it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ const int LF_HASH_OVERHEAD= sizeof(LF_SLIST);
4545
4646/*
4747 a structure to pass the context (pointers two the three successive elements
48- in a list) from lfind to linsert/ldelete
48+ in a list) from my_lfind to linsert/ldelete
4949*/
5050typedef struct {
5151 intptr volatile * prev ;
@@ -72,7 +72,7 @@ typedef struct {
7272 cursor is positioned in either case
7373 pins[0..2] are used, they are NOT removed on return
7474*/
75- static int lfind (LF_SLIST * volatile * head , CHARSET_INFO * cs , uint32 hashnr ,
75+ static int my_lfind (LF_SLIST * volatile * head , CHARSET_INFO * cs , uint32 hashnr ,
7676 const uchar * key , uint keylen , CURSOR * cursor , LF_PINS * pins )
7777{
7878 uint32 cur_hashnr ;
@@ -140,7 +140,7 @@ static int lfind(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr,
140140/*
141141 DESCRIPTION
142142 insert a 'node' in the list that starts from 'head' in the correct
143- position (as found by lfind )
143+ position (as found by my_lfind )
144144
145145 RETURN
146146 0 - inserted
@@ -158,7 +158,7 @@ static LF_SLIST *linsert(LF_SLIST * volatile *head, CHARSET_INFO *cs,
158158
159159 for (;;)
160160 {
161- if (lfind (head , cs , node -> hashnr , node -> key , node -> keylen ,
161+ if (my_lfind (head , cs , node -> hashnr , node -> key , node -> keylen ,
162162 & cursor , pins ) &&
163163 (flags & LF_HASH_UNIQUE ))
164164 {
@@ -209,7 +209,7 @@ static int ldelete(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr,
209209
210210 for (;;)
211211 {
212- if (!lfind (head , cs , hashnr , key , keylen , & cursor , pins ))
212+ if (!my_lfind (head , cs , hashnr , key , keylen , & cursor , pins ))
213213 {
214214 res = 1 ; /* not found */
215215 break ;
@@ -233,7 +233,7 @@ static int ldelete(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr,
233233 (to ensure the number of "set DELETED flag" actions
234234 is equal to the number of "remove from the list" actions)
235235 */
236- lfind (head , cs , hashnr , key , keylen , & cursor , pins );
236+ my_lfind (head , cs , hashnr , key , keylen , & cursor , pins );
237237 }
238238 res = 0 ;
239239 break ;
@@ -259,12 +259,12 @@ static int ldelete(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr,
259259 it uses pins[0..2], on return the pin[2] keeps the node found
260260 all other pins are removed.
261261*/
262- static LF_SLIST * lsearch (LF_SLIST * volatile * head , CHARSET_INFO * cs ,
262+ static LF_SLIST * my_lsearch (LF_SLIST * volatile * head , CHARSET_INFO * cs ,
263263 uint32 hashnr , const uchar * key , uint keylen ,
264264 LF_PINS * pins )
265265{
266266 CURSOR cursor ;
267- int res = lfind (head , cs , hashnr , key , keylen , & cursor , pins );
267+ int res = my_lfind (head , cs , hashnr , key , keylen , & cursor , pins );
268268 if (res )
269269 _lf_pin (pins , 2 , cursor .curr );
270270 _lf_unpin (pins , 0 );
@@ -445,7 +445,7 @@ int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen)
445445 MY_ERRPTR if OOM
446446
447447 NOTE
448- see lsearch () for pin usage notes
448+ see my_lsearch () for pin usage notes
449449*/
450450void * lf_hash_search (LF_HASH * hash , LF_PINS * pins , const void * key , uint keylen )
451451{
@@ -459,7 +459,7 @@ void *lf_hash_search(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen)
459459 return MY_ERRPTR ;
460460 if (* el == NULL && unlikely (initialize_bucket (hash , el , bucket , pins )))
461461 return MY_ERRPTR ;
462- found = lsearch (el , hash -> charset , my_reverse_bits (hashnr ) | 1 ,
462+ found = my_lsearch (el , hash -> charset , my_reverse_bits (hashnr ) | 1 ,
463463 (uchar * )key , keylen , pins );
464464 lf_rwunlock_by_pins (pins );
465465 return found ? found + 1 : 0 ;
0 commit comments