[MDEV-15258] Ansi quotes does not work with password Created: 2018-02-09  Updated: 2018-02-10  Resolved: 2018-02-09

Status: Closed
Project: MariaDB Server
Component/s: Character Sets
Affects Version/s: 10.0.33-galera
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Jori Mäntysalo Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: ansi_quotes
Environment:

Ubuntu 16.04 LTS



 Description   

MariaDB [(none)]> SET SQL_MODE=ANSI_QUOTES;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> CREATE USER "foo"@"localhost" IDENTIFIED BY "bar";
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"bar"' at line 1
MariaDB [(none)]> CREATE USER "foo"@"localhost" IDENTIFIED BY 'bar';
Query OK, 0 rows affected (0.00 sec)



 Comments   
Comment by Alice Sherepa [ 2018-02-09 ]

Hi Jori,
As in ANSI_QUOTE mode " is treated as an identifier quote character (like the ` quote character) and not as a string quote character, so for IDENTIFIED BY 'authentication_string' ---"bar" in this mode is not valid and query returns an error.

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