Bug 861175

Summary: nova.services table uses the word "binary" as a column header
Product: Red Hat OpenStack Reporter: Dan Yocum <dyocum>
Component: openstack-novaAssignee: Nikola Dipanov <ndipanov>
Status: CLOSED NOTABUG QA Contact: Jaroslav Henner <jhenner>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.0 (Essex)CC: eglynn, ndipanov, pbrady
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-12 16:56:08 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:
Embargoed:

Description Dan Yocum 2012-09-27 18:00:54 UTC
Description of problem:

The mysql reserved word "binary" is used as a column header in the nova.services table.


Version-Release number of selected component (if applicable):

essex

How reproducible:

always

Steps to Reproduce:
1. mysql -B -e "use nova; select binary from services;"
2.
3.
  
Actual results:

ERROR 1064 (42000): 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 'from services' at line 1

Expected results:

output of all names of binaries on all cloud nodes.

Additional info:

See table 5.5.28 on this page for a list of all reserved mysql keywords:  

http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html

Comment 2 Pádraig Brady 2012-11-05 16:13:16 UTC
Should be fixed upstream.

Comment 3 Dan Yocum 2012-11-12 18:23:28 UTC
I'm sorry I don't understand.  Are you saying that the fix is applied upstream or that I should report this problem upstream?  

Please, please, oh, please, don't make me use launchpad...

;-)

Comment 4 Pádraig Brady 2012-11-13 12:14:31 UTC
I was saying this issue should be fixed upstream first, and thus reported there.
Though perhaps the cost of migrating now isn't worth it?
Even custom queries like this can easily be escaped:

# mysql -B -e 'use nova; select `binary` from services;'

Comment 5 Dan Yocum 2012-11-13 14:53:26 UTC
I'm actually OK with reporting it upstream - but since I discovered the problem in the our preview product, I figured I'd report it to the "vendor" and let you guys work it in upstream.

Comment 6 Nikola Dipanov 2012-12-12 16:56:08 UTC
This does not seem to be something we are willing to propose upstream and does not really seem to cause issues in practice so I am marking it as closed.