diff options
author | Michael Widenius <monty@mariadb.org> | 2023-02-20 12:28:44 +0200 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2023-02-21 09:18:35 +0200 |
commit | e91b56c059b5fce9487ebc3b302774db1ab13a3b (patch) | |
tree | 8b5b9bbb63ee15a720056b68388e4fac9775d0f6 /sql/opt_subselect.cc | |
parent | 24c4877e3948e1de799fe037ba6318f6a8c42d85 (diff) | |
download | mariadb-git-bb-11.0.tar.gz |
squash! 4cb69791aaa59e786859405c3c3826a6a15c4a09bb-11.0
- Ensure that TEMP_TABLE_PARAM.func_count includes all items that may
need a copy function.
- Fixed that Aria allocates enough space for key copies.
- Fixed that Aria does not check empty_bits if not allocated.
The first issue could cause crashes, the other issues should not
affect anything.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 4edd4ccecad..8e6a4dbf1f8 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -4306,6 +4306,7 @@ bool setup_sj_materialization_part1(JOIN_TAB *sjm_tab) } sjm->sjm_table_param.field_count= subq_select->item_list.elements; + sjm->sjm_table_param.func_count= sjm->sjm_table_param.field_count; sjm->sjm_table_param.force_not_null_cols= TRUE; if (!(sjm->table= create_tmp_table(thd, &sjm->sjm_table_param, @@ -5925,14 +5926,14 @@ TABLE *create_dummy_tmp_table(THD *thd) DBUG_ENTER("create_dummy_tmp_table"); TABLE *table; TMP_TABLE_PARAM sjm_table_param; - sjm_table_param.init(); - sjm_table_param.field_count= 1; List<Item> sjm_table_cols; const LEX_CSTRING dummy_name= { STRING_WITH_LEN("dummy") }; Item *column_item= new (thd->mem_root) Item_int(thd, 1); if (!column_item) DBUG_RETURN(NULL); + sjm_table_param.init(); + sjm_table_param.field_count= sjm_table_param.func_count= 1; sjm_table_cols.push_back(column_item, thd->mem_root); if (!(table= create_tmp_table(thd, &sjm_table_param, sjm_table_cols, (ORDER*) 0, |