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

The object name is quoted as a string.

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.3.13
    • N/A
    • OTHER
    • None

    Description

      Preconditions: MariaDB 10.3.13 is installed from box.
      Only information_schema, mysql and performance_schema are available after installation. No user databases are present.
      All actions are performed with the user root.
      Steps to reproduce:
      1. Run the command line and execute the command:
      "C:\Program Files\MariaDB 10.3\bin\mysql.exe" -u root -proot
      2. Execute the script (see attachment) with the command: source D:/Script.sql
      After the script is executed, the db1 database will be created with one table and one package.
      3. Execute the query: SHOW CREATE PACKAGE db1.pg_simple;

      Attachments

        1. Quote.png
          Quote.png
          28 kB
        2. Script.7z
          0.5 kB

        Activity

          bar Alexander Barkov added a comment - - edited

          This behaviour is expected:
          sql_mode=ORACLE includes the ANSI_QUOTES flag, which changes the meaning of strings in double quotes from string literal to identifier. With ANSI_QUOTES enabled all SHOW statements display identifiers with double quotes instead of backticks:

          SET sql_mode=ORACLE;
          CREATE OR REPLACE TABLE t1 (a INT);
          SHOW CREATE TABLE t1;
          

          +-------+--------------------------------------------------+
          | Table | Create Table                                     |
          +-------+--------------------------------------------------+
          | t1    | CREATE TABLE "t1" (
            "a" int(11) DEFAULT NULL
          ) |
          +-------+--------------------------------------------------+
          

          bar Alexander Barkov added a comment - - edited This behaviour is expected: sql_mode=ORACLE includes the ANSI_QUOTES flag, which changes the meaning of strings in double quotes from string literal to identifier . With ANSI_QUOTES enabled all SHOW statements display identifiers with double quotes instead of backticks: SET sql_mode=ORACLE; CREATE OR REPLACE TABLE t1 (a INT ); SHOW CREATE TABLE t1; +-------+--------------------------------------------------+ | Table | Create Table | +-------+--------------------------------------------------+ | t1 | CREATE TABLE "t1" ( "a" int(11) DEFAULT NULL ) | +-------+--------------------------------------------------+

          People

            bar Alexander Barkov
            AlenaS Alena Subotina
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.