From 05acd51fba7dd5064f4be2b922d6f4c804fc30a0 Mon Sep 17 00:00:00 2001 From: "bell@sanja.is.com.ua" <> Date: Tue, 5 Oct 2004 15:07:31 +0300 Subject: [PATCH] postmerge fix --- mysql-test/r/view.result | 3 +-- mysql-test/t/view.test | 1 - sql/sql_insert.cc | 6 +++++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index bcec53f4722..7fec5ea174e 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1424,7 +1424,6 @@ a 1 drop view v1; drop table t1; -drop table t1,t2; create table t1 (a int); create table t2 (a int); create table t3 (a int); @@ -1541,7 +1540,7 @@ insert into v3(b) values (10); insert into v3(a) select a from t2; insert into v3(b) select b from t2; Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 2 +Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'a' at row 2 insert into v3(a) values (1) on duplicate key update a=a+10000+VALUES(a); select * from t1; a b diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 7d3c0e2dc45..5c0c628a99e 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -1387,7 +1387,6 @@ insert ignore into v1 values (1) on duplicate key update a=2; select * from t1; drop view v1; drop table t1; -drop table t1,t2; # # merge of VIEW with several tables diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index d14cc1cf780..160d77b512e 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -567,7 +567,11 @@ static bool check_view_insertability(TABLE_LIST *view, ulong query_id) view->contain_auto_increment= 1; /* prepare unique test */ field->field->query_id= other_query_id; - *trans= field; // remove collation if we have it + /* + remove collation (or other transparent for update function) if we have + it + */ + trans->item= field; } /* unique test */ for (trans= trans_start; trans != trans_end; trans++)