system_update_7086 / SQLSTATE[HY000]: General error: 1025 Error on rename

Created on 26 June 2023, over 1 year ago
Updated 27 June 2023, over 1 year ago

As suggested by @poker10 I open this new issue.

Problem/Motivation

Upgrading from 7.95 to 7.98 I get this error from MaríaDB with step system_update_7086

$ drush @udima.loc -y updatedb
 System  7086  Prepare the schema and data of the sessions table for hashed session ids.
Do you wish to run all pending updates? (y/n): y
SQLSTATE[HY000]: General error: 1025 Error on rename of './drupal7udima/sessions' to './drupal7udima/#sql-backup-607-22' (errno: 168 "Unknown (generic) error from engine")                       [error]
Performed update: system_update_7086                                                                                                                                                              [ok]
'all' cache was cleared.                                                                                                                                                                          [success]
Finished performing updates. 

This is my MariaDB version where I reproduce the problem.
10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04 . NO DOCKER CONTAINER.
PHP 7.4.33

Logs related in syslog:

Jun 26 18:54:48 portatil01 mariadbd[1543]: 2023-06-26 18:54:48 0 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:48 portatil01 mariadbd[1543]: message repeated 3 times: [ 2023-06-26 18:54:48 0 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL]
Jun 26 18:54:48 portatil01 mariadbd[1543]: 2023-06-26 18:54:48 31 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:48 portatil01 mariadbd[1543]: message repeated 3 times: [ 2023-06-26 18:54:48 31 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL]
Jun 26 18:54:48 portatil01 mariadbd[1543]: 2023-06-26 18:54:48 31 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_path` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:48 portatil01 mariadbd[1543]: 2023-06-26 18:54:48 31 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:48 portatil01 mariadbd[1543]: 2023-06-26 18:54:48 31 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_update` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:48 portatil01 mariadbd[1543]: 2023-06-26 18:54:48 31 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:48 portatil01 mariadbd[1543]: 2023-06-26 18:54:48 31 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:49 portatil01 mariadbd[1543]: 2023-06-26 18:54:49 34 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:49 portatil01 mariadbd[1543]: message repeated 3 times: [ 2023-06-26 18:54:49 34 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL]
Jun 26 18:54:49 portatil01 mariadbd[1543]: 2023-06-26 18:54:49 34 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_update` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:49 portatil01 mariadbd[1543]: 2023-06-26 18:54:49 34 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:49 portatil01 mariadbd[1543]: message repeated 6 times: [ 2023-06-26 18:54:49 34 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL]
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_libraries` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_field` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 0 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_metatag` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_views` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:50 portatil01 mariadbd[1543]: 2023-06-26 18:54:50 0 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_panels` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_token` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_features` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_block` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_advagg_aggregates` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_feeds_http` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: message repeated 3 times: [ 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL]
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_image` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: message repeated 9 times: [ 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL]
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_variable` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: message repeated 3 times: [ 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL]
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_views_data` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: message repeated 7 times: [ 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL]
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_filter` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: message repeated 3 times: [ 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL]
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_page` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache_bootstrap` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 39 [ERROR] InnoDB: Fetch of persistent statistics requested for table `drupal7udima`.`cache` but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 0 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL
Jun 26 18:54:52 portatil01 mariadbd[1543]: 2023-06-26 18:54:52 0 [ERROR] InnoDB: Column last_update in table mysql.innodb_table_stats is BINARY(4) NOT NULL but should be INT UNSIGNED NOT NULL

The same upgrade steps in other server with an older MariaDB version is working OK. Server version: 10.5.19-MariaDB-0+deb11u2 Debian 11

Steps to reproduce

Upgrade from 7.95 to 7.98 on a server with 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04

Maybe this only happens on my instance. I don't know.

💬 Support request
Status

Active

Version

7.0 ⚰️

Component
Update 

Last updated about 9 hours ago

  • Maintained by
  • 🇺🇸United States @tedbow
  • 🇺🇸United States @dww
Created by

🇪🇸Spain solanas

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @solanas
  • 🇪🇸Spain solanas

    I made an:

    mysql_upgrade
    

    No fix was made and the same problem is happening, but I think the mysql_upgrade was not was not required for because I didn't upgrade my mariadb. I just dump from other server and restored in my local computer.

    The same test in my colleague laptop with same mariadb version is working OK.
    Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1-log Ubuntu 22.04

    The problem seems to be happening just in my laptop. I can replay the same error with this code creating a new empty database:

    $ mysql
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 37
    Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
    
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]> create database kk;
    Query OK, 1 row affected (0,000 sec)
    
    MariaDB [(none)]> use kk;
    Database changed
    MariaDB [kk]> CREATE TABLE `sessions_bak` (
        ->   `uid` int(10) unsigned NOT NULL COMMENT 'The users.uid corresponding to a session, or 0 for anonymous user.',
        ->   `sid` varchar(128) NOT NULL COMMENT 'A session ID. The value is generated by Drupal’s session handlers.',
        ->   `ssid` varchar(128) NOT NULL DEFAULT '' COMMENT 'Secure session ID. The value is generated by Drupal’s session handlers.',
        ->   `hostname` varchar(128) NOT NULL DEFAULT '' COMMENT 'The IP address that last used this session ID (sid).',
        ->   `timestamp` int(11) NOT NULL DEFAULT 0 COMMENT 'The Unix timestamp when this session last requested a page. Old records are purged by PHP automatically.',
        ->   `cache` int(11) NOT NULL DEFAULT 0 COMMENT 'The time of this user’s last post. This is used when the site has specified a minimum_cache_lifetime. See cache_get().',
        ->   `session` longblob DEFAULT NULL COMMENT 'The serialized contents of $_SESSION, an array of name/value pairs that persists across page requests by this session ID. Drupal loads $_SESSION from here at the start of each request and saves it at the end.',
        ->   PRIMARY KEY (`sid`,`ssid`),
        ->   KEY `timestamp` (`timestamp`),
        ->   KEY `uid` (`uid`),
        ->   KEY `ssid` (`ssid`)
        -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='Drupal’s session handlers read and write into the...';
    Query OK, 0 rows affected (0,033 sec)
    
    MariaDB [kk]> ALTER TABLE `sessions_bak` DROP PRIMARY KEY;
    ERROR 1025 (HY000): Error on rename of './kk/sessions_bak' to './kk/#sql-backup-a9b7-25' (errno: 168 "Unknown (generic) error from engine")
    
Production build 0.71.5 2024