summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-20 10:26:49 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-20 10:41:32 +0200
commit514b305dfb2839c619a623bbdae5f21cf0077672 (patch)
tree2f9700f05ccf0ddc7e46a547d9a191404e8dbbd7 /sql/sql_select.cc
parentde51acd03730311505677eb7212756e7126183b3 (diff)
parent117291db8b35ddb4cd8c89ee4d8de888160b7163 (diff)
downloadmariadb-git-514b305dfb2839c619a623bbdae5f21cf0077672.tar.gz
Merge 10.3 into 10.4
The MDEV-17262 commit 26432e49d37a37d09b862bb49a021e44bdf4789c was skipped. In Galera 4, the implementation would seem to require changes to the streaming replication. In the tests archive.rnd_pos main.profiling, disable_ps_protocol for SHOW STATUS and SHOW PROFILE commands until MDEV-18974 has been fixed.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index b5b69a8f6c0..c8974721d09 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -3142,7 +3142,7 @@ bool JOIN::make_aggr_tables_info()
aggr_tables++;
curr_tab= join_tab + exec_join_tab_cnt();
- bzero(curr_tab, sizeof(JOIN_TAB));
+ bzero((void*)curr_tab, sizeof(JOIN_TAB));
curr_tab->ref.key= -1;
curr_tab->join= this;
@@ -3232,7 +3232,7 @@ bool JOIN::make_aggr_tables_info()
{
aggr_tables++;
curr_tab= join_tab + exec_join_tab_cnt();
- bzero(curr_tab, sizeof(JOIN_TAB));
+ bzero((void*)curr_tab, sizeof(JOIN_TAB));
curr_tab->ref.key= -1;
if (only_const_tables())
first_select= sub_select_postjoin_aggr;
@@ -3360,7 +3360,7 @@ bool JOIN::make_aggr_tables_info()
curr_tab++;
aggr_tables++;
- bzero(curr_tab, sizeof(JOIN_TAB));
+ bzero((void*)curr_tab, sizeof(JOIN_TAB));
curr_tab->ref.key= -1;
/* group data to new table */
@@ -4786,7 +4786,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
DBUG_RETURN(1);
/* The following should be optimized to only clear critical things */
- bzero(stat, sizeof(JOIN_TAB)* table_count);
+ bzero((void*)stat, sizeof(JOIN_TAB)* table_count);
/* Initialize POSITION objects */
for (i=0 ; i <= table_count ; i++)
(void) new ((char*) (join->positions + i)) POSITION;
@@ -10148,7 +10148,7 @@ bool JOIN::get_best_combination()
1. Put into main join order a JOIN_TAB that represents a lookup or scan
in the temptable.
*/
- bzero(j, sizeof(JOIN_TAB));
+ bzero((void*)j, sizeof(JOIN_TAB));
j->join= this;
j->table= NULL; //temporary way to tell SJM tables from others.
j->ref.key = -1;
@@ -18625,7 +18625,7 @@ bool Virtual_tmp_table::init(uint field_count)
&bitmaps, bitmap_buffer_size(field_count) * 6,
NullS))
DBUG_RETURN(true);
- bzero(s, sizeof(*s));
+ s->reset();
s->blob_field= blob_field;
setup_tmp_table_column_bitmaps(this, bitmaps, field_count);
m_alloced_field_count= field_count;
@@ -21891,7 +21891,8 @@ make_cond_for_table_from_pred(THD *thd, Item *root_cond, Item *cond,
the new parent Item. This should not be expensive because all
children of Item_cond_and should be fixed by now.
*/
- new_cond->fix_fields(thd, 0);
+ if (new_cond->fix_fields(thd, 0))
+ return (COND*) 0;
new_cond->used_tables_cache=
((Item_cond_and*) cond)->used_tables_cache &
tables;