[MDEV-30745] Feature request - Procedure/Function/Event hierarachy analyze(or explain?) Created: 2023-02-28 Updated: 2023-04-17 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Mitchell Lee | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | beginner-friendly | ||
| Description |
case A
The reason why is that, |
| Comments |
| Comment by Daniel Black [ 2023-02-28 ] |
|
Does something like the following meet your requirements? A parser trace of a single SQL that returns a JSON object. As views are processed in a SQL, they are parsed and the underlying tables form part of the parse object. Eg. parse select a, b, c from view1 join view2 ... where ends up with a hierarchy JSON object of the parsed SQL. I'm not sure how to extend this to Procedure/Function/Event as it becomes one object per SQL statement, with potentially loops, and would been to be fully executed so it becomes less and EXPLAIN like feature and more an ANALYZE. |
| Comment by Mitchell Lee [ 2023-02-28 ] |
|
Erm, I do not exacly understand your...example, BTW, don't need any involveness of JSON format. it makes complexity more to reuse the result. but, if there is a kinda parser which trace/travel into all child call stack, and can return in plain recordset it fine. and if there is an option to produce JSON, its also fine as an option. |