mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge in MWL#68: Subquery optimization: Efficient NOT IN execution with NULLs
This commit is contained in:
@ -874,6 +874,9 @@ JOIN::optimize()
|
||||
{
|
||||
DBUG_PRINT("info",("No tables"));
|
||||
error= 0;
|
||||
/* Create all structures needed for materialized subquery execution. */
|
||||
if (setup_subquery_materialization())
|
||||
DBUG_RETURN(1);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
error= -1; // Error is sent to client
|
||||
@ -11258,7 +11261,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
param->group_buff=group_buff;
|
||||
share->keys=1;
|
||||
share->uniques= test(using_unique_constraint);
|
||||
table->key_info=keyinfo;
|
||||
table->key_info= table->s->key_info= keyinfo;
|
||||
keyinfo->key_part=key_part_info;
|
||||
keyinfo->flags=HA_NOSAME;
|
||||
keyinfo->usable_key_parts=keyinfo->key_parts= param->group_parts;
|
||||
@ -11344,7 +11347,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
keyinfo->key_parts * sizeof(KEY_PART_INFO))))
|
||||
goto err;
|
||||
bzero((void*) key_part_info, keyinfo->key_parts * sizeof(KEY_PART_INFO));
|
||||
table->key_info=keyinfo;
|
||||
table->key_info= table->s->key_info= keyinfo;
|
||||
keyinfo->key_part=key_part_info;
|
||||
keyinfo->flags=HA_NOSAME | HA_NULL_ARE_EQUAL;
|
||||
keyinfo->key_length= 0; // Will compute the sum of the parts below.
|
||||
|
Reference in New Issue
Block a user