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

Different output from stored procedure on windows vs linux

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2.23, 10.3.14
    • 10.3
    • Data types
    • None
    • 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;
      
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            EstrategySupport Estrategy | Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.