mysql eclasses: Add missing SQL command after setting root password wrt bug 574040
authorBrian Evans <grknight@gentoo.org>
Sun, 7 Feb 2016 20:47:48 +0000 (15:47 -0500)
committerBrian Evans <grknight@gentoo.org>
Sun, 7 Feb 2016 20:47:48 +0000 (15:47 -0500)
When updating the table by hand, we don't do FLUSH PRIVILEGES before inserting the
next command which can stop the loading of the timezone and help tables.

eclass/mysql-multilib-r1.eclass
eclass/mysql-multilib.eclass
eclass/mysql-v2.eclass

index e14a2a832beb80de53c2e70a50ca0838203e22ad..1512b21d4ddbeaedfb4d7feeb963f76deb477bcc 100644 (file)
@@ -952,7 +952,7 @@ mysql-multilib-r1_pkg_config() {
 
        ebegin "Setting root password"
        # Do this from memory, as we don't want clear text passwords in temp files
-       local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'"
+       local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
        "${EROOT}/usr/bin/mysql" \
                --socket=${socket} \
                -hlocalhost \
index 69293f100497c176d9dde84a4a4084f1cc0e9fb0..b2e7dffa09ad90b65a7ce9fae65dd1181b4495ca 100644 (file)
@@ -1140,7 +1140,7 @@ mysql-multilib_pkg_config() {
 
        ebegin "Setting root password"
        # Do this from memory, as we don't want clear text passwords in temp files
-       local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'"
+       local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
        "${EROOT}/usr/bin/mysql" \
                --socket=${socket} \
                -hlocalhost \
index 260420b5b40217da43dfc8de4b7f668e2a4b0f7c..556d37eba6ef7296a49b299398b563d1f118e9c8 100644 (file)
@@ -886,7 +886,7 @@ mysql-v2_pkg_config() {
 
        ebegin "Setting root password"
        # Do this from memory, as we don't want clear text passwords in temp files
-       local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'"
+       local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
        "${EROOT}/usr/bin/mysql" \
                --socket=${socket} \
                -hlocalhost \