diff options
author | unknown <monty@mysql.com> | 2004-11-26 02:31:22 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-11-26 02:31:22 +0200 |
commit | 60af920628c435a5990c3ef7a753d0f374fc12cc (patch) | |
tree | f3f4600d006f2d2d7d31180814236decb181095f /sql | |
parent | fecd27a1063ef32c7d1d3149321323de2c943364 (diff) | |
download | mariadb-git-60af920628c435a5990c3ef7a753d0f374fc12cc.tar.gz |
Fixes while reviewing code
(Cleanups and better bug fixes)
mysql-test/r/select.result:
Fixed test after wrong merge
mysql-test/t/select.test:
Fixed test after wrong merge
scripts/mysql_fix_privilege_tables.sh:
Don't read defaults files
sql/item_cmpfunc.cc:
Fix wrong value for not_null_tables_cache
sql/item_cmpfunc.h:
Remove wrong patch (flags are set in fix_length_and_dec())
sql/item_func.h:
Fix wrong value for not_null_tables_cache
sql/slave.cc:
Fixed indentation
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_cmpfunc.cc | 7 | ||||
-rw-r--r-- | sql/item_cmpfunc.h | 3 | ||||
-rw-r--r-- | sql/item_func.h | 2 | ||||
-rw-r--r-- | sql/slave.cc | 3 |
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); |