diff --git a/dbcon/mysql/CMakeLists.txt b/dbcon/mysql/CMakeLists.txt index 4c423ed16..015ad58ea 100644 --- a/dbcon/mysql/CMakeLists.txt +++ b/dbcon/mysql/CMakeLists.txt @@ -25,7 +25,7 @@ set_source_files_properties(ha_calpont.cpp PROPERTIES COMPILE_FLAGS "-fno-rtti - add_library(calmysql SHARED ${libcalmysql_SRCS}) -target_link_libraries(calmysql ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} mysqlservices threadpool) +target_link_libraries(calmysql ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${NETSNMP_LIBRARIES} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool) set_target_properties(calmysql PROPERTIES VERSION 1.0.0 SOVERSION 1) @@ -34,7 +34,7 @@ SET ( is_columnstore_tables_SRCS ) add_library(is_columnstore_tables SHARED ${is_columnstore_tables_SRCS}) -target_link_libraries(is_columnstore_tables ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} mysqlservices threadpool) +target_link_libraries(is_columnstore_tables ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool) # Don't prepend .so file with 'lib' set_target_properties(is_columnstore_tables PROPERTIES PREFIX "") @@ -45,7 +45,7 @@ SET ( is_columnstore_columns_SRCS ) add_library(is_columnstore_columns SHARED ${is_columnstore_columns_SRCS}) -target_link_libraries(is_columnstore_columns ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} mysqlservices threadpool) +target_link_libraries(is_columnstore_columns ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool) # Don't prepend .so file with 'lib' set_target_properties(is_columnstore_columns PROPERTIES PREFIX "") @@ -56,7 +56,7 @@ SET ( is_columnstore_extents_SRCS ) add_library(is_columnstore_extents SHARED ${is_columnstore_extents_SRCS}) -target_link_libraries(is_columnstore_extents ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} mysqlservices threadpool) +target_link_libraries(is_columnstore_extents ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool) # Don't prepend .so file with 'lib' set_target_properties(is_columnstore_extents PROPERTIES PREFIX "") @@ -67,7 +67,7 @@ SET ( is_columnstore_files_SRCS ) add_library(is_columnstore_files SHARED ${is_columnstore_files_SRCS}) -target_link_libraries(is_columnstore_files ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} mysqlservices threadpool) +target_link_libraries(is_columnstore_files ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${SERVER_BUILD_INCLUDE_DIR}/../libservices/libmysqlservices.a threadpool) # Don't prepend .so file with 'lib' set_target_properties(is_columnstore_files PROPERTIES PREFIX "") diff --git a/dbcon/mysql/ha_calpont_execplan.cpp b/dbcon/mysql/ha_calpont_execplan.cpp index 5180e03ae..d3c0c4e01 100755 --- a/dbcon/mysql/ha_calpont_execplan.cpp +++ b/dbcon/mysql/ha_calpont_execplan.cpp @@ -21,7 +21,7 @@ */ /** @file */ -#define DEBUG_WALK_COND +//#define DEBUG_WALK_COND #include #include #include diff --git a/dbcon/mysql/ha_calpont_impl.cpp b/dbcon/mysql/ha_calpont_impl.cpp index 93ce00949..c0dab9b14 100755 --- a/dbcon/mysql/ha_calpont_impl.cpp +++ b/dbcon/mysql/ha_calpont_impl.cpp @@ -4390,10 +4390,11 @@ int ha_calpont_impl_external_lock(THD *thd, TABLE* table, int lock_type) // table mode if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_DISABLE_VTABLE) { - if (ci->traceFlags & 1) - push_warning(thd, Sql_condition::WARN_LEVEL_NOTE, 9999, mapiter->second.conn_hndl->queryStats.c_str()); if (mapiter->second.conn_hndl) { + if (ci->traceFlags & 1) + push_warning(thd, Sql_condition::WARN_LEVEL_NOTE, 9999, mapiter->second.conn_hndl->queryStats.c_str()); + ci->queryStats = mapiter->second.conn_hndl->queryStats; ci->extendedStats = mapiter->second.conn_hndl->extendedStats; ci->miniStats = mapiter->second.conn_hndl->miniStats; @@ -4417,11 +4418,12 @@ int ha_calpont_impl_external_lock(THD *thd, TABLE* table, int lock_type) { if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_SELECT_VTABLE) { + if (!ci->cal_conn_hndl) + return 0; + if (ci->traceFlags & 1) push_warning(thd, Sql_condition::WARN_LEVEL_NOTE, 9999, ci->cal_conn_hndl->queryStats.c_str()); - if (!ci->cal_conn_hndl) - return 0; ci->queryStats = ci->cal_conn_hndl->queryStats; ci->extendedStats = ci->cal_conn_hndl->extendedStats; ci->miniStats = ci->cal_conn_hndl->miniStats; diff --git a/dbcon/mysql/idb_mysql.h b/dbcon/mysql/idb_mysql.h index 670f0e0e0..637f517d7 100644 --- a/dbcon/mysql/idb_mysql.h +++ b/dbcon/mysql/idb_mysql.h @@ -65,6 +65,7 @@ template bool isnan(T); #include "sql_table.h" #include "sql_select.h" +#include "mysqld_error.h" #include "item_windowfunc.h" // Now clean up the pollution as best we can... diff --git a/utils/windowfunction/wf_lead_lag.cpp b/utils/windowfunction/wf_lead_lag.cpp index 8d3b6169b..85ad54f70 100644 --- a/utils/windowfunction/wf_lead_lag.cpp +++ b/utils/windowfunction/wf_lead_lag.cpp @@ -153,32 +153,6 @@ void WF_lead_lag::parseParms(const std::vector& parms) idbassert(cc != NULL); bool isNull = false; // dummy, harded coded fRespectNulls = (cc->getIntVal(fRow, isNull) > 0); -#if 0 - // parms[1]: offset - for (std::vector::size_type i = 1/*ignore 0th element*/; i < parms.size(); ++i) - { - ConstantColumn* cc = dynamic_cast(parms[i].get()); - if (cc != NULL) - { - fOffset = cc->getIntVal(fRow, fOffsetNull) * fLead; // row not used, no need to setData. - continue; - } - - cc = dynamic_cast(parms[i].get()); - if (cc != NULL) - { - getConstValue(cc, fDefault, fDefNull); - continue; - } - // IGNORE/RESPECT nulls is currently broken in the front end - cc = dynamic_cast(parms[i].get()); - if (cc != NULL) - { - bool isNull = false; // dummy, harded coded - fRespectNulls = (cc->getIntVal(fRow, isNull) > 0); - } - } -#endif }