mysqlmariadbdumpmysql-5.6

Suddenly cannot dump remote database: Unknown column 'generation_expression' in 'field list'


I've always been able to dump my remote database using mariadb-dump from the CLI. Starting today, I suddenly got the following error

mysqldump: Couldn't execute 
'select column_name, extra, generation_expression, data_type 
from information_schema.columns 
where table_schema=database() 
and table_name='<my-table>'': 
Unknown column 'generation_expression' in 'field list' (1054)

I checked the server information schema, and indeed the column generation_expression is missing. It is present on my local test server that I intend to dump to. The mariadb-dump version is Ver 10.19 Distrib 10.11.2-MariaDB, for Linux (x86_64), and the server version is MySQL 5.6.

I could not find any related problems on the internet or stackoverflow. I looked around and it appears that the generation_expression is introduced only in version 5.7. I cannot feasibly do a server upgrade to 5.7. I would expect this isn't needed though, the dump tool has always worked fine before. I'm considering doing a full reinstall of mariadb, but this takes a lot of time and effort, and might not solve the issue.

Edit: I just reinstalled the database server and cleaned all the data (with backing up first), and I am still getting the same error.


Solution

  • This has changed in MariaDB 10.11 (see MDEV-16029 and this commit).

    So you should either downgrade your MariaDB client tools (10.10 or below) or to use the MySQL client tools. Over the last 10 years MariaDB and MySQL have diverged, so there is no guarantee that the dump will work correctly when using MySQL client tools with MariaDB server.

    Also consider to upgrade your MySQL installation. MySQL 5.6 has reached EOL several years ago.