diff options
author | Nirbhay Choubey <nirbhay.choubey@oracle.com> | 2012-09-21 23:28:55 +0530 |
---|---|---|
committer | Nirbhay Choubey <nirbhay.choubey@oracle.com> | 2012-09-21 23:28:55 +0530 |
commit | 600aa420d6bb17a2af779de11926ae1d3c122fd8 (patch) | |
tree | 3c6a54b44db1dfbd09c3170fc0899ce74ed2299d /sql/sql_insert.cc | |
parent | 91d6d38e70baddfcd5a99bfa4cabf38254673833 (diff) | |
download | mariadb-git-600aa420d6bb17a2af779de11926ae1d3c122fd8.tar.gz |
Bug#14645196 MYSQL CLIENT'S USE COMMAND FAILS
WHEN DBNAME CONTAINS MULTIPLE QUOTES
MySQL client's USE command might fail if the
database name contains multiple quotes (backticks).
The reason behind the failure being the method
that client uses to remove/escape the quotes
while parsing the USE command's option (dbname),
where the option parsing might terminate if a
matching quote is found.
Also, C-APIs like mysql_select_db() expect a
normalized dbname. Now, in certain cases, client
might fail to normalize dbname similar to that of
server and hence mysql_select_db() would fail.
Fixed by getting the normalized dbname (indirectly)
from the server by directly sending the "USE dbanme"
as query to the server followed by a "SELECT DATABASE()".
The above steps are only performed if number of quotes
in the dbname is greater than 2. Once the normalized
dbname is received, the original db is restored.
Diffstat (limited to 'sql/sql_insert.cc')
0 files changed, 0 insertions, 0 deletions