@brief Convert date provided in a string to its packed temporal int representation. @param[in] thd thread handle @param[in] str a string to convert @param[in] warn_type type of the timestamp for issuing the warning @param[in] warn_name field name for issuing the warning @param[out] error_arg could not extract a DATE or DATETIME @details Convert date provid
| 197 | converted value. 0 on error and on zero-dates -- check 'failure' |
| 198 | */ |
| 199 | static ulonglong get_date_from_str(THD *thd, String *str, |
| 200 | timestamp_type warn_type, |
| 201 | const char *warn_name, bool *error_arg) |
| 202 | { |
| 203 | MYSQL_TIME l_time; |
| 204 | *error_arg= get_mysql_time_from_str(thd, str, warn_type, warn_name, &l_time); |
| 205 | |
| 206 | if (*error_arg) |
| 207 | return 0; |
| 208 | return TIME_to_longlong_datetime_packed(&l_time); |
| 209 | } |
| 210 | |
| 211 | /* |
| 212 | Retrieves correct DATETIME value from given item. |
no test coverage detected