Commit 62decaf5 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:4635] adding TOKUDB_DEFAULT to server variable possibilities, and

handling the case for ROW_TYPE_DEFAULT to quiet down SHOW CREATE TABLE


git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@41634 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0405f5c9
...@@ -6156,6 +6156,8 @@ compression_method_to_row_type(enum toku_compression_method method) ...@@ -6156,6 +6156,8 @@ compression_method_to_row_type(enum toku_compression_method method)
return ROW_TYPE_TOKU_FAST; return ROW_TYPE_TOKU_FAST;
case TOKU_SMALL_COMPRESSION_METHOD: case TOKU_SMALL_COMPRESSION_METHOD:
return ROW_TYPE_TOKU_SMALL; return ROW_TYPE_TOKU_SMALL;
case TOKU_DEFAULT_COMPRESSION_METHOD:
return ROW_TYPE_DEFAULT;
default: default:
assert(false); assert(false);
} }
...@@ -6194,10 +6196,12 @@ row_type_to_compression_method(enum row_type type) ...@@ -6194,10 +6196,12 @@ row_type_to_compression_method(enum row_type type)
return TOKU_LZMA_METHOD; return TOKU_LZMA_METHOD;
case ROW_TYPE_TOKU_SMALL: case ROW_TYPE_TOKU_SMALL:
return TOKU_SMALL_COMPRESSION_METHOD; 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: case ROW_TYPE_TOKU_FAST:
return TOKU_FAST_COMPRESSION_METHOD; 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) ...@@ -6596,9 +6600,10 @@ row_format_to_row_type(srv_row_format_t row_format)
return ROW_TYPE_TOKU_LZMA; return ROW_TYPE_TOKU_LZMA;
case SRV_ROW_FORMAT_SMALL: case SRV_ROW_FORMAT_SMALL:
return ROW_TYPE_TOKU_SMALL; return ROW_TYPE_TOKU_SMALL;
default:
case SRV_ROW_FORMAT_FAST: case SRV_ROW_FORMAT_FAST:
return ROW_TYPE_TOKU_FAST; return ROW_TYPE_TOKU_FAST;
default:
return ROW_TYPE_DEFAULT;
} }
} }
......
...@@ -181,6 +181,7 @@ static const char *tokudb_row_format_names[] = { ...@@ -181,6 +181,7 @@ static const char *tokudb_row_format_names[] = {
"tokudb_lzma", "tokudb_lzma",
"tokudb_fast", "tokudb_fast",
"tokudb_small", "tokudb_small",
"tokudb_default",
NullS NullS
}; };
...@@ -194,8 +195,8 @@ static TYPELIB tokudb_row_format_typelib = { ...@@ -194,8 +195,8 @@ static TYPELIB tokudb_row_format_typelib = {
static MYSQL_THDVAR_ENUM(row_format, PLUGIN_VAR_OPCMDARG, static MYSQL_THDVAR_ENUM(row_format, PLUGIN_VAR_OPCMDARG,
"Specifies the compression method for a table during this session. " "Specifies the compression method for a table during this session. "
"Possible values are TOKUDB_UNCOMPRESSED, TOKUDB_ZLIB, TOKUDB_QUICKLZ, " "Possible values are TOKUDB_UNCOMPRESSED, TOKUDB_ZLIB, TOKUDB_QUICKLZ, "
"TOKUDB_LZMA, TOKUDB_FAST (default), and TOKUDB_SMALL", "TOKUDB_LZMA, TOKUDB_FAST, TOKUDB_SMALL and TOKUDB_DEFAULT",
NULL, NULL, SRV_ROW_FORMAT_FAST, &tokudb_row_format_typelib); NULL, NULL, SRV_ROW_FORMAT_DEFAULT, &tokudb_row_format_typelib);
srv_row_format_t get_row_format(THD *thd) srv_row_format_t get_row_format(THD *thd)
{ {
......
...@@ -15,7 +15,8 @@ enum srv_row_format_enum { ...@@ -15,7 +15,8 @@ enum srv_row_format_enum {
SRV_ROW_FORMAT_QUICKLZ = 2, SRV_ROW_FORMAT_QUICKLZ = 2,
SRV_ROW_FORMAT_LZMA = 3, SRV_ROW_FORMAT_LZMA = 3,
SRV_ROW_FORMAT_FAST = 4, 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; typedef enum srv_row_format_enum srv_row_format_t;
......
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