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
518fcc8f
Commit
518fcc8f
authored
Jul 06, 2006
by
ingo@chilla.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge chilla.local:/home/mydev/mysql-5.0
into chilla.local:/home/mydev/mysql-5.0-ateam
parents
4eee50de
b21acbe0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
myisam/mi_rkey.c
myisam/mi_rkey.c
+18
-6
sql/sql_class.cc
sql/sql_class.cc
+3
-3
No files found.
myisam/mi_rkey.c
View file @
518fcc8f
...
...
@@ -68,6 +68,7 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
if
(
fast_mi_readinfo
(
info
))
goto
err
;
if
(
share
->
concurrent_insert
)
rw_rdlock
(
&
share
->
key_root_lock
[
inx
]);
...
...
@@ -90,24 +91,35 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
case
HA_KEY_ALG_BTREE
:
default:
if
(
!
_mi_search
(
info
,
keyinfo
,
key_buff
,
use_key_length
,
myisam_read_vec
[
search_flag
],
info
->
s
->
state
.
key_root
[
inx
]))
myisam_read_vec
[
search_flag
],
info
->
s
->
state
.
key_root
[
inx
]))
{
while
(
info
->
lastpos
>=
info
->
state
->
data_file_length
)
/*
If we are searching for an exact key (including the data pointer)
and this was added by an concurrent insert,
then the result is "key not found".
*/
if
((
search_flag
==
HA_READ_KEY_EXACT
)
&&
(
info
->
lastpos
>=
info
->
state
->
data_file_length
))
{
my_errno
=
HA_ERR_KEY_NOT_FOUND
;
info
->
lastpos
=
HA_OFFSET_ERROR
;
}
else
while
(
info
->
lastpos
>=
info
->
state
->
data_file_length
)
{
/*
Skip rows that are inserted by other threads since we got a lock
Note that this can only happen if we are not searching after an
exact key, because the keys are sorted according to position
*/
if
(
_mi_search_next
(
info
,
keyinfo
,
info
->
lastkey
,
info
->
lastkey_length
,
myisam_readnext_vec
[
search_flag
],
info
->
s
->
state
.
key_root
[
inx
]))
info
->
lastkey_length
,
myisam_readnext_vec
[
search_flag
],
info
->
s
->
state
.
key_root
[
inx
]))
break
;
}
}
}
if
(
share
->
concurrent_insert
)
rw_unlock
(
&
share
->
key_root_lock
[
inx
]);
...
...
sql/sql_class.cc
View file @
518fcc8f
...
...
@@ -930,7 +930,7 @@ bool select_send::send_data(List<Item> &items)
Protocol
*
protocol
=
thd
->
protocol
;
char
buff
[
MAX_FIELD_WIDTH
];
String
buffer
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
DBUG_ENTER
(
"send_data"
);
DBUG_ENTER
(
"se
lect_send::se
nd_data"
);
protocol
->
prepare_for_resend
();
Item
*
item
;
...
...
@@ -1140,7 +1140,7 @@ select_export::prepare(List<Item> &list, SELECT_LEX_UNIT *u)
bool
select_export
::
send_data
(
List
<
Item
>
&
items
)
{
DBUG_ENTER
(
"send_data"
);
DBUG_ENTER
(
"se
lect_export::se
nd_data"
);
char
buff
[
MAX_FIELD_WIDTH
],
null_buff
[
2
],
space
[
MAX_FIELD_WIDTH
];
bool
space_inited
=
0
;
String
tmp
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
),
*
res
;
...
...
@@ -1297,7 +1297,7 @@ bool select_dump::send_data(List<Item> &items)
String
tmp
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
),
*
res
;
tmp
.
length
(
0
);
Item
*
item
;
DBUG_ENTER
(
"send_data"
);
DBUG_ENTER
(
"se
lect_dump::se
nd_data"
);
if
(
unit
->
offset_limit_cnt
)
{
// using limit offset,count
...
...
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