WL#5050: Increase coverage of Field::val_xxx methods in main test suite
Affects: Server-9.x
—
Status: Code-Review
Coverage analysis has shown that a few val_xxx methods in Field classes are not
covered by the main test suite. This worklog will extend test suite to cover
those methods.
The following val_xxx methods is not covered by the main test suite. Tests for
these methods should, if possible, be added:
Field_double::val_int()
Field_float::val_int()
Field_blob::val_int()
Field_varstring::val_int()
In addition, the following classes are not covered at all:
Field_null
Field_date
Field_decimal
An attempt has been made to find SQL that invoke the methods in question.
Result:
Field_double::val_int()
Field_float::val_int()
To test these methods, test cases that cast of double/float columns to
signed/unsigned integers will be added to main.cast test.
Field_blob::val_int()
Field_varstring::val_int()
The following statements will trigger these methods:
select 1 from t1 where ;
select left('1234567890', ) from t1;
Similar test cases will be added to main.type_blob test.
(Casting relevant columns to integers as above do not apply since
conversion is then done by Item_func_signed::val_int_from_str())
Field_null
So far, no way has been found to instantiate Field_null with SQL.
Field_date
Field_decimal
These classes represent obsolete SQL types and will not be tested.
A worklog will be created for the removal of these classes.
Copyright (c) 2000, 2025, Oracle Corporation and/or its affiliates. All rights reserved.