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
16b0cd21
Commit
16b0cd21
authored
Apr 08, 2001
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This wouldn't ever be pushed
mysql-test/t/handler.test: new tests sql/sql_handler.cc: bugfix
parent
e81dcbdc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
24 deletions
+47
-24
mysql-test/t/handler.test
mysql-test/t/handler.test
+41
-24
sql/sql_handler.cc
sql/sql_handler.cc
+6
-0
No files found.
mysql-test/t/handler.test
View file @
16b0cd21
...
@@ -3,30 +3,47 @@
...
@@ -3,30 +3,47 @@
#
#
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
create
table
t1
(
a
int
,
b
char
(
10
),
key
a
(
a
));
create
table
t1
(
a
int
,
b
char
(
10
),
key
a
(
a
)
,
key
b
(
a
,
b
)
);
insert
into
t1
values
insert
into
t1
values
(
14
,
"aaa"
),(
15
,
"bbb"
),(
16
,
"ccc"
),
(
14
,
"aaa"
),(
15
,
"bbb"
),(
16
,
"ccc"
),
(
16
,
"xxx"
),
(
17
,
"ddd"
),(
18
,
"eee"
),(
19
,
"fff"
),
(
17
,
"ddd"
),(
18
,
"eee"
),(
19
,
"fff"
),
(
19
,
"yyy"
),
(
20
,
"ggg"
),(
21
,
"hhh"
),(
22
,
"iii"
);
(
20
,
"ggg"
),(
21
,
"hhh"
),(
22
,
"iii"
);
handler
t1
open
;
handler
t1
open
as
t2
;
handler
t
1
read
a
first
;
handler
t
2
read
a
first
;
handler
t
1
read
a
next
;
handler
t
2
read
a
next
;
handler
t
1
read
a
next
;
handler
t
2
read
a
next
;
handler
t
1
read
a
prev
;
handler
t
2
read
a
prev
;
handler
t
1
read
a
last
;
handler
t
2
read
a
last
;
handler
t
1
read
a
prev
;
handler
t
2
read
a
prev
;
handler
t
1
read
a
prev
;
handler
t
2
read
a
prev
;
handler
t
1
read
a
first
;
handler
t
2
read
a
first
;
handler
t
1
read
a
prev
;
handler
t
2
read
a
prev
;
handler
t
1
read
a
last
;
handler
t
2
read
a
last
;
handler
t
1
read
a
prev
;
handler
t
2
read
a
prev
;
handler
t
1
read
a
next
;
handler
t
2
read
a
next
;
handler
t
1
read
a
next
;
handler
t
2
read
a
next
;
handler
t
1
read
a
=
(
15
);
handler
t
2
read
a
=
(
15
);
handler
t2
read
a
=
(
16
);
handler
t1
close
;
drop
table
if
exists
t1
;
!
$
1070
handler
t2
read
a
=
(
19
,
"fff"
)
;
handler
t2
read
b
=
(
19
,
"fff"
);
handler
t2
read
b
=
(
19
,
"yyy"
);
handler
t2
read
b
=
(
19
);
!
$
1109
handler
t1
read
a
last
;
handler
t2
read
a
=
(
11
);
handler
t2
read
a
>=
(
11
);
handler
t2
read
a
=
(
18
);
handler
t2
read
a
>=
(
18
);
handler
t2
read
a
>
(
18
);
handler
t2
read
a
<=
(
18
);
handler
t2
read
a
<
(
18
);
handler
t2
close
;
drop
table
if
exists
t1
;
sql/sql_handler.cc
View file @
16b0cd21
...
@@ -90,6 +90,12 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
...
@@ -90,6 +90,12 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
KEY
*
keyinfo
=
table
->
key_info
+
keyno
;
KEY
*
keyinfo
=
table
->
key_info
+
keyno
;
uint
key_len
=
0
,
i
;
uint
key_len
=
0
,
i
;
byte
*
key
,
*
buf
;
byte
*
key
,
*
buf
;
if
(
key_expr
->
elements
>
keyinfo
->
key_parts
)
{
my_printf_error
(
ER_TOO_MANY_KEY_PARTS
,
ER
(
ER_TOO_MANY_KEY_PARTS
),
MYF
(
0
),
keyinfo
->
key_parts
);
return
-
1
;
}
for
(
i
=
0
;
i
<
key_expr
->
elements
;
i
++
)
for
(
i
=
0
;
i
<
key_expr
->
elements
;
i
++
)
key_len
+=
keyinfo
->
key_part
[
i
].
store_length
;
key_len
+=
keyinfo
->
key_part
[
i
].
store_length
;
if
(
!
(
key
=
sql_calloc
(
ALIGN_SIZE
(
key_len
))))
if
(
!
(
key
=
sql_calloc
(
ALIGN_SIZE
(
key_len
))))
...
...
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