[MCOL-1482] cross-engine update... join... not working when updating innodb tables Created: 2018-06-18  Updated: 2022-03-29  Resolved: 2021-07-02

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: 1.1.4
Fix Version/s: 6.1.1

Type: New Feature Priority: Blocker
Reporter: antoine Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 2
Labels: Compatibility
Environment:

debian9, deb package


Issue Links:
Relates
relates to MCOL-4765 Allow condition pushdown to ColumnSto... Open
Epic Link: ColumnStore Compatibility Improvements
Sprint: 2021-9

 Description   

It seems that an update statement cannot update innodb tables with columnstore content
(but an update statement can update columnstore tables with innodb content)

here is an example:

-- create a columnstore and an innodb table
drop table if exists mcs; drop table if exists idb; 
create table mcs(a int, b int) engine=columnstore;
create table idb(a int, b int) engine=innodb;
 
-- insert some rows
insert into mcs(a,b) values(1,2),(2,3),(4,5);
insert into idb(a,b) values(1,2),(2,3),(4,5);
 
-- columnstore can be update with innodb
update mcs dest join idb src on dest.a=src.a set dest.b=src.b;
 
--- ERROR: innodb cannot be update with columnstore
update idb dest join mcs src on dest.a=src.a set dest.b=src.b;
 
=> Error Code: 1815. Internal error: IDB-2006: 'my_db.idb' does not exist in Columnstore.

a workaround is to create a temp innodb table, insert from columnstore into this table with an INSERT... SELECT..., then update from innodb to innodb, then drop the temp innodb table. But that's a bit complicated and lengthy



 Comments   
Comment by Roman [ 2018-06-22 ]

Greetings.
This is a known limitation, that won't be addressed until at least 1.4.

Comment by antoine [ 2018-06-22 ]

ok, thanks. too bad.

Comment by Daniel Lee (Inactive) [ 2021-07-02 ]

Build verified: 6.1.1 ( Drone #2635)

Reproduced the issue in 5.6.1 and verified the fix in 6.1.1. Also tested update on views.

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