Debian Codegraph @

storage/heap/hp_rlast.c

raw symbols SCIP
1 /* Copyright (c) 2000-2002, 2005-2007 MySQL AB
2 Use is subject to license terms
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; version 2 of the License.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
16
17 #include "heapdef.h"cxx . . $ `<file>/storage/heap/heapdef.h`/
18
19 /* Read first record with the current key */
20
21
22 int heap_rlastcxx . . $ heap_rlast(5da3ab4f5fdac48b).(HP_INFOcxx . . $ HP_INFO# *info, ucharcxx . . $ uchar# *record, int inx)
23 {
24 HP_SHAREcxx . . $ HP_SHARE# *share= info->scxx . . $ st_heap_info#s.;
25 HP_KEYDEFcxx . . $ HP_KEYDEF# *keyinfo= share->keydefcxx . . $ st_heap_share#keydef. + inx;
26
27 DBUG_ENTERcxx . . $ `include/my_dbug.h:165:9`!("heap_rlast");
28 info->lastinxcxx . . $ st_heap_info#lastinx.= inx;
29 info->key_versioncxx . . $ st_heap_info#key_version.= info->scxx . . $ st_heap_info#s.->key_versioncxx . . $ st_heap_share#key_version.;
30 if (keyinfo->algorithmcxx . . $ st_hp_keydef#algorithm. == HA_KEY_ALG_BTREEcxx . . $ HA_KEY_ALG_BTREE.)
31 {
32 ucharcxx . . $ uchar# *pos;
33
34 if ((pos = tree_search_edgecxx . . $ tree_search_edge(6d7a3e5e86b42f69).(&keyinfo->rb_treecxx . . $ st_hp_keydef#rb_tree., info->parentscxx . . $ st_heap_info#parents.,
35 &info->last_poscxx . . $ st_heap_info#last_pos., offsetofcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:431:9`!(TREE_ELEMENT, right))))
36 {
37 memcpycxx . . $ memcpy(cc817cb175f282d).(&pos, pos + (*keyinfo->get_key_lengthcxx . . $ st_hp_keydef#get_key_length.)(keyinfo, pos),
38 sizeof(ucharcxx . . $ uchar#*));
39 info->current_ptrcxx . . $ st_heap_info#current_ptr. = pos;
40 memcpycxx . . $ memcpy(cc817cb175f282d).(record, pos, (size_t)share->reclengthcxx . . $ st_heap_share#reclength.);
41 info->updatecxx . . $ st_heap_info#update. = HA_STATE_AKTIVcxx . . $ `include/my_base.h:618:9`!;
42 }
43 else
44 {
45 my_errnocxx . . $ `include/my_pthread.h:720:9`! = HA_ERR_END_OF_FILEcxx . . $ `include/my_base.h:482:9`!;
46 DBUG_RETURNcxx . . $ `include/my_dbug.h:168:9`!(my_errnocxx . . $ `include/my_pthread.h:720:9`!);
47 }
48 DBUG_RETURNcxx . . $ `include/my_dbug.h:168:9`!(0);
49 }
50 else
51 {
52 /* We can't scan a non existing key value with hash index */
53 my_errnocxx . . $ `include/my_pthread.h:720:9`!= HA_ERR_WRONG_COMMANDcxx . . $ `include/my_base.h:476:9`!;
54 DBUG_RETURNcxx . . $ `include/my_dbug.h:168:9`!(my_errnocxx . . $ `include/my_pthread.h:720:9`!);
55 }
56 }