[MCOL-1854] ERROR 1815, 'Internal error: Query cannot be processed using operational mode 1 (vtable mode) Created: 2018-11-03  Updated: 2021-02-21  Resolved: 2021-02-21

Status: Closed
Project: MariaDB ColumnStore
Component/s: N/A
Affects Version/s: 1.2.2
Fix Version/s: 1.4.5

Type: Bug Priority: Major
Reporter: Martin Adamec Assignee: Unassigned
Resolution: Won't Do Votes: 1
Labels: None


 Description   

I ran into the error 1815, 'Internal error: Query cannot be processed using operational mode 1 (vtable mode) when executing this query:

INSERT INTO `rate_curve` (`id`, `type_id`, `currency_id`, `market_date`, `rate_date`, `rate`, `batch_id`) SELECT DISTINCT @i:=@i+1, 1, 1, `date`, `expiry`, ROUND(`risk_free_rate`,6), 247 FROM `tradealert`.`rates` WHERE `date` BETWEEN "2018-01-02" and "2018-03-29" ORDER BY `date`, `expiry`;

I later figured out what is triggering the error. It is this construct: @i:=@i+1 in the SELECT clause. When I replaced it by constant it ran and did not give me any error. Using variables is pretty standard ANSI SQL stuff and I expected this workaround for autoincrement will completely work. The workaround is necessary because of the reason that has something to do with autoincrement numbers "consumption" from the sequence when adding records into the table using mcsimport utility having autoincrement column value set to 0. We ran into the case where just few millions of record blew through the entire INT(11) supply of integer numbers. Because of that we decided to take care of "autoincrementing" the surrogate key for tables ourselves and we used the mechanism outlined in the query above.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2018-11-03 ]

This is an inherent problem of the vtable design unfortunately. We are working towards removing vtable in the future whilst keeping all the performance gains it gives us. Until then this is a limitation.

Comment by Todd Stoffel (Inactive) [ 2021-02-21 ]

Obsolete

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