diff options
author | unknown <konstantin@mysql.com> | 2003-11-05 14:35:20 +0300 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2003-11-05 14:35:20 +0300 |
commit | f00310a62231a011eef8b8066314eb5f4e6b6a9e (patch) | |
tree | ae3118b452d9f3703a3b04fb92d63d4edbc3f3c4 /sql | |
parent | 61e682b8adafdfae736327fee4ea0263e1a0bd37 (diff) | |
parent | 9c8d73c72898e35fafd83a56e7f9bc814e514d53 (diff) | |
download | mariadb-git-f00310a62231a011eef8b8066314eb5f4e6b6a9e.tar.gz |
Merge kosipov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/mysql/mysql-4.1-root
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/item_cmpfunc.cc | 5 | ||||
-rw-r--r-- | sql/item_func.cc | 14 |
3 files changed, 8 insertions, 13 deletions
diff --git a/sql/item.cc b/sql/item.cc index 24710654d4a..d76ab529db5 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -938,7 +938,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) set_field(tmp); } - else if (thd && thd->set_query_id && field->query_id != thd->query_id) + else if (thd->set_query_id && field->query_id != thd->query_id) { /* We only come here in unions */ TABLE *table=field->table; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 1ec1a19382d..8731e8fbe21 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1667,7 +1667,7 @@ Item_cond::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) */ and_tables_cache= ~(table_map) 0; - if (thd && check_stack_overrun(thd,buff)) + if (check_stack_overrun(thd, buff)) return 1; // Fatal error flag is set! while ((item=li++)) { @@ -1696,8 +1696,7 @@ Item_cond::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) if (item->maybe_null) maybe_null=1; } - if (thd) - thd->lex.current_select->cond_count+=list.elements; + thd->lex.current_select->cond_count+=list.elements; fix_length_and_dec(); fixed= 1; return 0; diff --git a/sql/item_func.cc b/sql/item_func.cc index 3ed0396e373..3112c73b188 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -197,7 +197,7 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) used_tables_cache= not_null_tables_cache= 0; const_item_cache=1; - if (thd && check_stack_overrun(thd,buff)) + if (check_stack_overrun(thd, buff)) return 1; // Fatal error if flag is set! if (arg_count) { // Print purify happy @@ -219,7 +219,7 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) } } fix_length_and_dec(); - if (thd && thd->net.last_errno) // An error inside fix_length_and_dec accured + if (thd->net.last_errno) // An error inside fix_length_and_dec occured return 1; fixed= 1; return 0; @@ -1435,13 +1435,9 @@ udf_handler::fix_fields(THD *thd, TABLE_LIST *tables, Item_result_field *func, #endif DBUG_ENTER("Item_udf_func::fix_fields"); - if (thd) - { - if (check_stack_overrun(thd,buff)) - DBUG_RETURN(1); // Fatal error flag is set! - } - else - thd=current_thd; // In WHERE / const clause + if (check_stack_overrun(thd, buff)) + DBUG_RETURN(1); // Fatal error flag is set! + udf_func *tmp_udf=find_udf(u_d->name.str,(uint) u_d->name.length,1); if (!tmp_udf) |