[MCOL-829] Implement stored procedure INSERT...SELECT Created: 2017-07-24  Updated: 2017-12-01  Resolved: 2017-07-25

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: None
Fix Version/s: 1.0.10, 1.1.0

Type: New Feature Priority: Major
Reporter: Andrew Hutchings (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2017-14, 2017-15

 Description   

vtable mode only supports SELECT. I believe we can implement INSERT...SELECT by setting the thd->infinidb_vtable.isInsertSelect flag when one is found.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2017-07-24 ]

Test case:

create table mcol829a (a int, b int) engine=columnstore;
create table mcol829b (a int, b int) engine=columnstore;
insert into mcol829a values (1,1),(2,2),(3,3);
delimiter //
create procedure mcol829() begin insert into mcol829b select * from mcol829a; end//
delimiter ;
call mcol829();

Before the fix this will error with:

ERROR 1178 (42000): The storage engine for the table doesn't support This stored procedure syntax is not supported by Columnstore in this version

After the fix it will execute the INSERT...SELECT correctly.

Comment by Andrew Hutchings (Inactive) [ 2017-07-24 ]

Pull requests for 1.0 and 1.1 as well as both versions of the regression suite.

Comment by Daniel Lee (Inactive) [ 2017-07-25 ]

Builds verified: Github source 1.0.10, 1.1.0

Reproduced the issue in 1.0.9-1.

1.0.10

[root@localhost mariadb-columnstore-server]# git show
commit 6e32a494b4387f3a501bc09addeffacb68eb8e99
Merge: 435972e 87f4873
Author: David.Hall <david.hall@mariadb.com>
Date: Tue Jul 25 00:25:21 2017 -0500

[root@localhost mariadb-columnstore-engine]# git show
commit aa27537874868745ea4086b0a1279191e07779df
Merge: 93794c9 7e568f5
Author: david hill <david.hill@mariadb.com>
Date: Mon Jul 24 10:09:17 2017 -0500

1.1.0

[root@localhost mariadb-columnstore-server]# git show
commit e475edfb8c267e4a4917a2437bef887bb4c7e630
Merge: 8e07495 81e053d
Author: David.Hall <david.hall@mariadb.com>
Date: Tue Jul 25 00:25:40 2017 -0500

[root@localhost mariadb-columnstore-engine]# git show
commit bbad7882d25578ff6c5ef6df7458b10c37941bc6
Merge: 853eb13 1c032cb
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Mon Jul 24 15:07:27 2017 +0100

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