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

Incorrect Query Result when Adding Columns

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.11
    • None
    • Data types
    • None

    Description

      CREATE TABLE IF NOT EXISTS t0 (
          c0 FLOAT,
          c0_1 DOUBLE,
          c0_2 VARCHAR(100),
          c1 VARCHAR(500) NULL
      );
      INSERT INTO t0 VALUES ('0.0171682', '0', '0.0171682', '0.028583989421476108');
       
      MariaDB [test]> SELECT * FROM T0;
      +-----------+------+-----------+----------------------+
      | c0        | c0_1 | c0_2      | c1                   |
      +-----------+------+-----------+----------------------+
      | 0.0171682 |    0 | 0.0171682 | 0.028583989421476108 |
      +-----------+------+-----------+----------------------+
      

      Execute the query:

      SELECT (t0.c0_1 + t0.c0_2) AS ref0 FROM t0 WHERE (t0.c0_1 + t0.c0_2);
      

      Expected Result:
      The query should return a single row with the value 0.0171682 in the ref0 column.

      Actual Result:
      The query returns an empty set.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dwenking chaos
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.