1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge 11.0 into 11.1

This commit is contained in:
Marko Mäkelä
2023-07-26 15:13:43 +03:00
214 changed files with 5163 additions and 2783 deletions

View File

@@ -27339,7 +27339,8 @@ cp_buffer_from_ref(THD *thd, TABLE *table, TABLE_REF *ref)
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
for (store_key **copy=ref->key_copy ; *copy ; copy++)
{
if ((*copy)->copy(thd) & 1)
if ((*copy)->copy(thd) & 1 ||
(ref->null_rejecting && (*copy)->null_key))
{
result= 1;
break;
@@ -29579,12 +29580,22 @@ bool JOIN_TAB::save_explain_data(Explain_table_access *eta,
jbuf_unpack_tracker= &eta->jbuf_unpack_tracker;
/* Enable the table access time tracker only for "ANALYZE stmt" */
if (thd->lex->analyze_stmt)
if (unlikely(thd->lex->analyze_stmt ||
thd->variables.log_slow_verbosity &
LOG_SLOW_VERBOSITY_ENGINE))
{
table->file->set_time_tracker(&eta->op_tracker);
eta->op_tracker.set_gap_tracker(&eta->extra_time_tracker);
eta->jbuf_unpack_tracker.set_gap_tracker(&eta->jbuf_extra_time_tracker);
/*
Set handler_for_stats even if we are not running an ANALYZE command.
There's no harm, and in case somebody runs a SHOW ANALYZE command we'll
be able to print the engine statistics.
*/
eta->handler_for_stats= table->file;
if (likely(thd->lex->analyze_stmt))
{
eta->op_tracker.set_gap_tracker(&eta->extra_time_tracker);
eta->jbuf_unpack_tracker.set_gap_tracker(&eta->jbuf_extra_time_tracker);
}
}
/* No need to save id and select_type here, they are kept in Explain_select */