Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f131bd53
Commit
f131bd53
authored
Aug 01, 2003
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace mi_rrnd() in myrg_rkey family to more intelligent (HA_KEYREAD-aware) read function
parent
fb5a1da6
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
8 deletions
+18
-8
myisammrg/myrg_def.h
myisammrg/myrg_def.h
+2
-0
myisammrg/myrg_queue.c
myisammrg/myrg_queue.c
+10
-2
myisammrg/myrg_rfirst.c
myisammrg/myrg_rfirst.c
+1
-1
myisammrg/myrg_rkey.c
myisammrg/myrg_rkey.c
+2
-2
myisammrg/myrg_rlast.c
myisammrg/myrg_rlast.c
+1
-1
myisammrg/myrg_rnext.c
myisammrg/myrg_rnext.c
+1
-1
myisammrg/myrg_rprev.c
myisammrg/myrg_rprev.c
+1
-1
No files found.
myisammrg/myrg_def.h
View file @
f131bd53
...
...
@@ -29,3 +29,5 @@ extern pthread_mutex_t THR_LOCK_open;
#endif
int
_myrg_init_queue
(
MYRG_INFO
*
info
,
int
inx
,
enum
ha_rkey_function
search_flag
);
int
_myrg_mi_read_record
(
MI_INFO
*
info
,
byte
*
buf
);
myisammrg/myrg_queue.c
View file @
f131bd53
...
...
@@ -14,8 +14,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Read record based on a key */
#include "myrg_def.h"
static
int
queue_key_cmp
(
void
*
keyseg
,
byte
*
a
,
byte
*
b
)
...
...
@@ -55,3 +53,13 @@ int _myrg_init_queue(MYRG_INFO *info,int inx,enum ha_rkey_function search_flag)
}
return
error
;
}
int
_myrg_mi_read_record
(
MI_INFO
*
info
,
byte
*
buf
)
{
if
(
!
(
*
info
->
read_record
)(
info
,
info
->
lastpos
,
buf
))
{
info
->
update
|=
HA_STATE_AKTIV
;
/* Record is read */
return
0
;
}
return
my_errno
;
}
myisammrg/myrg_rfirst.c
View file @
f131bd53
...
...
@@ -45,5 +45,5 @@ int myrg_rfirst(MYRG_INFO *info, byte *buf, int inx)
return
HA_ERR_END_OF_FILE
;
mi
=
(
info
->
current_table
=
(
MYRG_TABLE
*
)
queue_top
(
&
(
info
->
by_key
)))
->
table
;
return
mi_rrnd
(
mi
,
buf
,
mi
->
lastpos
);
return
_myrg_mi_read_record
(
mi
,
buf
);
}
myisammrg/myrg_rkey.c
View file @
f131bd53
...
...
@@ -36,7 +36,7 @@
SerG
*/
int
myrg_rkey
(
MYRG_INFO
*
info
,
byte
*
record
,
int
inx
,
const
byte
*
key
,
int
myrg_rkey
(
MYRG_INFO
*
info
,
byte
*
buf
,
int
inx
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
search_flag
)
{
byte
*
key_buff
;
...
...
@@ -83,5 +83,5 @@ int myrg_rkey(MYRG_INFO *info,byte *record,int inx, const byte *key,
return
HA_ERR_KEY_NOT_FOUND
;
mi
=
(
info
->
current_table
=
(
MYRG_TABLE
*
)
queue_top
(
&
(
info
->
by_key
)))
->
table
;
return
mi_rrnd
(
mi
,
record
,
mi
->
lastpos
);
return
_myrg_mi_read_record
(
mi
,
buf
);
}
myisammrg/myrg_rlast.c
View file @
f131bd53
...
...
@@ -45,6 +45,6 @@ int myrg_rlast(MYRG_INFO *info, byte *buf, int inx)
return
HA_ERR_END_OF_FILE
;
mi
=
(
info
->
current_table
=
(
MYRG_TABLE
*
)
queue_top
(
&
(
info
->
by_key
)))
->
table
;
return
mi_rrnd
(
mi
,
buf
,
mi
->
lastpos
);
return
_myrg_mi_read_record
(
mi
,
buf
);
}
myisammrg/myrg_rnext.c
View file @
f131bd53
...
...
@@ -49,5 +49,5 @@ int myrg_rnext(MYRG_INFO *info, byte *buf, int inx)
/* now, mymerge's read_next is as simple as one queue_top */
mi
=
(
info
->
current_table
=
(
MYRG_TABLE
*
)
queue_top
(
&
(
info
->
by_key
)))
->
table
;
return
mi_rrnd
(
mi
,
buf
,
mi
->
lastpos
);
return
_myrg_mi_read_record
(
mi
,
buf
);
}
myisammrg/myrg_rprev.c
View file @
f131bd53
...
...
@@ -49,5 +49,5 @@ int myrg_rprev(MYRG_INFO *info, byte *buf, int inx)
/* now, mymerge's read_prev is as simple as one queue_top */
mi
=
(
info
->
current_table
=
(
MYRG_TABLE
*
)
queue_top
(
&
(
info
->
by_key
)))
->
table
;
return
mi_rrnd
(
mi
,
buf
,
mi
->
lastpos
);
return
_myrg_mi_read_record
(
mi
,
buf
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment