Commit 0d66c7dd authored by Sergei Golubchik's avatar Sergei Golubchik

update tokudb to 10.2

parent 81e4ce5e
...@@ -428,7 +428,7 @@ static inline bool do_ignore_flag_optimization(THD* thd, TABLE* table, bool opt_ ...@@ -428,7 +428,7 @@ static inline bool do_ignore_flag_optimization(THD* thd, TABLE* table, bool opt_
static inline uint get_key_parts(const KEY *key) { static inline uint get_key_parts(const KEY *key) {
#if (50609 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \ #if (50609 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \ (50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \
(100009 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199) (100009 <= MYSQL_VERSION_ID)
return key->user_defined_key_parts; return key->user_defined_key_parts;
#else #else
return key->key_parts; return key->key_parts;
...@@ -2072,7 +2072,7 @@ int ha_tokudb::write_frm_data(DB* db, DB_TXN* txn, const char* frm_name) { ...@@ -2072,7 +2072,7 @@ int ha_tokudb::write_frm_data(DB* db, DB_TXN* txn, const char* frm_name) {
size_t frm_len = 0; size_t frm_len = 0;
int error = 0; int error = 0;
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199 #if 100000 <= MYSQL_VERSION_ID
error = table_share->read_frm_image((const uchar**)&frm_data,&frm_len); error = table_share->read_frm_image((const uchar**)&frm_data,&frm_len);
if (error) { goto cleanup; } if (error) { goto cleanup; }
#else #else
...@@ -2112,7 +2112,7 @@ int ha_tokudb::verify_frm_data(const char* frm_name, DB_TXN* txn) { ...@@ -2112,7 +2112,7 @@ int ha_tokudb::verify_frm_data(const char* frm_name, DB_TXN* txn) {
HA_METADATA_KEY curr_key = hatoku_frm_data; HA_METADATA_KEY curr_key = hatoku_frm_data;
// get the frm data from MySQL // get the frm data from MySQL
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199 #if 100000 <= MYSQL_VERSION_ID
error = table_share->read_frm_image((const uchar**)&mysql_frm_data,&mysql_frm_len); error = table_share->read_frm_image((const uchar**)&mysql_frm_data,&mysql_frm_len);
if (error) { if (error) {
goto cleanup; goto cleanup;
......
...@@ -221,7 +221,7 @@ static bool change_type_is_supported(TABLE *table, TABLE *altered_table, Alter_i ...@@ -221,7 +221,7 @@ static bool change_type_is_supported(TABLE *table, TABLE *altered_table, Alter_i
static ulong fix_handler_flags(THD *thd, TABLE *table, TABLE *altered_table, Alter_inplace_info *ha_alter_info) { static ulong fix_handler_flags(THD *thd, TABLE *table, TABLE *altered_table, Alter_inplace_info *ha_alter_info) {
ulong handler_flags = ha_alter_info->handler_flags; ulong handler_flags = ha_alter_info->handler_flags;
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199 #if 100000 <= MYSQL_VERSION_ID
// This is automatically supported, hide the flag from later checks // This is automatically supported, hide the flag from later checks
handler_flags &= ~Alter_inplace_info::ALTER_PARTITIONED; handler_flags &= ~Alter_inplace_info::ALTER_PARTITIONED;
#endif #endif
...@@ -724,13 +724,13 @@ bool ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_i ...@@ -724,13 +724,13 @@ bool ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_i
if (commit) { if (commit) {
#if (50613 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \ #if (50613 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \ (50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \
(100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199) (100000 <= MYSQL_VERSION_ID)
if (ha_alter_info->group_commit_ctx) { if (ha_alter_info->group_commit_ctx) {
ha_alter_info->group_commit_ctx = NULL; ha_alter_info->group_commit_ctx = NULL;
} }
#endif #endif
#if (50500 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50599) || \ #if (50500 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50599) || \
(100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199) (100000 <= MYSQL_VERSION_ID)
#if WITH_PARTITION_STORAGE_ENGINE #if WITH_PARTITION_STORAGE_ENGINE
if (TOKU_PARTITION_WRITE_FRM_DATA || altered_table->part_info == NULL) { if (TOKU_PARTITION_WRITE_FRM_DATA || altered_table->part_info == NULL) {
#else #else
......
...@@ -119,7 +119,7 @@ static bool field_valid_for_tokudb_table(Field* field) { ...@@ -119,7 +119,7 @@ static bool field_valid_for_tokudb_table(Field* field) {
case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_FLOAT:
#if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \ #if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \ (50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \
(100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199) (100000 <= MYSQL_VERSION_ID)
case MYSQL_TYPE_DATETIME2: case MYSQL_TYPE_DATETIME2:
case MYSQL_TYPE_TIMESTAMP2: case MYSQL_TYPE_TIMESTAMP2:
case MYSQL_TYPE_TIME2: case MYSQL_TYPE_TIME2:
...@@ -268,7 +268,7 @@ static TOKU_TYPE mysql_to_toku_type (Field* field) { ...@@ -268,7 +268,7 @@ static TOKU_TYPE mysql_to_toku_type (Field* field) {
goto exit; goto exit;
#if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \ #if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \ (50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \
(100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199) (100000 <= MYSQL_VERSION_ID)
case MYSQL_TYPE_DATETIME2: case MYSQL_TYPE_DATETIME2:
case MYSQL_TYPE_TIMESTAMP2: case MYSQL_TYPE_TIMESTAMP2:
case MYSQL_TYPE_TIME2: case MYSQL_TYPE_TIME2:
...@@ -3232,7 +3232,7 @@ static bool fields_are_same_type(Field* a, Field* b) { ...@@ -3232,7 +3232,7 @@ static bool fields_are_same_type(Field* a, Field* b) {
case MYSQL_TYPE_TIMESTAMP: case MYSQL_TYPE_TIMESTAMP:
#if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \ #if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \ (50700 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50799) || \
(100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199) (100000 <= MYSQL_VERSION_ID)
case MYSQL_TYPE_DATETIME2: case MYSQL_TYPE_DATETIME2:
case MYSQL_TYPE_TIMESTAMP2: case MYSQL_TYPE_TIMESTAMP2:
case MYSQL_TYPE_TIME2: case MYSQL_TYPE_TIME2:
......
...@@ -96,7 +96,7 @@ PATENT RIGHTS GRANT: ...@@ -96,7 +96,7 @@ PATENT RIGHTS GRANT:
#pragma interface /* gcc class implementation */ #pragma interface /* gcc class implementation */
#endif #endif
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199 #if 100000 <= MYSQL_VERSION_ID
#if !defined(TOKUDB_CHECK_JEMALLOC) #if !defined(TOKUDB_CHECK_JEMALLOC)
#define TOKUDB_CHECK_JEMALLOC 1 #define TOKUDB_CHECK_JEMALLOC 1
......
...@@ -168,7 +168,7 @@ static int tokudb_rollback_by_xid(handlerton* hton, XID* xid); ...@@ -168,7 +168,7 @@ static int tokudb_rollback_by_xid(handlerton* hton, XID* xid);
static int tokudb_rollback_to_savepoint(handlerton * hton, THD * thd, void *savepoint); static int tokudb_rollback_to_savepoint(handlerton * hton, THD * thd, void *savepoint);
static int tokudb_savepoint(handlerton * hton, THD * thd, void *savepoint); static int tokudb_savepoint(handlerton * hton, THD * thd, void *savepoint);
static int tokudb_release_savepoint(handlerton * hton, THD * thd, void *savepoint); static int tokudb_release_savepoint(handlerton * hton, THD * thd, void *savepoint);
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199 #if 100000 <= MYSQL_VERSION_ID
static int tokudb_discover_table(handlerton *hton, THD* thd, TABLE_SHARE *ts); static int tokudb_discover_table(handlerton *hton, THD* thd, TABLE_SHARE *ts);
static int tokudb_discover_table_existence(handlerton *hton, const char *db, const char *name); static int tokudb_discover_table_existence(handlerton *hton, const char *db, const char *name);
#endif #endif
...@@ -403,7 +403,7 @@ static int tokudb_init_func(void *p) { ...@@ -403,7 +403,7 @@ static int tokudb_init_func(void *p) {
tokudb_hton->savepoint_rollback = tokudb_rollback_to_savepoint; tokudb_hton->savepoint_rollback = tokudb_rollback_to_savepoint;
tokudb_hton->savepoint_release = tokudb_release_savepoint; tokudb_hton->savepoint_release = tokudb_release_savepoint;
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199 #if 100000 <= MYSQL_VERSION_ID
tokudb_hton->discover_table = tokudb_discover_table; tokudb_hton->discover_table = tokudb_discover_table;
tokudb_hton->discover_table_existence = tokudb_discover_table_existence; tokudb_hton->discover_table_existence = tokudb_discover_table_existence;
#else #else
...@@ -1028,7 +1028,7 @@ static int tokudb_release_savepoint(handlerton * hton, THD * thd, void *savepoin ...@@ -1028,7 +1028,7 @@ static int tokudb_release_savepoint(handlerton * hton, THD * thd, void *savepoin
TOKUDB_DBUG_RETURN(error); TOKUDB_DBUG_RETURN(error);
} }
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199 #if 100000 <= MYSQL_VERSION_ID
static int tokudb_discover_table(handlerton *hton, THD* thd, TABLE_SHARE *ts) { static int tokudb_discover_table(handlerton *hton, THD* thd, TABLE_SHARE *ts) {
uchar *frmblob = 0; uchar *frmblob = 0;
size_t frmlen; size_t frmlen;
...@@ -1073,7 +1073,7 @@ static int tokudb_discover3(handlerton *hton, THD* thd, const char *db, const ch ...@@ -1073,7 +1073,7 @@ static int tokudb_discover3(handlerton *hton, THD* thd, const char *db, const ch
DBT value = {}; DBT value = {};
bool do_commit = false; bool do_commit = false;
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199 #if 100000 <= MYSQL_VERSION_ID
tokudb_trx_data *trx = (tokudb_trx_data *) thd_get_ha_data(thd, tokudb_hton); tokudb_trx_data *trx = (tokudb_trx_data *) thd_get_ha_data(thd, tokudb_hton);
if (thd_sql_command(thd) == SQLCOM_CREATE_TABLE && trx && trx->sub_sp_level) { if (thd_sql_command(thd) == SQLCOM_CREATE_TABLE && trx && trx->sub_sp_level) {
do_commit = false; do_commit = false;
......
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