Details
-
New Feature
-
Status: In Progress (View Workflow)
-
Major
-
Resolution: Unresolved
-
Q2/2025 Development
Description
This is a part of MDEV-27189.
Step 1 is to dump the DDLs of all tables and VIEWs used in the query.
Use some setting (e.g. add a variable optimizer_trace_store_ddls) to enable this.
When enabled, all tables/VIEWs used by the query should be dumped into trace.
Then, one can use JSON_QUERY to extract the definitions.
Then, it should be possible to feed these definitions into the client. This will create
appropriate tables/views. After that, one should be able to run the original query.
Things to note:
- Query may use tables from different databases. This is ok. Make sure DDLs do not rely on the database's character set.
- Tables may be re-created in any order (EDIT: what about foreign keys? Are they printed? If yes, there are restrictions in which order one can run CREATE TABLE statements), VIEWs must be re-created in the "dependency" order: if view1 uses view2, view2 must be created first.
- What about Stored Functions? Dump them too or produce an error?
Attachments
Issue Links
- is part of
-
MDEV-27189 Optimizer Trace: save all info needed for replay
-
- Open
-