Commit 2afaba77 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:2342], some work for porting handlerton

git-svn-id: file:///svn/mysql/tokudb-engine/src@17474 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3b3b8119
...@@ -17,17 +17,13 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTOKUDB_VERSION=\\\"TOKUDB_VERSION_REPL ...@@ -17,17 +17,13 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTOKUDB_VERSION=\\\"TOKUDB_VERSION_REPL
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql INCLUDE_DIRECTORIES(TOKUDB_DIR_REPLACE_ME/windows
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include
TOKUDB_DIR_REPLACE_ME/windows
TOKUDB_DIR_REPLACE_ME/src TOKUDB_DIR_REPLACE_ME/src
TOKUDB_DIR_REPLACE_ME/include TOKUDB_DIR_REPLACE_ME/include
TOKUDB_DIR_REPLACE_ME/toku_include) TOKUDB_DIR_REPLACE_ME/toku_include)
INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
SET(TOKUDB_SOURCES hatoku_hton.cc ha_tokudb.cc hatoku_cmp.cc) SET(TOKUDB_SOURCES hatoku_hton.cc ha_tokudb.cc hatoku_cmp.cc)
MYSQL_STORAGE_ENGINE(TOKUDB)
IF(NOT SOURCE_SUBLIBS) TARGET_LINK_LIBRARIES(ha_tokudb optimized TOKUDB_OBJ_DIR_REPLACE_ME/opt/libtokudb debug TOKUDB_OBJ_DIR_REPLACE_ME/debug/libtokudb)
ADD_LIBRARY(ha_tokudb ${TOKUDB_SOURCES}) \ No newline at end of file
ADD_DEPENDENCIES(ha_tokudb GenError)
ENDIF(NOT SOURCE_SUBLIBS)
...@@ -61,7 +61,7 @@ static const char *ha_tokudb_exts[] = { ...@@ -61,7 +61,7 @@ static const char *ha_tokudb_exts[] = {
if (tokudb_debug & TOKUDB_DEBUG_LOCKRETRY) { \ if (tokudb_debug & TOKUDB_DEBUG_LOCKRETRY) { \
TOKUDB_TRACE("%s count=%d\n", __FUNCTION__, lockretrycount); \ TOKUDB_TRACE("%s count=%d\n", __FUNCTION__, lockretrycount); \
} \ } \
usleep((lockretrycount<4 ? (1<<lockretrycount) : (1<<3)) * 1024); \ Sleep(lockretrycount<4 ? (1<<lockretrycount) : (1<<3)); \
// //
// This offset is calculated starting from AFTER the NULL bytes // This offset is calculated starting from AFTER the NULL bytes
......
...@@ -121,12 +121,6 @@ extern "C" { ...@@ -121,12 +121,6 @@ extern "C" {
static int tokudb_init_func(void *p) { static int tokudb_init_func(void *p) {
TOKUDB_DBUG_ENTER("tokudb_init_func"); TOKUDB_DBUG_ENTER("tokudb_init_func");
int r; int r;
#if defined(_WIN32)
r = toku_ydb_init();
if (r) {
goto error;
}
#endif
db_env = NULL; db_env = NULL;
metadata_db = NULL; metadata_db = NULL;
...@@ -341,9 +335,6 @@ static int tokudb_done_func(void *p) { ...@@ -341,9 +335,6 @@ static int tokudb_done_func(void *p) {
my_hash_free(&tokudb_open_tables); my_hash_free(&tokudb_open_tables);
pthread_mutex_destroy(&tokudb_mutex); pthread_mutex_destroy(&tokudb_mutex);
pthread_mutex_destroy(&tokudb_meta_mutex); pthread_mutex_destroy(&tokudb_meta_mutex);
#if defined(_WIN32)
toku_ydb_destroy();
#endif
TOKUDB_DBUG_RETURN(0); TOKUDB_DBUG_RETURN(0);
} }
......
MYSQL_STORAGE_ENGINE(berkeley,,[Berkeley Storage Engine], [Berkeley Engine], [max,max-no-ndb]) MYSQL_STORAGE_ENGINE(TokuDB,,[TokuDB Storage Engine], [TokuDB Engine], [max,max-no-ndb])
MYSQL_PLUGIN_DIRECTORY(berkeley, [storage/berkeley]) MYSQL_PLUGIN_STATIC(berkeley, [libtokudb.a])
MYSQL_PLUGIN_STATIC(berkeley, [libberkeley.a]) MYSQL_PLUGIN_DYNAMIC(berkeley, [ha_tokudb.la])
MYSQL_PLUGIN_DYNAMIC(berkeley, [ha_berkeley.la])
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(berkeley, [ha_berkeley.cc])
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