summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc17
1 files changed, 5 insertions, 12 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index c940c4ab3c0..8c655cdc369 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -352,8 +352,7 @@ static bool convert_constant_item(THD *thd, Item_field *field_item,
/* For comparison purposes allow invalid dates like 2000-01-32 */
ulong orig_sql_mode= thd->variables.sql_mode;
enum_check_fields orig_count_cuted_fields= thd->count_cuted_fields;
- ulonglong orig_field_val; /* original field value if valid */
- LINT_INIT(orig_field_val);
+ ulonglong UNINIT_VAR(orig_field_val); /* original field value if valid */
thd->variables.sql_mode= (orig_sql_mode & ~MODE_NO_ZERO_DATE) |
MODE_INVALID_DATES;
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
@@ -2453,19 +2452,13 @@ Item_func_nullif::is_null()
Item *Item_func_case::find_item(String *str)
{
- String *first_expr_str, *tmp;
- my_decimal *first_expr_dec, first_expr_dec_val;
- longlong first_expr_int;
- double first_expr_real;
+ String *UNINIT_VAR(first_expr_str), *tmp;
+ my_decimal *UNINIT_VAR(first_expr_dec), first_expr_dec_val;
+ longlong UNINIT_VAR(first_expr_int);
+ double UNINIT_VAR(first_expr_real);
char buff[MAX_FIELD_WIDTH];
String buff_str(buff,sizeof(buff),default_charset());
- /* These will be initialized later */
- LINT_INIT(first_expr_str);
- LINT_INIT(first_expr_int);
- LINT_INIT(first_expr_real);
- LINT_INIT(first_expr_dec);
-
if (first_expr_num != -1)
{
switch (cmp_type)