859
859
return CMP_DATE_DFLT;
861
if (! temporal.from_string(str_val->c_ptr(), str_val->length()))
863
/* Chuck an error. Bad datetime input. */
864
my_error(ER_INVALID_DATETIME_VALUE, MYF(ME_FATALERROR), str_val->c_ptr());
865
return CMP_DATE_DFLT; /* :( What else can I return... */
868
/* String conversion was good. Convert to an integer for comparison purposes. */
869
temporal.to_int64_t(&value);
861
if (temporal.from_string(str_val->c_ptr(), str_val->length()))
863
/* String conversion was good. Convert to an integer for comparison purposes. */
864
temporal.to_int64_t(&value);
868
/* We aren't a DATETIME but still could be a TIME */
870
if (timevalue.from_string(str_val->c_ptr(), str_val->length()))
873
timevalue.to_uint64_t(timeint);
874
value= static_cast<int64_t>(timeint);
878
/* Chuck an error. Bad datetime input. */
879
my_error(ER_INVALID_DATETIME_VALUE, MYF(ME_FATALERROR), str_val->c_ptr());
880
return CMP_DATE_DFLT; /* :( What else can I return... */
872
885
*const_value= value;