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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8d273836
Commit
8d273836
authored
Mar 23, 2011
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lp:740173 5.1-micro reports incorrect Length metadata for TIME expressions
parent
e2d71ef3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
1 deletion
+15
-1
mysql-test/r/metadata.result
mysql-test/r/metadata.result
+6
-0
mysql-test/t/metadata.test
mysql-test/t/metadata.test
+8
-0
sql/item_timefunc.h
sql/item_timefunc.h
+1
-1
No files found.
mysql-test/r/metadata.result
View file @
8d273836
...
...
@@ -210,3 +210,9 @@ f1
DROP VIEW v1;
DROP TABLE t1;
End of 5.0 tests
select cast('01:01:01' as time), cast('01:01:01' as time(2));
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def cast('01:01:01' as time) 11 9 8 Y 128 0 63
def cast('01:01:01' as time(2)) 11 12 11 Y 128 2 63
cast('01:01:01' as time) cast('01:01:01' as time(2))
01:01:01 01:01:01.00
mysql-test/t/metadata.test
View file @
8d273836
...
...
@@ -143,3 +143,11 @@ DROP VIEW v1;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
--
enable_metadata
#
# lp:740173 5.1-micro reports incorrect Length metadata for TIME expressions
#
select
cast
(
'01:01:01'
as
time
),
cast
(
'01:01:01'
as
time
(
2
));
sql/item_timefunc.h
View file @
8d273836
...
...
@@ -698,7 +698,7 @@ public:
{
collation
.
set
(
&
my_charset_bin
);
maybe_null
=
1
;
max_length
=
M
AX
_TIME_WIDTH
;
max_length
=
M
IN
_TIME_WIDTH
;
if
(
decimals
==
NOT_FIXED_DEC
)
decimals
=
args
[
0
]
->
decimals
;
if
(
decimals
&&
decimals
!=
NOT_FIXED_DEC
)
...
...
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