mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge
sql/key.cc: Auto merged mysql-test/r/update.result: SCCS merged mysql-test/t/update.test: SCCS merged
This commit is contained in:
@ -219,3 +219,10 @@ select * from t1;
|
|||||||
id id_str
|
id id_str
|
||||||
1 test1
|
1 test1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1 (a int, b char(255), key(a, b(20)));
|
||||||
|
insert into t1 values (0, '1');
|
||||||
|
update t1 set b = b + 1 where a = 0;
|
||||||
|
select * from t1;
|
||||||
|
a b
|
||||||
|
0 2
|
||||||
|
drop table t1;
|
||||||
|
@ -179,3 +179,13 @@ insert into t1 (id_str) values ("test");
|
|||||||
update t1 set id_str = concat(id_str, id) where id = last_insert_id();
|
update t1 set id_str = concat(id_str, id) where id = last_insert_id();
|
||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #8942: a problem with update and partial key part
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (a int, b char(255), key(a, b(20)));
|
||||||
|
insert into t1 values (0, '1');
|
||||||
|
update t1 set b = b + 1 where a = 0;
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
@ -293,7 +293,7 @@ bool check_if_key_used(TABLE *table, uint idx, List<Item> &fields)
|
|||||||
f.rewind();
|
f.rewind();
|
||||||
while ((field=(Item_field*) f++))
|
while ((field=(Item_field*) f++))
|
||||||
{
|
{
|
||||||
if (key_part->field == field->field)
|
if (key_part->field->eq(field->field))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user