[MCOL-4702] UPDATE and DELETE using JOINS over VIEW do not work Created: 2021-04-30  Updated: 2023-07-02

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: None
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Gregory Dorman (Inactive) Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Issue split
split from MCOL-4687 Insert from view regression Closed

 Description   

This is a split off 4687 (INSERT AS SELECT FROM VIEW).

Remaining problem:

DROP TABLE IF EXISTS t1,t2;
DROP VIEW IF EXISTS v1;
CREATE TABLE t1 (id INT, fname VARCHAR(20)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,'Greg');
CREATE VIEW v1 as SELECT * FROM t1;
SELECT * FROM v1;
CREATE TABLE t2 (id INT, fname VARCHAR(20)) ENGINE=Columnstore;
INSERT INTO t2 VALUES (1,'Roman');
UPDATE t2,v1 SET t2.fname=v1.fname WHERE t2.id=v1.id;
ERROR 1178 (42000): The storage engine for the table doesn't support IDB-1011: Update on VIEW is currently not supported.
DELETE t2 FROM t2,v1 WHERE t2.id=v1.id;
ERROR 1178 (42000): The storage engine for the table doesn't support IDB-1011: Delete on VIEW is currently not supported.



 Comments   
Comment by Gagan Goel (Inactive) [ 2021-06-25 ]

In addition to the above error while updating a ColumnStore table with source as an InnoDB view, the following case is also erroring out (source is a ColumnStore view):

MariaDB [test]> create table c1 (a int)engine=columnstore;
Query OK, 0 rows affected (0.765 sec)
 
MariaDB [test]> create view v2 as select * from c1;
Query OK, 0 rows affected (0.007 sec)
 
MariaDB [test]> update c1 dest join v2 src on dest.a=src.a set dest.a=src.a;
ERROR 1178 (42000): The storage engine for the table doesn't support IDB-1011: Update on VIEW is currently not supported.

Generated at Thu Feb 08 02:52:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.