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

Connect engine: remote smallint unsigned is considered as smallint signed

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.14, 10.0, 10.1
    • 10.1.16, 10.0.27
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.