Commit a50e68f2 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #6028, fix fractional timestamps in mariadb

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@53322 c7de825b-a66e-492c-adef-691d508d4ae1
parent ba67355e
......@@ -82,7 +82,8 @@ void get_blob_field_info(
}
// this function is pattern matched from
// InnoDB's get_innobase_type_from_mysql_type
TOKU_TYPE mysql_to_toku_type (Field* field) {
TOKU_TYPE ret_val = toku_type_unknown;
enum_field_types mysql_type = field->real_type();
......@@ -93,15 +94,25 @@ TOKU_TYPE mysql_to_toku_type (Field* field) {
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_NEWDATE:
case MYSQL_TYPE_TIME:
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_SET:
ret_val = toku_type_int;
goto exit;
case MYSQL_TYPE_TIME:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_TIMESTAMP:
#ifdef MARIADB_BASE_VERSION
// case to handle fractional seconds in MariaDB
//
if (field->key_type() == HA_KEYTYPE_BINARY) {
ret_val = toku_type_fixbinary;
goto exit;
}
#endif
ret_val = toku_type_int;
goto exit;
case MYSQL_TYPE_DOUBLE:
ret_val = toku_type_double;
goto exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment