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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
06ed215c
Commit
06ed215c
authored
Apr 29, 2002
by
ram@gw.udmsearch.izhnet.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Index number argument
Fix in test results
parent
b8a12a8c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
16 deletions
+13
-16
heap/hp_rfirst.c
heap/hp_rfirst.c
+2
-2
heap/hp_rlast.c
heap/hp_rlast.c
+3
-6
heap/hp_test2.c
heap/hp_test2.c
+2
-2
include/heap.h
include/heap.h
+2
-2
mysql-test/r/heap_btree.result
mysql-test/r/heap_btree.result
+2
-2
sql/ha_heap.cc
sql/ha_heap.cc
+2
-2
No files found.
heap/hp_rfirst.c
View file @
06ed215c
...
...
@@ -18,10 +18,10 @@
/* Read first record with the current key */
int
heap_rfirst
(
HP_INFO
*
info
,
byte
*
record
)
int
heap_rfirst
(
HP_INFO
*
info
,
byte
*
record
,
int
inx
)
{
HP_SHARE
*
share
=
info
->
s
;
HP_KEYDEF
*
keyinfo
=
share
->
keydef
+
in
fo
->
lastin
x
;
HP_KEYDEF
*
keyinfo
=
share
->
keydef
+
inx
;
DBUG_ENTER
(
"heap_rfirst"
);
if
(
keyinfo
->
algorithm
==
HA_KEY_ALG_BTREE
)
...
...
heap/hp_rlast.c
View file @
06ed215c
...
...
@@ -19,15 +19,12 @@
/* Read first record with the current key */
int
heap_rlast
(
HP_INFO
*
info
,
byte
*
record
)
int
heap_rlast
(
HP_INFO
*
info
,
byte
*
record
,
int
inx
)
{
HP_SHARE
*
share
=
info
->
s
;
HP_KEYDEF
*
keyinfo
;
HP_SHARE
*
share
=
info
->
s
;
HP_KEYDEF
*
keyinfo
=
share
->
keydef
+
inx
;
DBUG_ENTER
(
"heap_rlast"
);
if
(
info
->
lastinx
<
0
)
DBUG_RETURN
(
my_errno
=
HA_ERR_WRONG_INDEX
);
keyinfo
=
share
->
keydef
+
info
->
lastinx
;
if
(
keyinfo
->
algorithm
==
HA_KEY_ALG_BTREE
)
{
byte
*
pos
;
...
...
heap/hp_test2.c
View file @
06ed215c
...
...
@@ -306,7 +306,7 @@ int main(int argc, char *argv[])
if
(
!
silent
)
printf
(
"- Read last key - delete - prev - prev - opt_delete - prev -> first
\n
"
);
if
(
heap_rlast
(
file
,
record3
))
goto
err
;
if
(
heap_rlast
(
file
,
record3
,
0
))
goto
err
;
if
(
heap_delete
(
file
,
record3
))
goto
err
;
key_check
-=
atoi
(
record3
);
key1
[
atoi
(
record
+
keyinfo
[
0
].
seg
[
0
].
start
)]
--
;
...
...
@@ -513,7 +513,7 @@ int main(int argc, char *argv[])
}
ant
=
0
;
for
(
error
=
heap_rlast
(
file
,
record
)
;
for
(
error
=
heap_rlast
(
file
,
record
,
0
)
;
!
error
;
error
=
heap_rprev
(
file
,
record
))
{
...
...
include/heap.h
View file @
06ed215c
...
...
@@ -161,8 +161,8 @@ extern int heap_panic(enum ha_panic_function flag);
extern
int
heap_rsame
(
HP_INFO
*
info
,
byte
*
record
,
int
inx
);
extern
int
heap_rnext
(
HP_INFO
*
info
,
byte
*
record
);
extern
int
heap_rprev
(
HP_INFO
*
info
,
byte
*
record
);
extern
int
heap_rfirst
(
HP_INFO
*
info
,
byte
*
record
);
extern
int
heap_rlast
(
HP_INFO
*
info
,
byte
*
record
);
extern
int
heap_rfirst
(
HP_INFO
*
info
,
byte
*
record
,
int
inx
);
extern
int
heap_rlast
(
HP_INFO
*
info
,
byte
*
record
,
int
inx
);
extern
void
heap_clear
(
HP_INFO
*
info
);
ha_rows
hp_rb_records_in_range
(
HP_INFO
*
info
,
int
inx
,
const
byte
*
start_key
,
...
...
mysql-test/r/heap_btree.result
View file @
06ed215c
...
...
@@ -124,11 +124,11 @@ create table t1 (id int unsigned not null, primary key using BTREE (id)) type=H
insert into t1 values(1);
select max(id) from t1;
max(id)
NULL
1
insert into t1 values(2);
select max(id) from t1;
max(id)
NULL
2
replace into t1 values(1);
drop table t1;
create table t1 (n int) type=heap;
...
...
sql/ha_heap.cc
View file @
06ed215c
...
...
@@ -189,7 +189,7 @@ int ha_heap::index_prev(byte * buf)
int
ha_heap
::
index_first
(
byte
*
buf
)
{
statistic_increment
(
ha_read_first_count
,
&
LOCK_status
);
int
error
=
heap_rfirst
(
file
,
buf
);
int
error
=
heap_rfirst
(
file
,
buf
,
active_index
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
error
;
}
...
...
@@ -197,7 +197,7 @@ int ha_heap::index_first(byte * buf)
int
ha_heap
::
index_last
(
byte
*
buf
)
{
statistic_increment
(
ha_read_last_count
,
&
LOCK_status
);
int
error
=
heap_rlast
(
file
,
buf
);
int
error
=
heap_rlast
(
file
,
buf
,
active_index
);
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
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