opengauss-server/og-dolphin.patch
2025-05-18 20:20:42 +00:00

185 lines
7.4 KiB
Diff

diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-600/CMakeLists.txt openGauss-server-600-edit/CMakeLists.txt
*** openGauss-server-600/CMakeLists.txt 2024-12-13 09:59:47.660744190 +0800
--- openGauss-server-600-edit/CMakeLists.txt 2024-12-13 09:55:28.144744190 +0800
***************
*** 37,42 ****
--- 37,49 ----
MESSAGE(FATAL_ERROR " The option ENABLE_PRIVATEGAUSS is not supported thus should be turned off.")
endif()
+ if("${ENABLE_LITE_MODE}" STREQUAL "")
+ set(ENABLE_LITE_MODE "OFF")
+ endif()
+ if("${ENABLE_MOT}" STREQUAL "")
+ set(ENABLE_MOT "OFF")
+ endif()
+
#FIXME: make it an argument
set(openGauss ".")
set(ENV{openGauss} ".")
***************
*** 107,113 ****
install(DIRECTORY ${CMAKE_BINARY_DIR}/libsimsearch DESTINATION lib)
if(EXISTS ${CMAKE_SOURCE_DIR}/contrib/dolphin)
! install(CODE "execute_process(COMMAND bash cmake.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/contrib/dolphin)")
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin.control
DESTINATION share/postgresql/extension/
)
--- 114,120 ----
install(DIRECTORY ${CMAKE_BINARY_DIR}/libsimsearch DESTINATION lib)
if(EXISTS ${CMAKE_SOURCE_DIR}/contrib/dolphin)
! install(CODE "execute_process(COMMAND bash cmake.sh ${ENABLE_LITE_MODE} ${ENABLE_MOT} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/contrib/dolphin)")
install(FILES ${CMAKE_SOURCE_DIR}/contrib/dolphin/dolphin.control
DESTINATION share/postgresql/extension/
)
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-600/contrib/CMakeLists.txt openGauss-server-600-edit/contrib/CMakeLists.txt
*** openGauss-server-600/contrib/CMakeLists.txt 2024-12-13 09:59:02.268744190 +0800
--- openGauss-server-600-edit/contrib/CMakeLists.txt 2024-12-13 11:26:28.136744190 +0800
***************
*** 30,35 ****
--- 30,42 ----
${CMAKE_CURRENT_SOURCE_DIR}/gms_profiler
)
+ if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
+ INCLUDE_DIRECTORIES(${LIBODBC_INCLUDE_PATH})
+ INCLUDE_DIRECTORIES(${LIBODBC_LIB_PATH})
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/dblink)
+ add_subdirectory(dblink)
+ endif()
+
add_subdirectory(hstore)
add_subdirectory(test_decoding)
add_subdirectory(mppdb_decoding)
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-600/contrib/dblink/CMakeList.txt openGauss-server-600-edit/contrib/dblink/CMakeList.txt
*** openGauss-server-600/contrib/dblink/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800
--- openGauss-server-600-edit/contrib/dblink/CMakeLists.txt 2024-12-13 09:55:28.144744190 +0800
***************
*** 0 ****
--- 1,23 ----
+ #This is the main CMAKE for build all gms_stats.
+ # gms_stats
+ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} TGT_dblink_SRC)
+ set(TGT_dblink_INC
+ ${PROJECT_OPENGS_DIR}/contrib/dblink
+ ${PROJECT_OPENGS_DIR}/contrib
+ )
+
+ set(dblink_DEF_OPTIONS ${MACRO_OPTIONS})
+ set(dblink_COMPILE_OPTIONS ${OPTIMIZE_OPTIONS} ${OS_OPTIONS} ${PROTECT_OPTIONS} ${WARNING_OPTIONS} ${LIB_SECURE_OPTIONS} ${CHECK_OPTIONS})
+ set(dblink_LINK_OPTIONS ${LIB_LINK_OPTIONS})
+ add_shared_libtarget(dblink TGT_dblink_SRC TGT_dblink_INC "${dblink_DEF_OPTIONS}" "${dblink_COMPILE_OPTIONS}" "${dblink_LINK_OPTIONS}")
+ target_link_libraries(dblink PUBLIC -lodbc)
+ target_link_directories(dblink PUBLIC ${ODBC_HOME}/lib)
+ set_target_properties(dblink PROPERTIES PREFIX "")
+
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dblink.control
+ DESTINATION share/postgresql/extension/
+ )
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dblink--1.0.sql
+ DESTINATION share/postgresql/extension/
+ )
+ install(TARGETS dblink DESTINATION lib/postgresql)
\ No newline at end of file
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' plugin_600_2/contrib/dolphin/cmake.sh plugin_600_2_edit/contrib/dolphin/cmake.sh
*** plugin_600_2/contrib/dolphin/cmake.sh 2024-12-13 10:03:21.704744190 +0800
--- plugin_600_2_edit/contrib/dolphin/cmake.sh 2024-12-13 10:03:06.804744190 +0800
***************
*** 1,5 ****
#!/bin/bash
! CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=ON"
cpus_num=$(grep -w processor /proc/cpuinfo|wc -l)
rm -f dolphin--4.0.sql
touch dolphin--4.0.sql
--- 1,5 ----
#!/bin/bash
! CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=$1 -DENABLE_MOT=$2 -DENABLE_LLVM_COMPILE=OFF -DENABLE_OBS=OFF -DENABLE_OPENSSL3=ON -DWITH_OPENEULER_OS=ON -DENABLE_OPENEULER_MAJOR=ON"
cpus_num=$(grep -w processor /proc/cpuinfo|wc -l)
rm -f dolphin--4.0.sql
touch dolphin--4.0.sql
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' plugin_600_2/contrib/dolphin/plugin_optimizer/commands/copy.cpp plugin_600_2_edit/contrib/dolphin/plugin_optimizer/commands/copy.cpp
*** plugin_600_2/contrib/dolphin/plugin_optimizer/commands/copy.cpp 2024-12-13 16:32:03.204744190 +0800
--- plugin_600_2_edit/contrib/dolphin/plugin_optimizer/commands/copy.cpp 2024-12-13 16:32:17.728744190 +0800
***************
*** 7089,7094 ****
--- 7089,7095 ----
if (cstate->mode == MODE_NORMAL) {
if (cstate->filename && is_obs_protocol(cstate->filename)) {
#ifndef ENABLE_LITE_MODE
+ #ifdef ENABLE_OBS
if (getNextOBS(cstate)) {
cstate->eol_type = EOL_UNKNOWN;
goto retry;
***************
*** 7096,7101 ****
--- 7097,7103 ----
#else
FEATURE_ON_LITE_MODE_NOT_SUPPORTED();
#endif
+ #endif
} else {
if (getNextGDS<true>(cstate)) {
if (cstate->eol_type != EOL_UD)
***************
*** 10060,10065 ****
--- 10062,10068 ----
case MODE_NORMAL: /* for GDS oriented dist import */
if (is_obs_protocol(cstate->filename)) {
#ifndef ENABLE_LITE_MODE
+ #ifdef ENABLE_OBS
/* Attache working house routines for OBS oriented dist import */
func.initBulkLoad = initOBSModeState;
func.endBulkLoad = endOBSModeBulkLoad;
***************
*** 10069,10074 ****
--- 10072,10078 ----
#else
FEATURE_ON_LITE_MODE_NOT_SUPPORTED();
#endif
+ #endif
} else {
/* Attache working house routines for GDS oriented dist import */
func.initBulkLoad = initNormalModeState<true>;
***************
*** 10135,10140 ****
--- 10139,10145 ----
if (is_obs_protocol(filename)) {
#ifndef ENABLE_LITE_MODE
+ #ifdef ENABLE_OBS
/* Fetch OBS write only table related attribtues */
getOBSOptions(&cstate->obs_copy_options, options);
***************
*** 10154,10159 ****
--- 10159,10165 ----
#else
FEATURE_ON_LITE_MODE_NOT_SUPPORTED();
#endif
+ #endif
} else {
initNormalModeState<false>(cstate, filename, tasklist);
}
***************
*** 10317,10322 ****
--- 10323,10329 ----
}
} else if (cstate->copy_dest == COPY_OBS) {
#ifndef ENABLE_LITE_MODE
+ #ifdef ENABLE_OBS
if (IS_PGXC_DATANODE) {
if (cstate->outBuffer->len > 0)
RemoteExportFlushData(cstate);
***************
*** 10327,10332 ****
--- 10334,10340 ----
#else
FEATURE_ON_LITE_MODE_NOT_SUPPORTED();
#endif
+ #endif
} else
exportDeinitOutBuffer(cstate);
MemoryContextDelete(cstate->rowcontext);