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

Connect engine: remote smallint unsigned is considered as smallint signed

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.14, 10.0, 10.1
    • Fix Version/s: 10.1.16, 10.0.27
    • Labels:
      None
    • Environment:
      3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64 GNU/Linux

      Description

      Scenario:

      Remote Server
      ---------------------

      CREATE TABLE a (
      `v` SMALLINT UNSIGNED
      ) Engine = InnoDB;

      INSERT INTO `a` VALUES(40000);

      Local server
      ---------------------

      CREATE TABLE `rem` ENGINE=CONNECT DEFAULT CHARSET=utf8 `TABLE_TYPE`='MYSQL' `DBNAME`='db' `SRCDEF`='SELECT * FROM a' `OPTION_LIST`='host=127.0.0.1,port=3301,user=user,password=password';

      SELECT * FROM `rem`;

      Actual result
      -----------------------
      0) `rem` table has `v` column defined as smallint(5).
      1) Value of `v` column is selected as 32767 instead of 40000.
      2) Out of range warning is generated.

      Desired result
      -------------------------
      0) `rem` table has `v` column defined as smallint unsigned.
      1) Value of `v` column is selected as 40000.

        Attachments

          Activity

            People

            • Assignee:
              bertrandop Olivier Bertrand
              Reporter:
              Sergey.Antonyuk Sergey Antonyuk
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: