Below is the list of changes that have just been committed into a local
5.0 repository of mydev. When mydev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2219 06/07/04 21:35:06 ingo@stripped +2 -0
Merge mysql.com:/home/mydev/mysql-4.1-bug14400
into mysql.com:/home/mydev/mysql-5.0-bug14400
sql/sql_class.cc
1.237 06/07/04 21:34:59 ingo@stripped +0 -0
Auto merged
myisam/mi_rkey.c
1.21 06/07/04 21:34:59 ingo@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: ingo
# Host: chilla.local
# Root: /home/mydev/mysql-5.0-bug14400/RESYNC
--- 1.20/myisam/mi_rkey.c 2005-10-10 17:12:22 +02:00
+++ 1.21/myisam/mi_rkey.c 2006-07-04 21:34:59 +02:00
@@ -68,6 +68,7 @@ int mi_rkey(MI_INFO *info, byte *buf, in
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, in
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]);
--- 1.236/sql/sql_class.cc 2006-06-21 00:21:07 +02:00
+++ 1.237/sql/sql_class.cc 2006-07-04 21:34:59 +02:00
@@ -930,7 +930,7 @@ bool select_send::send_data(List<Item> &
Protocol *protocol= thd->protocol;
char buff[MAX_FIELD_WIDTH];
String buffer(buff, sizeof(buff), &my_charset_bin);
- DBUG_ENTER("send_data");
+ DBUG_ENTER("select_send::send_data");
protocol->prepare_for_resend();
Item *item;
@@ -1140,7 +1140,7 @@ select_export::prepare(List<Item> &list,
bool select_export::send_data(List<Item> &items)
{
- DBUG_ENTER("send_data");
+ DBUG_ENTER("select_export::send_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> &
String tmp(buff,sizeof(buff),&my_charset_bin),*res;
tmp.length(0);
Item *item;
- DBUG_ENTER("send_data");
+ DBUG_ENTER("select_dump::send_data");
if (unit->offset_limit_cnt)
{ // using limit offset,count
| Thread |
|---|
| • bk commit into 5.0 tree (ingo:1.2219) | ingo | 4 Jul |