1- /* Copyright (c) 2006, 2010 , 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
@@ -43,7 +43,7 @@ typedef struct {
4343
4444/*
4545 a structure to pass the context (pointers two the three successive elements
46- in a list) from lfind to linsert/ldelete
46+ in a list) from my_lfind to linsert/ldelete
4747*/
4848typedef struct {
4949 intptr volatile * prev ;
@@ -70,7 +70,7 @@ typedef struct {
7070 cursor is positioned in either case
7171 pins[0..2] are used, they are NOT removed on return
7272*/
73- static int lfind (LF_SLIST * volatile * head , CHARSET_INFO * cs , uint32 hashnr ,
73+ static int my_lfind (LF_SLIST * volatile * head , CHARSET_INFO * cs , uint32 hashnr ,
7474 const uchar * key , uint keylen , CURSOR * cursor , LF_PINS * pins )
7575{
7676 uint32 cur_hashnr ;
@@ -138,7 +138,7 @@ static int lfind(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr,
138138/*
139139 DESCRIPTION
140140 insert a 'node' in the list that starts from 'head' in the correct
141- position (as found by lfind )
141+ position (as found by my_lfind )
142142
143143 RETURN
144144 0 - inserted
@@ -156,7 +156,7 @@ static LF_SLIST *linsert(LF_SLIST * volatile *head, CHARSET_INFO *cs,
156156
157157 for (;;)
158158 {
159- if (lfind (head , cs , node -> hashnr , node -> key , node -> keylen ,
159+ if (my_lfind (head , cs , node -> hashnr , node -> key , node -> keylen ,
160160 & cursor , pins ) &&
161161 (flags & LF_HASH_UNIQUE ))
162162 {
@@ -207,7 +207,7 @@ static int ldelete(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr,
207207
208208 for (;;)
209209 {
210- if (!lfind (head , cs , hashnr , key , keylen , & cursor , pins ))
210+ if (!my_lfind (head , cs , hashnr , key , keylen , & cursor , pins ))
211211 {
212212 res = 1 ; /* not found */
213213 break ;
@@ -231,7 +231,7 @@ static int ldelete(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr,
231231 (to ensure the number of "set DELETED flag" actions
232232 is equal to the number of "remove from the list" actions)
233233 */
234- lfind (head , cs , hashnr , key , keylen , & cursor , pins );
234+ my_lfind (head , cs , hashnr , key , keylen , & cursor , pins );
235235 }
236236 res = 0 ;
237237 break ;
@@ -257,12 +257,12 @@ static int ldelete(LF_SLIST * volatile *head, CHARSET_INFO *cs, uint32 hashnr,
257257 it uses pins[0..2], on return the pin[2] keeps the node found
258258 all other pins are removed.
259259*/
260- static LF_SLIST * lsearch (LF_SLIST * volatile * head , CHARSET_INFO * cs ,
260+ static LF_SLIST * my_lsearch (LF_SLIST * volatile * head , CHARSET_INFO * cs ,
261261 uint32 hashnr , const uchar * key , uint keylen ,
262262 LF_PINS * pins )
263263{
264264 CURSOR cursor ;
265- int res = lfind (head , cs , hashnr , key , keylen , & cursor , pins );
265+ int res = my_lfind (head , cs , hashnr , key , keylen , & cursor , pins );
266266 if (res )
267267 _lf_pin (pins , 2 , cursor .curr );
268268 _lf_unpin (pins , 0 );
@@ -443,7 +443,7 @@ int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen)
443443 MY_ERRPTR if OOM
444444
445445 NOTE
446- see lsearch () for pin usage notes
446+ see my_lsearch () for pin usage notes
447447*/
448448void * lf_hash_search (LF_HASH * hash , LF_PINS * pins , const void * key , uint keylen )
449449{
@@ -457,7 +457,7 @@ void *lf_hash_search(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen)
457457 return MY_ERRPTR ;
458458 if (* el == NULL && unlikely (initialize_bucket (hash , el , bucket , pins )))
459459 return MY_ERRPTR ;
460- found = lsearch (el , hash -> charset , my_reverse_bits (hashnr ) | 1 ,
460+ found = my_lsearch (el , hash -> charset , my_reverse_bits (hashnr ) | 1 ,
461461 (uchar * )key , keylen , pins );
462462 lf_rwunlock_by_pins (pins );
463463 return found ? found + 1 : 0 ;
0 commit comments