mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
a fix (bug #4198: Incorrect key file for table).
This commit is contained in:
@ -120,3 +120,13 @@ a b
|
|||||||
0 10
|
0 10
|
||||||
1 11
|
1 11
|
||||||
drop table t11, t12, t2;
|
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);
|
delete ignore from t11 where t11.b <> (select b from t2 where t11.a < t2.a);
|
||||||
select * from t11;
|
select * from t11;
|
||||||
drop table t11, t12, t2;
|
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;
|
||||||
|
@ -5972,7 +5972,8 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!table->key_read && table->used_keys.is_set(tab->ref.key) &&
|
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->key_read=1;
|
||||||
table->file->extra(HA_EXTRA_KEYREAD);
|
table->file->extra(HA_EXTRA_KEYREAD);
|
||||||
|
Reference in New Issue
Block a user