Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d4d865fc
Commit
d4d865fc
authored
Aug 12, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20332 Wrong UNSIGNED metadata flag returned for COALESCE(unsigned_field,timestamp_field)
parent
0e0d5714
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
mysql-test/main/func_hybrid_type.result
mysql-test/main/func_hybrid_type.result
+15
-0
mysql-test/main/func_hybrid_type.test
mysql-test/main/func_hybrid_type.test
+21
-0
sql/sql_type.cc
sql/sql_type.cc
+1
-1
No files found.
mysql-test/main/func_hybrid_type.result
View file @
d4d865fc
...
...
@@ -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
#
mysql-test/main/func_hybrid_type.test
View file @
d4d865fc
...
...
@@ -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
#
sql/sql_type.cc
View file @
d4d865fc
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment