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
3dbba5a0
Commit
3dbba5a0
authored
Nov 27, 2002
by
ram@mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for HA_READ_BEFORE_KEY and HA_READ_PREFIX_LAST_OR_PREV
parent
e198ebc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
sql/ha_berkeley.cc
sql/ha_berkeley.cc
+17
-0
No files found.
sql/ha_berkeley.cc
View file @
3dbba5a0
...
...
@@ -1416,10 +1416,21 @@ int ha_berkeley::index_read(byte * buf, const byte * key,
DBT
row
;
int
error
;
KEY
*
key_info
=
&
table
->
key_info
[
active_index
];
int
do_prev
=
0
;
DBUG_ENTER
(
"ha_berkeley::index_read"
);
statistic_increment
(
ha_read_key_count
,
&
LOCK_status
);
bzero
((
char
*
)
&
row
,
sizeof
(
row
));
if
(
find_flag
==
HA_READ_BEFORE_KEY
)
{
find_flag
=
HA_READ_KEY_OR_NEXT
;
do_prev
=
1
;
}
else
if
(
find_flag
==
HA_READ_PREFIX_LAST_OR_PREV
)
{
find_flag
=
HA_READ_AFTER_KEY
;
do_prev
=
1
;
}
if
(
key_len
==
key_info
->
key_length
)
{
error
=
read_row
(
cursor
->
c_get
(
cursor
,
pack_key
(
&
last_key
,
...
...
@@ -1453,6 +1464,12 @@ int ha_berkeley::index_read(byte * buf, const byte * key,
error
=
HA_ERR_KEY_NOT_FOUND
;
}
}
if
(
do_prev
)
{
bzero
((
char
*
)
&
row
,
sizeof
(
row
));
error
=
read_row
(
cursor
->
c_get
(
cursor
,
&
last_key
,
&
row
,
DB_PREV
),
(
char
*
)
buf
,
active_index
,
&
row
,
&
last_key
,
1
);
}
DBUG_RETURN
(
error
);
}
...
...
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