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

SFORMAT: Pass down FLOAT as FLOAT, without upcast to DOUBLE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.7(EOL)
    • 10.7.1
    • Server
    • None

    Description

      Split from MDEV-25015

      10.7.0 53b2c1f4664a3cb90f583979d9aa2771b7e1c98d (Debug)

      10.7.0-dbg>CREATE TABLE t1 (c1 FLOAT);
      Query OK, 0 rows affected (0.013 sec)
       
      10.7.0-dbg>INSERT INTO t1 VALUES (1.1);
      Query OK, 1 row affected (0.003 sec)
       
      10.7.0-dbg>SELECT * FROM t1;
      +------+
      | c1   |
      +------+
      |  1.1 |
      +------+
      1 row in set (0.001 sec)
       
      10.7.0-dbg>SELECT SFORMAT('{}',(SELECT 1.1));
      +----------------------------+
      | SFORMAT('{}',(SELECT 1.1)) |
      +----------------------------+
      | 1.1                        |
      +----------------------------+
      1 row in set (0.000 sec)
       
      10.7.0-dbg>SELECT SFORMAT('{}',(SELECT c1 FROM t1));
      +-----------------------------------+
      | SFORMAT('{}',(SELECT c1 FROM t1)) |
      +-----------------------------------+
      | 1.100000023841858                 |
      +-----------------------------------+
      1 row in set (0.001 sec)
      

      And libfmt can print floats correctly, so pass float as float.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.