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

Behaviour of SQL_NO_CACHE in derived tables is not consistent

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.1, 10.2, 10.3, 10.4
    • 10.4
    • Parser
    • None

    Description

      This script (notice sql_no_cache is used as a column name rather than an option):

      CREATE OR REPLACE TABLE t1 (sql_no_cache INT);
      SELECT * FROM (SELECT 1 UNION SELECT SQL_NO_CACHE FROM t1) AS t1;
      

      returns:

      +------+
      | 1    |
      +------+
      |    1 |
      +------+
      

      This script:

      CREATE OR REPLACE TABLE t1 (sql_no_cache INT);
      SELECT * FROM (SELECT SQL_NO_CACHE FROM t1) AS t1;
      

      returns

      ERROR 1234 (42000): Incorrect usage/placement of 'SQL_NO_CACHE'
      

      Looks wrong. It should return the result.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              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.