[MDEV-32688] Sever status variable for foreign key errors is missing Created: 2023-11-06 Updated: 2023-11-07 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Server |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Oli Sennhauser | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | beginner-friendly | ||
| Description |
|
If a deadlock happens (SHOW ENGINE INNODB STATUS) the server status variable innodb_deadlocks will be increased. So it would be good to have a server status variable like innodb_foreign_key_errors which indicates the amount of FK errors we had since last database start. |
| Comments |
| Comment by Daniel Black [ 2023-11-07 ] |
|
As FK errors, like deadlock errors are user errors, something like SQL_ERROR_LOG plugin, which is a simple AUDIT_PLUGIN that just counts, and then expose counts as either status variables or a information_schema table like locales . Yes, this extends beyond FK, but just anticipating the next feature request |
| Comment by Ralf Gebhardt [ 2023-11-07 ] |
|
Or to allow the SQL_ERROR_LOG plugin to write into a table, which allows easy aggregation |
| Comment by Daniel Black [ 2023-11-07 ] |
|
Right, with the SQL service inside the server now that should be achievable. |
| Comment by Oli Sennhauser [ 2023-11-07 ] |
|
The initial idea/requirement is/was a status counter for monitoring (and graphing)... |