Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39546

Unclear error message on OPEN strict_cursor FOR 'stmt'

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • 13.0
    • None
    • None
    • Can result in unexpected behaviour

    Description

      SET sql_mode=ORACLE;
      DELIMITER $$
      CREATE OR REPLACE PROCEDURE p1 AS
        TYPE rec0_t IS RECORD (a INT, b INT);
        TYPE cur0_t IS REF CURSOR RETURN rec0_t;
        c0 cur0_t;
      BEGIN
        OPEN c0 FOR 'SELECT 1,2';
      END;
      $$
      DELIMITER ;
      

      ERROR 4078 (HY000): Illegal parameter data types row<2> and row<0> for operation 'OPEN..FOR'
      

      The above error message is unclear.
      Note, it's correct that opening a strict cursor from a dynamic string not supported. But the error message should be clearer.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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