128
type::timestamp_t str_to_datetime_with_warn(Session *session,
128
type::timestamp_t str_to_datetime_with_warn(Session *session, const char *str, uint32_t length, type::Time *l_time, uint32_t flags)
134
130
type::cut_t was_cut= type::VALID;
135
type::timestamp_t ts_type;
137
ts_type= l_time->store(str, length,
138
(flags | (session->variables.sql_mode &
139
(MODE_INVALID_DATES |
140
MODE_NO_ZERO_DATE))),
131
type::timestamp_t ts_type= l_time->store(str, length, (flags | (session->variables.sql_mode & (MODE_INVALID_DATES | MODE_NO_ZERO_DATE))), was_cut);
142
132
if (was_cut || ts_type <= type::DRIZZLE_TIMESTAMP_ERROR)
143
make_truncated_value_warning(session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
144
str, length, ts_type, NULL);
133
make_truncated_value_warning(session, DRIZZLE_ERROR::WARN_LEVEL_WARN, str, length, ts_type, NULL);
151
str_to_time_with_warn(Session *session, const char *str, uint32_t length, type::Time *l_time)
139
bool str_to_time_with_warn(Session *session, const char *str, uint32_t length, type::Time *l_time)
154
142
bool ret_val= l_time->store(str, length, warning, type::DRIZZLE_TIMESTAMP_TIME);
155
143
if (ret_val || warning)
156
make_truncated_value_warning(session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
157
str, length, type::DRIZZLE_TIMESTAMP_TIME, NULL);
144
make_truncated_value_warning(session, DRIZZLE_ERROR::WARN_LEVEL_WARN, str, length, type::DRIZZLE_TIMESTAMP_TIME, NULL);