[MDEV-19181] Different output from stored procedure on windows vs linux Created: 2019-04-05  Updated: 2022-08-04

Status: Open
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 10.2.23, 10.3.14
Fix Version/s: 10.3

Type: Bug Priority: Major
Reporter: Estrategy | Support Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None
Environment:

ubuntu 1404 16045 1804
Windows 10 x64, Windows Server 2016 Standard x64



 Description   

After migrating a db instance to linux, we discovered some issues when receiving data from a stored procedure with the connector.net in c#
The problem is also visible when executing the script.
On 10.2 and 10.3 on windows we retreive the colomn types

[dummy and tt]
id unsigned int(10),
score smallint(6)
casted int(6)

On 10.2 on linux we retreive the colomn types

[dummy]
id unsigned int(10),
score smallint(6)
casted BIGINT(6)
[tt]
id unsigned int(10),
score smallint(6)
casted int(6)

On linux 10.3 the columns are equal to the windows environment.

DROP TABLE IF EXISTS dummy;
CREATE TABLE dummy (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `score` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
DELIMITER $$
DROP PROCEDURE IF EXISTS pTest$$
CREATE PROCEDURE pTest()
BEGIN
SELECT id, score,CAST(COALESCE(score, 0) AS SIGNED) AS CASTED  FROM dummy;
CREATE TEMPORARY TABLE TT AS(
SELECT id, score,CAST(COALESCE(score, 0) AS SIGNED) AS CASTED  FROM dummy
);
  SELECT * FROM TT;
  DROP TEMPORARY TABLE TT;
END$$
DELIMITER ;
CALL pTest();
DROP PROCEDURE IF EXISTS  pTest;
 
 
DROP TABLE dummy;


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