提交 7db4636d 编写于 作者: W Wesley Wang 提交者: wangzelin.wzl

Feature:

  1. Support public cloud shared proxy connection number resource
     isolation
  2. Support public cloud shared proxy tenant level whitelist
  3. Support shared proxy cluster configuration push
  4. Support hot restart
  5. Supports partition routing for Timestmp data types
  6. Support client-side Execute optimization, allow without Param Type
  7. Proxyd.sh supports port modification, rslist startup, and configurl
  startup
  8. PS memory optimization
  9. 16C model performance optimization
  10. When accessing the cluster for the first time, after OBProxy
  obtains the RSList from the ConfigServer, the All Server List is
  obtained asynchronously and adjusted to obtain it synchronously
  11. Log compression can be turned on with
  enable_syslog_file_compress=True
  12. Full username strict mode can be enabled by
  enable_full_username=True
  13. You can increase the SQL length of obproxy_digest.log by setting
  the digest_sql_length parameter
  14. Added support for partition routing for timestamp type and
  negative numbers
  15. Added support for DDL statements in sharding scenarios
  16. Added tenant-level SSL link encryption
  17. Supports splicing URLs by zone
  18. OB Sharding supports Join

Bugfix:
  1. Fix the problem that the new password under the newly deployed
  cluster etc is inconsistent with the old password
  2. Fix ODP unable to handle configurations larger than 4K, currently
  there is no limit to configuration size
  3. Fix the cluster without LDG. After the enable_ldg switch is turned
  on, the proxy stops updating the location cache, resulting in no sense
  of offline machines.
  4. Fix Under the 2.0 protocol, the data returned to the driver by the ps
  and fetch protocols is incorrect, resulting in the client hang problem
  5. Fix mutli swichover obproxy core at
  databuff_print_key_obj<oceanbase::common::ObLogPrintPointerCntx
  6. Fix obproxy memory leak caused by frequent push of current
  limiting rules
  7. Fix inaccurate routing in col = ("123") mode
  8. Fix too many current-limiting rules causing the push to fail to
  take effect
  9. Fix obproxy memory leak caused by frequent push of current
  limiting rules
  10. Fix After repairing the failover of the standby database into the main
  database, after the original main database is down, the proxy will
  have a short time to route the request to the original main database
  11. Fix Failed to establish connection without specifying cluster id
  within 3 minutes after lossless FO
  12. Fix After repairing the deletion of the standby database, continue to
  send requests to the old clusterId
  13. Fix the problem that the new protocol link proxy cursor scene,
  when the fench reaches the second value, it will be rammed
  14. Fix the problem of ps cursor ramming under non-compression
  protocol
  15. Fix a new connection reporting too many connections error
  16. Fix the case-insensitive name field of the ssl_config
  configuration table, resulting in unreasonable configuration reading
  logic
  17. Fix Compression and 2.0 protocol, obdump import data will be hung
  18. Fix the new protocol, refcursor cannot get the value when there
  are other out parameters
  19. Fix obproxy core at oceanbase::common::ObObjCmpFuncs::compare null
  safe
  20. Fix obproxy core at
  oceanbase::common::ObTimeConverter::str_to_digit_with_date
  21. Fix the error -5560, Unknown prepared statement handle when bmsql
  opens ps when the compression protocol is enabled
上级 1c05ac13
EXTRA_DIST=build.sh svn_dist_version script/deploy unittest/Makefile.in unittest/obproxy/Makefile.in deps/easy
EXTRA_DIST=build.sh svn_dist_version script/deploy unittest/Makefile.in unittest/obproxy/Makefile.in deps/easy hotfuncs.txt
bin_SCRIPTS=script/deploy/obproxyd.sh
if WITH_TEST_CASE
......
......@@ -69,17 +69,22 @@ function do_config()
case "x$1" in
xdebug)
# configure for developers
./configure --with-gcc-version=5.2.0 --with-coverage=no --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no
./configure --with-gcc-version=9.3.0 --with-coverage=no --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no
echo -e "\033[31m ===build debug version=== \033[0m"
;;
xgcov)
# configure for release
./configure --with-gcc-version=5.2.0 --with-coverage=yes --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no
./configure --with-gcc-version=9.3.0 --with-coverage=yes --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no
echo -e "\033[31m ===build gcov version=== \033[0m"
;;
xperf)
# configure for release
./configure --with-gcc-version=9.3.0 --with-coverage=no --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no --with-release --with-perf
echo -e "\033[31m ===build perf version=== \033[0m"
;;
*)
# configure for release
./configure --with-gcc-version=5.2.0 --with-coverage=no --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no --with-release
./configure --with-gcc-version=9.3.0 --with-coverage=no --enable-buildtime=no --enable-strip-ut=no --enable-silent-rules --enable-dlink-observer=no --with-release
echo -e "\033[31m ===build release version=== \033[0m"
;;
esac
......
AC_INIT([OceanBase],
[3.2.0],
[3.2.3],
[wgs13579@gmail.com],
[obproxy-ce],
[http://oceanbase.taobao.org/])
obapi_version="3.2.0"
obapi_version="3.2.3"
AC_SUBST(obapi_version)
AC_DISABLE_STATIC
......@@ -26,23 +26,23 @@
if test "$withval" = "yes"; then
case "$host_cpu" in
*aarch64* )
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -Wno-unused-parameter -Wformat -Wno-conversion -Wno-deprecated -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security -finline-functions -fno-strict-aliasing -mtune=generic -Wno-psabi -Wno-sign-compare"
AM_CFLAGS="-g -O2 -D_OB_VERSION=1000 -DCOMPATIBLE -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -finline-functions -fno-strict-aliasing -Wall -mtune=generic -Wno-psabi -Wno-sign-compare"
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -Wno-unused-parameter -Wformat -Wno-conversion -Wno-deprecated -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security -finline-functions -fno-strict-aliasing -mtune=generic -Wno-psabi -Wno-sign-compare -Wno-class-memaccess -Wno-deprecated-copy -Wno-ignored-qualifiers -Wno-aligned-new -Wno-format-truncation -Wno-literal-suffix -Wno-format-overflow -Wno-stringop-truncation -Wno-memset-elt-size -Wno-cast-function-type -Wno-address-of-packed-member -fuse-ld=lld -ffunction-sections -Wl,--no-warn-symbol-ordering,--symbol-ordering-file,${ac_abs_confdir}/hotfuncs.txt"
AM_CFLAGS="-g -O2 -D_OB_VERSION=1000 -DCOMPATIBLE -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -finline-functions -fno-strict-aliasing -Wall -mtune=generic -Wno-psabi -Wno-sign-compare -fuse-ld=lld -ffunction-sections -Wl,--no-warn-symbol-ordering,--symbol-ordering-file,${ac_abs_confdir}/hotfuncs.txt"
;;
* )
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -Wno-unused-parameter -Wformat -Wno-conversion -Wno-deprecated -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security -finline-functions -fno-strict-aliasing -mtune=core2 -Wno-psabi -Wno-sign-compare"
AM_CFLAGS="-g -O2 -D_OB_VERSION=1000 -DCOMPATIBLE -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -finline-functions -fno-strict-aliasing -Wall -mtune=core2 -Wno-psabi -Wno-sign-compare"
AM_CXXFLAGS="-g -O2 -D_OB_VERSION=1000 -D_NO_EXCEPTION -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNDEBUG -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -Wextra -Wno-unused-parameter -Wformat -Wno-conversion -Wno-deprecated -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security -finline-functions -fno-strict-aliasing -mtune=core2 -Wno-psabi -Wno-sign-compare -Wno-class-memaccess -Wno-deprecated-copy -Wno-ignored-qualifiers -Wno-aligned-new -Wno-format-truncation -Wno-literal-suffix -Wno-format-overflow -Wno-stringop-truncation -Wno-memset-elt-size -Wno-cast-function-type -Wno-address-of-packed-member -fuse-ld=lld -ffunction-sections -Wl,--no-warn-symbol-ordering,--symbol-ordering-file,${ac_abs_confdir}/hotfuncs.txt"
AM_CFLAGS="-g -O2 -D_OB_VERSION=1000 -DCOMPATIBLE -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -finline-functions -fno-strict-aliasing -Wall -mtune=core2 -Wno-psabi -Wno-sign-compare -fuse-ld=lld -ffunction-sections -Wl,--no-warn-symbol-ordering,--symbol-ordering-file,${ac_abs_confdir}/hotfuncs.txt"
;;
esac
fi
],
[ AM_CXXFLAGS="-D__STDC_LIMIT_MACROS -D_OB_VERSION=1000 -D__STDC_CONSTANT_MACROS -D_NO_EXCEPTION -g -Wall -Wextra -Wno-unused-parameter -Wformat -Wno-conversion -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -mtune=generic -Wno-psabi -Wno-sign-compare"
[ AM_CXXFLAGS="-D__STDC_LIMIT_MACROS -D_OB_VERSION=1000 -D__STDC_CONSTANT_MACROS -D_NO_EXCEPTION -g -Wall -Wextra -Wno-unused-parameter -Wformat -Wno-conversion -Wno-invalid-offsetof -Wno-unused-result -Wno-format-security -Wno-deprecated -fno-strict-aliasing -fno-omit-frame-pointer -mtune=generic -Wno-psabi -Wno-sign-compare -Wno-class-memaccess -Wno-deprecated-copy -Wno-ignored-qualifiers -Wno-aligned-new -Wno-format-truncation -Wno-literal-suffix -Wno-format-overflow -Wno-stringop-truncation -Wno-memset-elt-size -Wno-cast-function-type -Wno-address-of-packed-member"
AM_CFLAGS="-D_OB_VERSION=1000 -DCOMPATIBLE -D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fno-omit-frame-pointer -g -Wall -Wno-psabi -Wno-sign-compare"
]
)
#check gcc version, add -Wno-ignored-qualifiers flag for gcc version greater than 4.3.0
GCC_VERSION=`$CC -dumpversion`
GCC_VERSION=`$CC -dumpfullversion -dumpversion`
if test $? -eq 0; then
major=`echo $GCC_VERSION | cut -d. -f1`
minor=`echo $GCC_VERSION | cut -d. -f2`
......@@ -106,9 +106,12 @@
[with perf (default is NO)]),
[
if test "$withval" = "yes"; then
test_perf=yes
AM_CXXFLAGS="${AM_CXXFLAGS} -D__NEED_PERF__"
AM_LDFLAGS="${AM_LDFLAGS} -lprofiler"
# 下面参数为使用gperftools的选项,目前未用tcmalloc
# test_perf=yes
# AM_CXXFLAGS="${AM_CXXFLAGS} -D__NEED_PERF__"
# AM_LDFLAGS="${AM_LDFLAGS} -lprofiler"
AM_CXXFLAGS="${AM_CXXFLAGS} -fno-omit-frame-pointer"
AM_CFLAGS="${AM_CFLAGS} -fno-omit-frame-pointer"
fi
],
[with_perf=no]
......@@ -306,7 +309,7 @@
AM_LDFLAGS="${AM_LDFLAGS} -Wl,--no-as-needed -Wl,--allow-multiple-definition"
BIN_LDFLAGS="-lc -lrt"
if test "X5.2.0" = "X$GCC_VERSION"; then
if test "X9.3.0" = "X$GCC_VERSION"; then
AM_LDFLAGS="${AM_LDFLAGS} -static-libstdc++ -static-libgcc"
BIN_LDFLAGS="${BIN_LDFLAGS} ${TOOLS_DIR}/lib64/libstdc++.a"
postdeps_CXX=`echo " $postdeps_CXX " | sed 's, -lstdc++ ,,g'`
......
......@@ -10,12 +10,14 @@ devdeps-mariadb-connector-c-3.1.12-3.el7.aarch64.rpm
devdeps-gtest-1.8.0-3.el7.aarch64.rpm
devdeps-prometheus-cpp-0.8.0-2.el7.aarch64.rpm
devdeps-grpc-1.20.1-8.el7.aarch64.rpm
devdeps-sqlite-3.38.1-5.el7.aarch64.rpm
[tools]
obdevtools-gcc-5.2.0-3.el7.aarch64.rpm
obdevtools-gcc9-9.3.0-3.el7.aarch64.rpm
obdevtools-bintuils-2.30-3.el7.aarch64.rpm
obdevtools-bison-2.4.1-3.el7.aarch64.rpm
obdevtools-flex-2.5.35-3.el7.aarch64.rpm
obdevtools-llvm-11.0.1-40.el7.aarch64.rpm
[release]
oceanbase-ce-devel-3.1.3-10000102022030411.el7.aarch64.rpm
......@@ -9,12 +9,14 @@ devdeps-mariadb-connector-c-3.1.12-3.el7.x86_64.rpm
devdeps-prometheus-cpp-0.8.0-4.el7.x86_64.rpm
devdeps-gtest-1.8.0-3.el7.x86_64.rpm
devdeps-grpc-1.20.1-3.el7.x86_64.rpm
devdeps-sqlite-3.38.1-5.el7.x86_64.rpm
[tools]
obdevtools-gcc-5.2.0-3.el7.x86_64.rpm
obdevtools-gcc9-9.3.0-3.el7.x86_64.rpm
obdevtools-bintuils-2.30-3.el7.x86_64.rpm
obdevtools-bison-2.4.1-3.el7.x86_64.rpm
obdevtools-flex-2.5.35-3.el7.x86_64.rpm
obdevtools-llvm-11.0.1-40.el7.x86_64.rpm
[release]
oceanbase-ce-devel-3.1.3-10000102022030411.el7.x86_64.rpm
......@@ -10,12 +10,14 @@ devdeps-mariadb-connector-c-3.1.12-16.el8.aarch64.rpm
devdeps-gtest-1.8.0-16.el8.aarch64.rpm
devdeps-prometheus-cpp-0.8.0-2.el8.aarch64.rpm
devdeps-grpc-1.20.1-8.el8.aarch64.rpm
devdeps-sqlite-3.38.1-5.el8.aarch64.rpm
[tools]
obdevtools-gcc-5.2.0-15.el8.aarch64.rpm
obdevtools-gcc9-9.3.0-3.el8.aarch64.rpm
obdevtools-binutils-2.30-7.el8.aarch64.rpm
obdevtools-bison-2.4.1-9.el8.aarch64.rpm
obdevtools-flex-2.5.35-10.el8.aarch64.rpm
obdevtools-llvm-11.0.1-40.el8.aarch64.rpm
[release]
oceanbase-ce-devel-3.1.3-10000102022030411.el8.aarch64.rpm
......@@ -9,12 +9,14 @@ devdeps-mariadb-connector-c-3.1.12-3.el8.x86_64.rpm
devdeps-prometheus-cpp-0.8.0-4.el8.x86_64.rpm
devdeps-gtest-1.8.0-3.el8.x86_64.rpm
devdeps-grpc-1.20.1-3.el8.x86_64.rpm
devdeps-sqlite-3.38.1-5.el8.x86_64.rpm
[tools]
obdevtools-gcc-5.2.0-3.el8.x86_64.rpm
obdevtools-gcc9-9.3.0-3.el8.x86_64.rpm
obdevtools-bintuils-2.30-3.el8.x86_64.rpm
obdevtools-bison-2.4.1-3.el8.x86_64.rpm
obdevtools-flex-2.5.35-3.el8.x86_64.rpm
obdevtools-llvm-11.0.1-40.el8.x86_64.rpm
[release]
oceanbase-ce-devel-3.1.3-10000102022030411.el8.x86_64.rpm
......@@ -34,7 +34,7 @@ OceanBase Database Proxy
%setup
%build
./configure CXX=${CXX} CC=${CC} --with-gcc-version=5.2.0 RELEASEID=%{RELEASE} --prefix=%{_prefix} --with-test-case=no --with-release=yes --with-tblib-root=/opt/csr/common --with-easy-root=/usr --with-easy-lib-path=/usr/lib64 --with-svnfile --enable-shared=default --enable-silent-rules
./configure CXX=${CXX} CC=${CC} --with-gcc-version=9.3.0 RELEASEID=%{RELEASE} --prefix=%{_prefix} --with-test-case=no --with-release=yes --with-tblib-root=/opt/csr/common --with-easy-root=/usr --with-easy-lib-path=/usr/lib64 --with-svnfile --enable-shared=default --enable-silent-rules
mkdir -p unittest
CPU_CORES=`grep -c ^processor /proc/cpuinfo`
MAKE_ARGS="-j $CPU_CORES"
......
_ZN9oceanbase7obproxy5event9ObEThread7executeEv
_ZN9oceanbase7obproxy5event12mutex_unlockEPNS1_12ObProxyMutexEPNS1_9ObEThreadE
_ZN9oceanbase6common5ObPtrINS_7obproxy5event12ObProxyMutexEED1Ev
_ZN9oceanbase6common5ObPtrINS_7obproxy5event12ObProxyMutexEED2Ev
_ZN9oceanbase7obproxy5event9ObEThread13process_eventEPNS1_7ObEventEi
_ZN9oceanbase7obproxy3net12ObNetHandler14main_net_eventEiPNS0_5event7ObEventE
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection13read_from_netERNS0_5event9ObEThreadE
_ZN9oceanbase6common7ObLatch10try_wrlockEjPKj
_ZN9oceanbase7obproxy15ObStatProcessor17incr_raw_stat_sumEPNS0_17ObRecRawStatBlockEPNS0_5event9ObEThreadEll
_ZN9oceanbase6common7ObLatch6unlockEPKj
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection22read_signal_and_updateEi
_ZN9oceanbase7obproxy5proxy14ObMysqlVCTable10find_entryEPNS0_5event5ObVIOE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM12main_handlerEiPv
_ZN9oceanbase7obproxy7obutils23get_global_proxy_configEv
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection18reset_read_triggerEv
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection12write_to_netERNS0_5event9ObEThreadE
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection23write_signal_and_updateEi
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel12main_handlerEiPv
_ZN9oceanbase6common8ObLogger10get_loggerEv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM26state_server_response_readEiPv
_ZNK9oceanbase7obproxy17ObSessionFieldMgr29get_common_sys_variable_valueERKNS_6common8ObStringERNS2_5ObObjE
_ZNK9oceanbase7obproxy5proxy9ObMysqlSM36is_extra_ok_packet_for_stats_enabledEv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM35handle_first_normal_response_packetERNS1_20ObMysqlAnalyzeStatusEbRl
_ZNK9oceanbase7obproxy17ObSessionFieldMgr23get_common_sys_variableERKNS_6common8ObStringERPNS0_17ObSessionSysFieldE
_ZN9oceanbase7obproxy5proxy26ObMysqlTransactionAnalyzer14set_server_cmdENS_7obmysql10ObMySQLCmdENS1_19ObMysqlProtocolModeEbb
_ZN9oceanbase7obproxy5proxy26ObMysqlTransactionAnalyzer16analyze_responseERNS0_5event16ObIOBufferReaderERNS1_20ObMysqlAnalyzeResultEPNS1_11ObMysqlRespEb
_ZN9oceanbase7obproxy5proxy18ObProxyParserUtils18analyze_one_packetERNS0_5event16ObIOBufferReaderERNS1_20ObMysqlAnalyzeResultE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM25state_client_request_readEiPv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM34tunnel_handler_response_transferedEiPv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact16handle_pl_updateERNS2_12ObTransStateE
_ZNK9oceanbase6common6ObAddr8is_validEv
_ZNK9oceanbase7obproxy5proxy24ObProxyPartitionLocation10get_leaderEv
_ZNK9oceanbase7obproxy17ObSessionFieldMgr25get_variable_value_commonERKNS_6common8ObStringERNS2_5ObObjENS0_16ObSessionVarTypeE
_ZNK9oceanbase7obproxy17ObSessionFieldMgr27get_sys_variable_from_blockERKNS_6common8ObStringERPNS0_17ObSessionSysFieldEPKNS0_12ObFieldBlockIS6_LNS0_11HeapObjTypeE1EEE
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel16consumer_handlerEiRNS1_21ObMysqlTunnelConsumerE
_ZN9oceanbase7obproxy5event11ObMIOBuffer14dealloc_readerEPNS1_16ObIOBufferReaderE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM21tunnel_handler_clientEiRNS1_21ObMysqlTunnelConsumerE
_ZN9oceanbase7obproxy5proxy20ObMysqlClientSession27handle_transaction_completeEPNS0_5event16ObIOBufferReaderERb
_ZN9oceanbase7obproxy5proxy20ObSysVarSetProcessor7releaseEPNS0_18ObDefaultSysVarSetE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM21analyze_mysql_requestERNS1_20ObMysqlAnalyzeStatusE
_ZN9oceanbase7obproxy5proxy19ObProxyMysqlRequest5reuseEb
_ZN9oceanbase7obproxy7obutils16ObSqlParseResult16clear_proxy_stmtEv
_ZN9oceanbase6common9ObSEArrayINS_7obproxy7obutils8SqlFieldELl5ENS0_19ModulePageAllocatorENS0_22ObArrayDefaultCallBackIS4_EENS0_22NotImplementItemEncodeIS4_EENS0_7ObArrayIS4_S5_S7_S9_EEE7destroyEv
_ZN9oceanbase7obproxy5proxy22ObMysqlRequestAnalyzer15analyze_requestERKNS1_19ObRequestAnalyzeCtxERNS1_18ObMysqlAuthRequestERNS1_19ObProxyMysqlRequestERNS_7obmysql10ObMySQLCmdERNS1_20ObMysqlAnalyzeStatusEb
_ZN9oceanbase7obproxy5proxy19ObProxyMysqlRequest13get_parse_sqlERKNS_6common8ObStringE
_ZN9oceanbase7obproxy5proxy22ObMysqlRequestAnalyzer18do_analyze_requestERKNS1_19ObRequestAnalyzeCtxENS_7obmysql10ObMySQLCmdERNS1_18ObMysqlAuthRequestERNS1_19ObProxyMysqlRequestEb
__dynamic_cast
_ZN9oceanbase7obproxy7obutils16ObProxySqlParser9parse_sqlERKNS_6common8ObStringE16ObProxyParseModeRNS1_16ObSqlParseResultEbNS3_15ObCollationTypeEbb
_ZN9oceanbase7obproxy20string_to_lower_caseEPci
obproxy_parse_utf8_sql
ob_proxy_parser_utf8_yyset_extra
ob_proxy_parser_utf8_yy_scan_buffer
ob_proxy_parser_utf8_yylex_init_extra
ob_proxy_parser_utf8_yy_switch_to_buffer
ob_proxy_parser_utf8_yyparse
ob_proxy_parser_utf8_yyget_extra
ob_proxy_parser_utf8_yyget_lval
ob_proxy_parser_utf8_yylex
yy_push_state
obproxy_parse_malloc
_ZN9oceanbase6common16ObArenaAllocator5allocEl
_ZN9oceanbase7obproxy7obutils16ObProxySqlParser19get_parse_allocatorERPNS_6common16ObArenaAllocatorE
_ZN9oceanbase7obproxy5proxy22ObMysqlRequestAnalyzer19handle_internal_cmdERNS1_19ObProxyMysqlRequestE
_ZN9oceanbase7obproxy5proxy19ObProxyMysqlRequest11add_requestEPNS0_5event16ObIOBufferReaderEl
_ZN9oceanbase7obproxy5event16ObIOBufferReader4copyEPcll
_ZN9oceanbase7obproxy5proxy19ObClientSessionInfo22revalidate_sys_var_setERNS1_20ObSysVarSetProcessorE
_ZN9oceanbase7obproxy5proxy20ObSysVarSetProcessor7acquireEv
_ZN9oceanbase6common7DRWLock11RDLockGuardC1ERS1_
_ZN9oceanbase6common7DRWLock11RDLockGuardC2ERS1_
_ZN9oceanbase7obproxy7obutils16ObSqlParseResult11load_resultERK19_ObProxyParseResultbbb
_ZN9oceanbase6common7ObLatch6rdlockEjl
_ZN9oceanbase6common7ObLatch14low_try_rdlockEjjRb
_ZN9oceanbase6common7ObLatch8low_lockEjljjMS1_FijjRbES4_
_ZN9oceanbase6common20ObDiagnoseTenantInfo23get_local_diagnose_infoEv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM25state_server_request_sendEiPv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM26setup_server_response_readEv
_ZN9oceanbase7obproxy5event11ObMIOBuffer21append_block_internalEPNS1_15ObIOBufferBlockE
_ZN9oceanbase7obproxy5proxy19ObProxyMysqlRequest7get_sqlEv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM26setup_get_cluster_resourceEv
_ZN9oceanbase7obproxy3net15ObInactivityCop16check_inactivityEiPNS0_5event7ObEventE
_ZN9oceanbase7obproxy5event9ObEThread19dequeue_local_eventERNS_6common5QueueINS1_7ObEventENS5_10Link_link_EEE
_ZN9oceanbase7obproxy5event11ObMIOBuffer12append_blockEl
_ZN9oceanbase7obproxy5event15ObIOBufferBlock4freeEv
_ZNK10__cxxabiv120__si_class_type_info12__do_dyncastElNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM17handle_api_returnEv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact15handle_responseERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy20ObMysqlClientSession10do_io_readEPNS0_5event14ObContinuationElPNS3_11ObMIOBufferE
_ZN9oceanbase7obproxy5proxy20ObMysqlClientSession10do_io_readEPNS0_5event14ObContinuationElPNS3_11ObMIOBufferE.localalias
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection22set_inactivity_timeoutEl
_ZN9oceanbase7obproxy5proxy9ObMysqlSM32call_transact_and_set_next_stateEPFvRNS1_15ObMysqlTransact12ObTransStateEE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM33callout_api_and_start_next_actionENS1_15ObMysqlTransact24ObStateMachineActionTypeE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM21setup_server_transferEv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact23lookup_skip_open_serverERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM18setup_cmd_completeEv
_ZN9oceanbase7obproxy5proxy13ObLDCLocation5resetEv
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection10do_io_readEPNS0_5event14ObContinuationElPNS3_11ObMIOBufferE
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel12add_producerEPNS0_5event13ObVConnectionElPNS3_16ObIOBufferReaderEMNS1_9ObMysqlSMEFiiRNS1_21ObMysqlTunnelProducerEENS1_17ObMysqlTunnelTypeEPKcb
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel12add_consumerEPNS0_5event13ObVConnectionES5_MNS1_9ObMysqlSMEFiiRNS1_21ObMysqlTunnelConsumerEENS1_17ObMysqlTunnelTypeEPKcl
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact12ObTransState21reset_internal_bufferEv
_ZN9oceanbase7obproxy5proxy22get_global_table_cacheEv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM25setup_server_request_sendEv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact12ObTransState27get_trans_consistency_levelERNS1_19ObClientSessionInfoE
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection16set_read_triggerEv
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection25cancel_inactivity_timeoutEv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM20server_transfer_initEPNS0_5event11ObMIOBufferERl
_ZN9oceanbase7obproxy5event11ObMIOBuffer13remove_appendEPNS1_16ObIOBufferReaderERl
_ZN9oceanbase7obproxy5proxy9ObMysqlSM16do_observer_openEv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM25do_internal_observer_openEv
_ZN9oceanbase7obproxy5proxy20ObMysqlServerSession11do_io_writeEPNS0_5event14ObContinuationElPNS3_16ObIOBufferReaderE
_ZN9oceanbase7obproxy5proxy20ObMysqlServerSession10do_io_readEPNS0_5event14ObContinuationElPNS3_11ObMIOBufferE
_ZN9oceanbase7obproxy5proxy14ObMysqlVCTable9new_entryEv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM21attach_server_sessionERNS1_20ObMysqlServerSessionE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM20handle_observer_openEv
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel10tunnel_runEPNS1_21ObMysqlTunnelProducerE
_ZN9oceanbase7obproxy5proxy20ObMysqlClientSession11do_io_writeEPNS0_5event14ObContinuationElPNS3_16ObIOBufferReaderE
_ZN9oceanbase7obproxy5proxy20ObMysqlClientSession11do_io_writeEPNS0_5event14ObContinuationElPNS3_16ObIOBufferReaderE.localalias
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel12producer_runERNS1_21ObMysqlTunnelProducerE
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel16producer_handlerEiRNS1_21ObMysqlTunnelProducerE
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel23producer_handler_packetEiRNS1_21ObMysqlTunnelProducerE
_ZN9oceanbase7obproxy5proxy26ObMysqlTransactionAnalyzer16analyze_responseERNS0_5event16ObIOBufferReaderEPNS1_11ObMysqlRespE
_ZN9oceanbase7obproxy5proxy16ObPacketAnalyzer24process_response_contentERbS3_
_ZN9oceanbase7obproxy5proxy26ObMysqlTransactionAnalyzer22analyze_trans_responseERNS0_5event16ObIOBufferReaderEPNS1_11ObMysqlRespE
_ZN9oceanbase7obproxy5proxy26ObMysqlTransactionAnalyzer22analyze_trans_responseERKNS_6common8ObStringEPNS1_11ObMysqlRespE
_ZN9oceanbase7obproxy5proxy19ObMysqlRespAnalyzer18analyze_mysql_respERNS1_14ObBufferReaderERNS1_12ObRespResultEPNS1_11ObMysqlRespE
_ZN9oceanbase7obproxy5proxy19ObMysqlRespAnalyzer15handle_last_eofEj
_ZN9oceanbase7obproxy5proxy19ObMysqlRespAnalyzer13read_pkt_typeERNS1_14ObBufferReaderERNS1_12ObRespResultE
_ZN9oceanbase7obproxy5proxy19ObMysqlRespAnalyzer16analyze_resp_pktERNS1_12ObRespResultEPNS1_11ObMysqlRespE
_ZN9oceanbase7obmysql11ObMySQLUtil10get_lengthERPKcRm
_ZN9oceanbase7obproxy5proxy9ObMysqlSM21tunnel_handler_serverEiRNS1_21ObMysqlTunnelProducerE
_ZN9oceanbase7obproxy5proxy20ObMysqlClientSession21attach_server_sessionEPNS1_20ObMysqlServerSessionE
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection11do_io_writeEPNS0_5event14ObContinuationElPNS3_16ObIOBufferReaderE
_ZN9oceanbase7obproxy3net20ObUnixNetVConnection8reenableEPNS0_5event5ObVIOE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM34tunnel_handler_server_cmd_completeERNS1_21ObMysqlTunnelProducerE
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel19finish_all_internalERNS1_21ObMysqlTunnelProducerEb
_ZN9oceanbase7obproxy5proxy9ObMysqlSM14trim_ok_packetERNS0_5event16ObIOBufferReaderE
_ZNK9oceanbase7obproxy5proxy12ObRespResult16is_resp_finishedERbRNS1_21ObMysqlRespEndingTypeE
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact14modify_requestERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact20build_server_requestERNS2_12ObTransStateERPNS0_5event16ObIOBufferReaderERl
_ZNK9oceanbase7obproxy5proxy9ObMysqlSM24use_compression_protocolEv
_ZN9oceanbase7obproxy5proxy14ObMysqlVCTable13cleanup_entryEPNS1_19ObMysqlVCTableEntryEb
_ZN9oceanbase7obproxy5proxy14ObMysqlVCTable12remove_entryEPNS1_19ObMysqlVCTableEntryE
_ZN9oceanbase7obproxy5proxy25ObProxySessionInfoHandler23analyze_extra_ok_packetERNS0_5event16ObIOBufferReaderERNS1_19ObClientSessionInfoERNS1_19ObServerSessionInfoEbRNS1_19ObRespAnalyzeResultE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM28do_congestion_control_lookupEv
_ZNK9oceanbase7obproxy5proxy19ObClientSessionInfo28need_reset_user_session_varsERKNS1_19ObServerSessionInfoE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM35do_oceanbase_internal_observer_openERPNS1_20ObMysqlServerSessionE
_ZN9oceanbase7obproxy5proxy19ObClientSessionInfo17get_full_usernameEv
_ZN9oceanbase7obproxy5proxy20ObMysqlClientSession19acquire_svr_sessionERK8sockaddrbRPNS1_20ObMysqlServerSessionE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM30handle_saved_session_variablesEv
_ZNK9oceanbase7obproxy5proxy19ObClientSessionInfo23need_reset_session_varsERKNS1_19ObServerSessionInfoE
_ZN9oceanbase7obproxy7obutils19ObVariableLenBufferILl32EE4initEl
_ZN9oceanbase7obproxy5proxy9ObMysqlSM28do_partition_location_lookupEv
_ZN9oceanbase6common13murmurhash64AEPKvim
_ZN9oceanbase7obproxy12ObRefHashMapINS0_5proxy15ObTableEntryKeyEPNS2_12ObTableEntryENS2_18ObGetTableEntryKeyELl16384ENS_6common19ModulePageAllocatorEE3getERKS3_
_ZN9oceanbase7obproxy5proxy12ObTableCache22is_table_entry_expiredERKNS1_12ObTableEntryE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM31state_partition_location_lookupEiPv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM26process_partition_locationERNS1_18ObMysqlRouteResultE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM25update_cached_dummy_entryERNS1_18ObMysqlRouteResultE
_ZN9oceanbase7obproxy5proxy20ObMysqlClientSession16check_update_ldcEv
_ZNK9oceanbase7obproxy5proxy20ObMysqlClientSession20get_current_idc_nameEv
_ZN9oceanbase7obproxy5proxy9ObMysqlSM29is_cached_dummy_entry_expiredEv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact12ObTransState21alloc_internal_bufferEl
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact14handle_requestERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy22is_supported_mysql_cmdENS_7obmysql10ObMySQLCmdE
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact19is_internal_requestERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM24print_mysql_complete_logEPNS1_21ObMysqlTunnelProducerE
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact16handle_pl_lookupERNS2_12ObTransStateE
_ZN9oceanbase7obproxy3net11ops_ip_copyER8sockaddrjt
_ZN9oceanbase7obproxy5proxy13ObMysqlTunnel5resetEv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact32handle_congestion_control_lookupERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact20start_access_controlERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy9ObMysqlSM12update_statsEv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact27handle_response_from_serverERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact20handle_server_failedERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact33handle_on_forward_server_responseERNS2_12ObTransStateE
_ZN9oceanbase7obproxy5proxy12ObMysqlSMApi26do_response_transform_openEv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact28build_oceanbase_user_requestERNS2_12ObTransStateEPNS0_5event16ObIOBufferReaderERS7_Rl
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact15rewrite_stmt_idERNS2_12ObTransStateEPNS0_5event16ObIOBufferReaderE
_ZN9oceanbase7obproxy5proxy13ObLDCLocation16reset_item_arrayEv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact24handle_oceanbase_requestERNS2_12ObTransStateE
_ZNK9oceanbase7obproxy17ObSessionFieldMgr17get_database_nameERNS_6common8ObStringE
_ZNK9oceanbase7obproxy5proxy19ObClientSessionInfo17get_database_nameERNS_6common8ObStringE
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact22extract_partition_infoERNS2_12ObTransStateE
_ZNK9oceanbase7obproxy17ObSessionFieldMgr19get_str_field_valueENS0_12ObVFieldTypeERNS_6common8ObStringE
_ZN9oceanbase7obproxy5proxy13ObLDCLocation20get_thread_allocatorERPNS_6common19ModulePageAllocatorE
_ZN9oceanbase7obproxy5proxy12ObMysqlSMApi5resetEv
_ZN9oceanbase7obproxy5proxy15ObMysqlTransact23can_direct_ok_for_loginERNS2_12ObTransStateE
_ZNK9oceanbase7obproxy5proxy12ObTableEntry9to_stringEPcl
_ZN9oceanbase7obproxy5proxy20ObSqlTableRefHashMap14clean_hash_mapEv
_ZN9oceanbase7obproxy5proxy21ObPartitionRefHashMap14clean_hash_mapEv
3.2.0
\ No newline at end of file
3.2.3
......@@ -4,12 +4,20 @@
# description: obproxyd is a daemon which guarantee obproxy is running
OBPROXY_CMD=
OBPROXY_APP_NAME=
OBPROXY_APP_NAME_ARG=''
OBPROXY_IDC_NAME=
OBPROXY_APP_NAME=${APPNAME}
OBPROXY_APP_NAME_ARG=
OBPROXY_IDC_NAME=${OBPROXY_IDC_NAME}
OBPROXY_IDC_NAME_ARG=
OBPROXY_ROOT=$(dirname $(dirname $(readlink -f "$0")))
OBPROXY_PORT=2883
OBPROXY_PORT=${OBPROXY_PORT}
ENABLE_ROOT_SERVER=${ENABLE_ROOT_SERVER}
ENABLE_ROOT_SERVER_ARG=
ROOT_SERVER_CLUSTER_NAME=${ROOT_SERVER_CLUSTER_NAME}
ROOT_SERVER_CLUSTER_NAME_ARG=
ROOT_SERVER_LIST=${ROOT_SERVER_LIST}
ROOT_SERVER_LIST_ARG=
OBPROXY_CONFIG_SERVER_URL=${OBPROXY_CONFIG_SERVER_URL}
OBPROXY_CONFIG_SERVER_URL_ARG=
STATUS_ALL_OBPROXY=
......@@ -66,8 +74,40 @@ function check_opt()
;;
esac
OBPROXY_CONFIG_SERVER_URL=$OBPROXY_CONFIG_SERVER_URL
echo "obproxy config server url:$OBPROXY_CONFIG_SERVER_URL"
if [ x$ENABLE_ROOT_SERVER == xtrue ];then
ENABLE_ROOT_SERVER_ARG=" -r"
if [ -z $ROOT_SERVER_CLUSTER_NAME ]
then
echo "ROOT_SERVER_CLUSTER_NAME not set"
exit 1
else
ROOT_SERVER_CLUSTER_NAME_ARG=" -s ${ROOT_SERVER_CLUSTER_NAME}"
fi
if [ -z $ROOT_SERVER_LIST ]
then
echo "ROOT_SERVER_LIST not set"
exit 1
else
ROOT_SERVER_LIST_ARG=" -t ${ROOT_SERVER_LIST}"
fi
else
echo "obproxy config server url:$OBPROXY_CONFIG_SERVER_URL"
OBPROXY_CONFIG_SERVER_URL_ARG=" -u $OBPROXY_CONFIG_SERVER_URL"
if
# check PORT
if [ -z $OBPROXY_PORT ]
then
if [ ! -z $obproxy_port ]
then
OBPROXY_PORT=$obproxy_port
else
echo "env OBPROXY_PORT not set, use default 2883"
OBPROXY_PORT=2883
fi
fi
info_msg "port is: $OBPROXY_PORT"
# check APP_NAME
if [ -z "$OBPROXY_APP_NAME" ];
......@@ -85,6 +125,7 @@ function check_opt()
else
info_msg "idc name is: $OBPROXY_IDC_NAME"
OBPROXY_IDC_NAME_ARG=" -i ${OBPROXY_IDC_NAME}"
OBPROXY_OPT_LOCAL="${OBPROXY_OPT_LOCAL},proxy_idc_name=$OBPROXY_IDC_NAME"
fi
if [ -z $WORK_THREAD_NUM ]
......@@ -94,11 +135,19 @@ function check_opt()
fi
echo "obproxy work_thread_num:$WORK_THREAD_NUM"
if [ ! -z $NEED_CONVERT_VIP_TO_NAME ]
then
echo "obproxy NEED_CONVERT_VIP_TO_NAME: $NEED_CONVERT_VIP_TO_NAME"
OBPROXY_OPT_LOCAL="${OBPROXY_OPT_LOCAL},need_convert_vip_to_tname=true"
fi
if [ ! -z $OBPROXY_EXTRA_OPT ]
then
echo "obproxy OBPROXY_EXTRA_OPT: $OBPROXY_EXTRA_OPT"
OBPROXY_OPT_LOCAL=",$OBPROXY_EXTRA_OPT"
OBPROXY_OPT_LOCAL="${OBPROXY_OPT_LOCAL},$OBPROXY_EXTRA_OPT"
fi
OBPROXY_OPT_LOCAL=",enable_cached_server=false,enable_get_rslist_remote=true,monitor_stat_dump_interval=1s,enable_qos=true,enable_standby=false,query_digest_time_threshold=2ms,monitor_cost_ms_unit=true,enable_strict_kernel_release=false,enable_proxy_scramble=true,work_thread_num=$WORK_THREAD_NUM,proxy_mem_limited='2G',log_dir_size_threshold=10G${OBPROXY_OPT_LOCAL}"
}
# change to the path where this script locates.
......@@ -134,7 +183,7 @@ function start()
exit 0
fi
(cd $OBPROXY_ROOT; nohup ./bin/obproxyd.sh -c checkalive $OBPROXY_APP_NAME_ARG $OBPROXY_IDC_NAME_ARG > /dev/null 2>&1 &)
(cd $OBPROXY_ROOT; nohup ./bin/obproxyd.sh -c checkalive -p $OBPROXY_PORT $OBPROXY_APP_NAME_ARG $OBPROXY_IDC_NAME_ARG $ENABLE_ROOT_SERVER_ARG $ROOT_SERVER_LIST_ARG $ROOT_SERVER_CLUSTER_NAME_ARG $OBPROXY_CONFIG_SERVER_URL_ARG > /dev/null 2>&1 &)
success_msg "obproxy started"
}
......@@ -193,6 +242,7 @@ function status()
function checkalive()
{
is_first=true;
while [ 1 ]
do
restart=0
......@@ -200,7 +250,7 @@ function checkalive()
if [ $? -ge 1 ]
then
is_obproxy_exists
if [ $? -eq 1 ]
if [ $? -ge 1 ]
then
is_obproxy_healthy
if [ $? -ne 0 ]
......@@ -218,13 +268,24 @@ function checkalive()
if [ $restart -eq 1 ]
then
echo "ObProxy will running ..."
if [ -z "$OBPROXY_IDC_NAME" ];
if [ x$is_first == xtrue ];
then
($OBPROXY_ROOT/bin/obproxy -p $OBPROXY_PORT $OBPROXY_APP_NAME_ARG -o enable_get_rslist_remote=true,monitor_stat_dump_interval='1s',enable_qos=true,enable_standby=false,query_digest_time_threshold='2ms',monitor_cost_ms_unit=true,enable_strict_kernel_release=false,obproxy_config_server_url=''$OBPROXY_CONFIG_SERVER_URL'',enable_proxy_scramble=true,work_thread_num=$WORK_THREAD_NUM,proxy_mem_limited='2G',log_dir_size_threshold=10G"$OBPROXY_OPT_LOCAL")
if [ x$ENABLE_ROOT_SERVER == xtrue ];
then
($OBPROXY_ROOT/bin/obproxy -p $OBPROXY_PORT $OBPROXY_APP_NAME_ARG -c $ROOT_SERVER_CLUSTER_NAME -r "$ROOT_SERVER_LIST" -o obproxy_config_server_url=''"$OBPROXY_OPT_LOCAL")
else
($OBPROXY_ROOT/bin/obproxy -p $OBPROXY_PORT $OBPROXY_APP_NAME_ARG -o obproxy_config_server_url=''$OBPROXY_CONFIG_SERVER_URL''"$OBPROXY_OPT_LOCAL")
fi
else
($OBPROXY_ROOT/bin/obproxy -p $OBPROXY_PORT $OBPROXY_APP_NAME_ARG -o enable_get_rslist_remote=true,monitor_stat_dump_interval='1s',enable_qos=true,enable_standby=false,query_digest_time_threshold='2ms',monitor_cost_ms_unit=true,enable_strict_kernel_release=false,obproxy_config_server_url=''$OBPROXY_CONFIG_SERVER_URL'',enable_proxy_scramble=true,work_thread_num=$WORK_THREAD_NUM,proxy_mem_limited='2G',log_dir_size_threshold=10G,proxy_idc_name=''$OBPROXY_IDC_NAME''"$OBPROXY_OPT_LOCAL")
if [ x$ENABLE_ROOT_SERVER == xtrue ];
then
($OBPROXY_ROOT/bin/obproxy -p $OBPROXY_PORT $OBPROXY_APP_NAME_ARG -c $ROOT_SERVER_CLUSTER_NAME -r "$ROOT_SERVER_LIST" -o obproxy_config_server_url='')
else
($OBPROXY_ROOT/bin/obproxy -p $OBPROXY_PORT $OBPROXY_APP_NAME_ARG -o obproxy_config_server_url=''$OBPROXY_CONFIG_SERVER_URL'')
fi
fi
fi
is_first=false;
sleep 1
done
}
......@@ -258,7 +319,7 @@ function kill_all_checkalive()
}
while getopts c:n:i:ah opt
while getopts c:n:i:ahp:t:rs:u: opt
do
case $opt in
c)
......@@ -273,6 +334,21 @@ do
a)
STATUS_ALL_OBPROXY='1'
;;
p)
OBPROXY_PORT=$OPTARG
;;
t)
ROOT_SERVER_LIST=$OPTARG
;;
r)
ENABLE_ROOT_SERVER='true'
;;
s)
ROOT_SERVER_CLUSTER_NAME=$OPTARG
;;
u)
OBPROXY_CONFIG_SERVER_URL=$OPTARG
;;
h)
help
exit 0
......
......@@ -32,12 +32,15 @@ public:
~ObAccuracy() {}
explicit ObAccuracy(ObLength length) { set_length(length); }
ObAccuracy(ObPrecision precision, ObScale scale) { set_precision(precision); set_scale(scale); }
ObAccuracy(ObLength length, ObPrecision precision, ObScale scale)
{ set_length(length); set_precision(precision); set_scale(scale); }
ObAccuracy(const ObAccuracy &other) { accuracy_ = other.accuracy_; }
OB_INLINE void set_accuracy(const ObAccuracy &accuracy) { accuracy_ = accuracy.accuracy_; }
OB_INLINE void set_accuracy(const int64_t &accuracy) { accuracy_ = accuracy; }
OB_INLINE void set_length(ObLength length) { length_ = length; }
OB_INLINE void set_precision(ObPrecision precision) { precision_ = precision; }
OB_INLINE void set_scale(ObScale scale) { scale_ = scale; }
// get union data
OB_INLINE int64_t get_accuracy() const { return accuracy_; }
// get detail data
......
......@@ -45,7 +45,24 @@ struct ObField
{
}
int64_t to_string(char *buffer, int64_t length) const;
int64_t to_string(char *buffer, int64_t length) const
{
int64_t pos = 0;
databuff_printf(buffer, length, pos,
"dname:%.*s, tname: %.*s, org_tname: %.*s, "
"cname: %.*s, org_cname: %.*s, type: %s, "
"charset: %hu, "
"decimal_scale: %hu, flags: %x",
dname_.length(), dname_.ptr(),
tname_.length(), tname_.ptr(),
org_tname_.length(), org_tname_.ptr(),
cname_.length(), cname_.ptr(),
org_cname_.length(), org_cname_.ptr(),
to_cstring(type_),
charsetnr_, accuracy_.get_scale(), flags_);
return pos;
}
int deep_copy(const ObField &other, ObIAllocator *allocator);
static int get_field_mb_length(const ObObjType type,
const ObAccuracy &accuracy,
......
此差异已折叠。
......@@ -41,6 +41,8 @@ namespace common
// do range check.
#define CM_NO_CAST_INT_UINT (1ULL << 3) // no cast between int and uint, otherwise
// do cast between int and uint.
#define CM_ORACLE_MODE (1ULL << 61)
#define CM_INSERT_UPDATE_SCOPE (1ULL << 62) // affect calculate values() function. return the insert values
// otherwise return NULL;
#define CM_INTERNAL_CALL (1ULL << 63) // is internal call, otherwise
......@@ -59,6 +61,7 @@ typedef uint64_t ObCastMode;
#define CM_UNSET_NO_CAST_INT_UINT(mode) (~CM_NO_CAST_INT_UINT & (mode))
#define CM_IS_INTERNAL_CALL(mode) (CM_INTERNAL_CALL & (mode))
#define CM_IS_EXTERNAL_CALL(mode) (!CM_IS_INTERNAL_CALL(mode))
struct ObObjCastParams
{
// add params when necessary
......@@ -66,42 +69,58 @@ struct ObObjCastParams
ObObjCastParams()
: allocator_(NULL),
allocator_v2_(NULL),
tz_info_(NULL),
cur_time_(0),
cast_mode_(CM_NONE),
warning_(OB_SUCCESS),
zf_info_(NULL),
connection_collation_(CS_TYPE_INVALID),
res_accuracy_(NULL) {}
dest_collation_(CS_TYPE_INVALID),
expect_obj_collation_(CS_TYPE_INVALID),
res_accuracy_(NULL),
dtc_params_()
{
set_compatible_cast_mode();
}
ObObjCastParams(ObIAllocator *allocator_v2, const ObTimeZoneInfo *tz_info,
ObCastMode cast_mode, ObCollationType connection_collation,
ObAccuracy *res_accuracy = NULL)
ObObjCastParams(ObIAllocator* allocator_v2, const ObDataTypeCastParams* dtc_params, ObCastMode cast_mode,
ObCollationType dest_collation, ObAccuracy* res_accuracy = NULL)
//ObIAllocator *allocator_v2, ObCastMode cast_mode, ObCollationType dest_collation, ObAccuracy *res_accuracy = NULL)
: allocator_(NULL),
allocator_v2_(allocator_v2),
tz_info_(tz_info),
cur_time_(0),
cast_mode_(cast_mode),
warning_(OB_SUCCESS),
zf_info_(NULL),
connection_collation_(connection_collation),
res_accuracy_(res_accuracy) {}
ObObjCastParams(ObIAllocator *allocator_v2, const ObTimeZoneInfo *tz_info,
int64_t cur_time, ObCastMode cast_mode,
ObCollationType connection_collation,
const ObZerofillInfo *zf_info = NULL,
ObAccuracy *res_accuracy = NULL)
dest_collation_(dest_collation),
expect_obj_collation_(dest_collation),
res_accuracy_(res_accuracy),
dtc_params_()
{
set_compatible_cast_mode();
if (NULL != dtc_params) {
dtc_params_ = *dtc_params;
}
}
ObObjCastParams(ObIAllocator* allocator_v2, const ObDataTypeCastParams* dtc_params, int64_t cur_time,
ObCastMode cast_mode, ObCollationType dest_collation, const ObZerofillInfo* zf_info = NULL,
ObAccuracy* res_accuracy = NULL)
: allocator_(NULL),
allocator_v2_(allocator_v2),
tz_info_(tz_info),
cur_time_(cur_time),
cast_mode_(cast_mode),
warning_(OB_SUCCESS),
zf_info_(zf_info),
connection_collation_(connection_collation),
res_accuracy_(res_accuracy) {}
dest_collation_(dest_collation),
expect_obj_collation_(dest_collation),
res_accuracy_(res_accuracy),
dtc_params_()
{
set_compatible_cast_mode();
if (NULL != dtc_params) {
dtc_params_ = *dtc_params;
}
}
void *alloc(const int64_t size) const
{
void *ret = NULL;
......@@ -112,17 +131,52 @@ struct ObObjCastParams
}
return ret;
}
void set_compatible_cast_mode()
{
if (lib::is_oracle_mode()) {
cast_mode_ &= ~CM_WARN_ON_FAIL;
cast_mode_ |= CM_ORACLE_MODE;
} else {
cast_mode_ &= ~CM_ORACLE_MODE;
}
return;
}
TO_STRING_KV(K(cur_time_), KP(cast_mode_), K(warning_), K(dest_collation_),
K(expect_obj_collation_), K(res_accuracy_));
IAllocator *allocator_;
ObIAllocator *allocator_v2_;
const ObTimeZoneInfo *tz_info_;
int64_t cur_time_;
ObCastMode cast_mode_;
int warning_;
const ObZerofillInfo *zf_info_;
ObCollationType connection_collation_;
ObAccuracy *res_accuracy_;
ObCollationType dest_collation_;
ObCollationType expect_obj_collation_; // for each column obj
ObAccuracy *res_accuracy_;
ObDataTypeCastParams dtc_params_;
};
typedef ObObjCastParams ObCastCtx;
class ObHexUtils {
public:
// text can be odd number, like 'aaa', treat as '0aaa'
static int unhex(const common::ObString &text, common::ObCastCtx &cast_ctx, common::ObObj &result);
static int hex(const common::ObString &text, common::ObCastCtx &cast_ctx, common::ObObj &result);
static int hex_for_mysql(const uint64_t uint_val, common::ObCastCtx &cast_ctx, common::ObObj &result);
static int rawtohex(const common::ObObj &text, common::ObCastCtx &cast_ctx, common::ObObj &result);
static int hextoraw(const common::ObObj &text, common::ObCastCtx &cast_ctx, common::ObObj &result);
static int get_uint(const common::ObObj &obj, common::ObCastCtx &cast_ctx, common::number::ObNumber &out);
static int copy_raw(const common::ObObj &obj, common::ObCastCtx &cast_ctx, common::ObObj &result);
private:
static int uint_to_raw(const common::number::ObNumber &text, common::ObCastCtx &cast_ctx, common::ObObj &result);
};
/**
* cast functions to do the real work
* cast the input object to the type specified and store the result in out_obj
......@@ -337,7 +391,7 @@ int ObObjCaster<Source, AllocatorTmpl>::expr_obj_cast(const ObObjTypeClass orig_
ObObjCastParams::TAllocator<Allocator> ta(allocator_);
ObObjCastParams params;
params.allocator_ = &ta;
params.tz_info_ = tz_info;
params.dtc_params_.tz_info_ = tz_info;
params.cast_mode_ = CM_WARN_ON_FAIL;
int warning = OB_SUCCESS;
extern ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC];
......@@ -427,13 +481,9 @@ bool cast_supported(const ObObjTypeClass orig_td, const ObObjTypeClass expect_td
int ob_obj_to_ob_time_with_date(const ObObj &obj, const ObTimeZoneInfo *tz_info, ObTime &ob_time);
int ob_obj_to_ob_time_without_date(const ObObj &obj, const ObTimeZoneInfo *tz_info, ObTime &ob_time);
//==============================
typedef ObObjCastParams ObCastCtx;
int obj_collation_check(const bool is_strict_mode, const ObCollationType cs_type, ObObj &obj);
int obj_accuracy_check(ObCastCtx &cast_ctx, const ObAccuracy &accuracy, const ObCollationType cs_type,
const ObObj &obj, ObObj &buf_obj, const ObObj *&res_obj);
int obj_accuracy_check(ObCastCtx &cast_ctx, const ObAccuracy &accuracy,
const ObCollationType cs_type, const ObObj &obj, ObObj &buf_obj, const ObObj *&res_obj);
class ObObjCasterV2
{
......@@ -442,7 +492,7 @@ public:
const ObObj &in_obj, ObObj &buf_obj, const ObObj *&out_obj);
static int to_type(const ObObjType expect_type, ObCastCtx &cast_ctx,
const ObObj &in_obj, ObObj &out_obj);
static int to_type(const ObObjType expect_type, const ObCollationType expect_cs_type,
static int to_type(const ObObjType expect_type, ObCollationType expect_cs_type,
ObCastCtx &cast_ctx, const ObObj &in_obj, ObObj &out_obj);
static int is_cast_monotonic(ObObjType t1, ObObjType t2, bool &is_monotonic);
static int is_order_consistent(const ObObjMeta &from,
......
此差异已折叠。
此差异已折叠。
......@@ -273,6 +273,14 @@ const char *ob_sql_tc_str(ObObjTypeClass tc)
"EXT",
"UNKNOWN",
"TEXT",
"BIT",
"ENUMSET",
"ENUMSETINNER",
"OTIMESTAMP",
"RAW",
"INTERVAL",
"ROWID",
"LOB",
""
};
return sql_tc_name[OB_LIKELY(tc < ObMaxTC) ? tc : ObMaxTC];
......
......@@ -89,7 +89,8 @@ enum ObObjType
ObNVarchar2Type = 43, // nvarchar2
ObNCharType = 44, // nchar
ObURowIDType = 45, // UROWID
ObMaxType // invalid type, or count of obj type
ObLobType = 46, // Oracle Lob
ObMaxType // invalid type, or count of obj type
};
enum ObObjTypeClass
......@@ -107,7 +108,15 @@ enum ObObjTypeClass
ObStringTC = 10, // varchar, char, varbinary, binary.
ObExtendTC = 11, // extend
ObUnknownTC = 12, // unknown
ObTextTC = 13, //TinyText,MediumText, Text ,LongText
ObTextTC = 13, // TinyText, MediumText, Text, LongText
ObBitTC = 14, // bit
ObEnumSetTC = 15, // enum, set
ObEnumSetInnerTC = 16,
ObOTimestampTC = 17, // timestamp with time zone
ObRawTC = 18, // raw
ObIntervalTC = 19, // oracle interval type class include interval year to month and interval day to second
ObRowIDTC = 20, // oracle rowid typeclass, includes urowid and rowid
ObLobTC = 21, // oracle lob typeclass
ObMaxTC,
// invalid type classes are below, only used as the result of XXXX_type_promotion()
// to indicate that the two obj can't be promoted to the same type.
......@@ -119,57 +128,83 @@ enum ObObjTypeClass
static ObObjTypeClass OBJ_TYPE_TO_CLASS[ObMaxType] =
{
ObNullTC, // null
ObIntTC, // int8
ObIntTC, // int16
ObIntTC, // int24
ObIntTC, // int32
ObIntTC, // int64
ObUIntTC, // uint8
ObUIntTC, // uint16
ObUIntTC, // uint24
ObUIntTC, // uint32
ObUIntTC, // uint64
ObFloatTC, // float
ObDoubleTC, // double
ObFloatTC, // ufloat
ObDoubleTC, // udouble
ObNumberTC, // number
ObNumberTC, // unumber
ObDateTimeTC, // datetime
ObDateTimeTC, // timestamp
ObDateTC, // date
ObTimeTC, // time
ObYearTC, // year
ObStringTC, // varchar
ObStringTC, // char
ObStringTC, // hexadecimal literal
ObExtendTC, // extend
ObUnknownTC, // unknown
ObTextTC, // TinyText
ObTextTC, // MediumText
ObTextTC, // Text
ObTextTC // LongText
ObNullTC, // null obNullType
ObIntTC, // int8 ObTinyIntType
ObIntTC, // int16 ObSmallIntType
ObIntTC, // int24 ObMediumIntType
ObIntTC, // int32 ObInt32Type
ObIntTC, // int64 ObIntType
ObUIntTC, // uint8 ObUTinyIntType
ObUIntTC, // uint16 ObUSmallIntType
ObUIntTC, // uint24 ObUMediumIntType
ObUIntTC, // uint32 ObUInt32Type
ObUIntTC, // uint64 ObUInt64Type
ObFloatTC, // float ObFloatType
ObDoubleTC, // double ObDoubleType
ObFloatTC, // ufloat ObUFloatType
ObDoubleTC, // udouble ObUDoubleType
ObNumberTC, // number ObNumberType
ObNumberTC, // unumber ObUNumberType
ObDateTimeTC, // datetime ObDateTimeType
ObDateTimeTC, // timestamp ObTimestampType
ObDateTC, // date ObDateType
ObTimeTC, // time ObTimeType
ObYearTC, // year ObYearType
ObStringTC, // varchar ObVarcharType
ObStringTC, // char ObCharType
ObStringTC, // hexadecimal literal ObHexStringType
ObExtendTC, // extend ObExtendType
ObUnknownTC, // unknown ObUnknownType
ObTextTC, // TinyText ObTinyTextType
ObTextTC, // Text ObTextType
ObTextTC, // MediumText ObMediumTextType
ObTextTC, // LongText ObLongTextType
ObBitTC, // ObBitType
ObEnumSetTC, // ObEnumType
ObEnumSetTC, // ObSetType
ObEnumSetInnerTC, // ObEnumInnerType
ObEnumSetInnerTC, // ObSetInnerType
ObOTimestampTC, // ObTimestampTZType
ObOTimestampTC, // ObTimestampLTZType
ObOTimestampTC, // ObTimestampNanoType
ObRawTC, // ObRawType
ObIntervalTC, // ObIntervalYMType
ObIntervalTC, // ObIntervalDSType
ObNumberTC, // ObNumberFloatType
ObStringTC, // ObNVarchar2Type
ObStringTC, // ObNCharType
ObRowIDTC, // ObURowIDType
ObLobTC // ObLobType
};
static ObObjType OBJ_DEFAULT_TYPE[ObActualMaxTC] =
{
ObNullType, // null
ObIntType, // int
ObUInt64Type, // uint
ObFloatType, // float
ObDoubleType, // double
ObNumberType, // number
ObDateTimeType, // datetime
ObDateType, // date
ObTimeType, // time
ObYearType, // year
ObVarcharType, // varchar
ObExtendType, // extend
ObUnknownType, // unknown
ObNullType, // null
ObIntType, // int
ObUInt64Type, // uint
ObFloatType, // float
ObDoubleType, // double
ObNumberType, // number
ObDateTimeType, // datetime
ObDateType, // date
ObTimeType, // time
ObYearType, // year
ObVarcharType, // varchar
ObExtendType, // extend
ObUnknownType, // unknown
ObLongTextType, // text
ObMaxType, // maxtype
ObUInt64Type, // int&uint
ObBitType, // bit
ObUInt64Type, // enumset
ObMaxType, // enumsetInner
ObTimestampNanoType, // timestamp nano
ObRawType, // raw
ObMaxType, // no default type for interval type class
ObMaxType, // no default type for rowid type class
ObLobType, // lob
ObMaxType, // maxtype
ObUInt64Type, // int&uint
ObMaxType, // lefttype
ObMaxType, // righttype
};
OB_INLINE ObObjTypeClass ob_obj_type_class(const ObObjType type)
......@@ -237,16 +272,30 @@ inline bool ob_is_number_tc(ObObjType type) { return ObNumberTC == ob_obj_type_c
inline bool ob_is_datetime_tc(ObObjType type) { return ObDateTimeTC == ob_obj_type_class(type); }
inline bool ob_is_time_tc(ObObjType type) { return ObTimeTC == ob_obj_type_class(type); }
inline bool ob_is_string_tc(ObObjType type) { return ObStringTC == ob_obj_type_class(type); }
inline bool ob_is_text_tc(ObObjType type) { return ObTextTC == ob_obj_type_class(type); }
inline bool ob_is_nvarchar2(const ObObjType type) { return ObNVarchar2Type == type; }
inline bool ob_is_nchar(const ObObjType type) { return ObNCharType == type; }
inline bool ob_is_nstring_type(const ObObjType type)
inline bool ob_is_nstring_type(const ObObjType type) { return ob_is_nchar(type) || ob_is_nvarchar2(type); }
inline bool ob_is_accurate_numeric_type(ObObjType type)
{
return ob_is_nchar(type) || ob_is_nvarchar2(type);
return (ObTinyIntType <= type && type <= ObUInt64Type) || (ob_is_number_tc(type));
}
inline bool ob_is_otimestamp_type(const ObObjType type)
{
return (ObTimestampTZType <= type && type <= ObTimestampNanoType);
}
inline bool ob_is_timestamp_tz(const ObObjType type)
{
return ObTimestampTZType == type;
}
inline bool ob_is_blob(const ObObjType type, const ObCollationType cs_type)
{
return ObTextTC == ob_obj_type_class(type) && CS_TYPE_BINARY == cs_type;
}
inline bool is_obj_type_supported(ObObjType type)
{
return type > ObNullType && type < ObUnknownType;
return (type > ObNullType && type < ObUnknownType)
|| ob_is_otimestamp_type(type);
}
// to_string adapter
......
......@@ -28,6 +28,7 @@
#include "lib/allocator/ob_stack_allocator.h"
#include "lib/number/ob_number_v2.h"
#include "common/ob_obj_funcs.h"
using namespace oceanbase;
using namespace oceanbase::common;
......@@ -230,6 +231,12 @@ int ObObj::build_not_strict_default_value()
set_char(null_str);
}
break;
case ObTimestampTZType:
case ObTimestampLTZType:
case ObTimestampNanoType: {
set_otimestamp_null(data_type);
break;
}
default:
ret = OB_INVALID_ARGUMENT;
_OB_LOG(WARN, "unexpected data type=%hhd", data_type);
......@@ -421,7 +428,22 @@ ObObjTypeFuncs OBJ_FUNCS[ObMaxType] =
DEF_FUNC_ENTRY(ObHexStringType), // 24, hex_string
DEF_FUNC_ENTRY(ObExtendType), // 25, ext
DEF_FUNC_ENTRY(ObUnknownType), // 26, unknown
DEF_FUNC_ENTRY(ObRawType), // 39, timestamp (9)
DEF_FUNC_ENTRY(ObNullType), // 27
DEF_FUNC_ENTRY(ObNullType), // 28
DEF_FUNC_ENTRY(ObNullType), // 29
DEF_FUNC_ENTRY(ObNullType), // 30
DEF_FUNC_ENTRY(ObNullType), // 31
DEF_FUNC_ENTRY(ObNullType), // 32
DEF_FUNC_ENTRY(ObNullType), // 33
DEF_FUNC_ENTRY(ObNullType), // 34
DEF_FUNC_ENTRY(ObNullType), // 35
DEF_FUNC_ENTRY(ObTimestampTZType), // 36, timestamp with time zone
DEF_FUNC_ENTRY(ObTimestampLTZType), // 37, timestamp with local time zone
DEF_FUNC_ENTRY(ObTimestampNanoType), // 38, timestamp (9)
DEF_FUNC_ENTRY(ObRawType), // 39, raw
DEF_FUNC_ENTRY(ObNullType), // 40
DEF_FUNC_ENTRY(ObNullType), // 41
DEF_FUNC_ENTRY(ObNullType), // 42
DEF_FUNC_ENTRY(ObNVarchar2Type), // 43, nvarchar2
DEF_FUNC_ENTRY(ObNCharType), // 44, nchar
};
......
......@@ -133,6 +133,12 @@ public:
set_collation_level(CS_LEVEL_INVALID);
set_collation_type(CS_TYPE_BINARY);
}
OB_INLINE void set_otimestamp_type(const ObObjType type)
{
type_ = static_cast<uint8_t>(type);
set_collation_level(CS_LEVEL_NUMERIC);
set_collation_type(CS_TYPE_BINARY);
}
OB_INLINE bool is_valid() const { return ob_is_valid_obj_type(static_cast<ObObjType>(type_)); }
OB_INLINE bool is_invalid() const { return !ob_is_valid_obj_type(static_cast<ObObjType>(type_)); }
......@@ -188,6 +194,14 @@ public:
OB_INLINE bool is_integer_type() const { return ob_is_integer_type(get_type()); }
OB_INLINE bool is_string_type() const { return ob_is_string_tc(get_type()); }
OB_INLINE bool is_temporal_type() const { return ob_is_temporal_type(get_type()); }
OB_INLINE bool is_nchar() const { return type_ == static_cast<uint8_t>(ObNCharType); }
OB_INLINE bool is_nvarchar2() const { return type_ == static_cast<uint8_t>(ObNVarchar2Type); }
OB_INLINE bool is_nstring() const { return is_nvarchar2() || is_nchar(); }
OB_INLINE bool is_blob() const { return (ob_is_text_tc(get_type()) && CS_TYPE_BINARY == cs_type_); }
OB_INLINE bool is_character_type() const { return is_nstring() || is_varchar_or_char(); }
OB_INLINE bool is_timestamp_tz() const { return type_ == static_cast<uint8_t>(ObTimestampTZType); }
OB_INLINE bool is_timestamp_ltz() const { return type_ == static_cast<uint8_t>(ObTimestampLTZType); }
OB_INLINE bool is_timestamp_nano() const { return type_ == static_cast<uint8_t>(ObTimestampNanoType); }
OB_INLINE bool is_unsigned_integer() const
{
return (static_cast<uint8_t>(ObUTinyIntType) <= type_
......@@ -222,6 +236,28 @@ private:
int8_t scale_; // scale
};
struct ObObjPrintParams {
ObObjPrintParams(const ObTimeZoneInfo* tz_info, ObCollationType cs_type)
: tz_info_(tz_info), cs_type_(cs_type), print_flags_(0)
{}
ObObjPrintParams(const ObTimeZoneInfo* tz_info)
: tz_info_(tz_info), cs_type_(CS_TYPE_UTF8MB4_GENERAL_CI), print_flags_(0)
{}
ObObjPrintParams() : tz_info_(NULL), cs_type_(CS_TYPE_UTF8MB4_GENERAL_CI), print_flags_(0)
{}
TO_STRING_KV(K_(tz_info), K_(cs_type));
const ObTimeZoneInfo* tz_info_;
ObCollationType cs_type_;
union {
uint32_t print_flags_;
struct {
uint32_t need_cast_expr_ : 1;
uint32_t is_show_create_view_ : 1;
uint32_t reserved_ : 30;
};
};
};
// sizeof(ObObjValue)=8
union ObObjValue
{
......@@ -339,11 +375,14 @@ public:
void set_datetime_value(const int64_t value);
void set_timestamp_value(const int64_t value);
void set_otimestamp_value(const ObObjType type, const ObOTimestampData &value);
void set_otimestamp_value(const ObObjType type, const int64_t time_us, const uint32_t time_ctx_desc);
void set_otimestamp_value(const ObObjType type, const int64_t time_us, const uint16_t time_desc);
void set_otimestamp_null(const ObObjType type);
void set_date_value(const int32_t value);
void set_time_value(const int64_t value);
void set_year_value(const uint8_t value);
void set_string(const ObObjType type, const char *ptr, const ObString::obstr_size_t size);
void set_string(const ObObjType type, const ObString &value);
void set_varchar(const ObString &value);
......@@ -385,6 +424,7 @@ public:
v_.string_ = ptr;
val_len_ = static_cast<int32_t>(size);
}
//@}
//@{ getters
......@@ -474,6 +514,7 @@ public:
OB_INLINE ObString get_raw() const { return ObString(val_len_, v_.string_); }
OB_INLINE ObString get_binary() const { return ObString(val_len_, v_.string_); }
OB_INLINE ObString get_hex_string() const { return ObString(val_len_, v_.string_); }
OB_INLINE int64_t get_number_byte_length() const { return nmb_desc_.len_ * sizeof(uint32_t); }
OB_INLINE bool get_bool() const { return (0 != v_.int64_); }
inline int64_t get_ext() const;
......@@ -487,6 +528,24 @@ public:
inline ObString get_nvarchar2() const { return ObString(val_len_, v_.string_); }
inline ObString get_nchar() const { return ObString(val_len_, v_.string_); }
inline ObOTimestampData::UnionTZCtx get_tz_desc() const
{
return time_ctx_;
}
inline ObOTimestampData get_otimestamp_value() const
{
return ObOTimestampData(v_.datetime_, time_ctx_);
}
static int64_t get_otimestamp_store_size(const bool is_timestamp_tz)
{
return static_cast<int64_t>(sizeof(int64_t) + (is_timestamp_tz ? sizeof(uint32_t) : sizeof(uint16_t)));
}
inline int64_t get_otimestamp_store_size() const
{
return get_otimestamp_store_size(is_timestamp_tz());
}
//@}
//@{ test functions
......@@ -531,6 +590,11 @@ public:
OB_INLINE bool is_temporal_type() const { return meta_.is_temporal_type(); }
OB_INLINE bool is_varchar_or_char() const { return meta_.is_varchar_or_char(); }
OB_INLINE bool is_varying_len_char_type() const { return meta_.is_varying_len_char_type(); }
OB_INLINE bool is_character_type() const { return meta_.is_character_type(); }
OB_INLINE bool is_blob() const { return meta_.is_blob(); }
OB_INLINE bool is_timestamp_tz() const { return meta_.is_timestamp_tz(); }
OB_INLINE bool is_timestamp_nano() const { return meta_.is_timestamp_nano(); }
OB_INLINE bool is_varbinary_or_binary() const { return meta_.is_varbinary_or_binary(); }
inline bool is_min_value() const;
inline bool is_max_value() const;
......@@ -611,6 +675,7 @@ public:
{
int32_t val_len_;
number::ObNumber::Desc nmb_desc_;
ObOTimestampData::UnionTZCtx time_ctx_;
}; // sizeof = 4
ObObjValue v_; // sizeof = 8
};
......@@ -947,6 +1012,36 @@ inline void ObObj::set_timestamp_value(const int64_t value)
v_.datetime_ = value;
}
inline void ObObj::set_otimestamp_value(const ObObjType type, const ObOTimestampData &value)
{
meta_.set_otimestamp_type(type);
time_ctx_ = value.time_ctx_;
v_.datetime_ = value.time_us_;
}
inline void ObObj::set_otimestamp_value(const ObObjType type, const int64_t time_us, const uint32_t time_ctx_desc)
{
meta_.set_otimestamp_type(type);
time_ctx_.desc_ = time_ctx_desc;
v_.datetime_ = time_us;
}
inline void ObObj::set_otimestamp_value(const ObObjType type, const int64_t time_us, const uint16_t time_desc)
{
meta_.set_otimestamp_type(type);
time_ctx_.tz_desc_ = 0;
time_ctx_.time_desc_ = time_desc;
v_.datetime_ = time_us;
}
inline void ObObj::set_otimestamp_null(const ObObjType type)
{
meta_.set_otimestamp_type(type);
time_ctx_.tz_desc_ = 0;
time_ctx_.time_desc_ = 0;
time_ctx_.is_null_ = 1;
}
inline void ObObj::set_date(const int32_t value)
{
meta_.set_date();
......@@ -1662,7 +1757,7 @@ private:
ParamFlag flag_;
};
typedef int (*ob_obj_print)(const ObObj &obj, char *buffer, int64_t length, int64_t &pos, const ObTimeZoneInfo *tz_info);
typedef int (*ob_obj_print)(const ObObj &obj, char *buffer, int64_t length, int64_t &pos, const ObObjPrintParams &params);
typedef int64_t (*ob_obj_crc64)(const ObObj &obj, const int64_t current);
typedef void (*ob_obj_batch_checksum)(const ObObj &obj, ObBatchChecksum &bc);
typedef uint64_t (*ob_obj_hash)(const ObObj &obj, const uint64_t hash);
......
......@@ -134,9 +134,13 @@ int ObSMUtils::cell_str(
case ObYearTC:
ret = ObMySQLUtil::year_cell_str(buf, len, obj.get_year(), type, pos);
break;
case ObRawTC:
case ObTextTC: // TODO@hanhui texttc share the stringtc temporarily
case ObStringTC:
case ObLobTC: {
ret = ObMySQLUtil::varchar_cell_str(buf, len, obj.get_string(), pos);
break;
}
default:
_OB_LOG(ERROR, "invalid ob type=%d", obj.get_type());
ret = OB_ERROR;
......@@ -309,3 +313,35 @@ int ObSMUtils::get_ob_type(ObObjType &ob_type, EMySQLFieldType mysql_type)
}
return ret;
}
int ObSMUtils::to_ob_field(const ObMySQLField &field, ObField &mfield)
{
int ret = OB_SUCCESS;
mfield.dname_ = field.dname_;
mfield.tname_ = field.tname_;
mfield.org_tname_ = field.org_tname_;
mfield.cname_ = field.cname_;
mfield.org_cname_ = field.org_cname_;
mfield.accuracy_ = field.accuracy_;
// To distinguish between binary and nonbinary data for string data types,
// check whether the charsetnr value is 63. Also, flag must be set to binary accordingly
mfield.charsetnr_ = field.charsetnr_;
mfield.flags_ = field.flags_;
mfield.length_ = field.length_;
// For Varchar class, check charset:
// TODO:Handling incorrect character sets
if (ObCharset::is_valid_collation(static_cast<ObCollationType>(field.charsetnr_))
&& ObCharset::is_bin_sort(static_cast<ObCollationType>(field.charsetnr_))) {
mfield.flags_ |= OB_MYSQL_BINARY_FLAG;
}
ObObjType ob_type;
ret = ObSMUtils::get_ob_type(ob_type, field.type_);
mfield.type_.set_type(ob_type);
OB_LOG(DEBUG, "to ob field", K(ret), K(mfield), K(field));
return ret;
}
......@@ -19,6 +19,7 @@
#include "lib/timezone/ob_timezone_info.h"
#include "rpc/obmysql/ob_mysql_global.h"
#include "rpc/obmysql/ob_mysql_util.h"
#include "rpc/obmysql/ob_mysql_field.h"
#include "common/ob_object.h"
#include "common/ob_accuracy.h"
......@@ -55,6 +56,7 @@ public:
uint16_t &flags, ObScale &num_decimals);
static int get_ob_type(ObObjType &ob_type, obmysql::EMySQLFieldType mysql_type);
static int to_ob_field(const obmysql::ObMySQLField &field, ObField &mfield);
};
} // end of namespace common
......
......@@ -194,6 +194,8 @@ lib/timezone/ob_time_convert.h\
lib/timezone/ob_time_convert.cpp\
lib/timezone/ob_timezone_info.h\
lib/timezone/ob_timezone_info.cpp\
lib/timezone/ob_oracle_format_models.h\
lib/timezone/ob_oracle_format_models.cpp\
lib/utility/ob_preload.h\
lib/utility/ob_print_kv.h\
lib/utility/ob_print_utils.h\
......
......@@ -17,6 +17,7 @@
#include <cstdlib>
#include <cstddef>
#include "lib/utility/ob_macro_utils.h"
#include "lib/utility/ob_template_utils.h"
namespace oceanbase
{
......
......@@ -384,7 +384,7 @@ void ObjectSet::free_object(AObject *obj)
if (NULL == bm_
&& NULL == free_lists_
&& normal_hold_bytes_ > ABLOCK_SIZE
&& (normal_used_bytes_
&& (static_cast<double>(normal_used_bytes_)
< static_cast<double>(normal_hold_bytes_)
* (1. - FREE_LISTS_BUILD_RATIO))) {
build_free_lists();
......
......@@ -205,6 +205,7 @@ MOD_ITEM_DEF(OB_PARTITION_TABLE_TASK)
MOD_ITEM_DEF(OB_TEMP_VARIABLES)
MOD_ITEM_DEF(OB_EXTERNAL_SORTER)
MOD_ITEM_DEF(OB_OBJ_STORE)
MOD_ITEM_DEF(OB_COMPRESSOR)
//obproxy
MOD_ITEM_DEF(OB_PROXY_SESSION)
......@@ -228,6 +229,12 @@ MOD_ITEM_DEF(OB_PROXY_PARAM_OBJ_ARRAY)
MOD_ITEM_DEF(OB_PROXY_SHARDING_OPTIMIZER)
MOD_ITEM_DEF(OB_PROXY_SHARDING_EXPR)
MOD_ITEM_DEF(OB_PROXY_SHARDING_PARSE)
MOD_ITEM_DEF(OB_PROXY_SHARDING_CONFIG)
MOD_ITEM_DEF(OB_PROXY_SHARDING_DDL)
MOD_ITEM_DEF(OB_PROXY_QOS)
MOD_ITEM_DEF(OB_PROXY_SSL_RELATED)
MOD_ITEM_DEF(OB_PROXY_CONFIG_TABLE)
MOD_ITEM_DEF(OB_PROMETHEUS_RELATED)
//mergeservermodules
MOD_ITEM_DEF(OB_MS_CELL_ARRAY)
......@@ -633,7 +640,6 @@ MOD_ITEM_DEF(OB_TRANS_SUBMIT_LOG_TASK)
MOD_ITEM_DEF(OB_TRANS_LOCATION_CACHE)
MOD_ITEM_DEF(OB_TRANS_FREEZE_TASK)
// rootservice
MOD_ITEM_DEF(OB_HASH_BUCKET_LEADER_STATUS_MAP)
MOD_ITEM_DEF(OB_HASH_BUCKET_PARTITION_DIST_MAP)
......
......@@ -125,7 +125,7 @@ int StackAllocator::Block::init(const int64_t limit)
int64_t StackAllocator::Block::remain() const
{
return NULL == this ? -1 : limit_ - pos_;
return limit_ - pos_;
}
int StackAllocator::init(ObIAllocator *allocator, const int64_t block_size)
......
......@@ -85,6 +85,18 @@ inline int64_t inc_update(int64_t* v_, int64_t x)
#define ATOMIC_INC(val) do { IGNORE_RETURN ATOMIC_AAF((val), 1); } while (0)
#define ATOMIC_DEC(val) do { IGNORE_RETURN ATOMIC_SAF((val), 1); } while (0)
#define ATOMIC_LOAD64(addr) \
({ \
int64_t x = __atomic_load_n((int64_t*)addr, __ATOMIC_SEQ_CST); \
*(typeof(addr)) & x; \
})
#define ATOMIC_STORE64(addr, v) \
({ \
typeof(v) v1 = v; \
__atomic_store_n((int64_t*)addr, *(int64_t*)&v1, __ATOMIC_SEQ_CST); \
})
}
}
......
......@@ -61,4 +61,58 @@ lib/compress/zlib/zutil.h
lib_compress_libzlib_1_0_la_CPPFLAGS:= -I$(top_srcdir)/src -I${DEP_DIR}/include/ -w
noinst_LTLIBRARIES += lib/compress/libnone.la lib/compress/libzlib_1.0.la lib/compress/libsnappy_1.0.la lib/compress/liblz4_1.0.la
lib_compress_libzstd_1_3_8_la_SOURCES:=\
lib/compress/zstd_1_3_8/error_private.c\
lib/compress/zstd_1_3_8/error_private.h\
lib/compress/zstd_1_3_8/entropy_common.c\
lib/compress/zstd_1_3_8/debug.h\
lib/compress/zstd_1_3_8/debug.c\
lib/compress/zstd_1_3_8/cpu.h\
lib/compress/zstd_1_3_8/compiler.h\
lib/compress/zstd_1_3_8/bitstream.h\
lib/compress/zstd_1_3_8/hist.h\
lib/compress/zstd_1_3_8/hist.c\
lib/compress/zstd_1_3_8/fse.h\
lib/compress/zstd_1_3_8/fse_decompress.c\
lib/compress/zstd_1_3_8/fse_compress.c\
lib/compress/zstd_1_3_8/ob_zstd_wrapper.h\
lib/compress/zstd_1_3_8/ob_zstd_wrapper.cpp\
lib/compress/zstd_1_3_8/ob_zstd_compressor_1_3_8.h\
lib/compress/zstd_1_3_8/ob_zstd_compressor_1_3_8.cpp\
lib/compress/zstd_1_3_8/mem.h\
lib/compress/zstd_1_3_8/huf.h\
lib/compress/zstd_1_3_8/huf_decompress.c\
lib/compress/zstd_1_3_8/huf_compress.c\
lib/compress/zstd_1_3_8/xxhash.h\
lib/compress/zstd_1_3_8/xxhash.c\
lib/compress/zstd_1_3_8/threading.h\
lib/compress/zstd_1_3_8/threading.c\
lib/compress/zstd_1_3_8/pool.h\
lib/compress/zstd_1_3_8/pool.c\
lib/compress/zstd_1_3_8/zstd.h\
lib/compress/zstd_1_3_8/zstd_common.c\
lib/compress/zstd_1_3_8/zstd_compress.c\
lib/compress/zstd_1_3_8/zstd_ddict.h\
lib/compress/zstd_1_3_8/zstd_ddict.c\
lib/compress/zstd_1_3_8/zstd_compress_internal.h\
lib/compress/zstd_1_3_8/zstd_decompress_internal.h\
lib/compress/zstd_1_3_8/zstd_decompress.c\
lib/compress/zstd_1_3_8/zstd_decompress_block.h\
lib/compress/zstd_1_3_8/zstd_decompress_block.c\
lib/compress/zstd_1_3_8/zstd_internal.h\
lib/compress/zstd_1_3_8/zstd_fast.h\
lib/compress/zstd_1_3_8/zstd_fast.c\
lib/compress/zstd_1_3_8/zstd_errors.h\
lib/compress/zstd_1_3_8/zstd_double_fast.h\
lib/compress/zstd_1_3_8/zstd_double_fast.c\
lib/compress/zstd_1_3_8/zstd_opt.c\
lib/compress/zstd_1_3_8/zstd_opt.h\
lib/compress/zstd_1_3_8/zstd_ldm.h\
lib/compress/zstd_1_3_8/zstd_ldm.c\
lib/compress/zstd_1_3_8/zstd_lazy.h\
lib/compress/zstd_1_3_8/zstd_lazy.c\
lib/compress/zstd_1_3_8/zstdmt_compress.c\
lib/compress/zstd_1_3_8/zstdmt_compress.h
lib_compress_libzstd_1_3_8_la_CPPFLAGS:= -I$(top_srcdir)/src -I${DEP_DIR}/include/ -w
noinst_LTLIBRARIES += lib/compress/libnone.la lib/compress/libzlib_1.0.la lib/compress/libsnappy_1.0.la lib/compress/liblz4_1.0.la lib/compress/libzstd_1.3.8.la
......@@ -19,9 +19,9 @@ namespace common
ObCompressorPool::ObCompressorPool()
:none_compressor(),
lz4_compressor(),
lzo_compressor(),
snappy_compressor(),
zlib_compressor()
zlib_compressor(),
zstd_compressor_1_3_8()
{
}
ObCompressorPool &ObCompressorPool::get_instance()
......@@ -41,32 +41,39 @@ int ObCompressorPool::get_compressor(const char *compressor_name,
LIB_LOG(WARN, "invalid compressor name argument, ", K(ret), KP(compressor_name));
} else if (OB_FAIL(get_compressor_type(compressor_name, compressor_type))) {
LIB_LOG(WARN, "fail to get compressor type, ", K(ret), K(compressor_name));
} else {
switch(compressor_type) {
case NONE_COMPRESSOR:
compressor = &none_compressor;
break;
case LZ4_COMPRESSOR:
compressor = &lz4_compressor;
break;
case LZO_COMPRESSOR:
compressor = &lzo_compressor;
break;
case SNAPPY_COMPRESSOR:
compressor = &snappy_compressor;
break;
case ZLIB_COMPRESSOR:
compressor = &zlib_compressor;
break;
default:
compressor = NULL;
ret = OB_NOT_SUPPORTED;
LIB_LOG(WARN, "not support compress type, ", K(ret), K(compressor_type));
}
} else if (OB_FAIL(get_compressor(compressor_type, compressor))) {
LIB_LOG(WARN, "fail to get compressor", K(ret), K(compressor_type));
}
return ret;
}
int ObCompressorPool::get_compressor(const ObCompressorType& compressor_type, ObCompressor*& compressor)
{
int ret = OB_SUCCESS;
switch (compressor_type) {
case NONE_COMPRESSOR:
compressor = &none_compressor;
break;
case LZ4_COMPRESSOR:
compressor = &lz4_compressor;
break;
case SNAPPY_COMPRESSOR:
compressor = &snappy_compressor;
break;
case ZLIB_COMPRESSOR:
compressor = &zlib_compressor;
break;
case ZSTD_1_3_8_COMPRESSOR:
compressor = &zstd_compressor_1_3_8;
break;
default:
compressor = NULL;
ret = OB_NOT_SUPPORTED;
LIB_LOG(WARN, "not support compress type, ", K(ret), K(compressor_type));
}
return ret;
}
int ObCompressorPool::get_compressor_type(const char *compressor_name,
ObCompressorType &compressor_type) const
{
......@@ -78,12 +85,12 @@ int ObCompressorPool::get_compressor_type(const char *compressor_name,
compressor_type = NONE_COMPRESSOR;
} else if (!strcmp(compressor_name, "lz4_1.0")) {
compressor_type = LZ4_COMPRESSOR;
} else if (!strcmp(compressor_name, "lzo_1.0")) {
compressor_type = LZO_COMPRESSOR;
} else if (!strcmp(compressor_name, "snappy_1.0")) {
compressor_type = SNAPPY_COMPRESSOR;
} else if (!strcmp(compressor_name, "zlib_1.0")) {
compressor_type = ZLIB_COMPRESSOR;
} else if (!strcmp(compressor_name, "zstd_1.3.8")) {
compressor_type = ZSTD_1_3_8_COMPRESSOR;
} else {
ret = OB_NOT_SUPPORTED;
LIB_LOG(WARN, "no support compressor type, ", K(ret), K(compressor_name));
......
......@@ -16,38 +16,39 @@
#include "lib/compress/ob_compressor.h"
#include "none/ob_none_compressor.h"
#include "lz4/ob_lz4_compressor.h"
#include "lzo/ob_lzo_compressor.h"
#include "snappy/ob_snappy_compressor.h"
#include "zlib/ob_zlib_compressor.h"
#include "zstd_1_3_8/ob_zstd_compressor_1_3_8.h"
namespace oceanbase
{
namespace common
{
enum ObCompressorType {
INVALID_COMPRESSOR = 0 ,
NONE_COMPRESSOR ,
LZ4_COMPRESSOR ,
SNAPPY_COMPRESSOR ,
ZLIB_COMPRESSOR ,
ZSTD_1_3_8_COMPRESSOR
};
class ObCompressorPool
{
public:
static ObCompressorPool &get_instance();
int get_compressor(const char *compressor_name, ObCompressor *&compressor);
int get_compressor(const ObCompressorType& compressor_type, ObCompressor*& compressor);
int get_compressor_type(const char *compressor_name, ObCompressorType &compressor_type) const;
private:
ObCompressorPool();
virtual ~ObCompressorPool() {}
enum ObCompressorType {
INVALID_COMPRESSOR = 0 ,
NONE_COMPRESSOR ,
LZ4_COMPRESSOR ,
LZO_COMPRESSOR ,
SNAPPY_COMPRESSOR ,
ZLIB_COMPRESSOR
};
int get_compressor_type(const char *compressor_name, ObCompressorType &compressor_type) const;
ObNoneCompressor none_compressor;
ObLZ4Compressor lz4_compressor;
ObLZOCompressor lzo_compressor;
ObSnappyCompressor snappy_compressor;
ObZlibCompressor zlib_compressor;
zstd_1_3_8::ObZstdCompressor_1_3_8 zstd_compressor_1_3_8;
};
} /* namespace common */
......
BSD License
For Zstandard software
Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name Facebook nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
此差异已折叠。
此差异已折叠。
此差异已折叠。
/* ******************************************************************
debug
Part of FSE library
Copyright (C) 2013-present, Yann Collet.
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You can contact the author at :
- Source repository : https://github.com/Cyan4973/FiniteStateEntropy
****************************************************************** */
/*
* This module only hosts one global variable
* which can be used to dynamically influence the verbosity of traces,
* such as DEBUGLOG and RAWLOG
*/
#include "debug.h"
int g_debuglevel = DEBUGLEVEL;
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* You may select, at your option, one of the above-listed licenses.
*/
#ifndef ZSTD_DDICT_H
#define ZSTD_DDICT_H
/*-*******************************************************
* Dependencies
*********************************************************/
#include <stddef.h> /* size_t */
#include "zstd.h" /* ZSTD_DDict, and several public functions */
/*-*******************************************************
* Interface
*********************************************************/
/* note: several prototypes are already published in `zstd.h` :
* ZSTD_createDDict()
* ZSTD_createDDict_byReference()
* ZSTD_createDDict_advanced()
* ZSTD_freeDDict()
* ZSTD_initStaticDDict()
* ZSTD_sizeof_DDict()
* ZSTD_estimateDDictSize()
* ZSTD_getDictID_fromDict()
*/
const void* ZSTD_DDict_dictContent(const ZSTD_DDict* ddict);
size_t ZSTD_DDict_dictSize(const ZSTD_DDict* ddict);
void ZSTD_copyDDictParameters(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict);
#endif /* ZSTD_DDICT_H */
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册