[MDEV-4587] TABLE METADATA - Add a table history, about STRUCTURE and queries that was done to change the structure (like GIT log) Created: 2013-05-26 Updated: 2013-06-18 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Trivial |
| Reporter: | roberto spadim | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
hi guys, should be nice a tool or sql commands to see .frm history that information that could be nice to have diff table a.1 a.current something similar to git, but instead of checkout, just reproduce the diff query (queries) to update the current table from some point in time second part is replication or export/import and merge well it's a bit complicated but with this tool and git, i could have a full history of table inside database, instead inside some other file, and since it's inside database, i will never lost historical information i don't know if this could be done with binlog or something similar, but could be nice this tool be a per table log, instead a "daemon" binlog for first version just history could be nice, and at a second version the diff tool some fields that i thik that are usefull well that's all |
| Comments |
| Comment by Sergei Golubchik [ 2013-05-26 ] |
|
you can do that with an audit plugin. this plugin can be notified when a table is created or altered, and it can keep track of all statements that did that. |
| Comment by roberto spadim [ 2013-05-26 ] |
|
some ALTER command needs a UPDATE, in other words, maybe some UPDATE queries should be changed to include a option, like: the INCLUDE_IN_HISTORY could add the query to table definition log |
| Comment by roberto spadim [ 2013-05-26 ] |
|
hi sergey, i'm a source code begineer, could you give me more information about audit? maybe a example? |
| Comment by Sergei Golubchik [ 2013-05-26 ] |
|
Yes. see plugin/audit_null example in the MariaDB 5.5 source tree. |
| Comment by roberto spadim [ 2013-05-26 ] |
|
nice, what about make it a 'default' feature of mariadb? |
| Comment by Sergei Golubchik [ 2013-05-26 ] |
|
yes, if you create such a plugin, and we accept it into the mainline, then it can be included by default in our releases. |
| Comment by roberto spadim [ 2013-06-16 ] |
|
maybe this MDEV-4259 could help here |