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
e89fdaac
Commit
e89fdaac
authored
Oct 12, 2006
by
kaa@polly.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5.0-specific fixes when merging the fix for bug #11655 and bug #20927 from 4.1
parent
02ac6350
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+1
-1
sql/item_timefunc.cc
sql/item_timefunc.cc
+6
-4
No files found.
mysql-test/r/func_time.result
View file @
e89fdaac
...
...
@@ -898,7 +898,7 @@ CREATE TABLE t1(f1 TIME);
INSERT INTO t1 VALUES('916:00:00 a');
Warnings:
Warning 1265 Data truncated for column 'f1' at row 1
Warning 1264
Data truncated; out of range
for column 'f1' at row 1
Warning 1264
Out of range value adjusted
for column 'f1' at row 1
SELECT * FROM t1;
f1
838:59:59
...
...
sql/item_timefunc.cc
View file @
e89fdaac
...
...
@@ -120,7 +120,7 @@ static bool make_datetime_with_warn(date_time_format_types format, TIME *ltime,
return
0
;
make_truncated_value_warning
(
current_thd
,
str
->
ptr
(),
str
->
length
(),
MYSQL_TIMESTAMP_TIME
);
MYSQL_TIMESTAMP_TIME
,
NullS
);
return
make_datetime
(
format
,
ltime
,
str
);
}
...
...
@@ -146,7 +146,7 @@ static bool make_time_with_warn(const DATE_TIME_FORMAT *format,
if
(
warning
)
{
make_truncated_value_warning
(
current_thd
,
str
->
ptr
(),
str
->
length
(),
MYSQL_TIMESTAMP_TIME
);
MYSQL_TIMESTAMP_TIME
,
NullS
);
make_time
(
format
,
l_time
,
str
);
}
...
...
@@ -207,7 +207,8 @@ static bool sec_to_time(longlong seconds, bool unsigned_flag, TIME *ltime)
char
buf
[
22
];
int
len
=
(
int
)(
longlong10_to_str
(
seconds
,
buf
,
unsigned_flag
?
10
:
-
10
)
-
buf
);
make_truncated_value_warning
(
current_thd
,
buf
,
len
,
MYSQL_TIMESTAMP_TIME
);
make_truncated_value_warning
(
current_thd
,
buf
,
len
,
MYSQL_TIMESTAMP_TIME
,
NullS
);
return
1
;
}
...
...
@@ -2960,7 +2961,8 @@ String *Item_func_maketime::val_str(String *str)
char
*
ptr
=
longlong10_to_str
(
hour
,
buf
,
args
[
0
]
->
unsigned_flag
?
10
:
-
10
);
int
len
=
(
int
)(
ptr
-
buf
)
+
my_sprintf
(
ptr
,
(
ptr
,
":%02u:%02u"
,
(
uint
)
minute
,
(
uint
)
second
));
make_truncated_value_warning
(
current_thd
,
buf
,
len
,
MYSQL_TIMESTAMP_TIME
);
make_truncated_value_warning
(
current_thd
,
buf
,
len
,
MYSQL_TIMESTAMP_TIME
,
NullS
);
}
if
(
make_time_with_warn
((
DATE_TIME_FORMAT
*
)
0
,
&
ltime
,
str
))
...
...
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