Commit c623c003 authored by unknown's avatar unknown

Merge polly.local:/tmp/maint/bug11655/my50-bug11655

into  polly.local:/tmp/maint/bug11655/my51-bug11655


mysql-test/r/func_time.result:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
parents d8ed788f 6bee06c2
...@@ -970,7 +970,7 @@ CREATE TABLE t1(f1 TIME); ...@@ -970,7 +970,7 @@ CREATE TABLE t1(f1 TIME);
INSERT INTO t1 VALUES('916:00:00 a'); INSERT INTO t1 VALUES('916:00:00 a');
Warnings: Warnings:
Warning 1265 Data truncated for column 'f1' at row 1 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; SELECT * FROM t1;
f1 f1
838:59:59 838:59:59
......
...@@ -120,7 +120,7 @@ static bool make_datetime_with_warn(date_time_format_types format, TIME *ltime, ...@@ -120,7 +120,7 @@ static bool make_datetime_with_warn(date_time_format_types format, TIME *ltime,
return 0; return 0;
make_truncated_value_warning(current_thd, str->ptr(), str->length(), make_truncated_value_warning(current_thd, str->ptr(), str->length(),
MYSQL_TIMESTAMP_TIME); MYSQL_TIMESTAMP_TIME, NullS);
return make_datetime(format, ltime, str); return make_datetime(format, ltime, str);
} }
...@@ -146,7 +146,7 @@ static bool make_time_with_warn(const DATE_TIME_FORMAT *format, ...@@ -146,7 +146,7 @@ static bool make_time_with_warn(const DATE_TIME_FORMAT *format,
if (warning) if (warning)
{ {
make_truncated_value_warning(current_thd, str->ptr(), str->length(), make_truncated_value_warning(current_thd, str->ptr(), str->length(),
MYSQL_TIMESTAMP_TIME); MYSQL_TIMESTAMP_TIME, NullS);
make_time(format, l_time, str); make_time(format, l_time, str);
} }
...@@ -207,7 +207,8 @@ static bool sec_to_time(longlong seconds, bool unsigned_flag, TIME *ltime) ...@@ -207,7 +207,8 @@ static bool sec_to_time(longlong seconds, bool unsigned_flag, TIME *ltime)
char buf[22]; char buf[22];
int len= (int)(longlong10_to_str(seconds, buf, unsigned_flag ? 10 : -10) int len= (int)(longlong10_to_str(seconds, buf, unsigned_flag ? 10 : -10)
- buf); - 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; return 1;
} }
...@@ -2841,7 +2842,8 @@ String *Item_func_maketime::val_str(String *str) ...@@ -2841,7 +2842,8 @@ String *Item_func_maketime::val_str(String *str)
char *ptr= longlong10_to_str(hour, buf, args[0]->unsigned_flag ? 10 : -10); char *ptr= longlong10_to_str(hour, buf, args[0]->unsigned_flag ? 10 : -10);
int len = (int)(ptr - buf) + int len = (int)(ptr - buf) +
my_sprintf(ptr, (ptr, ":%02u:%02u", (uint)minute, (uint)second)); 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)) if (make_time_with_warn((DATE_TIME_FORMAT *) 0, &ltime, str))
......
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