Convert a timestamp string to a MYSQL_TIME value and produce a warning if string was truncated during conversion. NOTE See description of str_to_datetime() for more information. */
| 382 | See description of str_to_datetime() for more information. |
| 383 | */ |
| 384 | bool |
| 385 | str_to_datetime_with_warn(String *str, MYSQL_TIME *l_time, uint flags) |
| 386 | { |
| 387 | MYSQL_TIME_STATUS status; |
| 388 | THD *thd= current_thd; |
| 389 | bool ret_val= str_to_datetime(str, l_time, |
| 390 | (flags | (thd->variables.sql_mode & |
| 391 | (MODE_INVALID_DATES | MODE_NO_ZERO_DATE))), |
| 392 | &status); |
| 393 | if (ret_val || status.warnings) |
| 394 | make_truncated_value_warning(ErrConvString(str), l_time->time_type); |
| 395 | return ret_val; |
| 396 | } |
| 397 | |
| 398 | |
| 399 | /* |
nothing calls this directly
no test coverage detected