1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Adding support for the SQL-standard temporal literals.

added:
  mysql-test/r/temporal_literal.result
  mysql-test/t/temporal_literal.test
modified:
  client/mysqlbinlog.cc
  include/my_time.h
  mysql-test/r/cast.result
  mysql-test/r/partition_innodb.result
  mysql-test/t/cast.test
  mysql-test/t/partition_innodb.test
  sql-common/my_time.c
  sql/field.cc
  sql/item.cc
  sql/item.h
  sql/item_cmpfunc.cc
  sql/item_create.cc
  sql/item_create.h
  sql/item_strfunc.cc
  sql/item_timefunc.cc
  sql/item_timefunc.h
  sql/sql_select.cc
  sql/sql_time.cc
  sql/sql_time.h
  sql/sql_yacc.yy
  storage/spider/spd_db_mysql.cc
This commit is contained in:
Alexander Barkov
2013-07-10 12:12:27 +04:00
parent 17f3ae267f
commit d98584f56a
23 changed files with 1256 additions and 216 deletions

View File

@@ -1541,13 +1541,14 @@ the mysql command line client.\n\n");
static my_time_t convert_str_to_timestamp(const char* str)
{
int was_cut;
MYSQL_TIME_STATUS status;
MYSQL_TIME l_time;
long dummy_my_timezone;
uint dummy_in_dst_time_gap;
/* We require a total specification (date AND time) */
if (str_to_datetime(str, (uint) strlen(str), &l_time, 0, &was_cut) !=
MYSQL_TIMESTAMP_DATETIME || was_cut)
if (str_to_datetime(str, (uint) strlen(str), &l_time, 0, &status) ||
l_time.time_type != MYSQL_TIMESTAMP_DATETIME || status.warnings)
{
error("Incorrect date and time argument: %s", str);
exit(1);