[MDEV-26239] ERROR 1808 (HY000): Schema mismatch (Index field name logintype doesn't match tablespace metadata field name password for field position 5) Created: 2021-07-26  Updated: 2021-08-25

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.5.11
Fix Version/s: None

Type: Bug Priority: Major
Reporter: derry Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Environment:

Linux



 Description   

Do as following steps:
1. mariabackup --backup --user=root --password='1234' --target_dir=/home/test/backup1 --parallel=4 --rsync
2. mariabackup --prepare --export --target-dir /home/test/backup1 --user root --password '1234'
3. alter table test.users DISCARD TABLESPACE;
4. cp /home/test/backup1/test/users.cfg /var/lib/mysql/test/
cp /home/test/backup1/test/users.ibd /var/lib/mysql/test/
chown -R mysql:mysql /var/lib/mysql/test/
5. alter table test.users IMPORT TABLESPACE;
6. ERROR 1808 (HY000): Schema mismatch (Index field name logintype doesn't match tablespace metadata field name password for field position 5)

CREATE TABLE `users` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(64) NOT NULL,
`name` varchar(64) NOT NULL,
`logintype` smallint(1) NOT NULL DEFAULT 0 COMMENT '',
`password` varchar(64) NOT NULL,
`enabled` smallint(6) NOT NULL,
`email` varchar(64) NOT NULL,
`create_ts` timestamp NOT NULL DEFAULT current_timestamp(),
`lastupdate_ts` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;



 Comments   
Comment by Dave [ 2021-08-25 ]

Having this exact same issue but naturally for my own schema:
SQLSTATE[HY000]: General error: 1808 Schema mismatch (Index field name distribution_channel doesn't match tablespace metadata field name created_at for field position 8)

I was following identical steps as original Reporter, only difference really being the charset, aside from that, identical.
I created the tables from a schema SQL file, then do table by table imports, some work, some fail on some variation of the reported error message.

Comment by Dave [ 2021-08-25 ]

Looks to be similar to https://jira.mariadb.org/browse/MDEV-24352 and https://jira.mariadb.org/browse/MDEV-18543

Generated at Thu Feb 08 09:43:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.