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

MariaDB upgrade fail when using default_time_zone

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0(EOL), 10.1(EOL)
    • 10.0.36, 10.1.35
    • Server, Time zones
    • None
    • Linux Debian

    Description

      I am using official MariaDB APT repository on Debian 8 to install mariadb-server-10.1 package.

      I populate timezone tables using:

      /usr/bin/mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql
      

      Then setting default_time_zone variable in my.cnf:

      [mysqld]
      default_time_zone=Europe/Paris
      

      After restarting mysql service all works fine:

      :~# /etc/init.d/mysql restart
      [ ok ] Restarting mysql (via systemctl): mysql.service.
      :~# mysql -e "show variables like 'time_zone'"
      +---------------+--------------+
      | Variable_name | Value        |
      +---------------+--------------+
      | time_zone     | Europe/Paris |
      +---------------+--------------+
      

      The problem occurs when upgrading mariadb-server packages. For example, my last apt-get upgrade upgraded MariaDB from v10.1.22 to v10.1.25:

      :~# apt-get upgrade
      ...
      Errors were encountered while processing:
       mariadb-server-10.1
       mariadb-server
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      

      :~# apt-get install -f
      Reading package lists... Done
      Building dependency tree       
      Reading state information... Done
      0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
      2 not fully installed or removed.
      After this operation, 0 B of additional disk space will be used.
      Setting up mariadb-server-10.1 (10.1.25+maria-1~jessie) ...
      dpkg: error processing package mariadb-server-10.1 (--configure):
       subprocess installed post-installation script returned error exit status 1
      dpkg: dependency problems prevent configuration of mariadb-server:
       mariadb-server depends on mariadb-server-10.1 (= 10.1.25+maria-1~jessie); however:
        Package mariadb-server-10.1 is not configured yet.
       
      dpkg: error processing package mariadb-server (--configure):
       dependency problems - leaving unconfigured
      Errors were encountered while processing:
       mariadb-server-10.1
       mariadb-server
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      

      MariaDB error log (/var/log/mysql.err) says:

      2017-07-28 10:09:20 140185074391296 [ERROR] Fatal error: Illegal or unknown default time zone 'Europe/Paris'
      

      If I comment the default_time_zone parameter in my.cnf, I can complete the upgrade process:

      [mysqld]
      #default_time_zone=Europe/Paris
      

      Then, reintroducing default_time_zone parameter in my.cnf, I am able to restart mysql service without any problem.

      It seems that something is broken in apt upgrade process when default_time_zone is set, whereas time zone tables are filled or not...

      Other users have encountered the same problem as you can see on StackOverflow: https://stackoverflow.com/questions/29565278/apt-get-upgrade-always-fails-on-mariadb-server-due-to-timezone

      Attachments

        Activity

          People

            serg Sergei Golubchik
            nico Nicolas Payart
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.