------------ STARTING pre-start-execution at Thu Feb 7 14:02:34 UTC 2019 -------------- ERROR 1105 (HY000) at line 1556: Percona-XtraDB-Cluster prohibits use of DML command on a table (ccdb.backup_ccdb_users) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER panic: exit status 1 goroutine 1 [running]: main.main() /var/vcap/data/compile/migrate-to-pxc/src/migrate-to-pxc/main.go:71 +0x4bd mysqldump: Got errno 32 on write
The migration script expects there to be a primary key in each table because pxc_strict_mode = ENFORCING
in Percona. By default, PXC Strict Mode is set to ENFORCING
. If a validation fails during startup, the expected behavior of PXC Stick Mode is to halt the server and throw an error.
Users have run into two scenarios which caused this behavior:
1. You upgraded from PAS 2.1 directly to PAS 2.3 AND attempted to migrate MariaDB to PXC all in one deploy. By doing this, you missed out on database schema changes to add primary keys.
2. You created backup tables manually in PAS 2.1. For example: SELECT ... INTO from ccdb.users table
. By doing this you, freeze PAS 2.1 tables and as a result, they are missing the primary keys.
mysql --defaults-extra-file=/var/vcap/jobs/mysql/config/mylogin.cnf
:
`ALTER TABLE` ccdb.backup_ccdb_users` ADD `bogusid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY