Commit 441ed1b5 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

refs #5780 build basic tokudb in percona server

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@51373 c7de825b-a66e-492c-adef-691d508d4ae1
parent f853378e
SET(TOKUDB_VERSION $ENV{TOKUDB_VERSION}) IF(DEFINED ENV{TOKUDB_VERSION})
SET(TOKUDB_VERSION $ENV{TOKUDB_VERSION})
ADD_DEFINITIONS("-DTOKUDB_VERSION=\"${TOKUDB_VERSION}\"")
ENDIF()
IF(DEFINED ENV{TOKUDB_PATCHES})
SET(TOKUDB_PATCHES $ENV{TOKUDB_PATCHES})
ADD_DEFINITIONS("-DTOKUDB_PATCHES=${TOKUDB_PATCHES}")
ENDIF()
SET(TOKUFRACTALTREE_RELEASE_DIR $ENV{TOKUFRACTALTREE}) SET(TOKUFRACTALTREE_RELEASE_DIR $ENV{TOKUFRACTALTREE})
SET(TOKUFRACTALTREE_LIBNAME $ENV{TOKUFRACTALTREE_LIBNAME}) SET(TOKUFRACTALTREE_LIBNAME $ENV{TOKUFRACTALTREE_LIBNAME})
SET(TOKUPORTABILITY_LIBNAME $ENV{TOKUPORTABILITY_LIBNAME}) SET(TOKUPORTABILITY_LIBNAME $ENV{TOKUPORTABILITY_LIBNAME})
ADD_DEFINITIONS("-DTOKUDB_VERSION=\"${TOKUDB_VERSION}\"")
INCLUDE_DIRECTORIES(${TOKUFRACTALTREE_RELEASE_DIR}/include) INCLUDE_DIRECTORIES(${TOKUFRACTALTREE_RELEASE_DIR}/include)
FIND_LIBRARY(TOKUFRACTALTREE_LIB NAMES ${TOKUFRACTALTREE_LIBNAME} HINTS ${TOKUFRACTALTREE_RELEASE_DIR}/lib) FIND_LIBRARY(TOKUFRACTALTREE_LIB NAMES ${TOKUFRACTALTREE_LIBNAME} HINTS ${TOKUFRACTALTREE_RELEASE_DIR}/lib)
FIND_LIBRARY(TOKUPORTABILITY_LIB NAMES ${TOKUPORTABILITY_LIBNAME} HINTS ${TOKUFRACTALTREE_RELEASE_DIR}/lib) FIND_LIBRARY(TOKUPORTABILITY_LIB NAMES ${TOKUPORTABILITY_LIBNAME} HINTS ${TOKUFRACTALTREE_RELEASE_DIR}/lib)
......
...@@ -1653,12 +1653,12 @@ int ha_tokudb::initialize_share( ...@@ -1653,12 +1653,12 @@ int ha_tokudb::initialize_share(
goto exit; goto exit;
} }
if (TOKU_PARTITION_WRITE_FRM_DATA) { #if TOKU_PARTITION_WRITE_FRM_DATA
// verify frm data for all tables // verify frm data for all tables
error = verify_frm_data(table->s->path.str, txn); error = verify_frm_data(table->s->path.str, txn);
if (error) if (error)
goto exit; goto exit;
} else { #else
// verify frm data for non-partitioned tables // verify frm data for non-partitioned tables
if (table->part_info == NULL) { if (table->part_info == NULL) {
error = verify_frm_data(table->s->path.str, txn); error = verify_frm_data(table->s->path.str, txn);
...@@ -1670,7 +1670,7 @@ int ha_tokudb::initialize_share( ...@@ -1670,7 +1670,7 @@ int ha_tokudb::initialize_share(
if (error) if (error)
goto exit; goto exit;
} }
} #endif
error = initialize_key_and_col_info( error = initialize_key_and_col_info(
table_share, table_share,
...@@ -6709,11 +6709,16 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in ...@@ -6709,11 +6709,16 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in
error = write_auto_inc_create(status_block, create_info->auto_increment_value, txn); error = write_auto_inc_create(status_block, create_info->auto_increment_value, txn);
if (error) { goto cleanup; } if (error) { goto cleanup; }
#if TOKU_PARTITION_WRITE_FRM_DATA
error = write_frm_data(status_block, txn, form->s->path.str);
if (error) { goto cleanup; }
#else
// only for tables that are not partitioned // only for tables that are not partitioned
if (TOKU_PARTITION_WRITE_FRM_DATA || form->part_info == NULL) { if (form->part_info == NULL) {
error = write_frm_data(status_block, txn, form->s->path.str); error = write_frm_data(status_block, txn, form->s->path.str);
if (error) { goto cleanup; } if (error) { goto cleanup; }
} }
#endif
error = allocate_key_and_col_info(form->s, &kc_info); error = allocate_key_and_col_info(form->s, &kc_info);
if (error) { goto cleanup; } if (error) { goto cleanup; }
......
...@@ -29,7 +29,9 @@ ...@@ -29,7 +29,9 @@
#endif #endif
#endif #endif
#if 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099 #if defined(TOKUDB_PATCHES) && TOKUDB_PATCHES == 0
#elif 100000 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 100099
#define TOKU_INCLUDE_ALTER_56 0 #define TOKU_INCLUDE_ALTER_56 0
#define TOKU_INCLUDE_ALTER_55 0 #define TOKU_INCLUDE_ALTER_55 0
#define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 0 #define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 0
...@@ -37,15 +39,7 @@ ...@@ -37,15 +39,7 @@
#define TOKU_PARTITION_WRITE_FRM_DATA 0 #define TOKU_PARTITION_WRITE_FRM_DATA 0
#define TOKU_INCLUDE_WRITE_FRM_DATA 0 #define TOKU_INCLUDE_WRITE_FRM_DATA 0
#elif 50609 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699 #elif 50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50699
#define TOKU_INCLUDE_ALTER_56 1
#define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 1
#define TOKU_INCLUDE_XA 1
#define TOKU_PARTITION_WRITE_FRM_DATA 1
#define TOKU_INCLUDE_WRITE_FRM_DATA 1
#define TOKU_INCLUDE_UPSERT 1
#elif 50600 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50608
#define TOKU_INCLUDE_ALTER_56 1 #define TOKU_INCLUDE_ALTER_56 1
#define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 1 #define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 1
#define TOKU_INCLUDE_XA 1 #define TOKU_INCLUDE_XA 1
...@@ -71,6 +65,7 @@ ...@@ -71,6 +65,7 @@
#else #else
#error #error
#endif #endif
#if !defined(HA_CLUSTERING) #if !defined(HA_CLUSTERING)
......
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