Bug #83165 The table does not comply with the requirements by an external plugin
Submitted: 27 Sep 2016 9:56
Reporter: Thomas Lobker Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.6.1 OS:Ubuntu
Assigned to: CPU Architecture:Any
Tags: 3098, DatabaseError, GROUP, hy000, replication

[27 Sep 2016 9:56] Thomas Lobker
Description:
The MySQL Fabric table schemes are not compliant in combination with Group Replication, because there are some tables without primary key.

How to repeat:
1. Setup a database cluster with MySQL Group Replication
2. Setup MySQL Fabric to use the database server with Group Replication
3. Run `mysqlfabric manage setup`
4. Run `mysqlfabric manage start`

== Result ==

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mysql/fabric/handler.py", line 303, in emit
    self.format(record), info_category, info_type
  File "/usr/lib/python2.7/dist-packages/mysql/fabric/persistence.py", line 136, in _wrap
    return original(*args, **kwrds)
  File "/usr/lib/python2.7/dist-packages/mysql/fabric/handler.py", line 208, in add
    info_type)}
  File "/usr/lib/python2.7/dist-packages/mysql/fabric/persistence.py", line 511, in exec_stmt
    return self.__cnx.exec_stmt(stmt_str, options)
  File "/usr/lib/python2.7/dist-packages/mysql/fabric/connection.py", line 150, in exec_stmt
    (stmt_str, params, self.address(), error), errno
DatabaseError: Command (INSERT INTO log (subject, reported, reporter, message, category, type) VALUES(%s, %s, %s, %s, %s, %s), ('0', datetime.datetime(2016, 9, 27, 8, 4, 41), 'mysql.fabric.services.manage', 'Fabric node starting.', 0, 0)) failed accessing (database:3306). 3098 (HY000): The table does not comply with the requirements by an external plugin..

Suggested fix:
There are two tables without a primary key. Add a column with a primary key and the problem is resolved.

ALTER TABLE `log` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
ALTER TABLE `shard_ranges` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
[6 Jul 2017 19:20] Bugs System
Status updated to 'Won't fix' (Fabric is now covered under Oracle Lifetime Sustaining Support)
[4 Sep 2020 11:47] Jayant Das
Getting subject line error while restoring database into another server ? only solution is create primary key column ?