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

Wrong data type for CREATE..SELECT sp_var

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1, 10.2, 10.3
    • Fix Version/s: 10.3.1
    • Component/s: OTHER
    • Labels:

      Description

      DROP PROCEDURE IF EXISTS p1;
      DELIMITER $$
      CREATE PROCEDURE p1()
      BEGIN
        DECLARE a INT;
        DECLARE b FLOAT;
        CREATE OR REPLACE TABLE t1 AS SELECT a, b;
      END;
      $$
      DELIMITER ;
      CALL p1;
      DESCRIBE t1;
      

      +-------+------------+------+-----+---------+-------+
      | Field | Type       | Null | Key | Default | Extra |
      +-------+------------+------+-----+---------+-------+
      | a     | bigint(11) | YES  |     | NULL    |       |
      | b     | double     | YES  |     | NULL    |       |
      +-------+------------+------+-----+---------+-------+
      

      The expected data types would be INT and FLOAT.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: