Details
Description
Debian has CREATE TABLE IF NOT EXISTS plugin and Ubuntu only has CREATE TABLE plugin.
Thinking Ubuntu should have IF NOT EXISTS too. It might fail otherwise.
--- debian/dist/Ubuntu/mariadb-server-10.0.postinst 2014-05-25 15:03:40.306600000 +1000
+++ debian/dist/Debian/mariadb-server-10.0.postinst 2014-05-25 15:03:40.306600000 +1000
@@ -213,7 +212,7 @@
# admin might already have chosen to remove one or more plugins. Newlines are necessary.
install_plugins=`/bin/echo -e \
"USE mysql;\n" \
- "CREATE TABLE plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \
+ "CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \
" dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \
" PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';" `
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
'IF NOT EXISTS' was added by Monty in this patch:
Apparently, it should be applied to Ubuntu also.
Here is the whole patch (so it's the only change that's missing):
$ bzr diff -c 3543 === modified file 'debian/dist/Debian/mariadb-server-5.5.postinst' --- debian/dist/Debian/mariadb-server-5.5.postinst 2012-07-12 13:32:35 +0000 +++ debian/dist/Debian/mariadb-server-5.5.postinst 2012-10-02 13:26:22 +0000 @@ -212,7 +212,7 @@ # admin might already have chosen to remove one or more plugins. Newlines are necessary. install_plugins=`/bin/echo -e \ "USE mysql;\n" \ - "CREATE TABLE plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \ + "CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \ " dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \ " PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';" ` === modified file 'debian/mariadb-server-5.5.mysql.init' --- debian/mariadb-server-5.5.mysql.init 2012-01-28 20:22:14 +0000 +++ debian/mariadb-server-5.5.mysql.init 2012-10-02 13:26:22 +0000 @@ -109,7 +109,7 @@ /usr/bin/mysqld_safe > /dev/null 2>&1 & # 6s was reported in #352070 to be too few when using ndbcluster - for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-14}"); do + for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}"); do sleep 1 if mysqld_status check_alive nowarn ; then break; fi log_progress_msg "." @@ -142,7 +142,7 @@ log_daemon_msg "Killing MariaDB database server by signal" "mysqld" killall -15 mysqld server_down= - for i in 1 2 3 4 5 6 7 8 9 10; do + for i in 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10; do sleep 1 if mysqld_status check_dead nowarn; then server_down=1; break; fi done