Commit d4d865fc authored by Alexander Barkov's avatar Alexander Barkov

MDEV-20332 Wrong UNSIGNED metadata flag returned for COALESCE(unsigned_field,timestamp_field)

parent 0e0d5714
......@@ -4104,3 +4104,18 @@ c
#
# 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 # End of 10.4 tests
--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);
else
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;
return false;
}
......
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