1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-17 12:02:09 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2020-06-13 19:01:28 +03:00
42 changed files with 479 additions and 183 deletions

View File

@ -3412,7 +3412,7 @@ Query_cache::register_tables_from_list(THD *thd, TABLE_LIST *tables_used,
if (!insert_table(thd, key_length, key, (*block_table),
tables_used->view_db.length, 0,
HA_CACHE_TBL_NONTRANSACT, 0, 0, TRUE))
DBUG_RETURN(0);
goto err_cleanup;
/*
We do not need to register view tables here because they are already
present in the global list.
@ -3436,7 +3436,7 @@ Query_cache::register_tables_from_list(THD *thd, TABLE_LIST *tables_used,
tables_used->callback_func,
tables_used->engine_data,
TRUE))
DBUG_RETURN(0);
goto err_cleanup;
if (tables_used->table->file->
register_query_cache_dependant_tables(thd, this, block_table, &n))
@ -3444,6 +3444,11 @@ Query_cache::register_tables_from_list(THD *thd, TABLE_LIST *tables_used,
}
}
DBUG_RETURN(n - counter);
err_cleanup:
// Mark failed
(*block_table)->next= (*block_table)->prev= NULL;
(*block_table)->parent= NULL;
DBUG_RETURN(0);
}
/*
@ -3477,7 +3482,12 @@ my_bool Query_cache::register_all_tables(THD *thd,
for (Query_cache_block_table *tmp = block->table(0) ;
tmp != block_table;
tmp++)
unlink_table(tmp);
{
if (tmp->prev) // not marked as failed and unuseable
unlink_table(tmp);
else
break;
}
if (block_table->parent)
unlink_table(block_table);
}