[MDEV-12876] Wrong data type for CREATE..SELECT sp_var Created: 2017-05-23  Updated: 2017-05-25  Resolved: 2017-05-23

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.1, 10.2, 10.3
Fix Version/s: 10.3.1

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: datatype

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed
Duplicate
is duplicated by MDEV-12917 Wrong data type for CREATE..SELECT ye... Closed

 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.



 Comments   
Comment by Alexander Barkov [ 2017-05-23 ]

Pushed to bb-10.2-ext

Generated at Thu Feb 08 08:01:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.