@@ -159,8 +159,6 @@ LOCK TABLES t1 write, t2 read;
159
159
DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n;
160
160
--error 1099
161
161
UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n;
162
- --QQ This should not generate an error
163
- --error 1099
164
162
UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n;
165
163
unlock tables;
166
164
LOCK TABLES t1 write, t2 write;
@@ -428,7 +426,7 @@ drop table t1, t2, t3;
428
426
#
429
427
create table t1 (col1 int);
430
428
create table t2 (col1 int);
431
- -- QQ The following should give error 1093
429
+ -- error 1093
432
430
update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1;
433
431
-- error 1093
434
432
delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1;
@@ -479,3 +477,35 @@ delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
479
477
480
478
set @@storage_engine=@ttype_save;
481
479
drop table t1,t2;
480
+
481
+ create table t1 (a int, b int);
482
+ insert into t1 values (1, 2), (2, 3), (3, 4);
483
+ create table t2 (a int);
484
+ insert into t2 values (10), (20), (30);
485
+ create view v1 as select a as b, a/10 as a from t2;
486
+
487
+ connect (locker,localhost,root,,test);
488
+ connection locker;
489
+ lock table t1 write;
490
+
491
+ connect (changer,localhost,root,,test);
492
+ connection changer;
493
+ send alter table t1 add column c int default 100 after a;
494
+
495
+ connect (updater,localhost,root,,test);
496
+ connection updater;
497
+ send update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a;
498
+
499
+ connection locker;
500
+ sleep 2;
501
+ unlock tables;
502
+
503
+ connection changer;
504
+ reap;
505
+
506
+ connection updater;
507
+ reap;
508
+ select * from t1;
509
+ select * from t2;
510
+ drop view v1;
511
+ drop table t1, t2;
0 commit comments