Commit c87f2b1b authored by unknown's avatar unknown

Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1

into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b4198


sql/sql_select.cc:
  Auto merged
parents 0fbf3ab7 6e0fb8f6
......@@ -120,3 +120,13 @@ a b
0 10
1 11
drop table t11, t12, t2;
create table t1 (a int, b int, unique key (a), key (b));
insert into t1 values (3, 3), (7, 7);
delete t1 from t1 where a = 3;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
select * from t1;
a b
7 7
drop table t1;
......@@ -98,3 +98,14 @@ select * from t11;
delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a);
select * from t11;
drop table t11, t12, t2;
#
# Bug #4198: deletion and KEYREAD
#
create table t1 (a int, b int, unique key (a), key (b));
insert into t1 values (3, 3), (7, 7);
delete t1 from t1 where a = 3;
check table t1;
select * from t1;
drop table t1;
......@@ -5976,7 +5976,8 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
else
{
if (!table->key_read && table->used_keys.is_set(tab->ref.key) &&
!table->no_keyread)
!table->no_keyread &&
(int) table->reginfo.lock_type <= (int) TL_READ_HIGH_PRIORITY)
{
table->key_read=1;
table->file->extra(HA_EXTRA_KEYREAD);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment