mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.1' into 10.2
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2000, 2015 Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2015 MariaDB
|
||||
Copyright (c) 2009, 2016 MariaDB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -9236,7 +9236,7 @@ static void add_not_null_conds(JOIN *join)
|
||||
if (!referred_tab)
|
||||
continue;
|
||||
if (!(notnull= new (join->thd->mem_root)
|
||||
Item_func_isnotnull(join->thd, not_null_item)))
|
||||
Item_func_isnotnull(join->thd, item)))
|
||||
DBUG_VOID_RETURN;
|
||||
/*
|
||||
We need to do full fix_fields() call here in order to have correct
|
||||
@ -17117,6 +17117,12 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
|
||||
goto err;
|
||||
|
||||
bzero(seg, sizeof(*seg) * keyinfo->user_defined_key_parts);
|
||||
/*
|
||||
Note that a similar check is performed during
|
||||
subquery_types_allow_materialization. See MDEV-7122 for more details as
|
||||
to why. Whenever this changes, it must be updated there as well, for
|
||||
all tmp_table engines.
|
||||
*/
|
||||
if (keyinfo->key_length > table->file->max_key_length() ||
|
||||
keyinfo->user_defined_key_parts > table->file->max_key_parts() ||
|
||||
share->uniques)
|
||||
@ -17316,6 +17322,12 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
|
||||
goto err;
|
||||
|
||||
bzero(seg, sizeof(*seg) * keyinfo->user_defined_key_parts);
|
||||
/*
|
||||
Note that a similar check is performed during
|
||||
subquery_types_allow_materialization. See MDEV-7122 for more details as
|
||||
to why. Whenever this changes, it must be updated there as well, for
|
||||
all tmp_table engines.
|
||||
*/
|
||||
if (keyinfo->key_length > table->file->max_key_length() ||
|
||||
keyinfo->user_defined_key_parts > table->file->max_key_parts() ||
|
||||
share->uniques)
|
||||
@ -18783,7 +18795,18 @@ int join_read_key2(THD *thd, JOIN_TAB *tab, TABLE *table, TABLE_REF *table_ref)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
The following is needed when one makes ref (or eq_ref) access from row
|
||||
comparisons: one must call row->bring_value() to get the new values.
|
||||
*/
|
||||
if (tab && tab->bush_children)
|
||||
{
|
||||
TABLE_LIST *emb_sj_nest= tab->bush_children->start->emb_sj_nest;
|
||||
emb_sj_nest->sj_subq_pred->left_expr->bring_value();
|
||||
}
|
||||
|
||||
/* TODO: Why don't we do "Late NULLs Filtering" here? */
|
||||
|
||||
if (cmp_buffer_with_ref(thd, table, table_ref) ||
|
||||
(table->status & (STATUS_GARBAGE | STATUS_NO_PARENT | STATUS_NULL_ROW)))
|
||||
{
|
||||
@ -21194,7 +21217,7 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
|
||||
&examined_rows, &found_rows,
|
||||
join->explain->ops_tracker.report_sorting(thd));
|
||||
table->sort.found_records= filesort_retval;
|
||||
tab->records= found_rows; // For SQL_CALC_ROWS
|
||||
tab->records= join->select_options & OPTION_FOUND_ROWS ? found_rows : filesort_retval;
|
||||
|
||||
if (quick_created)
|
||||
{
|
||||
|
Reference in New Issue
Block a user