summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.cc7
-rw-r--r--sql/item_cmpfunc.h3
-rw-r--r--sql/item_func.h2
-rw-r--r--sql/slave.cc3
4 files changed, 7 insertions, 8 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index fbc1ad97e76..107a17815ae 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -293,9 +293,9 @@ void Item_func_interval::fix_length_and_dec()
}
maybe_null=0; max_length=2;
used_tables_cache|= item->used_tables();
- not_null_tables_cache&= item->not_null_tables();
+ not_null_tables_cache= item->not_null_tables();
with_sum_func= with_sum_func || item->with_sum_func;
- const_item_cache&=item->const_item();
+ const_item_cache&= item->const_item();
}
@@ -1087,7 +1087,8 @@ void Item_func_in::fix_length_and_dec()
maybe_null= item->maybe_null;
max_length=2;
used_tables_cache|= item->used_tables();
- not_null_tables_cache&= item->not_null_tables();
+ /* not_null_tables_cache is only dependent on the argument to in */
+ not_null_tables_cache= item->not_null_tables();
const_item_cache&= item->const_item();
}
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index d36429ab61e..8f1aa525190 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -432,9 +432,6 @@ class Item_func_in :public Item_int_func
{
bool res= (item->fix_fields(thd,tlist) || Item_func::fix_fields(thd,tlist));
with_sum_func= with_sum_func || item->with_sum_func;
- used_tables_cache|= item->used_tables();
- not_null_tables_cache|= item->not_null_tables();
- const_item_cache&= item->const_item();
return res;
}
void fix_length_and_dec();
diff --git a/sql/item_func.h b/sql/item_func.h
index 8a013f42c05..3627af4ebb1 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -600,7 +600,7 @@ public:
{
maybe_null=0; max_length=3;
used_tables_cache|= item->used_tables();
- not_null_tables_cache&= item->not_null_tables();
+ not_null_tables_cache= item->not_null_tables();
const_item_cache&= item->const_item();
with_sum_func= with_sum_func || item->with_sum_func;
}
diff --git a/sql/slave.cc b/sql/slave.cc
index 7e544572755..b0f911e7013 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1637,7 +1637,8 @@ int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
position is at the beginning of the file, and will read the
"signature" and then fast-forward to the last position read.
*/
- if (thread_mask & SLAVE_SQL) {
+ if (thread_mask & SLAVE_SQL)
+ {
my_b_seek(mi->rli.cur_log, (my_off_t) 0);
}
DBUG_RETURN(0);