mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-16917 Index affects query results
The optimizer erroneously allowed to use join cache when joining a splittable materialized table together with splitting optimization. As a consequence in some rare cases the server returned wrong result sets for queries with materialized derived. This patch allows to use either join cache without usage of splitting technique for materialization of a splittable derived table or splitting without usage of join cache when joining such table. The costs the these alternatives are compared and the best variant is chosen.
This commit is contained in:
@ -267,6 +267,13 @@ void TABLE::deny_splitting()
|
||||
}
|
||||
|
||||
|
||||
double TABLE::get_materialization_cost()
|
||||
{
|
||||
DBUG_ASSERT(spl_opt_info != NULL);
|
||||
return spl_opt_info->unsplit_cost;
|
||||
}
|
||||
|
||||
|
||||
/* This structure is auxiliary and used only in the function that follows it */
|
||||
struct SplM_field_ext_info: public SplM_field_info
|
||||
{
|
||||
|
Reference in New Issue
Block a user