mariadb/mysql-test/suite/sys_vars
bsrikanth-mariadb 67b320b413 MDEV-36483: store ddls in the optimizer trace
This feature stores the ddls of the tables/views that are used in
a query, to the optimizer trace. It is currently controlled by a
system variable store_ddls_in_optimizer_trace, and is not enabled
by default. All the ddls will be stored in a single json array, with each
element having table/view name, and the associated create definition
of the table/view.

The approach taken is to read global query_tables from the thd->lex,
and read them in reverse. Create a record with table_name, ddl of
the table and add the table_name to the hash,
along with dumping the information to the trace.
dbName_plus_tableName is used as a key,
and the duplicate entries are not added to the hash.

The main suite tests are also run with the feature enabled, and they
all succeed.
2025-06-28 07:35:07 -04:00
..
inc Merge branch '11.4' into 11.8 2025-06-18 07:43:24 +02:00
r MDEV-36483: store ddls in the optimizer trace 2025-06-28 07:35:07 -04:00
t cleanup: disconnect before DROP USER 2025-07-16 09:14:33 +07:00
disabled.def MDEV-21452: Replace ib_mutex_t with mysql_mutex_t 2020-12-15 17:56:18 +02:00