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

SELECT INTO arroc_array does not work for ROWTYPE

    XMLWordPrintable

Details

    • Can result in unexpected behaviour

    Description

      SET sql_mode=ORACLE;
      CREATE OR REPLACE TABLE t1 (a INT, b VARCHAR(10));
      INSERT INTO t1 VALUES (10,'b10');
      DELIMITER $$
      CREATE OR REPLACE PROCEDURE p1() AS
        TYPE assoc0_t IS TABLE OF t1%ROWTYPE INDEX BY INT;
        a0 assoc0_t;
      BEGIN
        SELECT * INTO a0(30) FROM t1;
      END;
      $$
      DELIMITER ;
      CALL p1();
      

      ERROR 1222 (21000): The used SELECT statements have a different number of columns
      

      The above output is not expected. It should assign a t1 row value into a0(30).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.