[MDEV-18814] The object name is quoted as a string. Created: 2019-03-04  Updated: 2019-04-02  Resolved: 2019-04-02

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.3.13
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Alena Subotina Assignee: Alexander Barkov
Resolution: Not a Bug Votes: 0
Labels: None

Attachments: PNG File Quote.png     File Script.7z    

 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;



 Comments   
Comment by Alexander Barkov [ 2019-04-02 ]

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
) |
+-------+--------------------------------------------------+

Generated at Thu Feb 08 08:46:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.