diff options
Diffstat (limited to 'mysql-test/t/multi_update.test')
-rw-r--r-- | mysql-test/t/multi_update.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index ff456b710c1..088b355a17c 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -214,3 +214,13 @@ UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n; select * from t1; select * from t2; drop table t1,t2; +drop table if exists t1,t2,t3; +CREATE TABLE t1 ( broj int(4) unsigned NOT NULL default '0', naziv char(25) NOT NULL default 'NEPOZNAT', PRIMARY KEY (broj)) TYPE=MyISAM; +INSERT INTO t1 VALUES (1,'jedan'),(2,'dva'),(3,'tri'),(4,'xxxxxxxxxx'),(5,'a'),(10,''),(11,''),(12,''),(13,''); +CREATE TABLE t2 ( broj int(4) unsigned NOT NULL default '0', naziv char(25) NOT NULL default 'NEPOZNAT', PRIMARY KEY (broj)) TYPE=MyISAM; +INSERT INTO t2 VALUES (1,'jedan'),(2,'dva'),(3,'tri'),(4,'xxxxxxxxxx'),(5,'a'); +CREATE TABLE t3 ( broj int(4) unsigned NOT NULL default '0', naziv char(25) NOT NULL default 'NEPOZNAT', PRIMARY KEY (broj)) TYPE=MyISAM; +INSERT INTO t3 VALUES (1,'jedan'),(2,'dva'); +update t1,t2 set t1.naziv="aaaa" where t1.broj=t2.broj; +update t1,t2,t3 set t1.naziv="bbbb", t2.naziv="aaaa" where t1.broj=t2.broj and t2.broj=t3.broj; +drop table if exists t1,t2,t3; |