Merge lp:~mbruzek/charms/precise/mysql/addescapes into lp:charms/mysql

Proposed by Matt Bruzek
Status: Merged
Merged at revision: 120
Proposed branch: lp:~mbruzek/charms/precise/mysql/addescapes
Merge into: lp:charms/mysql
Diff against target: 21 lines (+2/-2)
1 file modified
hooks/master-relation-changed (+2/-2)
To merge this branch: bzr merge lp:~mbruzek/charms/precise/mysql/addescapes
Reviewer Review Type Date Requested Status
Charles Butler (community) Approve
Review via email: mp+215239@code.launchpad.net

Description of the change

I noticed that on a departed relation the mysql command was not properly escaped. Fixing that with this MP.

To post a comment you must log in.
Revision history for this message
Matt Bruzek (mbruzek) wrote :

I used the mysql command 8 lines above to get the proper escape syntax.

Revision history for this message
Charles Butler (lazypower) wrote :

Thanks for the submission Matt,

I've deployed the requested change and validated it works. The merge will show up in the store approx 15 to 30 minutes post merge.

If you have any questions/comments/concerns about the review contact us in #juju on irc.freenode.net or email the mailing list <email address hidden>

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/master-relation-changed'
2--- hooks/master-relation-changed 2014-03-17 16:28:58 +0000
3+++ hooks/master-relation-changed 2014-04-10 16:10:21 +0000
4@@ -2,7 +2,7 @@
5 #
6 # Master side of master/slave replication
7
8-set -e
9+set -ex
10
11 . $CHARM_DIR/lib/net.sh
12
13@@ -78,7 +78,7 @@
14 port=3306
15 ;;
16 departed)
17- mysql $ROOTARGS -e "REVOKE REPLICATION SLAVE, REPLICATION CLIENT ON *.* FROM `$user`@`$remote_ip`"
18+ mysql $ROOTARGS -e "REVOKE REPLICATION SLAVE, REPLICATION CLIENT ON *.* FROM \`$user\`@\`$remote_ip\`"
19 ;;
20 broken)
21 # XXX Need some way to tie users to relation ID

Subscribers

People subscribed via source and target branches

to all changes: