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

Bad result in view

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.8
    • 10.2.9
    • Parser, Views
    • None
    • Centos 7.3

    Description

      View return bad result "31457280.0000", but correct value is "30":

      MariaDB [test]> CREATE TABLE `t1` (bps INT);
      Query OK, 0 rows affected (0.01 sec)
       
      MariaDB [test]> INSERT INTO t1 (bps) VALUES(31457280);
      Query OK, 1 row affected (0.00 sec)
       
      MariaDB [test]> SELECT (t1.bps / (1024 * 1024)) AS Mbit FROM t1;
      +---------+
      | Mbit    |
      +---------+
      | 30.0000 |
      +---------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> CREATE VIEW v1 AS SELECT (t1.bps / (1024 * 1024)) AS Mbit FROM t1;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> SELECT * FROM v1;
      +---------------+
      | Mbit          |
      +---------------+
      | 31457280.0000 |
      +---------------+
      1 row in set (0.00 sec)
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            chaky Michal Hucik
            Votes:
            2 Vote for this issue
            Watchers:
            5 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.