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

Anchored ROW TYPE OF variables for a single column table fail to compare

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5
    • 11.8
    • Data types
    • None

    Description

      Explicit ROW definition does not allow rows with one member.
      But anchored definitions using ROW TYPE OF (or using %ROWTYPE with sql_type=ORACLE) do allow creation of rows with a single member.

      Such variables fail to compare:

      CREATE OR REPLACE TABLE t1 (a INT);
      INSERT INTO t1 VALUES (1);
      DELIMITER $$
      BEGIN NOT ATOMIC
        DECLARE v1 ROW TYPE OF t1;
        SELECT * FROM t1 INTO v1;
        SELECT v1=v1;
      END;
      $$
      

      ERROR 1241 (21000): Operand should contain 1 column(s)
      

      The expected result is to perform comparison like it's done for rows with two or more elements.

      Attachments

        Issue Links

          Activity

            There are no comments yet on this issue.

            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.