Skip to content

MDEV-39405: store all the plugin-engines optimizer costs#5014

Open
bsrikanth-mariadb wants to merge 1 commit into
bb-12.3-MDEV-39368-test-replayfrom
13.0-MDEV-39405-store-all-engines-opt-costs
Open

MDEV-39405: store all the plugin-engines optimizer costs#5014
bsrikanth-mariadb wants to merge 1 commit into
bb-12.3-MDEV-39368-test-replayfrom
13.0-MDEV-39405-store-all-engines-opt-costs

Conversation

@bsrikanth-mariadb
Copy link
Copy Markdown
Contributor

store all the plugin-engines optimizer costs into the context, so that the replay server uses the same engine costs while computing the query cost

@bsrikanth-mariadb bsrikanth-mariadb force-pushed the 13.0-MDEV-39405-store-all-engines-opt-costs branch from f94bc59 to ad93751 Compare May 7, 2026 06:48
@bsrikanth-mariadb bsrikanth-mariadb force-pushed the 13.0-MDEV-39405-store-all-engines-opt-costs branch from ad93751 to 95d3c20 Compare May 7, 2026 08:31
@spetrunia
Copy link
Copy Markdown
Member

Also, fix warnings in mysqltest.cc

Please split this into a separate commit. We;ll need this as we will need to do a rebase and put all mtr --replay-server changes into a separate commit. It will be reviewed separately, etc.

plugin_foreach_with_mask(thd, store_engine_costs_callback,
MYSQL_STORAGE_ENGINE_PLUGIN, PLUGIN_IS_READY,
&sql_script);
store_optimizer_costs("heap", &heap_optimizer_costs, sql_script);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? Shouldn't we have encountered HEAP when enumerating the storage engine plugins? If not, please add a comment about this, preferably explaining why.

@spetrunia
Copy link
Copy Markdown
Member

A general comment, something to consider:
We are saving statistics for every table the query uses. Could we also collect a list of storage engines that the query is using? (And then add the in-memory and on-disk temp.table engines?)

@bsrikanth-mariadb bsrikanth-mariadb force-pushed the 13.0-MDEV-39405-store-all-engines-opt-costs branch 2 times, most recently from ae4619c to df5872f Compare May 13, 2026 03:47
store all the plugin-engines optimizer costs into the context, so that
the replay server uses the same engine costs while computing the query cost
@bsrikanth-mariadb bsrikanth-mariadb force-pushed the 13.0-MDEV-39405-store-all-engines-opt-costs branch from df5872f to 646e2a2 Compare May 13, 2026 03:50
@bsrikanth-mariadb
Copy link
Copy Markdown
Contributor Author

Also, fix warnings in mysqltest.cc

Please split this into a separate commit. We;ll need this as we will need to do a rebase and put all mtr --replay-server changes into a separate commit. It will be reviewed separately, etc.

sure, reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants