summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorEvgeny Potemkin <epotemkin@mysql.com>2009-10-20 11:30:41 +0400
committerEvgeny Potemkin <epotemkin@mysql.com>2009-10-20 11:30:41 +0400
commit4349a4726e46a5694ceda60713b67d9132c8a4a0 (patch)
treeb5430b493ae6d3d29e6f5107bb8fee90742310ca /mysql-test
parent3c557833205a44e08b72d47db53054562907cc78 (diff)
downloadmariadb-git-4349a4726e46a5694ceda60713b67d9132c8a4a0.tar.gz
#41760 Inserting into multiple-table views is not working
During insert, we are not reading the rows in a referring table but instead using the last read row that happens to be in table->record[0]. Now INSERT into such view is denied. mysql-test/r/delayed.result: A test case result is adjusted after fixing bug#41760. mysql-test/r/insert.result: A test case result is adjusted after fixing bug#41760. mysql-test/t/delayed.test: A test case is adjusted after fixing bug#41760. mysql-test/t/insert.test: A test case is adjusted after fixing bug#41760.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/delayed.result2
-rw-r--r--mysql-test/r/insert.result4
-rw-r--r--mysql-test/t/delayed.test2
-rw-r--r--mysql-test/t/insert.test2
4 files changed, 6 insertions, 4 deletions
diff --git a/mysql-test/r/delayed.result b/mysql-test/r/delayed.result
index 4d5d656f3ce..b26b029759c 100644
--- a/mysql-test/r/delayed.result
+++ b/mysql-test/r/delayed.result
@@ -252,7 +252,7 @@ HEX(a)
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT DELAYED INTO t1 SET b= b();
-ERROR 42S22: Unknown column 'b' in 'field list'
+ERROR 42000: FUNCTION test.b does not exist
DROP TABLE t1;
End of 5.0 tests
DROP TABLE IF EXISTS t1,t2;
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 3f91039d592..4ed56bf3c56 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -355,17 +355,17 @@ insert into t2 values (1,12), (2,24);
insert into v1 (f1) values (3) on duplicate key update f3= f3 + 10;
ERROR HY000: Can not modify more than one base table through a join view 'test.v1'
insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10;
+ERROR HY000: Can not modify more than one base table through a join view 'test.v1'
select * from t1;
f1 f2
1 11
2 22
-3 NULL
insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10;
+ERROR HY000: Can not modify more than one base table through a join view 'test.v1'
select * from t1;
f1 f2
1 11
2 22
-12 NULL
drop view v1;
drop table t1,t2;
create table t1 (id int primary key auto_increment, data int, unique(data));
diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test
index 94ad22b80d0..14833b8f837 100644
--- a/mysql-test/t/delayed.test
+++ b/mysql-test/t/delayed.test
@@ -247,7 +247,7 @@ DROP TABLE t1;
# Bug #32676: insert delayed crash with wrong column and function specified
#
CREATE TABLE t1 (a INT);
---error ER_BAD_FIELD_ERROR
+--error 1305
INSERT DELAYED INTO t1 SET b= b();
DROP TABLE t1;
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 8f9ed6c7d06..155ae6937ef 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -235,8 +235,10 @@ insert into t1 values (1,11), (2,22);
insert into t2 values (1,12), (2,24);
--error 1393
insert into v1 (f1) values (3) on duplicate key update f3= f3 + 10;
+--error 1393
insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10;
select * from t1;
+--error 1393
insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10;
select * from t1;
drop view v1;