[MDEV-6572] "USE dbname" with a bad sequence erroneously connects to a wrong database Created: 2014-08-13 Updated: 2020-05-05 Resolved: 2015-03-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 5.3.12, 5.5.39, 10.0.14 |
| Fix Version/s: | 10.1.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
I create a database with some question marks in the name:
Now I run a "USE" query with a bad byte sequence:
(notice. '��' is a four-byte UTF-8 character, which is considered as a wrong It erroneously connects to the database 'test????':
The correct behaviour would be report either "unknown database", The latter would be consistent with what's reported on attempt to
A similar problem also happens with table names.
Now I change the connection character set to utf8mb4 and run a SELECT query:
It returns rows from the table `test????`:
The expected behaviour would be to return some error. |