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

LP:484120 - Upgrade from MySQL server requires extra server restart to upgrade tables properly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      I tried today installing mariadb-server-5.1 (5.1.39-ourdelta67) on an Ubuntu 8.04 machine that previously ran the standard Ubuntu MySQL 5.0, so an upgrade scenario.

      After the install, I see this in the /var/log/daemon.log from the bootstrap done during postinst:

      Nov 17 10:40:52 odin mysqld_safe[10176]: 091117 10:40:52 [Warning] options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set
      Nov 17 10:40:52 odin mysqld_safe[10176]: ERROR: 1136 Column count doesn't match value count at row 1
      Nov 17 10:40:52 odin mysqld_safe[10176]: 091117 10:40:52 [ERROR] Aborting

      It seems this comes from this line in mariadb-server-5.1.postinst:

      echo "$replace_query" | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER

      The problem is that my mysql.user table is missing the columns Event_priv and Trigger_priv. The postinst script tries to add them with this statement:

      fix_privs=`/bin/echo -e \
      "USE mysql;\n" \
      "ALTER TABLE user ADD column Create_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
      "ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
      "ALTER TABLE user ADD column Create_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
      "ALTER TABLE user ADD column Alter_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
      "ALTER TABLE user ADD column Create_user_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
      "ALTER TABLE user ADD column Event_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
      "ALTER TABLE user ADD column Trigger_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " `

      But this failed to create the Event_priv and Trigger_priv columns. This is not surprising, as in MySQL 5.0 the other columns are already present. So the first ALTER TABLE fails and bootstrap aborts. (I did not find any error message in the logs for failing ALTER TABLE, not sure why...)

      Manually adding the Event_priv and Trigger_priv columns and re-installing seems to get rid of the "Column count doesn't match value count" error.

      A possible solution might be to seperate this into two bootstrap statements, so that Event_priv and Trigger_priv will be created even if adding the other columns fails.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            knielsen Kristian Nielsen added a comment -

            Re: "ERROR: 1136 Column count doesn't match value count at row 1" when installing mariadb-server-5.1
            Ok, the problem here is a bit deeper, and different from what I first thought.

            The above error message about multiple columns is also there when upgrading the stock MySQL 5.0 to stock MySQL 5.1 in Ubuntu Jaunty. As is the syntax error.

            Seems that these ADD COLUMN statements are just some old cruft that never worked, nor were needed?!?

            The actual upgrade of the system tables to 5.1 format is done when the /etc/init.d/mysql start script calls mysql_upgrade during startup (mysql_upgrade is the 5.1 replacement for mysql_fix_privilege_tables). This happens on every start of the mysql server.

            I just tested an upgrade from mysql 5.0 to mariadb 5.1.39 on Ubuntu Hardy. There was some issue with a stuck mysqld_safe which I want to investigate further, but after second restart of mysql I checked and mysql.user / mysql.db were ok and correctly upgraded by mysql_upgrade by the startup script.

            I suspect that the reason I saw a problem was due to other issues with my install and/or waiting for mysqlcheck to finish before the upgrade is actually done. At least also my original install seems ok now.

            Will double check and then if no further problems I will just remove the useless, non-functional SQL from the postinst.

            Show
            knielsen Kristian Nielsen added a comment - Re: "ERROR: 1136 Column count doesn't match value count at row 1" when installing mariadb-server-5.1 Ok, the problem here is a bit deeper, and different from what I first thought. The above error message about multiple columns is also there when upgrading the stock MySQL 5.0 to stock MySQL 5.1 in Ubuntu Jaunty. As is the syntax error. Seems that these ADD COLUMN statements are just some old cruft that never worked, nor were needed?!? The actual upgrade of the system tables to 5.1 format is done when the /etc/init.d/mysql start script calls mysql_upgrade during startup (mysql_upgrade is the 5.1 replacement for mysql_fix_privilege_tables). This happens on every start of the mysql server. I just tested an upgrade from mysql 5.0 to mariadb 5.1.39 on Ubuntu Hardy. There was some issue with a stuck mysqld_safe which I want to investigate further, but after second restart of mysql I checked and mysql.user / mysql.db were ok and correctly upgraded by mysql_upgrade by the startup script. I suspect that the reason I saw a problem was due to other issues with my install and/or waiting for mysqlcheck to finish before the upgrade is actually done. At least also my original install seems ok now. Will double check and then if no further problems I will just remove the useless, non-functional SQL from the postinst.
            Hide
            knielsen Kristian Nielsen added a comment -

            Re: "ERROR: 1136 Column count doesn't match value count at row 1" when installing mariadb-server-5.1
            So the real problems here are:

            1. When upgrading from mysql-5.0 to mariadb on Ubuntu Hardy 64-bit (haven't tested other platforms), the upgrade is not done correctly on the first start of mysqld. Only after a second restart is the upgrade done, and then it is correct.

            2. After installation, if the server is stopped the mysqld_safe process does not end, but loops endlessly, with strace showing infinite calls like this:

            wait4(4294967295, 0x7fffedde19fc, 0, NULL) = -1 ECHILD (No child processes)

            3. mariadb-server-5.1.postinst contains some old junk SQL that is passed to $BOOTSTRAP during installation, but which is neither needed nor functional.

            Show
            knielsen Kristian Nielsen added a comment - Re: "ERROR: 1136 Column count doesn't match value count at row 1" when installing mariadb-server-5.1 So the real problems here are: 1. When upgrading from mysql-5.0 to mariadb on Ubuntu Hardy 64-bit (haven't tested other platforms), the upgrade is not done correctly on the first start of mysqld. Only after a second restart is the upgrade done, and then it is correct. 2. After installation, if the server is stopped the mysqld_safe process does not end, but loops endlessly, with strace showing infinite calls like this: wait4(4294967295, 0x7fffedde19fc, 0, NULL) = -1 ECHILD (No child processes) 3. mariadb-server-5.1.postinst contains some old junk SQL that is passed to $BOOTSTRAP during installation, but which is neither needed nor functional.
            Hide
            knielsen Kristian Nielsen added a comment -

            Re: Upgrade from MySQL server requires extra server restart to upgrade tables properly
            Having a hard time tracking this down.

            I tested on Jaunty (amd64), it does not have the problem. But on Hardy, after
            upgrading from mysql 5.0 to mariadb 5.1, the mysql_upgrade does not complete,
            and mysqld_safe hangs when stopping the server. Upon next restart,
            mysql_upgrade completes successfully, and everything seems ok.

            I have appended logs below, note how the mysqlcheck and mysql_upgrade seems to
            abort early, without any visible error messages.

            Here is the log from /etc/mysql/debian-start from the first, unsuccessful
            start:

            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5418]: Upgrading MySQL tables if necessary.
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: Looking for 'mysql' as: /usr/bin/mysql
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: Running 'mysqlcheck' with connection arguments: '-port=3306' 'socket=/var/run/mysqld/mysqld.sock' 'host=localhost' 'socket=/var/run/mysqld/mysqld.sock' '-socket=/var/run/mysqld/mysqld.sock'
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: Running 'mysqlcheck' with connection arguments: '-port=3306' 'socket=/var/run/mysqld/mysqld.sock' 'host=localhost' 'socket=/var/run/mysqld/mysqld.sock' '-socket=/var/run/mysqld/mysqld.sock'
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.columns_priv OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.db OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.event OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.func OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.general_log
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: Error : You can't use locks with log tables.
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: status : OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.help_category
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: error : Table upgrade required. Please do "REPAIR TABLE `help_category`" or dump/reload to fix it!
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.help_keyword
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: error : Table upgrade required. Please do "REPAIR TABLE `help_keyword`" or dump/reload to fix it!
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.help_relation OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.help_topic
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: error : Table upgrade required. Please do "REPAIR TABLE `help_topic`" or dump/reload to fix it!
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.host OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.ndb_binlog_index OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.plugin OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.proc
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: error : Table upgrade required. Please do "REPAIR TABLE `proc`" or dump/reload to fix it!
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.procs_priv OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.servers OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.slow_log
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: Error : You can't use locks with log tables.
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: status : OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.tables_priv OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.time_zone OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.time_zone_leap_second OK
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: mysql.time_zone_name
            Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start[5425]: error : Table upgrade required. Please do "REPAIR TABLE `time_zone_name`" or dump/reload to fix it!

            And here is the output after server stop and restart, this time successful:

            Dec 15 10:24:53 vm-jaunty-amd64 /etc/mysql/debian-start[4442]: Upgrading MySQL tables if necessary.
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: Looking for 'mysql' as: /usr/bin/mysql
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: Running 'mysqlcheck'...
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: Running 'mysqlcheck'...
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.columns_priv OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.db OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.event OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.func OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.general_log
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: Error : You can't use locks with log tables.
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: status : OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.help_category
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: error : Table upgrade required. Please do "REPAIR TABLE `help_category`" to fix it!
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.help_keyword
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: error : Table upgrade required. Please do "REPAIR TABLE `help_keyword`" to fix it!
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.help_relation OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.help_topic
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: error : Table upgrade required. Please do "REPAIR TABLE `help_topic`" to fix it!
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.host OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.ndb_binlog_index OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.plugin OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.proc
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: error : Table upgrade required. Please do "REPAIR TABLE `proc`" to fix it!
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.procs_priv OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.servers OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.slow_log
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: Error : You can't use locks with log tables.
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: status : OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.tables_priv OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.time_zone OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.time_zone_leap_second OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.time_zone_name
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: error : Table upgrade required. Please do "REPAIR TABLE `time_zone_name`" to fix it!
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.time_zone_transition OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.time_zone_transition_type OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.user OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mytest.t OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]:
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: Repairing tables
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.help_category OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.help_keyword OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.help_topic OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.proc OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: mysql.time_zone_name OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: Running 'mysql_fix_privilege_tables'...
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4448]: OK
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4472]: Checking for insecure root accounts.
            Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start[4476]: Triggering myisam-recover for all MyISAM tables

            Show
            knielsen Kristian Nielsen added a comment - Re: Upgrade from MySQL server requires extra server restart to upgrade tables properly Having a hard time tracking this down. I tested on Jaunty (amd64), it does not have the problem. But on Hardy, after upgrading from mysql 5.0 to mariadb 5.1, the mysql_upgrade does not complete, and mysqld_safe hangs when stopping the server. Upon next restart, mysql_upgrade completes successfully, and everything seems ok. I have appended logs below, note how the mysqlcheck and mysql_upgrade seems to abort early, without any visible error messages. Here is the log from /etc/mysql/debian-start from the first, unsuccessful start: Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5418] : Upgrading MySQL tables if necessary. Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : /usr/bin/mysql_upgrade: the '--basedir' option is always ignored Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : Looking for 'mysql' as: /usr/bin/mysql Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : Running 'mysqlcheck' with connection arguments: '- port=3306' ' socket=/var/run/mysqld/mysqld.sock' ' host=localhost' ' socket=/var/run/mysqld/mysqld.sock' ' -socket=/var/run/mysqld/mysqld.sock' Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : Running 'mysqlcheck' with connection arguments: '- port=3306' ' socket=/var/run/mysqld/mysqld.sock' ' host=localhost' ' socket=/var/run/mysqld/mysqld.sock' ' -socket=/var/run/mysqld/mysqld.sock' Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.columns_priv OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.db OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.event OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.func OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.general_log Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : Error : You can't use locks with log tables. Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : status : OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.help_category Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : error : Table upgrade required. Please do "REPAIR TABLE `help_category`" or dump/reload to fix it! Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.help_keyword Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : error : Table upgrade required. Please do "REPAIR TABLE `help_keyword`" or dump/reload to fix it! Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.help_relation OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.help_topic Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : error : Table upgrade required. Please do "REPAIR TABLE `help_topic`" or dump/reload to fix it! Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.host OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.ndb_binlog_index OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.plugin OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.proc Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : error : Table upgrade required. Please do "REPAIR TABLE `proc`" or dump/reload to fix it! Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.procs_priv OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.servers OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.slow_log Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : Error : You can't use locks with log tables. Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : status : OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.tables_priv OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.time_zone OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.time_zone_leap_second OK Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : mysql.time_zone_name Dec 15 10:54:17 vm-hardy-amd64 /etc/mysql/debian-start [5425] : error : Table upgrade required. Please do "REPAIR TABLE `time_zone_name`" or dump/reload to fix it! And here is the output after server stop and restart, this time successful: Dec 15 10:24:53 vm-jaunty-amd64 /etc/mysql/debian-start [4442] : Upgrading MySQL tables if necessary. Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : Looking for 'mysql' as: /usr/bin/mysql Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : Running 'mysqlcheck'... Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : Running 'mysqlcheck'... Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.columns_priv OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.db OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.event OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.func OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.general_log Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : Error : You can't use locks with log tables. Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : status : OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.help_category Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : error : Table upgrade required. Please do "REPAIR TABLE `help_category`" to fix it! Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.help_keyword Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : error : Table upgrade required. Please do "REPAIR TABLE `help_keyword`" to fix it! Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.help_relation OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.help_topic Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : error : Table upgrade required. Please do "REPAIR TABLE `help_topic`" to fix it! Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.host OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.ndb_binlog_index OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.plugin OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.proc Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : error : Table upgrade required. Please do "REPAIR TABLE `proc`" to fix it! Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.procs_priv OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.servers OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.slow_log Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : Error : You can't use locks with log tables. Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : status : OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.tables_priv OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.time_zone OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.time_zone_leap_second OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.time_zone_name Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : error : Table upgrade required. Please do "REPAIR TABLE `time_zone_name`" to fix it! Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.time_zone_transition OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.time_zone_transition_type OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.user OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mytest.t OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : Repairing tables Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.help_category OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.help_keyword OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.help_topic OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.proc OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : mysql.time_zone_name OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : Running 'mysql_fix_privilege_tables'... Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4448] : OK Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4472] : Checking for insecure root accounts. Dec 15 10:24:54 vm-jaunty-amd64 /etc/mysql/debian-start [4476] : Triggering myisam-recover for all MyISAM tables
            Hide
            knielsen Kristian Nielsen added a comment -

            Re: Upgrade from MySQL server requires extra server restart to upgrade tables properly
            Think I finally found it. Seems the mysql_upgrade running from /etc/mysql/debian-start got a SIGHUP in the middle.

            I have pushed a branch with a proposed fix for this, we will see what tests say.

            Show
            knielsen Kristian Nielsen added a comment - Re: Upgrade from MySQL server requires extra server restart to upgrade tables properly Think I finally found it. Seems the mysql_upgrade running from /etc/mysql/debian-start got a SIGHUP in the middle. I have pushed a branch with a proposed fix for this, we will see what tests say.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 484120

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 484120

              People

              • Assignee:
                knielsen Kristian Nielsen
                Reporter:
                knielsen Kristian Nielsen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: