Bug #79989 "USE <db>" doesn't always change @@character_set_database to <db>'s charset
| Submitted: | 14 Jan 2016 16:25 | Modified: | 18 Jan 2016 12:31 |
|---|---|---|---|
| Reporter: | Yura Sorokin (OCA) | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
| Version: | 5.5.47, 5.6.28, 5.7.10, 5.5.48, 5.6.29, 5.7.11 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | character_set_database, Use | ||
[14 Jan 2016 16:25]
Yura Sorokin
[15 Jan 2016 6:20]
MySQL Verification Team
Hello Yura Sorokin, Thank you for the report and test case. Thanks, Umesh
[18 Jan 2016 12:31]
Yura Sorokin
Just want to give another example which shows that users might encounter unexpected results when executing their statements because of this bug. If the statement "SELECT '00' UNION SELECT '10' INTO OUTFILE 'tmp.txt';" is executed before the code fragment in the bug description, 'tmp.txt' will be 6 bytes in size (written in latin1 encoding). However, if the same statement is executed after that code fragment (bacause @@character_set_database has silently changed), 'tmp.txt' will be 10 bytes in size (written in ucs2 encoding).
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.