[debian-mysql] Bug#793977: mariadb-server-core-10.0: please include mysql_upgrade for application started mariadb server

Martin Steigerwald Martin at Lichtvoll.de
Wed Jul 29 13:58:52 UTC 2015


Package: mariadb-server-core-10.0
Version: 10.0.20-3
Severity: wishlist

Dear Maintainer,

   * What led up to the situation?

After testing Akonadi MySQL backend with MariaDB for a while I found this
by checking mysql.err for another reason:

150729 15:39:42 [ERROR] Column count of mysql.events_waits_current is wrong. Expected 19, found 16. Created with MariaDB 50540, now running 100020. Please use mysql_upgrade
 to fix this error.
150729 15:39:42 [ERROR] Column count of mysql.events_waits_history is wrong. Expected 19, found 16. Created with MariaDB 50540, now running 100020. Please use mysql_upgrade
 to fix this error.
150729 15:39:42 [ERROR] Column count of mysql.events_waits_history_long is wrong. Expected 19, found 16. Created with MariaDB 50540, now running 100020. Please use mysql_up
grade to fix this error.

[complete file attached for reference]

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

I didn´t find mysql_upgrade however and thus I apt-file searched for it.
And yes, its only installed in the complete server package and not in the
core server package:

martin at merkaba:~> dpkg -L mariadb-server-10.0 | grep upgrade
/usr/bin/mysql_upgrade
/usr/share/man/man1/mysql_upgrade.1.gz
/var/lib/mysql-upgrade

martin at merkaba:~> dpkg -L mariadb-server-core-10.0 | grep upgrade
martin at merkaba:~#1>

   * What was the outcome of this action?

After installing the main server I had the mysql_upgrade script, but then
I have a mysql server running system-wide which is not needed. Sure, I can
systemctl / insserv -r / insserv stop=0,1,2,3… disable the mariadb server,

   * What outcome did you expect instead?

but it would be nice to have the mysql_upgrade script in the core package.
It also makes a lot of sense, since the core package contains the mysql
daemon executable. So anyone with the core package can run a MariaDB server
and be asked to run the mysql_upgrade script.

The MariaDB ugprade worked just fine:

martin at merkaba:~/.local/share/akonadi> mysql_upgrade --defaults-file=mysql.conf --socket=/tmp/akonadi-martin.MekFVe/mysql.socket
MySQL upgrade detected
Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.servers                                      OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
Phase 2/6: Fixing views from mysql
Phase 3/6: Running 'mysql_fix_privilege_tables'
Phase 4/6: Fixing table and database names
Phase 5/6: Checking and upgrading tables
Processing databases
akonadi
akonadi.collectionattributetable                   OK
akonadi.collectionmimetyperelation                 OK
akonadi.collectionpimitemrelation                  OK
akonadi.collectiontable                            OK
akonadi.flagtable                                  OK
akonadi.mimetypetable                              OK
akonadi.parttable                                  OK
akonadi.parttypetable                              OK
akonadi.pimitemflagrelation                        OK
akonadi.pimitemtable                               OK
akonadi.pimitemtagrelation                         OK
akonadi.resourcetable                              OK
akonadi.schemaversiontable                         OK
akonadi.tagattributetable                          OK
akonadi.tagremoteidresourcerelationtable           OK
akonadi.tagtable                                   OK
akonadi.tagtypetable                               OK
information_schema
performance_schema
Phase 6/6: Running 'FLUSH PRIVILEGES'
OK

Another question would be whether this should be automated, but this would
be an upstream thing to do, I think.

Thank you,
Martin

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-rc3-tp520-btrfstrim+ (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages mariadb-server-core-10.0 depends on:
ii  libaio1         0.3.110-1
ii  libc6           2.19-19
ii  libpcre3        2:8.35-7
ii  libstdc++6      5.1.1-14
ii  mariadb-common  10.0.20-3
ii  zlib1g          1:1.2.8.dfsg-2+b1

mariadb-server-core-10.0 recommends no packages.

mariadb-server-core-10.0 suggests no packages.

-- no debconf information
-------------- next part --------------
2015-07-29 15:39:42 7fcd4408f780 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
150729 15:39:42 [Note] InnoDB: Using mutexes to ref count buffer pool pages
150729 15:39:42 [Note] InnoDB: The InnoDB memory heap is disabled
150729 15:39:42 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
150729 15:39:42 [Note] InnoDB: Memory barrier is not used
150729 15:39:42 [Note] InnoDB: Compressed tables use zlib 1.2.8
150729 15:39:42 [Note] InnoDB: Using Linux native AIO
150729 15:39:42 [Note] InnoDB: Using CPU crc32 instructions
150729 15:39:42 [Note] InnoDB: Initializing buffer pool, size = 512.0M
150729 15:39:42 [Note] InnoDB: Completed initialization of buffer pool
150729 15:39:42 [Note] InnoDB: Highest supported file format is Barracuda.
150729 15:39:42 [Note] InnoDB: 128 rollback segment(s) are active.
150729 15:39:42 [Note] InnoDB: Waiting for purge to start
150729 15:39:42 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.24-72.2 started; log sequence number 38898417595
150729 15:39:42 [Note] Plugin 'FEEDBACK' is disabled.
150729 15:39:42 [ERROR] Column count of mysql.events_waits_current is wrong. Expected 19, found 16. Created with MariaDB 50540, now running 100020. Please use mysql_upgrade to fix this error.
150729 15:39:42 [ERROR] Column count of mysql.events_waits_history is wrong. Expected 19, found 16. Created with MariaDB 50540, now running 100020. Please use mysql_upgrade to fix this error.
150729 15:39:42 [ERROR] Column count of mysql.events_waits_history_long is wrong. Expected 19, found 16. Created with MariaDB 50540, now running 100020. Please use mysql_upgrade to fix this error.
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Incorrect definition of table performance_schema.events_waits_summary_by_thread_by_event_name: expected column 'THREAD_ID' at position 0 to have type bigint(20), found type int(11).
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Column count of mysql.file_summary_by_event_name is wrong. Expected 23, found 5. Created with MariaDB 50540, now running 100020. Please use mysql_upgrade to fix this error.
150729 15:39:42 [ERROR] Column count of mysql.file_summary_by_instance is wrong. Expected 25, found 6. Created with MariaDB 50540, now running 100020. Please use mysql_upgrade to fix this error.
150729 15:39:42 [ERROR] Native table 'performance_schema'.'host_cache' has the wrong structure
150729 15:39:42 [ERROR] Incorrect definition of table performance_schema.mutex_instances: expected column 'LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
150729 15:39:42 [ERROR] Native table 'performance_schema'.'objects_summary_global_by_type' has the wrong structure
150729 15:39:42 [ERROR] Incorrect definition of table performance_schema.rwlock_instances: expected column 'WRITE_LOCKED_BY_THREAD_ID' at position 2 to have type bigint(20), found type int(11).
150729 15:39:42 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure
150729 15:39:42 [ERROR] Column count of mysql.threads is wrong. Expected 14, found 3. Created with MariaDB 50540, now running 100020. Please use mysql_upgrade to fix this error.
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_stages_summary_global_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_statements_current' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_statements_history' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_statements_history_long' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_thread_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_account_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_user_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_host_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_statements_summary_global_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_digest' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'users' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'accounts' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'hosts' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'socket_summary_by_event_name' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'session_connect_attrs' has the wrong structure
150729 15:39:42 [ERROR] Native table 'performance_schema'.'session_account_connect_attrs' has the wrong structure
150729 15:39:42 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
150729 15:39:42 [Note] Reading of all Master_info entries succeded
150729 15:39:42 [Note] Added new Master_info '' to hash table
150729 15:39:42 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.0.20-MariaDB-3'  socket: '/tmp/akonadi-martin.MekFVe/mysql.socket'  port: 0  Debian unstable
2015-07-29 15:39:42 7fcd43ffb700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
150729 15:40:59 [Note] /usr/sbin/mysqld: Normal shutdown

150729 15:41:00 [Note] InnoDB: FTS optimize thread exiting.
150729 15:41:00 [Note] InnoDB: Starting shutdown...
150729 15:41:01 [Note] InnoDB: Shutdown completed; log sequence number 38899235161
150729 15:41:01 [Note] /usr/sbin/mysqld: Shutdown complete



More information about the pkg-mysql-maint mailing list