summaryrefslogtreecommitdiff
path: root/mysql-test/t/insert.test
diff options
context:
space:
mode:
authorMichael Widenius <monty@mysql.com>2008-12-27 04:05:16 +0200
committerMichael Widenius <monty@mysql.com>2008-12-27 04:05:16 +0200
commit2fa91ecd3d085a261c074471b2d2f1235d4a0d06 (patch)
tree6aefbfd98caeec4c2e9643373b57c0e0855f1a1a /mysql-test/t/insert.test
parent871612648ef7780f78c886d307a049845488cb6a (diff)
downloadmariadb-git-2fa91ecd3d085a261c074471b2d2f1235d4a0d06.tar.gz
Fixed bugs found by pushbuild
Added code to detect and give error when doing an insert into a view where we accessed fields in a not yet read table Disabled test in subselect.test as the CHECK_OPTION for views doesn't work for insert. This needs to be fixed properly later. The problem with views are described in Bug #41760 Inserting into multiple-table views is not working mysql-test/r/insert.result: Fixed wrong usage of insert into view. mysql-test/r/subselect.result: Disabled wrong test (temporary) mysql-test/suite/maria/r/maria.result: Added test of size of table mysql-test/suite/maria/t/maria.test: Added test of size of table mysql-test/t/insert.test: Fixed wrong usage of insert into view The bug is that during insert/update we currently don't read any of the referenced tables of the view. This means that we can't get a value from another table to use as part of the update. mysql-test/t/subselect.test: Disabled not working test until someone has time to fix insert into view properly Here we where refering to last used value in t2, which is wrong. sql/sql_insert.cc: Detect if we are trying to update one table in a view based on value in another, not yet read, table. This fixes the problem discovered in insert.test storage/maria/ma_blockrec.c: Don't ignore not critical changes to the last page in the table. We need to write the last page as otherwise we can during aborting of a row with a duplicate key get state.data_file_length and the real length of file out of sync storage/maria/ma_check.c: Flush the page cache even if we got an error during zerofill. (This fixes a call to assert() in case of a too short data file) storage/maria/ma_pagecache.c: Mark page as read when we do a write of a full page. This fixes a bug when we got an error during read and then used direct write to page to update it storage/maria/ma_state.c: Restore info->lock.type after call to maria_versioning. Fixed crash in maria_recover.test storage/maria/maria_read_log.c: Don't write thread id in debug log. (Not needed as maria_read_log is a single treaded program)
Diffstat (limited to 'mysql-test/t/insert.test')
-rw-r--r--mysql-test/t/insert.test2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index c58fb61ad30..a5eb31496b1 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;