MySQL 5.6 syntax error with revoke

Bug #1292690 reported by Mat Lowery
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Undecided
Mat Lowery

Bug Description

The current MySQL guest agent, which mostly works with MySQL 5.6, issues the following REVOKE SQL:

    REVOKE ALL ON `tintin`.* FROM `tico`@`%` IDENTIFIED BY PASSWORD '*FA5CD0D6C1C6FDB957EE840BD8F8B2A00433EC19';

On MySQL 5.6, this results in a syntax error.

    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 ''*FA5CD0D6C1C6FDB957EE840BD8F8B2A00433EC19'' at line 1

You can reproduce with the following SQL on MySQL 5.5 and 5.6 without using Trove:

    create database testdb1;
    use testdb1;
    CREATE USER 'mat'@'%' IDENTIFIED BY 'password';
    GRANT ALL ON testdb1.* TO mat@'%' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19';
    REVOKE ALL ON testdb1.* FROM mat@'%' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19';

The following works on both MySQL 5.5 and 5.6:

    REVOKE ALL ON testdb1.* FROM mat@'%'

Neither the 5.5 nor the 5.6 documentation mentions IDENTIFIED BY in REVOKE:
* http://dev.mysql.com/doc/refman/5.5/en/revoke.html
* http://dev.mysql.com/doc/refman/5.6/en/revoke.html

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/80694

Changed in trove:
assignee: nobody → Mat Lowery (mat-lowery)
status: New → In Progress
Mat Lowery (mat-lowery)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/80694
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=cc80b17aff8ab4ec7c0e7ac3a5bd0c8405ade129
Submitter: Jenkins
Branch: master

commit cc80b17aff8ab4ec7c0e7ac3a5bd0c8405ade129
Author: Mat Lowery <email address hidden>
Date: Fri Mar 14 15:28:26 2014 -0500

    Remove IDENTIFIED BY clause for MySQL REVOKE

    IDENTIFIED BY is not documented for REVOKE in MySQL 5.5 and 5.6 and
    furthermore produces a syntax error on MySQL 5.6.

    Change-Id: Ib7bf1ba0ce049c1ed8a90292064a1e05724170e0
    Closes-Bug: #1292690

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
milestone: none → icehouse-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: icehouse-rc1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.