mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-in-4.1 mysql-test/r/subselect.result: Auto merged sql/sql_yacc.yy: Auto merged
This commit is contained in:
@ -1082,3 +1082,20 @@ Invalid use of group function
|
||||
UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i));
|
||||
Invalid use of group function
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
id int(11) default NULL
|
||||
) TYPE=MyISAM CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES (1),(1),(2),(2),(1),(3);
|
||||
CREATE TABLE t2 (
|
||||
id int(11) default NULL,
|
||||
name varchar(15) default NULL
|
||||
) TYPE=MyISAM CHARSET=latin1;
|
||||
INSERT INTO t2 VALUES (4,'vita'), (1,'vita'), (2,'vita'), (1,'vita');
|
||||
update t1, t2 set t2.name='lenka' where t2.id in (select id from t1);
|
||||
select * from t2;
|
||||
id name
|
||||
4 vita
|
||||
1 lenka
|
||||
2 lenka
|
||||
1 lenka
|
||||
drop table t1,t2;
|
||||
|
@ -673,3 +673,20 @@ UPDATE t1 SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i));
|
||||
-- error 1111
|
||||
UPDATE t1 SET i=i+1 WHERE i=(SELECT MAX(i));
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Multi update test
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
id int(11) default NULL
|
||||
) TYPE=MyISAM CHARSET=latin1;
|
||||
INSERT INTO t1 VALUES (1),(1),(2),(2),(1),(3);
|
||||
CREATE TABLE t2 (
|
||||
id int(11) default NULL,
|
||||
name varchar(15) default NULL
|
||||
) TYPE=MyISAM CHARSET=latin1;
|
||||
|
||||
INSERT INTO t2 VALUES (4,'vita'), (1,'vita'), (2,'vita'), (1,'vita');
|
||||
update t1, t2 set t2.name='lenka' where t2.id in (select id from t1);
|
||||
select * from t2;
|
||||
drop table t1,t2;
|
||||
|
Reference in New Issue
Block a user