Commit 8f3c3b08 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.0

into mysql.com:/home/kostja/mysql/mysql-4.0-return_else
parents 908c3ddb 42507efd
......@@ -848,7 +848,7 @@ int Field_decimal::cmp(const char *a_ptr,const char *b_ptr)
return 0;
if (*a_ptr == '-')
return -1;
else if (*b_ptr == '-')
if (*b_ptr == '-')
return 1;
while (a_ptr != end)
......@@ -3018,7 +3018,7 @@ void Field_year::store(const char *from, uint len)
current_thd->cuted_fields++;
return;
}
else if (current_thd->count_cuted_fields && !test_if_int(from,len))
if (current_thd->count_cuted_fields && !test_if_int(from,len))
current_thd->cuted_fields++;
if (nr != 0 || len != 4)
{
......
......@@ -694,9 +694,8 @@ Item_result item_cmp_type(Item_result a,Item_result b)
{
if (a == STRING_RESULT && b == STRING_RESULT)
return STRING_RESULT;
else if (a == INT_RESULT && b == INT_RESULT)
if (a == INT_RESULT && b == INT_RESULT)
return INT_RESULT;
else
return REAL_RESULT;
}
......
......@@ -463,9 +463,8 @@ static Item_result item_store_type(Item_result a,Item_result b)
{
if (a == STRING_RESULT || b == STRING_RESULT)
return STRING_RESULT;
else if (a == REAL_RESULT || b == REAL_RESULT)
if (a == REAL_RESULT || b == REAL_RESULT)
return REAL_RESULT;
else
return INT_RESULT;
}
......
......@@ -214,7 +214,6 @@ String *Item_real_func::val_str(String *str)
double nr=val();
if (null_value)
return 0; /* purecov: inspected */
else
str->set(nr,decimals);
return str;
}
......@@ -227,7 +226,7 @@ String *Item_num_func::val_str(String *str)
longlong nr=val_int();
if (null_value)
return 0; /* purecov: inspected */
else if (!unsigned_flag)
if (!unsigned_flag)
str->set(nr);
else
str->set((ulonglong) nr);
......@@ -237,7 +236,6 @@ String *Item_num_func::val_str(String *str)
double nr=val();
if (null_value)
return 0; /* purecov: inspected */
else
str->set(nr,decimals);
}
return str;
......@@ -257,7 +255,7 @@ String *Item_int_func::val_str(String *str)
longlong nr=val_int();
if (null_value)
return 0;
else if (!unsigned_flag)
if (!unsigned_flag)
str->set(nr);
else
str->set((ulonglong) nr);
......@@ -286,7 +284,7 @@ String *Item_num_op::val_str(String *str)
longlong nr=val_int();
if (null_value)
return 0; /* purecov: inspected */
else if (!unsigned_flag)
if (!unsigned_flag)
str->set(nr);
else
str->set((ulonglong) nr);
......@@ -296,7 +294,6 @@ String *Item_num_op::val_str(String *str)
double nr=val();
if (null_value)
return 0; /* purecov: inspected */
else
str->set(nr,decimals);
}
return str;
......@@ -799,7 +796,7 @@ String *Item_func_min_max::val_str(String *str)
longlong nr=val_int();
if (null_value)
return 0;
else if (!unsigned_flag)
if (!unsigned_flag)
str->set(nr);
else
str->set((ulonglong) nr);
......@@ -810,7 +807,6 @@ String *Item_func_min_max::val_str(String *str)
double nr=val();
if (null_value)
return 0; /* purecov: inspected */
else
str->set(nr,decimals);
return str;
}
......@@ -1392,7 +1388,6 @@ String *Item_func_udf_float::val_str(String *str)
double nr=val();
if (null_value)
return 0; /* purecov: inspected */
else
str->set(nr,decimals);
return str;
}
......@@ -1413,7 +1408,7 @@ String *Item_func_udf_int::val_str(String *str)
longlong nr=val_int();
if (null_value)
return 0;
else if (!unsigned_flag)
if (!unsigned_flag)
str->set(nr);
else
str->set((ulonglong) nr);
......
......@@ -1706,15 +1706,12 @@ inline String* alloc_buffer(String *res,String *str,String *tmp_value,
str->length(length);
return str;
}
else
{
if (tmp_value->alloc(length))
return 0;
(void) tmp_value->copy(*res);
tmp_value->length(length);
return tmp_value;
}
}
res->length(length);
return res;
}
......
......@@ -1153,7 +1153,6 @@ String *Item_sum_udf_float::val_str(String *str)
double nr=val();
if (null_value)
return 0; /* purecov: inspected */
else
str->set(nr,decimals);
return str;
}
......@@ -1172,7 +1171,6 @@ String *Item_sum_udf_int::val_str(String *str)
longlong nr=val_int();
if (null_value)
return 0;
else
str->set(nr);
return str;
}
......
......@@ -1043,7 +1043,7 @@ static void set_user(const char *user)
}
return;
}
else if (!user)
if (!user)
{
if (!opt_bootstrap)
{
......
......@@ -1474,7 +1474,7 @@ key_or(SEL_ARG *key1,SEL_ARG *key2)
}
return 0;
}
else if (!key2)
if (!key2)
{
key1->use_count--;
key1->free_tree();
......
......@@ -220,7 +220,6 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len)
info->is_float = 1; // we can't use variable decimals here
return 1;
}
else
return 0;
}
for (str++; *(end - 1) == '0'; end--); // jump over zeros at the end
......@@ -236,10 +235,7 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len)
info->dval = atod(begin);
return 1;
}
else
return 0;
}
else
return 0;
}
......
......@@ -1409,8 +1409,6 @@ bool select_insert::send_eof()
::send_error(&thd->net);
return 1;
}
else
{
char buff[160];
if (info.handle_duplicates == DUP_IGNORE)
sprintf(buff,ER(ER_INSERT_INFO),info.records,info.records-info.copied,
......@@ -1420,7 +1418,6 @@ bool select_insert::send_eof()
thd->cuted_fields);
::send_ok(&thd->net,info.copied+info.deleted,last_insert_id,buff);
return 0;
}
}
......
......@@ -268,7 +268,6 @@ static bool check_user(THD *thd,enum_server_command command, const char *user,
decrease_user_connections(thd->user_connect);
return error;
}
else
send_ok(net); // Ready to handle questions
thd->password= test(passwd[0]); // Remember for error messages
return 0; // ok
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment