diff options
author | unknown <monty@mysql.com> | 2005-07-03 14:17:52 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-07-03 14:17:52 +0300 |
commit | eeee5fb10b59f6580ebcb08ebd82d0b75c66aa8f (patch) | |
tree | bf06496ea5d097316e5972a5cf4c4d5f674fb90b /mysql-test/r/insert_select.result | |
parent | 6d9bc9c8b71acd82aa79ae580271e7dc4012e5a4 (diff) | |
parent | c7ab92c28a535d2419ffa906042fff7e476df972 (diff) | |
download | mariadb-git-eeee5fb10b59f6580ebcb08ebd82d0b75c66aa8f.tar.gz |
Merge with 4.1
Makefile.am:
Auto merged
myisam/mi_create.c:
Auto merged
myisam/mi_open.c:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysys/thr_alarm.c:
Auto merged
VC++Files/sql/mysqld.dsp:
Keep old
client/mysqldump.c:
Manual merge
client/mysqltest.c:
Automatic merge
configure.in:
Manual merge
mysql-test/r/ctype_ucs.result:
Auto merge
mysql-test/r/func_str.result:
Auto merge
mysql-test/r/group_by.result:
Auto merge
mysql-test/r/insert_select.result:
Auto merge
mysql-test/r/insert_update.result:
Auto merge
mysql-test/r/lowercase_table2.result:
Auto merge
mysql-test/r/select.result:
Manual merge
mysql-test/r/variables.result:
Auto merge
mysql-test/t/ctype_ucs.test:
Auto merge
mysql-test/t/func_str.test:
Auto merge
mysql-test/t/group_by.test:
Auto merge
mysql-test/t/insert_select.test:
Auto merge
mysql-test/t/insert_update.test:
Auto merge
mysql-test/t/ndb_alter_table.test:
Auto merge
mysql-test/t/select.test:
Auto merge
mysql-test/t/variables.test:
Auto merge
mysys/my_access.c:
Auto merge
scripts/make_win_src_distribution.sh:
Auto merge
sql/field.cc:
Manual merge
sql/ha_ndbcluster.cc:
Auto merge
sql/handler.cc:
Auto merge
sql/item.cc:
Auto merge
sql/item.h:
Manual merge
sql/item_cmpfunc.h:
Auto merge
sql/item_strfunc.cc:
Auto merge
sql/item_strfunc.h:
Auto merge
sql/mysql_priv.h:
manual merge
sql/mysqld.cc:
manual merge
sql/opt_range.cc:
manual merge
sql/set_var.cc:
Auto merge
sql/sql_base.cc:
manual merge
Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_insert.cc:
manual merge
Restore processing of ON DUPLICATE KEY UPDATE
Simplify mysql_prepare_insert by using local variable for select_lex and save old values just before they are changed
sql/sql_parse.cc:
Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_prepare.cc:
New ON DUPLICATE KEY UPDATE handling
sql/sql_select.cc:
manual merge
sql/sql_table.cc:
auto merge
sql/sql_yacc.yy:
auto merge
strings/ctype-ucs2.c:
auto merge
strings/ctype-utf8.c:
auto merge
Diffstat (limited to 'mysql-test/r/insert_select.result')
-rw-r--r-- | mysql-test/r/insert_select.result | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 026dae8381a..f745af182eb 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3; create table t1 (bandID MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, payoutID SMALLINT UNSIGNED NOT NULL); insert into t1 (bandID,payoutID) VALUES (1,6),(2,6),(3,4),(4,9),(5,10),(6,1),(7,12),(8,12); create table t2 (payoutID SMALLINT UNSIGNED NOT NULL PRIMARY KEY); @@ -636,16 +636,35 @@ ff1 ff2 drop table t1, t2; create table t1 (a int unique); create table t2 (a int, b int); +create table t3 (c int, d int); insert into t1 values (1),(2); insert into t2 values (1,2); +insert into t3 values (1,6),(3,7); select * from t1; a 1 2 -insert into t1 select t2.a from t2 on duplicate key update a= a + t2.b; +insert into t1 select a from t2 on duplicate key update a= t1.a + t2.b; select * from t1; a 2 3 -drop table t1; -drop table t2; +insert into t1 select a+1 from t2 on duplicate key update t1.a= t1.a + t2.b+1; +select * from t1; +a +3 +5 +insert into t1 select t3.c from t3 on duplicate key update a= a + t3.d; +select * from t1; +a +1 +5 +10 +insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= a + 10; +insert into t1 select t2.a from t2 on duplicate key update a= a + t2.b; +ERROR 23000: Column 'a' in field list is ambiguous +insert into t1 select t2.a from t2 on duplicate key update t2.a= a + t2.b; +ERROR 42S02: Unknown table 't2' in field list +insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= t1.a + t2.b; +ERROR 42S02: Unknown table 't2' in field list +drop table t1,t2,t3; |