diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index a38ec55ec29..b176ca88d84 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -6156,6 +6156,8 @@ compression_method_to_row_type(enum toku_compression_method method) return ROW_TYPE_TOKU_FAST; case TOKU_SMALL_COMPRESSION_METHOD: return ROW_TYPE_TOKU_SMALL; + case TOKU_DEFAULT_COMPRESSION_METHOD: + return ROW_TYPE_DEFAULT; default: assert(false); } @@ -6194,10 +6196,12 @@ row_type_to_compression_method(enum row_type type) return TOKU_LZMA_METHOD; case ROW_TYPE_TOKU_SMALL: return TOKU_SMALL_COMPRESSION_METHOD; - default: - DBUG_PRINT("info", ("Ignoring ROW_FORMAT not used by TokuDB, using TOKUDB_FAST by default instead")); case ROW_TYPE_TOKU_FAST: return TOKU_FAST_COMPRESSION_METHOD; + default: + DBUG_PRINT("info", ("Ignoring ROW_FORMAT not used by TokuDB, using TOKUDB_FAST by default instead")); + case ROW_TYPE_DEFAULT: + return TOKU_DEFAULT_COMPRESSION_METHOD; } } @@ -6596,9 +6600,10 @@ row_format_to_row_type(srv_row_format_t row_format) return ROW_TYPE_TOKU_LZMA; case SRV_ROW_FORMAT_SMALL: return ROW_TYPE_TOKU_SMALL; - default: case SRV_ROW_FORMAT_FAST: return ROW_TYPE_TOKU_FAST; + default: + return ROW_TYPE_DEFAULT; } } diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc index 5f4c998a537..7794539110a 100644 --- a/storage/tokudb/hatoku_hton.cc +++ b/storage/tokudb/hatoku_hton.cc @@ -181,6 +181,7 @@ static const char *tokudb_row_format_names[] = { "tokudb_lzma", "tokudb_fast", "tokudb_small", + "tokudb_default", NullS }; @@ -194,8 +195,8 @@ static TYPELIB tokudb_row_format_typelib = { static MYSQL_THDVAR_ENUM(row_format, PLUGIN_VAR_OPCMDARG, "Specifies the compression method for a table during this session. " "Possible values are TOKUDB_UNCOMPRESSED, TOKUDB_ZLIB, TOKUDB_QUICKLZ, " - "TOKUDB_LZMA, TOKUDB_FAST (default), and TOKUDB_SMALL", - NULL, NULL, SRV_ROW_FORMAT_FAST, &tokudb_row_format_typelib); + "TOKUDB_LZMA, TOKUDB_FAST, TOKUDB_SMALL and TOKUDB_DEFAULT", + NULL, NULL, SRV_ROW_FORMAT_DEFAULT, &tokudb_row_format_typelib); srv_row_format_t get_row_format(THD *thd) { diff --git a/storage/tokudb/hatoku_hton.h b/storage/tokudb/hatoku_hton.h index 1bda75475b0..79d1bb388d0 100644 --- a/storage/tokudb/hatoku_hton.h +++ b/storage/tokudb/hatoku_hton.h @@ -15,7 +15,8 @@ enum srv_row_format_enum { SRV_ROW_FORMAT_QUICKLZ = 2, SRV_ROW_FORMAT_LZMA = 3, SRV_ROW_FORMAT_FAST = 4, - SRV_ROW_FORMAT_SMALL = 5 + SRV_ROW_FORMAT_SMALL = 5, + SRV_ROW_FORMAT_DEFAULT = 6 }; typedef enum srv_row_format_enum srv_row_format_t;