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

SFORMAT Does not allow @variable use

    XMLWordPrintable

Details

    Description

      10.7.0 53b2c1f4664a3cb90f583979d9aa2771b7e1c98d (Debug) preview-10.7-MDEV-25015-sformat

      10.7.0-dbg>SET @a=3.14;
      Query OK, 0 rows affected (0.000 sec)
       
      10.7.0-dbg>CREATE TABLE t1 SELECT @a;
      Query OK, 1 row affected (0.019 sec)
      Records: 1  Duplicates: 0  Warnings: 0
       
      10.7.0-dbg>SHOW CREATE TABLE t1\G
      *************************** 1. row ***************************
             Table: t1
      Create Table: CREATE TABLE `t1` (
        `@a` decimal(65,38) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1
      1 row in set (0.000 sec)
       
      10.7.0-dbg>SELECT SFORMAT ('FLOAT {:.5f}',@a);
      +-----------------------------+
      | SFORMAT ('FLOAT {:.5f}',@a) |
      +-----------------------------+
      | NULL                        |
      +-----------------------------+
      1 row in set, 1 warning (0.000 sec)
       
      10.7.0-dbg>SHOW WARNINGS;
      +---------+------+---------------------------------------+
      | Level   | Code | Message                               |
      +---------+------+---------------------------------------+
      | Warning | 4183 | SFORMAT error: invalid type specifier |
      +---------+------+---------------------------------------+
      1 row in set (0.000 sec)
       
      10.7.0-dbg>SELECT SFORMAT ('FLOAT {:.5f}',3.14);
      +-------------------------------+
      | SFORMAT ('FLOAT {:.5f}',3.14) |
      +-------------------------------+
      | FLOAT 3.14000                 |
      +-------------------------------+
      1 row in set (0.000 sec)
      

      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.