@@ -3781,6 +3781,7 @@ void Item_param::set_int(longlong i, uint32 max_length_arg)
3781
3781
max_length= max_length_arg;
3782
3782
decimals= 0 ;
3783
3783
maybe_null= 0 ;
3784
+ null_value= 0 ;
3784
3785
fix_type (Item::INT_ITEM);
3785
3786
DBUG_VOID_RETURN;
3786
3787
}
@@ -3795,6 +3796,7 @@ void Item_param::set_double(double d)
3795
3796
max_length= DBL_DIG + 8 ;
3796
3797
decimals= NOT_FIXED_DEC;
3797
3798
maybe_null= 0 ;
3799
+ null_value= 0 ;
3798
3800
fix_type (Item::REAL_ITEM);
3799
3801
DBUG_VOID_RETURN;
3800
3802
}
@@ -3827,6 +3829,7 @@ void Item_param::set_decimal(const char *str, ulong length)
3827
3829
my_decimal_precision_to_length_no_truncation (value.m_decimal .precision (),
3828
3830
decimals, unsigned_flag);
3829
3831
maybe_null= 0 ;
3832
+ null_value= 0 ;
3830
3833
fix_type (Item::DECIMAL_ITEM);
3831
3834
DBUG_VOID_RETURN;
3832
3835
}
@@ -3843,6 +3846,7 @@ void Item_param::set_decimal(const my_decimal *dv, bool unsigned_arg)
3843
3846
unsigned_flag= unsigned_arg;
3844
3847
max_length= my_decimal_precision_to_length (value.m_decimal .intg + decimals,
3845
3848
decimals, unsigned_flag);
3849
+ null_value= 0 ;
3846
3850
fix_type (Item::DECIMAL_ITEM);
3847
3851
}
3848
3852
@@ -3862,6 +3866,7 @@ void Item_param::set_time(const MYSQL_TIME *tm,
3862
3866
{
3863
3867
DBUG_ASSERT (value.type_handler ()->cmp_type () == TIME_RESULT);
3864
3868
value.time = *tm;
3869
+ null_value= 0 ;
3865
3870
fix_temporal (max_length_arg, decimals_arg);
3866
3871
}
3867
3872
@@ -3896,6 +3901,7 @@ void Item_param::set_time(MYSQL_TIME *tm, timestamp_type time_type,
3896
3901
set_zero_time (&value.time , MYSQL_TIMESTAMP_ERROR);
3897
3902
}
3898
3903
maybe_null= 0 ;
3904
+ null_value= 0 ;
3899
3905
fix_temporal (max_length_arg,
3900
3906
tm->second_part > 0 ? TIME_SECOND_PART_DIGITS : 0 );
3901
3907
DBUG_VOID_RETURN;
@@ -3932,6 +3938,7 @@ bool Item_param::set_str(const char *str, ulong length,
3932
3938
collation.set (tocs, DERIVATION_COERCIBLE);
3933
3939
max_length= length;
3934
3940
maybe_null= 0 ;
3941
+ null_value= 0 ;
3935
3942
/* max_length and decimals are set after charset conversion */
3936
3943
/* sic: str may be not null-terminated, don't add DBUG_PRINT here */
3937
3944
fix_type (Item::STRING_ITEM);
@@ -3967,6 +3974,7 @@ bool Item_param::set_longdata(const char *str, ulong length)
3967
3974
DBUG_RETURN (TRUE );
3968
3975
state= LONG_DATA_VALUE;
3969
3976
maybe_null= 0 ;
3977
+ null_value= 0 ;
3970
3978
fix_type (Item::STRING_ITEM);
3971
3979
3972
3980
DBUG_RETURN (FALSE );
0 commit comments