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_
static inline uint get_key_parts(const KEY *key) {
#if (50609 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(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;
#else
return key->key_parts;
......@@ -2072,7 +2072,7 @@ int ha_tokudb::write_frm_data(DB* db, DB_TXN* txn, const char* frm_name) {
size_t frm_len = 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);
if (error) { goto cleanup; }
#else
......@@ -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;
// 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);
if (error) {
goto cleanup;
......
......@@ -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) {
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
handler_flags &= ~Alter_inplace_info::ALTER_PARTITIONED;
#endif
......@@ -724,13 +724,13 @@ bool ha_tokudb::commit_inplace_alter_table(TABLE *altered_table, Alter_inplace_i
if (commit) {
#if (50613 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(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) {
ha_alter_info->group_commit_ctx = NULL;
}
#endif
#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 (TOKU_PARTITION_WRITE_FRM_DATA || altered_table->part_info == NULL) {
#else
......
......@@ -119,7 +119,7 @@ static bool field_valid_for_tokudb_table(Field* field) {
case MYSQL_TYPE_FLOAT:
#if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(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_TIMESTAMP2:
case MYSQL_TYPE_TIME2:
......@@ -268,7 +268,7 @@ static TOKU_TYPE mysql_to_toku_type (Field* field) {
goto exit;
#if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(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_TIMESTAMP2:
case MYSQL_TYPE_TIME2:
......@@ -3232,7 +3232,7 @@ static bool fields_are_same_type(Field* a, Field* b) {
case MYSQL_TYPE_TIMESTAMP:
#if (50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699) || \
(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_TIMESTAMP2:
case MYSQL_TYPE_TIME2:
......
......@@ -96,7 +96,7 @@ PATENT RIGHTS GRANT:
#pragma interface /* gcc class implementation */
#endif
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100199
#if 100000 <= MYSQL_VERSION_ID
#if !defined(TOKUDB_CHECK_JEMALLOC)
#define TOKUDB_CHECK_JEMALLOC 1
......
......@@ -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_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_existence(handlerton *hton, const char *db, const char *name);
#endif
......@@ -403,7 +403,7 @@ static int tokudb_init_func(void *p) {
tokudb_hton->savepoint_rollback = tokudb_rollback_to_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_existence = tokudb_discover_table_existence;
#else
......@@ -1028,7 +1028,7 @@ static int tokudb_release_savepoint(handlerton * hton, THD * thd, void *savepoin
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) {
uchar *frmblob = 0;
size_t frmlen;
......@@ -1073,7 +1073,7 @@ static int tokudb_discover3(handlerton *hton, THD* thd, const char *db, const ch
DBT value = {};
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);
if (thd_sql_command(thd) == SQLCOM_CREATE_TABLE && trx && trx->sub_sp_level) {
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