diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/update.result | 14 | ||||
-rw-r--r-- | mysql-test/t/update.test | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result index 4a9e95fb89e..d83952e118b 100644 --- a/mysql-test/r/update.result +++ b/mysql-test/r/update.result @@ -226,3 +226,17 @@ select * from t1; a b 0 2 drop table t1; +create table t1 (a int, b varchar(10), key b(b(5))) engine=myisam; +create table t2 (a int, b varchar(10)) engine=myisam; +insert into t1 values ( 1, 'abcd1e'); +insert into t1 values ( 2, 'abcd2e'); +insert into t2 values ( 1, 'abcd1e'); +insert into t2 values ( 2, 'abcd2e'); +analyze table t1,t2; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +update t1, t2 set t1.a = t2.a where t2.b = t1.b; +show warnings; +Level Code Message +drop table t1, t2; diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test index 8eb3a924ee3..6a90fb95760 100644 --- a/mysql-test/t/update.test +++ b/mysql-test/t/update.test @@ -189,3 +189,15 @@ insert into t1 values (0, '1'); update t1 set b = b + 1 where a = 0; select * from t1; drop table t1; + +# BUG#9103 "Erroneous data truncation warnings on multi-table updates" +create table t1 (a int, b varchar(10), key b(b(5))) engine=myisam; +create table t2 (a int, b varchar(10)) engine=myisam; +insert into t1 values ( 1, 'abcd1e'); +insert into t1 values ( 2, 'abcd2e'); +insert into t2 values ( 1, 'abcd1e'); +insert into t2 values ( 2, 'abcd2e'); +analyze table t1,t2; +update t1, t2 set t1.a = t2.a where t2.b = t1.b; +show warnings; +drop table t1, t2; |