Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-391

cursors in stored procedures over columnstore tables not supported

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.4
    • 5.5.1
    • MariaDB Server
    • None

    Description

      You can create a stored procedure that creates cursors over column store tables, however the stored procedure will fail to execute with the following error:
      ERROR 1178 (42000): The storage engine for the table doesn't support This stored procedure syntax is not supported by Columnstore in this version

      This was also unsupported in InfiniDB.

      Couple cases to verify / repro.

      Basic table setup:

      create table t1(i int) engine=columnstore;
      insert into t1 values (1), (2);
      

      Insert select:

      delimiter //
      create or replace procedure p()  begin create table tmp(i int) engine=memory; insert into tmp(i) select sum(i) from t1; select * from tmp; drop table tmp; end;//
      call p//
      ERROR 1178 (42000): The storage engine for the table doesn't support This stored procedure syntax is not supported by Columnstore in this version
      

      cursor case:

      create or replace procedure q()  begin declare done int default false; declare x int; declare c1 cursor for select i from t1; declare continue handler for not found set done = true; open c1; rl:loop fetch c1 into x; if done then leave rl; end if; end loop; close c1; end;//
       call q//
      ERROR 1178 (42000): The storage engine for the table doesn't support This stored procedure syntax is not supported by Columnstore in this version
      

      In both cases, making table t1 an innodb table will result in the call invocation completing.

      Attachments

        Activity

          People

            toddstoffel Todd Stoffel (Inactive)
            dthompson David Thompson (Inactive)
            Votes:
            9 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.