Bug 810627

Summary: mysql_install_db fails with sql-mode NO_BACKSLASH_ESCAPES
Product: [Fedora] Fedora Reporter: Jon Dufresne <jon.dufresne>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: hhorak, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-07 15:42:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jon Dufresne 2012-04-07 11:05:00 UTC
Description of problem:
In /etc/my.cnf set sql-mode to NO_BACKSLASH_ESCAPES:

sql-mode=NO_BACKSLASH_ESCAPES

Once set run mysql_install_db. Some SQL fails, but the install continues.

# mysql_install_db 
Installing MySQL system tables...
OK
Filling help tables...
ERROR: 1064  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'abc\'), UNHEX(HEX(\'abc\'));\n        -> \'abc\', 616263, \'abc\'\nmysql> SELECT' at line 1
120407  3:57:42 [ERROR] Aborting

120407  3:57:42 [Note] /usr/libexec/mysqld: Shutdown complete

...

Version-Release number of selected component (if applicable):
$ rpm -qa mysql\*
mysql-server-5.5.21-1.fc16.x86_64
mysql-embedded-5.5.21-1.fc16.x86_64
mysql-connector-odbc-5.1.8-3.fc16.x86_64
mysql-5.5.21-1.fc16.x86_64
mysql-libs-5.5.21-1.fc16.x86_64

How reproducible:
100%

Comment 1 Tom Lane 2012-04-07 14:45:06 UTC
This does not look to me like an error in the Fedora packaging of mysql, but an unsupported case in the upstream code.  If you think it's important for it to work, I'd suggest filing a bug upstream at bugs.mysql.com.

Comment 2 Jon Dufresne 2012-04-07 15:42:05 UTC
Filed upstream bug. http://bugs.mysql.com/bug.php?id=64899