mariadb/libmysqld
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
..
examples Fix remaining typos 2025-04-29 11:18:00 +10:00
client_settings.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
CMakeLists.txt MDEV-36483: store ddls in the optimizer trace 2025-06-28 07:35:07 -04:00
emb_qcache.cc cleanup: remove unconditional #ifdef's 2024-11-05 14:00:47 -08:00
emb_qcache.h MDEV-19275 Provide SQL service to plugins. 2020-08-14 21:04:25 +04:00
embedded_priv.h Fixed crash in connect.misc with embedded server 2024-02-27 14:55:47 +02:00
lib_sql.cc MDEV-36397 Record change_user command in MTR output 2025-06-23 20:38:36 +02:00
libmysql.c Fix typos in C comments in miscellaneous files 2025-03-24 13:36:28 +11:00
libmysqld.c Fixed crash in connect.misc with embedded server 2024-02-27 14:55:47 +02:00
libmysqld.def merge with 5.3 2011-10-19 21:45:18 +02:00
libmysqld.rc query_id and my_xid -> ulonglong 2005-01-27 22:38:56 +01:00
resource.h query_id and my_xid -> ulonglong 2005-01-27 22:38:56 +01:00