Character set-aware version of str_to_time() */
| 252 | |
| 253 | /* Character set-aware version of str_to_time() */ |
| 254 | bool str_to_time(const CHARSET_INFO *cs, const char *str,uint length, |
| 255 | MYSQL_TIME *l_time, uint flags, MYSQL_TIME_STATUS *status) |
| 256 | { |
| 257 | char cnv[MAX_TIME_FULL_WIDTH + 3]; // +3 for nanoseconds (for rounding) |
| 258 | if ((cs->state & MY_CS_NONASCII) != 0) |
| 259 | { |
| 260 | length= to_ascii(cs, str, length, cnv, sizeof(cnv)); |
| 261 | str= cnv; |
| 262 | } |
| 263 | return str_to_time(str, length, l_time, status) || |
| 264 | (!(flags & TIME_NO_NSEC_ROUNDING) && |
| 265 | time_add_nanoseconds_with_round(l_time, status->nanoseconds, |
| 266 | &status->warnings)); |
| 267 | } |
| 268 | |
| 269 | |
| 270 | /* Character set-aware version of str_to_datetime() */ |
no test coverage detected