diff options
author | unknown <ramil@mysql.com> | 2005-03-17 10:24:50 +0400 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2005-03-17 10:24:50 +0400 |
commit | 7ceb5c6cef7c1b9bebe3869e9836035fbb177601 (patch) | |
tree | 5c075b6f58481b058b5a1b404a70cfd16466776e /mysql-test/t/update.test | |
parent | c8e834e995712cf695ce6bef5362be54f77ad774 (diff) | |
download | mariadb-git-7ceb5c6cef7c1b9bebe3869e9836035fbb177601.tar.gz |
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.
Diffstat (limited to 'mysql-test/t/update.test')
-rw-r--r-- | mysql-test/t/update.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test index 62439dcc51b..6c7b450f763 100644 --- a/mysql-test/t/update.test +++ b/mysql-test/t/update.test @@ -164,3 +164,13 @@ 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; + +# +# 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; |