Bug #39248 Maria: INSERT ON DUPLICATE KEY UPDATE gives error if using a view
Submitted: 4 Sep 2008 15:06 Modified: 9 Jan 2009 15:28
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Maria storage engine Severity:S3 (Non-critical)
Version:5.1-maria, 6.0-bk OS:Linux
Assigned to: Michael Widenius CPU Architecture:Any

[4 Sep 2008 15:06] Guilhem Bichot
Description:
create table t1 (f1 int unique, f2 int);
create table t2 (f3 int, f4 int);
create view v1 as select * from t1, t2 where f1= f3;
insert into t1 values (1,11), (2,22);
insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10;
insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10;
The last INSERT above fails with error:
1178: The storage engine for the table doesn't support UPDATE in WRITE CONCURRENT

This problem happens also when running:
 ./mtr --mem insert  --mysqld=--binlog-format=row --ps-protocol  --mysqld=--default-storage-engine=maria
and also main.trigger and main.view exhibit these.
so don't forget to run these tests with the above mtr options before closing the bug.

How to repeat:
see description
[26 Sep 2008 13:46] Michael Widenius
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.
[26 Oct 2008 22:20] Bugs System
Pushed into 6.0.8-alpha  (revid:monty@mysql.com-20080926134951-jhu48x78j8yh0qm8) (version source revid:guilhem@mysql.com-20081020191322-i0e65e3k8044kkce) (pib:5)
[9 Jan 2009 15:28] MC Brown
Added a note to the 6.0.8 changelog: 

Performing a INSERT INTO ... ON DUPLICATE KEY UPDATE statement on a Maria table would fail with the error 1178: The storage engine for the table doesn't support UPDATE in WRITE CONCURRENT.