MDEV-20332 Wrong UNSIGNED metadata flag returned for COALESCE(unsigned_field,timestamp_field)
This commit is contained in:
parent
0e0d57141e
commit
d4d865fcc8
@ -4104,3 +4104,18 @@ c
|
|||||||
#
|
#
|
||||||
# End of 10.4 tests
|
# End of 10.4 tests
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# Start of 10.5 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-20332 Wrong UNSIGNED metadata flag returned for COALESCE(unsigned_field,timestamp_field)
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT UNSIGNED, b TIMESTAMP);
|
||||||
|
SELECT COALESCE(a,b) FROM t1;
|
||||||
|
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||||
|
def COALESCE(a,b) 253 19 0 Y 0 39 8
|
||||||
|
COALESCE(a,b)
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of 10.5 tests
|
||||||
|
#
|
||||||
|
@ -815,3 +815,24 @@ SELECT 0 + LEAST(TIME'-10:00:00',TIME'10:00:00') AS c;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.4 tests
|
--echo # End of 10.4 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Start of 10.5 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-20332 Wrong UNSIGNED metadata flag returned for COALESCE(unsigned_field,timestamp_field)
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT UNSIGNED, b TIMESTAMP);
|
||||||
|
--disable_ps_protocol
|
||||||
|
--enable_metadata
|
||||||
|
SELECT COALESCE(a,b) FROM t1;
|
||||||
|
--disable_metadata
|
||||||
|
--enable_ps_protocol
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.5 tests
|
||||||
|
--echo #
|
||||||
|
@ -1201,7 +1201,7 @@ bool Type_std_attributes::aggregate_attributes_string(const char *func_name,
|
|||||||
max_length= find_max_octet_length(items, nitems);
|
max_length= find_max_octet_length(items, nitems);
|
||||||
else
|
else
|
||||||
fix_char_length(find_max_char_length(items, nitems));
|
fix_char_length(find_max_char_length(items, nitems));
|
||||||
unsigned_flag= count_unsigned(items, nitems) > 0;
|
unsigned_flag= false;
|
||||||
decimals= max_length ? NOT_FIXED_DEC : 0;
|
decimals= max_length ? NOT_FIXED_DEC : 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user