From eb771658a767b8238ff1774472f06450212d3ff4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Mar 2005 10:24:50 +0400 Subject: A fix (bug #8942: SUBSTRING_INDEX in UPDATE causes internal loop). sql/key.cc: A fix (bug #8942: SUBSTRING_INDEX in UPDATE causes internal loop). For "partial" key parts (e.g. key(a(20), ...) we create different key_part->field, see sql/table.cc; so we have to use the eq() function here to compare fields. --- mysql-test/r/update.result | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/r/update.result') diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result index 7810d52d156..9ca92fe75df 100644 --- a/mysql-test/r/update.result +++ b/mysql-test/r/update.result @@ -209,3 +209,10 @@ insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20); update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1"; update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1" where t1.c3 = 10; drop table t1, t2; +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; -- cgit v1.2.1