Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7519

debian / ubuntu packaging creation of plugin table (if not exists)

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';" `
       

      Attachments

        Activity

          'IF NOT EXISTS' was added by Monty in this patch:

          revno: 3543
          revision-id: monty@askmonty.org-20121002132622-2iews7w28r5kp6fk
          parent: sanja@montyprogram.com-20120925104511-okm43niqk8jkf9vc
          committer: Michael Widenius <monty@askmonty.org>
          branch nick: maria-5.5
          timestamp: Tue 2012-10-02 16:26:22 +0300
          message:
            Fixed installation issues on debian:
            - Don't abort if plugin table exists
            - Use longer timeout for start/stop of mysqld

          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

          elenst Elena Stepanova added a comment - 'IF NOT EXISTS' was added by Monty in this patch: revno: 3543 revision-id: monty@askmonty.org-20121002132622-2iews7w28r5kp6fk parent: sanja@montyprogram.com-20120925104511-okm43niqk8jkf9vc committer: Michael Widenius <monty@askmonty.org> branch nick: maria-5.5 timestamp: Tue 2012-10-02 16:26:22 +0300 message: Fixed installation issues on debian: - Don't abort if plugin table exists - Use longer timeout for start/stop of mysqld 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
          elenst Elena Stepanova added a comment - Pushed into 5.5 tree: http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/4423

          People

            elenst Elena Stepanova
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.