[MDEV-7289] Add classes to handle DDL statements Created: 2014-12-08 Updated: 2021-05-11 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Alexander Barkov | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
There are four very similar pieces of the code in sql_parse.cc performed for SQLCOM_CREATE_DB, SQLCOM_DROP_DB, SQLCOM_ALTER_DB_UPGRADE,SQLCOM_ALTER_DB. It would be very nice to add classes that handle all sql_parse.cc events. This will allow to share similar pieces of the code not only between commands of the same database object (like in case of SCHEMA commands), but also between different database objects (e.g. tables, views, triggers, SP, all the rest). All SQL statements consist of these steps:
All these steps can be put into virtual methods of a new class. This task will wrap DDL related routines only (CREATE, DROP, ALTER). |