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

Converting integers to float numbers returns unexpected results in mariadb

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.3.2
    • None
    • Server
    • None
    • x86 and macOS

    Description

      CREATE TABLE t0 (
      c0 FLOAT DEFAULT NULL,
      c1 TEXT DEFAULT NULL,
      c2 FLOAT NOT NULL,
      PRIMARY KEY (c2)
      );

      INSERT INTO t0 VALUES (NULL, ' \nvHr', -1.805790031E9), (NULL, 'nb0otl', 0.007098603), (500216130, 'Wn', 0.020739017), (NULL, NULL, 0.09841974), (NULL, NULL, 0.35942525), (NULL, '362105892', 0.39435965), (NULL, NULL, 0.46104088), (NULL, '6(塄^iD6B', 0.47216758), (NULL, NULL, 0.4847922), (NULL, NULL, 0.6031779), (0.95755357, '864424835', 0.62653536), (NULL, NULL, 0.9029423), (NULL, NULL, 0.9647869), (NULL, NULL, 0.9814666), (NULL, 'f^', 506079200);

      SELECT t0.c0 FROM t0 WHERE t0.c0 IS NOT NULL GROUP BY t0.c2;

      Expected:
      -----------

      c0

      -----------

      500216000
      0.957554

      -----------

      Result:
      MySQL> SELECT t0.c0 FROM t0 WHERE t0.c0 IS NOT NULL GROUP BY t0.c2;
      ------------

      c0

      ------------

      500216130
      0.95755357

      ------------
      2 rows in set (0.002 sec)

      Attachments

        Activity

          People

            Unassigned Unassigned
            yangshijie yangshijie
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.