diff options
author | unknown <evgen@moonbone.local> | 2005-10-25 20:04:12 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-10-25 20:04:12 +0400 |
commit | 45369edf570069f500b83c27b84004a0e4593074 (patch) | |
tree | c02babc6eea474c8c1c524a69234536b7eafae07 /mysql-test/t/insert_select.test | |
parent | 6e49a48a25465eeb8e9e4c6b510b78ed508242bc (diff) | |
download | mariadb-git-45369edf570069f500b83c27b84004a0e4593074.tar.gz |
Fix bug#13392 Wrong VALUES() behaviour in INSERT SELECT with ON DUPLICATE
VALUES() can only refer to table insert going to.
But Item_insert_value::fix_fields() were passing to it's arg full table list,
This results in finding second column which shouldn't be found, and
failing with error about ambiguous field.
Item_insert_value::fix_fields() now passes only first table of full table
list.
sql/item.cc:
Fix bug #14016 date_format() 2nd parameter was compared using case insensitive collation.
If second parameter of date_format() is constant then it's collation is changed to case sensitive.
mysql-test/r/insert_select.result:
Test case for bug#14016 2nd parameter was compared using case insensitive collation
mysql-test/t/insert_select.test:
Test case for bug#14016 2nd parameter was compared using case insensitive collation
Diffstat (limited to 'mysql-test/t/insert_select.test')
-rw-r--r-- | mysql-test/t/insert_select.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test index 6fcdef6ab03..48acdf1cbc5 100644 --- a/mysql-test/t/insert_select.test +++ b/mysql-test/t/insert_select.test @@ -214,4 +214,16 @@ insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1; select * from t1; drop table t1; +# +# Bug #13392 values() fails with 'ambiguous' or returns NULL +# with ON DUPLICATE and SELECT +create table t1(x int, y int); +create table t2(x int, z int); +insert into t1(x,y) select x,z from t2 on duplicate key update x=values(x); +--error 1054 +insert into t1(x,y) select x,z from t2 on duplicate key update x=values(z); +--error 1109 +insert into t1(x,y) select x,z from t2 on duplicate key update x=values(t2.x); +drop table t1,t2; + # End of 4.1 tests |