Bug #84419 Improve error reporting for external plugin requirement error messages
Submitted: 5 Jan 2017 7:57 Modified: 19 Jan 2017 7:11
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: group replication, plugin

[5 Jan 2017 7:57] Simon Mudd
Description:
Frederic blogged here: http://lefred.be/content/mysql-group-replication-single-primary-or-multi-primary/ about some error messages.

One stood out:

mysql> update employees.salaries set salary = 60118 where emp_no=10002 and salary<60117;
ERROR 3098 (HY000): The table does not comply with the requirements by an external plugin.

This message is clear but not helpful in identifying the problem clearly nor helping the DBA figure out how to resolve it.

How to repeat:
See blog post.

Suggested fix:
Suggestion. Replace with something like this:

ERROR 3098 (HY000): The table does not comply with the requirements by external plugin XXXX, Requirement: YYY.

and make YYY a text description or some sort of error code which is easy to search for.
[5 Jan 2017 12:42] Frederic Descamps
The error in the error log is more explicit: 

[ERROR] Plugin group_replication reported: 'Table salaries has a foreign key with 'CASCADE' clause. This is not compatible with Group Replication'

I don't know how feasible it will be to have such information in the Error returned to the client.
[9 Jan 2017 7:17] Simon Mudd
Well, it's the client that makes the mistake so it's the client that gains most from being told what the real problem is ....
[19 Jan 2017 7:11] MySQL Verification Team
Hello Simon,

Thank you for the feature request!

Thanks,
Umesh