mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge branch 'master' into test/zvonand-monotonic
This commit is contained in:
commit
6540d55d42
15
.clang-tidy
15
.clang-tidy
@ -1,6 +1,14 @@
|
|||||||
|
# To run clang-tidy from CMake, build ClickHouse with -DENABLE_CLANG_TIDY=1. To show all warnings, it is
|
||||||
|
# recommended to pass "-k0" to Ninja.
|
||||||
|
|
||||||
# Enable all checks + disale selected checks. Feel free to remove disabled checks from below list if
|
# Enable all checks + disale selected checks. Feel free to remove disabled checks from below list if
|
||||||
# a) the new check is not controversial (this includes many checks in readability-* and google-*) or
|
# a) the new check is not controversial (this includes many checks in readability-* and google-*) or
|
||||||
# b) too noisy (checks with > 100 new warnings are considered noisy, this includes e.g. cppcoreguidelines-*).
|
# b) too noisy (checks with > 100 new warnings are considered noisy, this includes e.g. cppcoreguidelines-*).
|
||||||
|
|
||||||
|
# TODO Let clang-tidy check headers in further directories
|
||||||
|
# --> HeaderFilterRegex: '^.*/(src|base|programs|utils)/.*(h|hpp)$'
|
||||||
|
HeaderFilterRegex: '^.*/(base)/.*(h|hpp)$'
|
||||||
|
|
||||||
Checks: '*,
|
Checks: '*,
|
||||||
-abseil-*,
|
-abseil-*,
|
||||||
|
|
||||||
@ -14,6 +22,8 @@ Checks: '*,
|
|||||||
-bugprone-implicit-widening-of-multiplication-result,
|
-bugprone-implicit-widening-of-multiplication-result,
|
||||||
-bugprone-narrowing-conversions,
|
-bugprone-narrowing-conversions,
|
||||||
-bugprone-not-null-terminated-result,
|
-bugprone-not-null-terminated-result,
|
||||||
|
-bugprone-unchecked-optional-access,
|
||||||
|
-bugprone-assignment-in-if-condition,
|
||||||
|
|
||||||
-cert-dcl16-c,
|
-cert-dcl16-c,
|
||||||
-cert-err58-cpp,
|
-cert-err58-cpp,
|
||||||
@ -54,8 +64,6 @@ Checks: '*,
|
|||||||
-cppcoreguidelines-slicing,
|
-cppcoreguidelines-slicing,
|
||||||
-cppcoreguidelines-special-member-functions,
|
-cppcoreguidelines-special-member-functions,
|
||||||
|
|
||||||
-concurrency-mt-unsafe,
|
|
||||||
|
|
||||||
-darwin-*,
|
-darwin-*,
|
||||||
|
|
||||||
-fuchsia-*,
|
-fuchsia-*,
|
||||||
@ -97,6 +105,7 @@ Checks: '*,
|
|||||||
|
|
||||||
-misc-no-recursion,
|
-misc-no-recursion,
|
||||||
-misc-non-private-member-variables-in-classes,
|
-misc-non-private-member-variables-in-classes,
|
||||||
|
-misc-const-correctness,
|
||||||
|
|
||||||
-modernize-avoid-c-arrays,
|
-modernize-avoid-c-arrays,
|
||||||
-modernize-concat-nested-namespaces,
|
-modernize-concat-nested-namespaces,
|
||||||
@ -108,6 +117,7 @@ Checks: '*,
|
|||||||
-modernize-use-nodiscard,
|
-modernize-use-nodiscard,
|
||||||
-modernize-use-override,
|
-modernize-use-override,
|
||||||
-modernize-use-trailing-return-type,
|
-modernize-use-trailing-return-type,
|
||||||
|
-modernize-macro-to-enum,
|
||||||
|
|
||||||
-performance-inefficient-string-concatenation,
|
-performance-inefficient-string-concatenation,
|
||||||
-performance-no-int-to-ptr,
|
-performance-no-int-to-ptr,
|
||||||
@ -129,6 +139,7 @@ Checks: '*,
|
|||||||
-readability-suspicious-call-argument,
|
-readability-suspicious-call-argument,
|
||||||
-readability-uppercase-literal-suffix,
|
-readability-uppercase-literal-suffix,
|
||||||
-readability-use-anyofallof,
|
-readability-use-anyofallof,
|
||||||
|
-readability-simplify-boolean-expr,
|
||||||
|
|
||||||
-zirkon-*,
|
-zirkon-*,
|
||||||
'
|
'
|
||||||
|
15
.git-blame-ignore-revs
Normal file
15
.git-blame-ignore-revs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# This is a file that can be used by git-blame to ignore some revisions.
|
||||||
|
# (git 2.23+, released in August 2019)
|
||||||
|
#
|
||||||
|
# Can be configured as follow:
|
||||||
|
#
|
||||||
|
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||||
|
#
|
||||||
|
# For more information you can look at git-blame(1) man page.
|
||||||
|
|
||||||
|
# Changed tabs to spaces in code [#CLICKHOUSE-3]
|
||||||
|
137ad95929ee016cc6d3c03bccb5586941c163ff
|
||||||
|
|
||||||
|
# dbms/ → src/
|
||||||
|
# (though it is unlikely that you will see it in blame)
|
||||||
|
06446b4f08a142d6f1bc30664c47ded88ab51782
|
139
.github/workflows/backport_branches.yml
vendored
139
.github/workflows/backport_branches.yml
vendored
@ -349,6 +349,100 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
|
BuilderBinDarwin:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH=${{runner.temp}}/images_path
|
||||||
|
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH=${{runner.temp}}/../ccaches
|
||||||
|
BUILD_NAME=binary_darwin
|
||||||
|
EOF
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ env.IMAGES_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule sync --recursive
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME"
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_URLS }}
|
||||||
|
path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
|
BuilderBinDarwinAarch64:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH=${{runner.temp}}/images_path
|
||||||
|
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH=${{runner.temp}}/../ccaches
|
||||||
|
BUILD_NAME=binary_darwin_aarch64
|
||||||
|
EOF
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ env.IMAGES_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule sync --recursive
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME"
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_URLS }}
|
||||||
|
path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
############################################################################################
|
############################################################################################
|
||||||
##################################### Docker images #######################################
|
##################################### Docker images #######################################
|
||||||
############################################################################################
|
############################################################################################
|
||||||
@ -425,6 +519,46 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
BuilderSpecialReport:
|
||||||
|
needs:
|
||||||
|
- BuilderBinDarwin
|
||||||
|
- BuilderBinDarwinAarch64
|
||||||
|
runs-on: [self-hosted, style-checker]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/report_check
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=ClickHouse special build check
|
||||||
|
NEEDS_DATA_PATH=${{runner.temp}}/needs.json
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Report Builder
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cat > "$NEEDS_DATA_PATH" << 'EOF'
|
||||||
|
${{ toJSON(needs) }}
|
||||||
|
EOF
|
||||||
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
||||||
|
python3 build_report_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
##############################################################################################
|
##############################################################################################
|
||||||
########################### FUNCTIONAl STATELESS TESTS #######################################
|
########################### FUNCTIONAl STATELESS TESTS #######################################
|
||||||
##############################################################################################
|
##############################################################################################
|
||||||
@ -437,7 +571,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_debug
|
TEMP_PATH=${{runner.temp}}/stateless_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (address)
|
CHECK_NAME=Stateless tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
EOF
|
EOF
|
||||||
@ -521,7 +655,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_thread
|
TEMP_PATH=${{runner.temp}}/stress_thread
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (thread)
|
CHECK_NAME=Stress test (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -592,6 +726,7 @@ jobs:
|
|||||||
- DockerHubPush
|
- DockerHubPush
|
||||||
- DockerServerImages
|
- DockerServerImages
|
||||||
- BuilderReport
|
- BuilderReport
|
||||||
|
- BuilderSpecialReport
|
||||||
- FunctionalStatelessTestAsan
|
- FunctionalStatelessTestAsan
|
||||||
- FunctionalStatefulTestDebug
|
- FunctionalStatefulTestDebug
|
||||||
- StressTestTsan
|
- StressTestTsan
|
||||||
|
1
.github/workflows/docs_release.yml
vendored
1
.github/workflows/docs_release.yml
vendored
@ -13,7 +13,6 @@ concurrency:
|
|||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
- 'benchmark/**'
|
|
||||||
- 'docker/docs/release/**'
|
- 'docker/docs/release/**'
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- 'utils/list-versions/version_date.tsv'
|
- 'utils/list-versions/version_date.tsv'
|
||||||
|
226
.github/workflows/master.yml
vendored
226
.github/workflows/master.yml
vendored
@ -151,8 +151,8 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
SplitBuildSmokeTest:
|
SharedBuildSmokeTest:
|
||||||
needs: [BuilderDebSplitted]
|
needs: [BuilderDebShared]
|
||||||
runs-on: [self-hosted, style-checker]
|
runs-on: [self-hosted, style-checker]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -171,7 +171,7 @@ jobs:
|
|||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ env.REPORTS_PATH }}
|
path: ${{ env.REPORTS_PATH }}
|
||||||
- name: Split build check
|
- name: Shared build check
|
||||||
run: |
|
run: |
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
mkdir -p "$TEMP_PATH"
|
mkdir -p "$TEMP_PATH"
|
||||||
@ -598,7 +598,7 @@ jobs:
|
|||||||
##########################################################################################
|
##########################################################################################
|
||||||
##################################### SPECIAL BUILDS #####################################
|
##################################### SPECIAL BUILDS #####################################
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
BuilderDebSplitted:
|
BuilderDebShared:
|
||||||
needs: [DockerHubPush]
|
needs: [DockerHubPush]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
@ -609,7 +609,7 @@ jobs:
|
|||||||
IMAGES_PATH=${{runner.temp}}/images_path
|
IMAGES_PATH=${{runner.temp}}/images_path
|
||||||
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
||||||
CACHES_PATH=${{runner.temp}}/../ccaches
|
CACHES_PATH=${{runner.temp}}/../ccaches
|
||||||
BUILD_NAME=binary_splitted
|
BUILD_NAME=binary_shared
|
||||||
EOF
|
EOF
|
||||||
- name: Download changed images
|
- name: Download changed images
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
@ -923,6 +923,53 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
|
BuilderBinAmd64SSE2:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH=${{runner.temp}}/images_path
|
||||||
|
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH=${{runner.temp}}/../ccaches
|
||||||
|
BUILD_NAME=binary_amd64sse2
|
||||||
|
EOF
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ env.IMAGES_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule sync --recursive
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME"
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_URLS }}
|
||||||
|
path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
############################################################################################
|
############################################################################################
|
||||||
##################################### Docker images #######################################
|
##################################### Docker images #######################################
|
||||||
############################################################################################
|
############################################################################################
|
||||||
@ -1011,8 +1058,9 @@ jobs:
|
|||||||
- BuilderBinFreeBSD
|
- BuilderBinFreeBSD
|
||||||
# - BuilderBinGCC
|
# - BuilderBinGCC
|
||||||
- BuilderBinPPC64
|
- BuilderBinPPC64
|
||||||
|
- BuilderBinAmd64SSE2
|
||||||
- BuilderBinClangTidy
|
- BuilderBinClangTidy
|
||||||
- BuilderDebSplitted
|
- BuilderDebShared
|
||||||
runs-on: [self-hosted, style-checker]
|
runs-on: [self-hosted, style-checker]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -1126,6 +1174,84 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
FunctionalStatelessTestReleaseDatabaseReplicated0:
|
||||||
|
needs: [BuilderDebRelease]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/stateless_database_replicated
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=Stateless tests (release, DatabaseReplicated)
|
||||||
|
REPO_COPY=${{runner.temp}}/stateless_database_replicated/ClickHouse
|
||||||
|
KILL_TIMEOUT=10800
|
||||||
|
RUN_BY_HASH_NUM=0
|
||||||
|
RUN_BY_HASH_TOTAL=2
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci"
|
||||||
|
python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
FunctionalStatelessTestReleaseDatabaseReplicated1:
|
||||||
|
needs: [BuilderDebRelease]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/stateless_database_replicated
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=Stateless tests (release, DatabaseReplicated)
|
||||||
|
REPO_COPY=${{runner.temp}}/stateless_database_replicated/ClickHouse
|
||||||
|
KILL_TIMEOUT=10800
|
||||||
|
RUN_BY_HASH_NUM=1
|
||||||
|
RUN_BY_HASH_TOTAL=2
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci"
|
||||||
|
python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
FunctionalStatelessTestReleaseS3:
|
FunctionalStatelessTestReleaseS3:
|
||||||
needs: [BuilderDebRelease]
|
needs: [BuilderDebRelease]
|
||||||
runs-on: [self-hosted, func-tester]
|
runs-on: [self-hosted, func-tester]
|
||||||
@ -1209,7 +1335,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_debug
|
TEMP_PATH=${{runner.temp}}/stateless_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (address)
|
CHECK_NAME=Stateless tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
@ -1248,7 +1374,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_debug
|
TEMP_PATH=${{runner.temp}}/stateless_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (address)
|
CHECK_NAME=Stateless tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
@ -1287,7 +1413,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (thread)
|
CHECK_NAME=Stateless tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
@ -1326,7 +1452,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (thread)
|
CHECK_NAME=Stateless tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
@ -1365,7 +1491,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (thread)
|
CHECK_NAME=Stateless tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=2
|
RUN_BY_HASH_NUM=2
|
||||||
@ -1441,7 +1567,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_memory
|
TEMP_PATH=${{runner.temp}}/stateless_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (memory)
|
CHECK_NAME=Stateless tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
@ -1480,7 +1606,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_memory
|
TEMP_PATH=${{runner.temp}}/stateless_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (memory)
|
CHECK_NAME=Stateless tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
@ -1519,7 +1645,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_memory
|
TEMP_PATH=${{runner.temp}}/stateless_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (memory)
|
CHECK_NAME=Stateless tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=2
|
RUN_BY_HASH_NUM=2
|
||||||
@ -1706,43 +1832,6 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
FunctionalStatefulTestReleaseDatabaseOrdinary:
|
|
||||||
needs: [BuilderDebRelease]
|
|
||||||
runs-on: [self-hosted, func-tester]
|
|
||||||
steps:
|
|
||||||
- name: Set envs
|
|
||||||
run: |
|
|
||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_release_database_ordinary
|
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
|
||||||
CHECK_NAME=Stateful tests (release, DatabaseOrdinary)
|
|
||||||
REPO_COPY=${{runner.temp}}/stateful_release_database_ordinary/ClickHouse
|
|
||||||
KILL_TIMEOUT=3600
|
|
||||||
EOF
|
|
||||||
- name: Download json reports
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
path: ${{ env.REPORTS_PATH }}
|
|
||||||
- name: Clear repository
|
|
||||||
run: |
|
|
||||||
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
||||||
- name: Check out repository code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Functional test
|
|
||||||
run: |
|
|
||||||
sudo rm -fr "$TEMP_PATH"
|
|
||||||
mkdir -p "$TEMP_PATH"
|
|
||||||
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
|
||||||
cd "$REPO_COPY/tests/ci"
|
|
||||||
python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT"
|
|
||||||
- name: Cleanup
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
docker kill $(docker ps -q) ||:
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
|
||||||
sudo rm -fr "$TEMP_PATH"
|
|
||||||
FunctionalStatefulTestAarch64:
|
FunctionalStatefulTestAarch64:
|
||||||
needs: [BuilderDebAarch64]
|
needs: [BuilderDebAarch64]
|
||||||
runs-on: [self-hosted, func-tester-aarch64]
|
runs-on: [self-hosted, func-tester-aarch64]
|
||||||
@ -1789,7 +1878,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_debug
|
TEMP_PATH=${{runner.temp}}/stateful_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateful tests (address)
|
CHECK_NAME=Stateful tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateful_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateful_debug/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -1826,7 +1915,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_tsan
|
TEMP_PATH=${{runner.temp}}/stateful_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateful tests (thread)
|
CHECK_NAME=Stateful tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateful_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateful_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -1863,7 +1952,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_msan
|
TEMP_PATH=${{runner.temp}}/stateful_msan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateful tests (memory)
|
CHECK_NAME=Stateful tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateful_msan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateful_msan/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -1977,7 +2066,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_thread
|
TEMP_PATH=${{runner.temp}}/stress_thread
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (address)
|
CHECK_NAME=Stress test (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2017,7 +2106,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_thread
|
TEMP_PATH=${{runner.temp}}/stress_thread
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (thread)
|
CHECK_NAME=Stress test (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2053,7 +2142,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_memory
|
TEMP_PATH=${{runner.temp}}/stress_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (memory)
|
CHECK_NAME=Stress test (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_memory/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2089,7 +2178,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_undefined
|
TEMP_PATH=${{runner.temp}}/stress_undefined
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (undefined)
|
CHECK_NAME=Stress test (ubsan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_undefined/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_undefined/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2278,7 +2367,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -2316,7 +2405,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -2354,7 +2443,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=2
|
RUN_BY_HASH_NUM=2
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -2392,7 +2481,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=3
|
RUN_BY_HASH_NUM=3
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -2509,7 +2598,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/ast_fuzzer_asan
|
TEMP_PATH=${{runner.temp}}/ast_fuzzer_asan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=AST fuzzer (ASan)
|
CHECK_NAME=AST fuzzer (asan)
|
||||||
REPO_COPY=${{runner.temp}}/ast_fuzzer_asan/ClickHouse
|
REPO_COPY=${{runner.temp}}/ast_fuzzer_asan/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2545,7 +2634,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/ast_fuzzer_tsan
|
TEMP_PATH=${{runner.temp}}/ast_fuzzer_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=AST fuzzer (TSan)
|
CHECK_NAME=AST fuzzer (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/ast_fuzzer_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/ast_fuzzer_tsan/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2581,7 +2670,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/ast_fuzzer_ubsan
|
TEMP_PATH=${{runner.temp}}/ast_fuzzer_ubsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=AST fuzzer (UBSan)
|
CHECK_NAME=AST fuzzer (ubsan)
|
||||||
REPO_COPY=${{runner.temp}}/ast_fuzzer_ubsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/ast_fuzzer_ubsan/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2617,7 +2706,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/ast_fuzzer_msan
|
TEMP_PATH=${{runner.temp}}/ast_fuzzer_msan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=AST fuzzer (MSan)
|
CHECK_NAME=AST fuzzer (msan)
|
||||||
REPO_COPY=${{runner.temp}}/ast_fuzzer_msan/ClickHouse
|
REPO_COPY=${{runner.temp}}/ast_fuzzer_msan/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -3063,6 +3152,8 @@ jobs:
|
|||||||
- FunctionalStatelessTestDebug2
|
- FunctionalStatelessTestDebug2
|
||||||
- FunctionalStatelessTestRelease
|
- FunctionalStatelessTestRelease
|
||||||
- FunctionalStatelessTestReleaseDatabaseOrdinary
|
- FunctionalStatelessTestReleaseDatabaseOrdinary
|
||||||
|
- FunctionalStatelessTestReleaseDatabaseReplicated0
|
||||||
|
- FunctionalStatelessTestReleaseDatabaseReplicated1
|
||||||
- FunctionalStatelessTestAarch64
|
- FunctionalStatelessTestAarch64
|
||||||
- FunctionalStatelessTestAsan0
|
- FunctionalStatelessTestAsan0
|
||||||
- FunctionalStatelessTestAsan1
|
- FunctionalStatelessTestAsan1
|
||||||
@ -3075,7 +3166,6 @@ jobs:
|
|||||||
- FunctionalStatelessTestUBsan
|
- FunctionalStatelessTestUBsan
|
||||||
- FunctionalStatefulTestDebug
|
- FunctionalStatefulTestDebug
|
||||||
- FunctionalStatefulTestRelease
|
- FunctionalStatefulTestRelease
|
||||||
- FunctionalStatefulTestReleaseDatabaseOrdinary
|
|
||||||
- FunctionalStatelessTestReleaseS3
|
- FunctionalStatelessTestReleaseS3
|
||||||
- FunctionalStatefulTestAarch64
|
- FunctionalStatefulTestAarch64
|
||||||
- FunctionalStatefulTestAsan
|
- FunctionalStatefulTestAsan
|
||||||
@ -3111,7 +3201,7 @@ jobs:
|
|||||||
- UnitTestsMsan
|
- UnitTestsMsan
|
||||||
- UnitTestsUBsan
|
- UnitTestsUBsan
|
||||||
- UnitTestsReleaseClang
|
- UnitTestsReleaseClang
|
||||||
- SplitBuildSmokeTest
|
- SharedBuildSmokeTest
|
||||||
runs-on: [self-hosted, style-checker]
|
runs-on: [self-hosted, style-checker]
|
||||||
steps:
|
steps:
|
||||||
- name: Clear repository
|
- name: Clear repository
|
||||||
|
452
.github/workflows/pull_request.yml
vendored
452
.github/workflows/pull_request.yml
vendored
@ -216,8 +216,8 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
SplitBuildSmokeTest:
|
SharedBuildSmokeTest:
|
||||||
needs: [BuilderDebSplitted]
|
needs: [BuilderDebShared]
|
||||||
runs-on: [self-hosted, style-checker]
|
runs-on: [self-hosted, style-checker]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -236,7 +236,7 @@ jobs:
|
|||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ env.REPORTS_PATH }}
|
path: ${{ env.REPORTS_PATH }}
|
||||||
- name: Split build check
|
- name: Shared build check
|
||||||
run: |
|
run: |
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
mkdir -p "$TEMP_PATH"
|
mkdir -p "$TEMP_PATH"
|
||||||
@ -254,7 +254,7 @@ jobs:
|
|||||||
#################################### ORDINARY BUILDS ####################################
|
#################################### ORDINARY BUILDS ####################################
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
BuilderDebRelease:
|
BuilderDebRelease:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -301,7 +301,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
BuilderBinRelease:
|
BuilderBinRelease:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -345,53 +345,8 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
# BuilderBinGCC:
|
|
||||||
# needs: [DockerHubPush, FastTest]
|
|
||||||
# runs-on: [self-hosted, builder]
|
|
||||||
# steps:
|
|
||||||
# - name: Set envs
|
|
||||||
# run: |
|
|
||||||
# cat >> "$GITHUB_ENV" << 'EOF'
|
|
||||||
# TEMP_PATH=${{runner.temp}}/build_check
|
|
||||||
# IMAGES_PATH=${{runner.temp}}/images_path
|
|
||||||
# REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
|
||||||
# CACHES_PATH=${{runner.temp}}/../ccaches
|
|
||||||
# BUILD_NAME=binary_gcc
|
|
||||||
# EOF
|
|
||||||
# - name: Download changed images
|
|
||||||
# uses: actions/download-artifact@v2
|
|
||||||
# with:
|
|
||||||
# name: changed_images
|
|
||||||
# path: ${{ runner.temp }}/images_path
|
|
||||||
# - name: Clear repository
|
|
||||||
# run: |
|
|
||||||
# sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
||||||
# - name: Check out repository code
|
|
||||||
# uses: actions/checkout@v2
|
|
||||||
# - name: Build
|
|
||||||
# run: |
|
|
||||||
# git -C "$GITHUB_WORKSPACE" submodule sync --recursive
|
|
||||||
# git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10
|
|
||||||
# sudo rm -fr "$TEMP_PATH"
|
|
||||||
# mkdir -p "$TEMP_PATH"
|
|
||||||
# cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
|
||||||
# cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME"
|
|
||||||
# - name: Upload build URLs to artifacts
|
|
||||||
# if: ${{ success() || failure() }}
|
|
||||||
# uses: actions/upload-artifact@v2
|
|
||||||
# with:
|
|
||||||
# name: ${{ env.BUILD_URLS }}
|
|
||||||
# path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json
|
|
||||||
# - name: Cleanup
|
|
||||||
# if: always()
|
|
||||||
# run: |
|
|
||||||
# # shellcheck disable=SC2046
|
|
||||||
# docker kill $(docker ps -q) ||:
|
|
||||||
# # shellcheck disable=SC2046
|
|
||||||
# docker rm -f $(docker ps -a -q) ||:
|
|
||||||
# sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
|
||||||
BuilderDebAarch64:
|
BuilderDebAarch64:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -438,7 +393,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderDebAsan:
|
BuilderDebAsan:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -483,7 +438,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderDebUBsan:
|
BuilderDebUBsan:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -528,7 +483,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderDebTsan:
|
BuilderDebTsan:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -573,7 +528,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderDebMsan:
|
BuilderDebMsan:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -618,7 +573,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderDebDebug:
|
BuilderDebDebug:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -665,8 +620,8 @@ jobs:
|
|||||||
##########################################################################################
|
##########################################################################################
|
||||||
##################################### SPECIAL BUILDS #####################################
|
##################################### SPECIAL BUILDS #####################################
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
BuilderDebSplitted:
|
BuilderDebShared:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -676,7 +631,7 @@ jobs:
|
|||||||
IMAGES_PATH=${{runner.temp}}/images_path
|
IMAGES_PATH=${{runner.temp}}/images_path
|
||||||
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
||||||
CACHES_PATH=${{runner.temp}}/../ccaches
|
CACHES_PATH=${{runner.temp}}/../ccaches
|
||||||
BUILD_NAME=binary_splitted
|
BUILD_NAME=binary_shared
|
||||||
EOF
|
EOF
|
||||||
- name: Download changed images
|
- name: Download changed images
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
@ -711,7 +666,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderBinClangTidy:
|
BuilderBinClangTidy:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -756,7 +711,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderBinDarwin:
|
BuilderBinDarwin:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -801,7 +756,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderBinAarch64:
|
BuilderBinAarch64:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -846,7 +801,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderBinFreeBSD:
|
BuilderBinFreeBSD:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -891,7 +846,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderBinDarwinAarch64:
|
BuilderBinDarwinAarch64:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -936,7 +891,7 @@ jobs:
|
|||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
BuilderBinPPC64:
|
BuilderBinPPC64:
|
||||||
needs: [DockerHubPush, FastTest]
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
runs-on: [self-hosted, builder]
|
runs-on: [self-hosted, builder]
|
||||||
steps:
|
steps:
|
||||||
- name: Set envs
|
- name: Set envs
|
||||||
@ -980,6 +935,51 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
|
BuilderBinAmd64SSE2:
|
||||||
|
needs: [DockerHubPush, FastTest, StyleCheck]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH=${{runner.temp}}/images_path
|
||||||
|
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH=${{runner.temp}}/../ccaches
|
||||||
|
BUILD_NAME=binary_amd64sse2
|
||||||
|
EOF
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ env.IMAGES_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule sync --recursive
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME"
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_URLS }}
|
||||||
|
path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
############################################################################################
|
############################################################################################
|
||||||
##################################### Docker images #######################################
|
##################################### Docker images #######################################
|
||||||
############################################################################################
|
############################################################################################
|
||||||
@ -1068,8 +1068,9 @@ jobs:
|
|||||||
- BuilderBinFreeBSD
|
- BuilderBinFreeBSD
|
||||||
# - BuilderBinGCC
|
# - BuilderBinGCC
|
||||||
- BuilderBinPPC64
|
- BuilderBinPPC64
|
||||||
|
- BuilderBinAmd64SSE2
|
||||||
- BuilderBinClangTidy
|
- BuilderBinClangTidy
|
||||||
- BuilderDebSplitted
|
- BuilderDebShared
|
||||||
runs-on: [self-hosted, style-checker]
|
runs-on: [self-hosted, style-checker]
|
||||||
if: ${{ success() || failure() }}
|
if: ${{ success() || failure() }}
|
||||||
steps:
|
steps:
|
||||||
@ -1299,6 +1300,228 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
FunctionalStatelessTestS3Debug0:
|
||||||
|
needs: [BuilderDebDebug]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/stateless_s3_storage_debug
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=Stateless tests (debug, s3 storage)
|
||||||
|
REPO_COPY=${{runner.temp}}/stateless_s3_storage_debug/ClickHouse
|
||||||
|
KILL_TIMEOUT=10800
|
||||||
|
RUN_BY_HASH_NUM=0
|
||||||
|
RUN_BY_HASH_TOTAL=3
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci"
|
||||||
|
python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill "$(docker ps -q)" ||:
|
||||||
|
docker rm -f "$(docker ps -a -q)" ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
FunctionalStatelessTestS3Debug1:
|
||||||
|
needs: [BuilderDebDebug]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/stateless_s3_storage_debug
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=Stateless tests (debug, s3 storage)
|
||||||
|
REPO_COPY=${{runner.temp}}/stateless_s3_storage_debug/ClickHouse
|
||||||
|
KILL_TIMEOUT=10800
|
||||||
|
RUN_BY_HASH_NUM=1
|
||||||
|
RUN_BY_HASH_TOTAL=3
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci"
|
||||||
|
python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill "$(docker ps -q)" ||:
|
||||||
|
docker rm -f "$(docker ps -a -q)" ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
FunctionalStatelessTestS3Debug2:
|
||||||
|
needs: [BuilderDebDebug]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/stateless_s3_storage_debug
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=Stateless tests (debug, s3 storage)
|
||||||
|
REPO_COPY=${{runner.temp}}/stateless_s3_storage_debug/ClickHouse
|
||||||
|
KILL_TIMEOUT=10800
|
||||||
|
RUN_BY_HASH_NUM=2
|
||||||
|
RUN_BY_HASH_TOTAL=3
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci"
|
||||||
|
python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill "$(docker ps -q)" ||:
|
||||||
|
docker rm -f "$(docker ps -a -q)" ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
FunctionalStatelessTestS3Tsan0:
|
||||||
|
needs: [BuilderDebTsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/stateless_s3_storage_tsan
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=Stateless tests (tsan, s3 storage)
|
||||||
|
REPO_COPY=${{runner.temp}}/stateless_s3_storage_tsan/ClickHouse
|
||||||
|
KILL_TIMEOUT=10800
|
||||||
|
RUN_BY_HASH_NUM=0
|
||||||
|
RUN_BY_HASH_TOTAL=3
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci"
|
||||||
|
python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill "$(docker ps -q)" ||:
|
||||||
|
docker rm -f "$(docker ps -a -q)" ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
FunctionalStatelessTestS3Tsan1:
|
||||||
|
needs: [BuilderDebTsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/stateless_s3_storage_tsan
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=Stateless tests (tsan, s3 storage)
|
||||||
|
REPO_COPY=${{runner.temp}}/stateless_s3_storage_tsan/ClickHouse
|
||||||
|
KILL_TIMEOUT=10800
|
||||||
|
RUN_BY_HASH_NUM=1
|
||||||
|
RUN_BY_HASH_TOTAL=3
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci"
|
||||||
|
python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill "$(docker ps -q)" ||:
|
||||||
|
docker rm -f "$(docker ps -a -q)" ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
FunctionalStatelessTestS3Tsan2:
|
||||||
|
needs: [BuilderDebTsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/stateless_s3_storage_tsan
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=Stateless tests (tsan, s3 storage)
|
||||||
|
REPO_COPY=${{runner.temp}}/stateless_s3_storage_tsan/ClickHouse
|
||||||
|
KILL_TIMEOUT=10800
|
||||||
|
RUN_BY_HASH_NUM=2
|
||||||
|
RUN_BY_HASH_TOTAL=3
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci"
|
||||||
|
python3 functional_test_check.py "$CHECK_NAME" "$KILL_TIMEOUT"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill "$(docker ps -q)" ||:
|
||||||
|
docker rm -f "$(docker ps -a -q)" ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
FunctionalStatelessTestAarch64:
|
FunctionalStatelessTestAarch64:
|
||||||
needs: [BuilderDebAarch64]
|
needs: [BuilderDebAarch64]
|
||||||
runs-on: [self-hosted, func-tester-aarch64]
|
runs-on: [self-hosted, func-tester-aarch64]
|
||||||
@ -1345,7 +1568,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_debug
|
TEMP_PATH=${{runner.temp}}/stateless_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (address)
|
CHECK_NAME=Stateless tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
@ -1384,7 +1607,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_debug
|
TEMP_PATH=${{runner.temp}}/stateless_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (address)
|
CHECK_NAME=Stateless tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
@ -1423,7 +1646,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (thread)
|
CHECK_NAME=Stateless tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
@ -1462,7 +1685,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (thread)
|
CHECK_NAME=Stateless tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
@ -1501,7 +1724,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (thread)
|
CHECK_NAME=Stateless tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=2
|
RUN_BY_HASH_NUM=2
|
||||||
@ -1577,7 +1800,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_memory
|
TEMP_PATH=${{runner.temp}}/stateless_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (memory)
|
CHECK_NAME=Stateless tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
@ -1616,7 +1839,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_memory
|
TEMP_PATH=${{runner.temp}}/stateless_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (memory)
|
CHECK_NAME=Stateless tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
@ -1655,7 +1878,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_memory
|
TEMP_PATH=${{runner.temp}}/stateless_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (memory)
|
CHECK_NAME=Stateless tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=2
|
RUN_BY_HASH_NUM=2
|
||||||
@ -1811,7 +2034,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_flaky_asan
|
TEMP_PATH=${{runner.temp}}/stateless_flaky_asan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests flaky check (address)
|
CHECK_NAME=Stateless tests flaky check (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_flaky_asan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_flaky_asan/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -1972,7 +2195,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_debug
|
TEMP_PATH=${{runner.temp}}/stateful_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateful tests (address)
|
CHECK_NAME=Stateful tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateful_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateful_debug/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -2009,7 +2232,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_tsan
|
TEMP_PATH=${{runner.temp}}/stateful_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateful tests (thread)
|
CHECK_NAME=Stateful tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateful_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateful_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -2046,7 +2269,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_msan
|
TEMP_PATH=${{runner.temp}}/stateful_msan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateful tests (memory)
|
CHECK_NAME=Stateful tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateful_msan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateful_msan/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -2160,7 +2383,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_thread
|
TEMP_PATH=${{runner.temp}}/stress_thread
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (address)
|
CHECK_NAME=Stress test (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2200,7 +2423,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_thread
|
TEMP_PATH=${{runner.temp}}/stress_thread
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (thread)
|
CHECK_NAME=Stress test (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2236,7 +2459,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_memory
|
TEMP_PATH=${{runner.temp}}/stress_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (memory)
|
CHECK_NAME=Stress test (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_memory/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2272,7 +2495,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_undefined
|
TEMP_PATH=${{runner.temp}}/stress_undefined
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (undefined)
|
CHECK_NAME=Stress test (ubsan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_undefined/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_undefined/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2347,7 +2570,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/ast_fuzzer_asan
|
TEMP_PATH=${{runner.temp}}/ast_fuzzer_asan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=AST fuzzer (ASan)
|
CHECK_NAME=AST fuzzer (asan)
|
||||||
REPO_COPY=${{runner.temp}}/ast_fuzzer_asan/ClickHouse
|
REPO_COPY=${{runner.temp}}/ast_fuzzer_asan/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2383,7 +2606,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/ast_fuzzer_tsan
|
TEMP_PATH=${{runner.temp}}/ast_fuzzer_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=AST fuzzer (TSan)
|
CHECK_NAME=AST fuzzer (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/ast_fuzzer_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/ast_fuzzer_tsan/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2419,7 +2642,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/ast_fuzzer_ubsan
|
TEMP_PATH=${{runner.temp}}/ast_fuzzer_ubsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=AST fuzzer (UBSan)
|
CHECK_NAME=AST fuzzer (ubsan)
|
||||||
REPO_COPY=${{runner.temp}}/ast_fuzzer_ubsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/ast_fuzzer_ubsan/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2455,7 +2678,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/ast_fuzzer_msan
|
TEMP_PATH=${{runner.temp}}/ast_fuzzer_msan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=AST fuzzer (MSan)
|
CHECK_NAME=AST fuzzer (msan)
|
||||||
REPO_COPY=${{runner.temp}}/ast_fuzzer_msan/ClickHouse
|
REPO_COPY=${{runner.temp}}/ast_fuzzer_msan/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -2644,7 +2867,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -2682,7 +2905,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -2720,7 +2943,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=2
|
RUN_BY_HASH_NUM=2
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -2758,7 +2981,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=3
|
RUN_BY_HASH_NUM=3
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -2974,42 +3197,6 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
# UnitTestsReleaseGCC:
|
|
||||||
# needs: [BuilderBinGCC]
|
|
||||||
# runs-on: [self-hosted, fuzzer-unit-tester]
|
|
||||||
# steps:
|
|
||||||
# - name: Set envs
|
|
||||||
# run: |
|
|
||||||
# cat >> "$GITHUB_ENV" << 'EOF'
|
|
||||||
# TEMP_PATH=${{runner.temp}}/unit_tests_asan
|
|
||||||
# REPORTS_PATH=${{runner.temp}}/reports_dir
|
|
||||||
# CHECK_NAME=Unit tests (release-gcc)
|
|
||||||
# REPO_COPY=${{runner.temp}}/unit_tests_asan/ClickHouse
|
|
||||||
# EOF
|
|
||||||
# - name: Download json reports
|
|
||||||
# uses: actions/download-artifact@v2
|
|
||||||
# with:
|
|
||||||
# path: ${{ env.REPORTS_PATH }}
|
|
||||||
# - name: Clear repository
|
|
||||||
# run: |
|
|
||||||
# sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
||||||
# - name: Check out repository code
|
|
||||||
# uses: actions/checkout@v2
|
|
||||||
# - name: Unit test
|
|
||||||
# run: |
|
|
||||||
# sudo rm -fr "$TEMP_PATH"
|
|
||||||
# mkdir -p "$TEMP_PATH"
|
|
||||||
# cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
|
||||||
# cd "$REPO_COPY/tests/ci"
|
|
||||||
# python3 unit_tests_check.py "$CHECK_NAME"
|
|
||||||
# - name: Cleanup
|
|
||||||
# if: always()
|
|
||||||
# run: |
|
|
||||||
# # shellcheck disable=SC2046
|
|
||||||
# docker kill $(docker ps -q) ||:
|
|
||||||
# # shellcheck disable=SC2046
|
|
||||||
# docker rm -f $(docker ps -a -q) ||:
|
|
||||||
# sudo rm -fr "$TEMP_PATH"
|
|
||||||
UnitTestsTsan:
|
UnitTestsTsan:
|
||||||
needs: [BuilderDebTsan]
|
needs: [BuilderDebTsan]
|
||||||
runs-on: [self-hosted, fuzzer-unit-tester]
|
runs-on: [self-hosted, fuzzer-unit-tester]
|
||||||
@ -3429,6 +3616,10 @@ jobs:
|
|||||||
###################################### JEPSEN TESTS #########################################
|
###################################### JEPSEN TESTS #########################################
|
||||||
#############################################################################################
|
#############################################################################################
|
||||||
Jepsen:
|
Jepsen:
|
||||||
|
# This is special test NOT INCLUDED in FinishCheck
|
||||||
|
# When it's skipped, all dependent tasks will be skipped too.
|
||||||
|
# DO NOT add it there
|
||||||
|
if: contains(github.event.pull_request.labels.*.name, 'jepsen-test')
|
||||||
needs: [BuilderBinRelease]
|
needs: [BuilderBinRelease]
|
||||||
uses: ./.github/workflows/jepsen.yml
|
uses: ./.github/workflows/jepsen.yml
|
||||||
|
|
||||||
@ -3465,6 +3656,12 @@ jobs:
|
|||||||
- FunctionalStatefulTestMsan
|
- FunctionalStatefulTestMsan
|
||||||
- FunctionalStatefulTestUBsan
|
- FunctionalStatefulTestUBsan
|
||||||
- FunctionalStatelessTestReleaseS3
|
- FunctionalStatelessTestReleaseS3
|
||||||
|
- FunctionalStatelessTestS3Debug0
|
||||||
|
- FunctionalStatelessTestS3Debug1
|
||||||
|
- FunctionalStatelessTestS3Debug2
|
||||||
|
- FunctionalStatelessTestS3Tsan0
|
||||||
|
- FunctionalStatelessTestS3Tsan1
|
||||||
|
- FunctionalStatelessTestS3Tsan2
|
||||||
- StressTestDebug
|
- StressTestDebug
|
||||||
- StressTestAsan
|
- StressTestAsan
|
||||||
- StressTestTsan
|
- StressTestTsan
|
||||||
@ -3497,10 +3694,9 @@ jobs:
|
|||||||
- UnitTestsMsan
|
- UnitTestsMsan
|
||||||
- UnitTestsUBsan
|
- UnitTestsUBsan
|
||||||
- UnitTestsReleaseClang
|
- UnitTestsReleaseClang
|
||||||
- SplitBuildSmokeTest
|
- SharedBuildSmokeTest
|
||||||
- CompatibilityCheck
|
- CompatibilityCheck
|
||||||
- IntegrationTestsFlakyCheck
|
- IntegrationTestsFlakyCheck
|
||||||
- Jepsen
|
|
||||||
runs-on: [self-hosted, style-checker]
|
runs-on: [self-hosted, style-checker]
|
||||||
steps:
|
steps:
|
||||||
- name: Clear repository
|
- name: Clear repository
|
||||||
|
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: ReleaseWorkflow
|
name: PublishedReleaseCI
|
||||||
# - Gets artifacts from S3
|
# - Gets artifacts from S3
|
||||||
# - Sends it to JFROG Artifactory
|
# - Sends it to JFROG Artifactory
|
||||||
# - Adds them to the release assets
|
# - Adds them to the release assets
|
||||||
@ -15,7 +15,7 @@ jobs:
|
|||||||
- name: Set envs
|
- name: Set envs
|
||||||
run: |
|
run: |
|
||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
JFROG_API_KEY=${{ secrets.JFROG_KEY_API_PACKAGES }}
|
JFROG_API_KEY=${{ secrets.JFROG_ARTIFACTORY_API_KEY }}
|
||||||
TEMP_PATH=${{runner.temp}}/release_packages
|
TEMP_PATH=${{runner.temp}}/release_packages
|
||||||
REPO_COPY=${{runner.temp}}/release_packages/ClickHouse
|
REPO_COPY=${{runner.temp}}/release_packages/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
@ -29,8 +29,13 @@ jobs:
|
|||||||
rm -rf "$TEMP_PATH" && mkdir -p "$TEMP_PATH"
|
rm -rf "$TEMP_PATH" && mkdir -p "$TEMP_PATH"
|
||||||
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
cd "$REPO_COPY"
|
cd "$REPO_COPY"
|
||||||
python3 ./tests/ci/push_to_artifactory.py --release "${{ github.ref }}" \
|
# Download and push packages to artifactory
|
||||||
--commit '${{ github.sha }}' --all
|
python3 ./tests/ci/push_to_artifactory.py --release '${{ github.ref }}' \
|
||||||
|
--commit '${{ github.sha }}' --artifactory-url '${{ secrets.JFROG_ARTIFACTORY_URL }}' --all
|
||||||
|
# Download macos binaries to ${{runner.temp}}/download_binary
|
||||||
|
python3 ./tests/ci/download_binary.py --version '${{ github.ref }}' \
|
||||||
|
--commit '${{ github.sha }}' binary_darwin binary_darwin_aarch64
|
||||||
|
mv '${{runner.temp}}/download_binary/'clickhouse-* '${{runner.temp}}/push_to_artifactory'
|
||||||
- name: Upload packages to release assets
|
- name: Upload packages to release assets
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
|
175
.github/workflows/release_branches.yml
vendored
175
.github/workflows/release_branches.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: ReleaseCI
|
name: ReleaseBranchCI
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Force the stdout and stderr streams to be unbuffered
|
# Force the stdout and stderr streams to be unbuffered
|
||||||
@ -426,6 +426,100 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
|
BuilderBinDarwin:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH=${{runner.temp}}/images_path
|
||||||
|
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH=${{runner.temp}}/../ccaches
|
||||||
|
BUILD_NAME=binary_darwin
|
||||||
|
EOF
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ env.IMAGES_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule sync --recursive
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME"
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_URLS }}
|
||||||
|
path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
|
BuilderBinDarwinAarch64:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH=${{runner.temp}}/images_path
|
||||||
|
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH=${{runner.temp}}/../ccaches
|
||||||
|
BUILD_NAME=binary_darwin_aarch64
|
||||||
|
EOF
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ env.IMAGES_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule sync --recursive
|
||||||
|
git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --recursive --init --jobs=10
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||||
|
cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME"
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_URLS }}
|
||||||
|
path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||||
############################################################################################
|
############################################################################################
|
||||||
##################################### Docker images #######################################
|
##################################### Docker images #######################################
|
||||||
############################################################################################
|
############################################################################################
|
||||||
@ -505,6 +599,46 @@ jobs:
|
|||||||
# shellcheck disable=SC2046
|
# shellcheck disable=SC2046
|
||||||
docker rm -f $(docker ps -a -q) ||:
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
sudo rm -fr "$TEMP_PATH"
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
BuilderSpecialReport:
|
||||||
|
needs:
|
||||||
|
- BuilderBinDarwin
|
||||||
|
- BuilderBinDarwinAarch64
|
||||||
|
runs-on: [self-hosted, style-checker]
|
||||||
|
steps:
|
||||||
|
- name: Set envs
|
||||||
|
run: |
|
||||||
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
|
TEMP_PATH=${{runner.temp}}/report_check
|
||||||
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME=ClickHouse special build check
|
||||||
|
NEEDS_DATA_PATH=${{runner.temp}}/needs.json
|
||||||
|
EOF
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPORTS_PATH }}
|
||||||
|
- name: Clear repository
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Report Builder
|
||||||
|
run: |
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
|
mkdir -p "$TEMP_PATH"
|
||||||
|
cat > "$NEEDS_DATA_PATH" << 'EOF'
|
||||||
|
${{ toJSON(needs) }}
|
||||||
|
EOF
|
||||||
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
||||||
|
python3 build_report_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr "$TEMP_PATH"
|
||||||
##############################################################################################
|
##############################################################################################
|
||||||
########################### FUNCTIONAl STATELESS TESTS #######################################
|
########################### FUNCTIONAl STATELESS TESTS #######################################
|
||||||
##############################################################################################
|
##############################################################################################
|
||||||
@ -591,7 +725,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_debug
|
TEMP_PATH=${{runner.temp}}/stateless_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (address)
|
CHECK_NAME=Stateless tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
@ -630,7 +764,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_debug
|
TEMP_PATH=${{runner.temp}}/stateless_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (address)
|
CHECK_NAME=Stateless tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
@ -669,7 +803,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (thread)
|
CHECK_NAME=Stateless tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
@ -708,7 +842,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (thread)
|
CHECK_NAME=Stateless tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
@ -747,7 +881,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
TEMP_PATH=${{runner.temp}}/stateless_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (thread)
|
CHECK_NAME=Stateless tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=2
|
RUN_BY_HASH_NUM=2
|
||||||
@ -823,7 +957,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_memory
|
TEMP_PATH=${{runner.temp}}/stateless_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (memory)
|
CHECK_NAME=Stateless tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
@ -862,7 +996,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_memory
|
TEMP_PATH=${{runner.temp}}/stateless_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (memory)
|
CHECK_NAME=Stateless tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
@ -901,7 +1035,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateless_memory
|
TEMP_PATH=${{runner.temp}}/stateless_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateless tests (memory)
|
CHECK_NAME=Stateless tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
KILL_TIMEOUT=10800
|
KILL_TIMEOUT=10800
|
||||||
RUN_BY_HASH_NUM=2
|
RUN_BY_HASH_NUM=2
|
||||||
@ -1134,7 +1268,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_debug
|
TEMP_PATH=${{runner.temp}}/stateful_debug
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateful tests (address)
|
CHECK_NAME=Stateful tests (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stateful_debug/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateful_debug/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -1171,7 +1305,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_tsan
|
TEMP_PATH=${{runner.temp}}/stateful_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateful tests (thread)
|
CHECK_NAME=Stateful tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stateful_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateful_tsan/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -1208,7 +1342,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stateful_msan
|
TEMP_PATH=${{runner.temp}}/stateful_msan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stateful tests (memory)
|
CHECK_NAME=Stateful tests (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stateful_msan/ClickHouse
|
REPO_COPY=${{runner.temp}}/stateful_msan/ClickHouse
|
||||||
KILL_TIMEOUT=3600
|
KILL_TIMEOUT=3600
|
||||||
EOF
|
EOF
|
||||||
@ -1322,7 +1456,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_thread
|
TEMP_PATH=${{runner.temp}}/stress_thread
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (address)
|
CHECK_NAME=Stress test (asan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -1362,7 +1496,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_thread
|
TEMP_PATH=${{runner.temp}}/stress_thread
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (thread)
|
CHECK_NAME=Stress test (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_thread/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -1398,7 +1532,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_memory
|
TEMP_PATH=${{runner.temp}}/stress_memory
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (memory)
|
CHECK_NAME=Stress test (msan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_memory/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_memory/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -1434,7 +1568,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/stress_undefined
|
TEMP_PATH=${{runner.temp}}/stress_undefined
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Stress test (undefined)
|
CHECK_NAME=Stress test (ubsan)
|
||||||
REPO_COPY=${{runner.temp}}/stress_undefined/ClickHouse
|
REPO_COPY=${{runner.temp}}/stress_undefined/ClickHouse
|
||||||
EOF
|
EOF
|
||||||
- name: Download json reports
|
- name: Download json reports
|
||||||
@ -1623,7 +1757,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=0
|
RUN_BY_HASH_NUM=0
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -1661,7 +1795,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=1
|
RUN_BY_HASH_NUM=1
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -1699,7 +1833,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=2
|
RUN_BY_HASH_NUM=2
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -1737,7 +1871,7 @@ jobs:
|
|||||||
cat >> "$GITHUB_ENV" << 'EOF'
|
cat >> "$GITHUB_ENV" << 'EOF'
|
||||||
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
TEMP_PATH=${{runner.temp}}/integration_tests_tsan
|
||||||
REPORTS_PATH=${{runner.temp}}/reports_dir
|
REPORTS_PATH=${{runner.temp}}/reports_dir
|
||||||
CHECK_NAME=Integration tests (thread)
|
CHECK_NAME=Integration tests (tsan)
|
||||||
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
REPO_COPY=${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
RUN_BY_HASH_NUM=3
|
RUN_BY_HASH_NUM=3
|
||||||
RUN_BY_HASH_TOTAL=4
|
RUN_BY_HASH_TOTAL=4
|
||||||
@ -1847,6 +1981,7 @@ jobs:
|
|||||||
- DockerHubPush
|
- DockerHubPush
|
||||||
- DockerServerImages
|
- DockerServerImages
|
||||||
- BuilderReport
|
- BuilderReport
|
||||||
|
- BuilderSpecialReport
|
||||||
- FunctionalStatelessTestDebug0
|
- FunctionalStatelessTestDebug0
|
||||||
- FunctionalStatelessTestDebug1
|
- FunctionalStatelessTestDebug1
|
||||||
- FunctionalStatelessTestDebug2
|
- FunctionalStatelessTestDebug2
|
||||||
|
21
.github/workflows/tags_stable.yml
vendored
21
.github/workflows/tags_stable.yml
vendored
@ -13,13 +13,24 @@ on: # yamllint disable-line rule:truthy
|
|||||||
- 'v*-prestable'
|
- 'v*-prestable'
|
||||||
- 'v*-stable'
|
- 'v*-stable'
|
||||||
- 'v*-lts'
|
- 'v*-lts'
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: 'Test tag'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
UpdateVersions:
|
UpdateVersions:
|
||||||
runs-on: [self-hosted, style-checker]
|
runs-on: [self-hosted, style-checker]
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set test tag
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
|
run: |
|
||||||
|
echo "GITHUB_TAG=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
|
||||||
- name: Get tag name
|
- name: Get tag name
|
||||||
|
if: github.event_name != 'workflow_dispatch'
|
||||||
run: |
|
run: |
|
||||||
echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV"
|
echo "GITHUB_TAG=${GITHUB_REF#refs/tags/}" >> "$GITHUB_ENV"
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
@ -29,25 +40,29 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Generate versions
|
- name: Generate versions
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
./utils/list-versions/list-versions.sh > ./utils/list-versions/version_date.tsv
|
./utils/list-versions/list-versions.sh > ./utils/list-versions/version_date.tsv
|
||||||
|
./utils/list-versions/update-docker-version.sh
|
||||||
GID=$(id -g "${UID}")
|
GID=$(id -g "${UID}")
|
||||||
docker run -u "${UID}:${GID}" -e PYTHONUNBUFFERED=1 \
|
docker run -u "${UID}:${GID}" -e PYTHONUNBUFFERED=1 \
|
||||||
--volume="${GITHUB_WORKSPACE}:/ClickHouse" clickhouse/style-test \
|
--volume="${GITHUB_WORKSPACE}:/ClickHouse" clickhouse/style-test \
|
||||||
/ClickHouse/utils/changelog/changelog.py -vv --gh-user-or-token="$GITHUB_TOKEN" \
|
/ClickHouse/utils/changelog/changelog.py -v --debug-helpers \
|
||||||
--output="/ClickHouse/docs/changelogs/${GITHUB_TAG}.md" --jobs=5 "${GITHUB_TAG}"
|
--gh-user-or-token="$GITHUB_TOKEN" --jobs=5 \
|
||||||
|
--output="/ClickHouse/docs/changelogs/${GITHUB_TAG}.md" "${GITHUB_TAG}"
|
||||||
git add "./docs/changelogs/${GITHUB_TAG}.md"
|
git add "./docs/changelogs/${GITHUB_TAG}.md"
|
||||||
git diff HEAD
|
git diff HEAD
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
with:
|
with:
|
||||||
author: "robot-clickhouse <robot-clickhouse@users.noreply.github.com>"
|
author: "robot-clickhouse <robot-clickhouse@users.noreply.github.com>"
|
||||||
|
token: ${{ secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN }}
|
||||||
committer: "robot-clickhouse <robot-clickhouse@users.noreply.github.com>"
|
committer: "robot-clickhouse <robot-clickhouse@users.noreply.github.com>"
|
||||||
commit-message: Update version_date.tsv and changelogs after ${{ env.GITHUB_TAG }}
|
commit-message: Update version_date.tsv and changelogs after ${{ env.GITHUB_TAG }}
|
||||||
branch: auto/${{ env.GITHUB_TAG }}
|
branch: auto/${{ env.GITHUB_TAG }}
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
title: Update version_date.tsv and changelogs after ${{ env.GITHUB_TAG }}
|
title: Update version_date.tsv and changelogs after ${{ env.GITHUB_TAG }}
|
||||||
|
labels: do not test
|
||||||
body: |
|
body: |
|
||||||
Update version_date.tsv and changelogs after ${{ env.GITHUB_TAG }}
|
Update version_date.tsv and changelogs after ${{ env.GITHUB_TAG }}
|
||||||
|
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -58,6 +58,10 @@ cmake_install.cmake
|
|||||||
CTestTestfile.cmake
|
CTestTestfile.cmake
|
||||||
*.a
|
*.a
|
||||||
*.o
|
*.o
|
||||||
|
*.so
|
||||||
|
*.dll
|
||||||
|
*.lib
|
||||||
|
*.dylib
|
||||||
cmake-build-*
|
cmake-build-*
|
||||||
|
|
||||||
# Python cache
|
# Python cache
|
||||||
|
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -201,7 +201,7 @@
|
|||||||
[submodule "contrib/boringssl"]
|
[submodule "contrib/boringssl"]
|
||||||
path = contrib/boringssl
|
path = contrib/boringssl
|
||||||
url = https://github.com/ClickHouse/boringssl.git
|
url = https://github.com/ClickHouse/boringssl.git
|
||||||
branch = MergeWithUpstream
|
branch = unknown_branch_from_artur
|
||||||
[submodule "contrib/NuRaft"]
|
[submodule "contrib/NuRaft"]
|
||||||
path = contrib/NuRaft
|
path = contrib/NuRaft
|
||||||
url = https://github.com/ClickHouse/NuRaft.git
|
url = https://github.com/ClickHouse/NuRaft.git
|
||||||
|
145
CHANGELOG.md
145
CHANGELOG.md
@ -1,4 +1,5 @@
|
|||||||
### Table of Contents
|
### Table of Contents
|
||||||
|
**[ClickHouse release v22.8, 2022-08-18](#228)**<br/>
|
||||||
**[ClickHouse release v22.7, 2022-07-21](#227)**<br/>
|
**[ClickHouse release v22.7, 2022-07-21](#227)**<br/>
|
||||||
**[ClickHouse release v22.6, 2022-06-16](#226)**<br/>
|
**[ClickHouse release v22.6, 2022-06-16](#226)**<br/>
|
||||||
**[ClickHouse release v22.5, 2022-05-19](#225)**<br/>
|
**[ClickHouse release v22.5, 2022-05-19](#225)**<br/>
|
||||||
@ -8,6 +9,148 @@
|
|||||||
**[ClickHouse release v22.1, 2022-01-18](#221)**<br/>
|
**[ClickHouse release v22.1, 2022-01-18](#221)**<br/>
|
||||||
**[Changelog for 2021](https://clickhouse.com/docs/en/whats-new/changelog/2021/)**<br/>
|
**[Changelog for 2021](https://clickhouse.com/docs/en/whats-new/changelog/2021/)**<br/>
|
||||||
|
|
||||||
|
|
||||||
|
### <a id="228"></a> ClickHouse release 22.8, 2022-08-18
|
||||||
|
|
||||||
|
#### Backward Incompatible Change
|
||||||
|
* Extended range of `Date32` and `DateTime64` to support dates from the year 1900 to 2299. In previous versions, the supported interval was only from the year 1925 to 2283. The implementation is using the proleptic Gregorian calendar (which is conformant with [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601):2004 (clause 3.2.1 The Gregorian calendar)) instead of accounting for historical transitions from the Julian to the Gregorian calendar. This change affects implementation-specific behavior for out-of-range arguments. E.g. if in previous versions the value of `1899-01-01` was clamped to `1925-01-01`, in the new version it will be clamped to `1900-01-01`. It changes the behavior of rounding with `toStartOfInterval` if you pass `INTERVAL 3 QUARTER` up to one quarter because the intervals are counted from an implementation-specific point of time. Closes [#28216](https://github.com/ClickHouse/ClickHouse/issues/28216), improves [#38393](https://github.com/ClickHouse/ClickHouse/issues/38393). [#39425](https://github.com/ClickHouse/ClickHouse/pull/39425) ([Roman Vasin](https://github.com/rvasin)).
|
||||||
|
* Now, all relevant dictionary sources respect `remote_url_allow_hosts` setting. It was already done for HTTP, Cassandra, Redis. Added ClickHouse, MongoDB, MySQL, PostgreSQL. Host is checked only for dictionaries created from DDL. [#39184](https://github.com/ClickHouse/ClickHouse/pull/39184) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* Make the remote filesystem cache composable, allow not to evict certain files (regarding idx, mrk, ..), delete old cache version. Now it is possible to configure cache over Azure blob storage disk, over Local disk, over StaticWeb disk, etc. This PR is marked backward incompatible because cache configuration changes and in order for cache to work need to update the config file. Old cache will still be used with new configuration. The server will startup fine with the old cache configuration. Closes https://github.com/ClickHouse/ClickHouse/issues/36140. Closes https://github.com/ClickHouse/ClickHouse/issues/37889. ([Kseniia Sumarokova](https://github.com/kssenii)). [#36171](https://github.com/ClickHouse/ClickHouse/pull/36171))
|
||||||
|
|
||||||
|
#### New Feature
|
||||||
|
* Query parameters can be set in interactive mode as `SET param_abc = 'def'` and transferred via the native protocol as settings. [#39906](https://github.com/ClickHouse/ClickHouse/pull/39906) ([Nikita Taranov](https://github.com/nickitat)).
|
||||||
|
* Quota key can be set in the native protocol ([Yakov Olkhovsky](https://github.com/ClickHouse/ClickHouse/pull/39874)).
|
||||||
|
* Added a setting `exact_rows_before_limit` (0/1). When enabled, ClickHouse will provide exact value for `rows_before_limit_at_least` statistic, but with the cost that the data before limit will have to be read completely. This closes [#6613](https://github.com/ClickHouse/ClickHouse/issues/6613). [#25333](https://github.com/ClickHouse/ClickHouse/pull/25333) ([kevin wan](https://github.com/MaxWk)).
|
||||||
|
* Added support for parallel distributed insert select with `s3Cluster` table function into tables with `Distributed` and `Replicated` engine [#34670](https://github.com/ClickHouse/ClickHouse/issues/34670). [#39107](https://github.com/ClickHouse/ClickHouse/pull/39107) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
|
||||||
|
* Add new settings to control schema inference from text formats: - `input_format_try_infer_dates` - try infer dates from strings. - `input_format_try_infer_datetimes` - try infer datetimes from strings. - `input_format_try_infer_integers` - try infer `Int64` instead of `Float64`. - `input_format_json_try_infer_numbers_from_strings` - try infer numbers from json strings in JSON formats. [#39186](https://github.com/ClickHouse/ClickHouse/pull/39186) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* An option to provide JSON formatted log output. The purpose is to allow easier ingestion and query in log analysis tools. [#39277](https://github.com/ClickHouse/ClickHouse/pull/39277) ([Mallik Hassan](https://github.com/SadiHassan)).
|
||||||
|
* Add function `nowInBlock` which allows getting the current time during long-running and continuous queries. Closes [#39522](https://github.com/ClickHouse/ClickHouse/issues/39522). Notes: there are no functions `now64InBlock` neither `todayInBlock`. [#39533](https://github.com/ClickHouse/ClickHouse/pull/39533) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Add ability to specify settings for an `executable()` table function. [#39681](https://github.com/ClickHouse/ClickHouse/pull/39681) ([Constantine Peresypkin](https://github.com/pkit)).
|
||||||
|
* Implemented automatic conversion of database engine from `Ordinary` to `Atomic`. Create empty `convert_ordinary_to_atomic` file in `flags` directory and all `Ordinary` databases will be converted automatically on next server start. Resolves [#39546](https://github.com/ClickHouse/ClickHouse/issues/39546). [#39933](https://github.com/ClickHouse/ClickHouse/pull/39933) ([Alexander Tokmakov](https://github.com/tavplubix)).
|
||||||
|
* Support `SELECT ... INTO OUTFILE '...' AND STDOUT`. [#37490](https://github.com/ClickHouse/ClickHouse/issues/37490). [#39054](https://github.com/ClickHouse/ClickHouse/pull/39054) ([SmitaRKulkarni](https://github.com/SmitaRKulkarni)).
|
||||||
|
* Add formats `PrettyMonoBlock`, `PrettyNoEscapesMonoBlock`, `PrettyCompactNoEscapes`, `PrettyCompactNoEscapesMonoBlock`, `PrettySpaceNoEscapes`, `PrettySpaceMonoBlock`, `PrettySpaceNoEscapesMonoBlock`. [#39646](https://github.com/ClickHouse/ClickHouse/pull/39646) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Add new setting schema_inference_hints that allows to specify structure hints in schema inference for specific columns. Closes [#39569](https://github.com/ClickHouse/ClickHouse/issues/39569). [#40068](https://github.com/ClickHouse/ClickHouse/pull/40068) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
|
||||||
|
#### Experimental Feature
|
||||||
|
* Support SQL standard DELETE FROM syntax on merge tree tables and lightweight delete implementation for merge tree families. [#37893](https://github.com/ClickHouse/ClickHouse/pull/37893) ([Jianmei Zhang](https://github.com/zhangjmruc)) ([Alexander Gololobov](https://github.com/davenger)). Note: this new feature does not make ClickHouse an HTAP DBMS.
|
||||||
|
|
||||||
|
#### Performance Improvement
|
||||||
|
* Improved memory usage during memory efficient merging of aggregation results. [#39429](https://github.com/ClickHouse/ClickHouse/pull/39429) ([Nikita Taranov](https://github.com/nickitat)).
|
||||||
|
* Added concurrency control logic to limit total number of concurrent threads created by queries. [#37558](https://github.com/ClickHouse/ClickHouse/pull/37558) ([Sergei Trifonov](https://github.com/serxa)). Add `concurrent_threads_soft_limit parameter` to increase performance in case of high QPS by means of limiting total number of threads for all queries. [#37285](https://github.com/ClickHouse/ClickHouse/pull/37285) ([Roman Vasin](https://github.com/rvasin)).
|
||||||
|
* Add `SLRU` cache policy for uncompressed cache and marks cache. ([Kseniia Sumarokova](https://github.com/kssenii)). [#34651](https://github.com/ClickHouse/ClickHouse/pull/34651) ([alexX512](https://github.com/alexX512)). Decoupling local cache function and cache algorithm [#38048](https://github.com/ClickHouse/ClickHouse/pull/38048) ([Han Shukai](https://github.com/KinderRiven)).
|
||||||
|
* Intel® In-Memory Analytics Accelerator (Intel® IAA) is a hardware accelerator available in the upcoming generation of Intel® Xeon® Scalable processors ("Sapphire Rapids"). Its goal is to speed up common operations in analytics like data (de)compression and filtering. ClickHouse gained the new "DeflateQpl" compression codec which utilizes the Intel® IAA offloading technology to provide a high-performance DEFLATE implementation. The codec uses the [Intel® Query Processing Library (QPL)](https://github.com/intel/qpl) which abstracts access to the hardware accelerator, respectively to a software fallback in case the hardware accelerator is not available. DEFLATE provides in general higher compression rates than ClickHouse's LZ4 default codec, and as a result, offers less disk I/O and lower main memory consumption. [#36654](https://github.com/ClickHouse/ClickHouse/pull/36654) ([jasperzhu](https://github.com/jinjunzh)). [#39494](https://github.com/ClickHouse/ClickHouse/pull/39494) ([Robert Schulze](https://github.com/rschu1ze)).
|
||||||
|
* `DISTINCT` in order with `ORDER BY`: Deduce way to sort based on input stream sort description. Skip sorting if input stream is already sorted. [#38719](https://github.com/ClickHouse/ClickHouse/pull/38719) ([Igor Nikonov](https://github.com/devcrafter)). Improve memory usage (significantly) and query execution time + use `DistinctSortedChunkTransform` for final distinct when `DISTINCT` columns match `ORDER BY` columns, but rename to `DistinctSortedStreamTransform` in `EXPLAIN PIPELINE` → this improves memory usage significantly + remove unnecessary allocations in hot loop in `DistinctSortedChunkTransform`. [#39432](https://github.com/ClickHouse/ClickHouse/pull/39432) ([Igor Nikonov](https://github.com/devcrafter)). Use `DistinctSortedTransform` only when sort description is applicable to DISTINCT columns, otherwise fall back to ordinary DISTINCT implementation + it allows making less checks during `DistinctSortedTransform` execution. [#39528](https://github.com/ClickHouse/ClickHouse/pull/39528) ([Igor Nikonov](https://github.com/devcrafter)). Fix: `DistinctSortedTransform` didn't take advantage of sorting. It never cleared HashSet since clearing_columns were detected incorrectly (always empty). So, it basically worked as ordinary `DISTINCT` (`DistinctTransform`). The fix reduces memory usage significantly. [#39538](https://github.com/ClickHouse/ClickHouse/pull/39538) ([Igor Nikonov](https://github.com/devcrafter)).
|
||||||
|
* Use local node as first priority to get structure of remote table when executing `cluster` and similar table functions. [#39440](https://github.com/ClickHouse/ClickHouse/pull/39440) ([Mingliang Pan](https://github.com/liangliangpan)).
|
||||||
|
* Optimize filtering by numeric columns with AVX512VBMI2 compress store. [#39633](https://github.com/ClickHouse/ClickHouse/pull/39633) ([Guo Wangyang](https://github.com/guowangy)). For systems with AVX512 VBMI2, this PR improves performance by ca. 6% for SSB benchmark queries queries 3.1, 3.2 and 3.3 (SF=100). Tested on Intel Icelake Xeon 8380 * 2 socket. [#40033](https://github.com/ClickHouse/ClickHouse/pull/40033) ([Robert Schulze](https://github.com/rschu1ze)).
|
||||||
|
* Optimize index analysis with functional expressions in multi-thread scenario. [#39812](https://github.com/ClickHouse/ClickHouse/pull/39812) ([Guo Wangyang](https://github.com/guowangy)).
|
||||||
|
* Optimizations for complex queries: Don't visit the AST for UDFs if none are registered. [#40069](https://github.com/ClickHouse/ClickHouse/pull/40069) ([Raúl Marín](https://github.com/Algunenano)). Optimize CurrentMemoryTracker alloc and free. [#40078](https://github.com/ClickHouse/ClickHouse/pull/40078) ([Raúl Marín](https://github.com/Algunenano)).
|
||||||
|
* Improved Base58 encoding/decoding. [#39292](https://github.com/ClickHouse/ClickHouse/pull/39292) ([Andrey Zvonov](https://github.com/zvonand)).
|
||||||
|
* Improve bytes to bits mask transform for SSE/AVX/AVX512. [#39586](https://github.com/ClickHouse/ClickHouse/pull/39586) ([Guo Wangyang](https://github.com/guowangy)).
|
||||||
|
|
||||||
|
#### Improvement
|
||||||
|
* Normalize `AggregateFunction` types and state representations because optimizations like [#35788](https://github.com/ClickHouse/ClickHouse/pull/35788) will treat `count(not null columns)` as `count()`, which might confuses distributed interpreters with the following error : `Conversion from AggregateFunction(count) to AggregateFunction(count, Int64) is not supported`. [#39420](https://github.com/ClickHouse/ClickHouse/pull/39420) ([Amos Bird](https://github.com/amosbird)). The functions with identical states can be used in materialized views interchangeably.
|
||||||
|
* Rework and simplify the `system.backups` table, remove the `internal` column, allow user to set the ID of operation, add columns `num_files`, `uncompressed_size`, `compressed_size`, `start_time`, `end_time`. [#39503](https://github.com/ClickHouse/ClickHouse/pull/39503) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Improved structure of DDL query result table for `Replicated` database (separate columns with shard and replica name, more clear status) - `CREATE TABLE ... ON CLUSTER` queries can be normalized on initiator first if `distributed_ddl_entry_format_version` is set to 3 (default value). It means that `ON CLUSTER` queries may not work if initiator does not belong to the cluster that specified in query. Fixes [#37318](https://github.com/ClickHouse/ClickHouse/issues/37318), [#39500](https://github.com/ClickHouse/ClickHouse/issues/39500) - Ignore `ON CLUSTER` clause if database is `Replicated` and cluster name equals to database name. Related to [#35570](https://github.com/ClickHouse/ClickHouse/issues/35570) - Miscellaneous minor fixes for `Replicated` database engine - Check metadata consistency when starting up `Replicated` database, start replica recovery in case of mismatch of local metadata and metadata in Keeper. Resolves [#24880](https://github.com/ClickHouse/ClickHouse/issues/24880). [#37198](https://github.com/ClickHouse/ClickHouse/pull/37198) ([Alexander Tokmakov](https://github.com/tavplubix)).
|
||||||
|
* Add result_rows and result_bytes to progress reports (`X-ClickHouse-Summary`). [#39567](https://github.com/ClickHouse/ClickHouse/pull/39567) ([Raúl Marín](https://github.com/Algunenano)).
|
||||||
|
* Improve primary key analysis for MergeTree. [#25563](https://github.com/ClickHouse/ClickHouse/pull/25563) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* `timeSlots` now works with DateTime64; subsecond duration and slot size available when working with DateTime64. [#37951](https://github.com/ClickHouse/ClickHouse/pull/37951) ([Andrey Zvonov](https://github.com/zvonand)).
|
||||||
|
* Added support of `LEFT SEMI` and `LEFT ANTI` direct join with `EmbeddedRocksDB` tables. [#38956](https://github.com/ClickHouse/ClickHouse/pull/38956) ([Vladimir C](https://github.com/vdimir)).
|
||||||
|
* Add profile events for fsync operations. [#39179](https://github.com/ClickHouse/ClickHouse/pull/39179) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Add the second argument to the ordinary function `file(path[, default])`, which function returns in the case when a file does not exists. [#39218](https://github.com/ClickHouse/ClickHouse/pull/39218) ([Nikolay Degterinsky](https://github.com/evillique)).
|
||||||
|
* Some small fixes for reading via http, allow to retry partial content in case if 200 OK. [#39244](https://github.com/ClickHouse/ClickHouse/pull/39244) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Support queries `CREATE TEMPORARY TABLE ... (<list of columns>) AS ...`. [#39462](https://github.com/ClickHouse/ClickHouse/pull/39462) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Add support of `!`/`*` (exclamation/asterisk) in custom TLDs (`cutToFirstSignificantSubdomainCustom()`/`cutToFirstSignificantSubdomainCustomWithWWW()`/`firstSignificantSubdomainCustom()`). [#39496](https://github.com/ClickHouse/ClickHouse/pull/39496) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Add support for TLS connections to NATS. Implements [#39525](https://github.com/ClickHouse/ClickHouse/issues/39525). [#39527](https://github.com/ClickHouse/ClickHouse/pull/39527) ([Constantine Peresypkin](https://github.com/pkit)).
|
||||||
|
* `clickhouse-obfuscator` (a tool for database obfuscation for testing and load generation) now has the new `--save` and `--load` parameters to work with pre-trained models. This closes [#39534](https://github.com/ClickHouse/ClickHouse/issues/39534). [#39541](https://github.com/ClickHouse/ClickHouse/pull/39541) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix incorrect behavior of log rotation during restart. [#39558](https://github.com/ClickHouse/ClickHouse/pull/39558) ([Nikolay Degterinsky](https://github.com/evillique)).
|
||||||
|
* Fix building aggregate projections when external aggregation is on. Mark as improvement because the case is rare and there exists easy workaround to fix it via changing settings. This fixes [#39667](https://github.com/ClickHouse/ClickHouse/issues/39667) . [#39671](https://github.com/ClickHouse/ClickHouse/pull/39671) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Allow to execute hash functions with arguments of type `Map`. [#39685](https://github.com/ClickHouse/ClickHouse/pull/39685) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Add a configuration parameter to hide addresses in stack traces. It may improve security a little but generally, it is harmful and should not be used. [#39690](https://github.com/ClickHouse/ClickHouse/pull/39690) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Change the prefix size of AggregateFunctionDistinct to make sure nested function data memory segment is aligned. [#39696](https://github.com/ClickHouse/ClickHouse/pull/39696) ([Pxl](https://github.com/BiteTheDDDDt)).
|
||||||
|
* Properly escape credentials passed to the `clickhouse-diagnostic` tool. [#39707](https://github.com/ClickHouse/ClickHouse/pull/39707) ([Dale McDiarmid](https://github.com/gingerwizard)).
|
||||||
|
* ClickHouse Keeper improvement: create a snapshot on exit. It can be controlled with the config `keeper_server.create_snapshot_on_exit`, `true` by default. [#39755](https://github.com/ClickHouse/ClickHouse/pull/39755) ([Antonio Andelic](https://github.com/antonio2368)).
|
||||||
|
* Support primary key analysis for `row_policy_filter` and `additional_filter`. It also helps fix issues like [#37454](https://github.com/ClickHouse/ClickHouse/issues/37454) . [#39826](https://github.com/ClickHouse/ClickHouse/pull/39826) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fix two usability issues in Play UI: - it was non-pixel-perfect on iPad due to parasitic border radius and margins; - the progress indication did not display after the first query. This closes [#39957](https://github.com/ClickHouse/ClickHouse/issues/39957). This closes [#39960](https://github.com/ClickHouse/ClickHouse/issues/39960). [#39961](https://github.com/ClickHouse/ClickHouse/pull/39961) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Play UI: add row numbers; add cell selection on click; add hysteresis for table cells. [#39962](https://github.com/ClickHouse/ClickHouse/pull/39962) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Play UI: recognize tab key in textarea, but at the same time don't mess up with tab navigation. [#40053](https://github.com/ClickHouse/ClickHouse/pull/40053) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* The client will show server-side elapsed time. This is important for the performance comparison of ClickHouse services in remote datacenters. This closes [#38070](https://github.com/ClickHouse/ClickHouse/issues/38070). See also [this](https://github.com/ClickHouse/ClickBench/blob/main/hardware/benchmark-cloud.sh#L37) for motivation. [#39968](https://github.com/ClickHouse/ClickHouse/pull/39968) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Adds `parseDateTime64BestEffortUS`, `parseDateTime64BestEffortUSOrNull`, `parseDateTime64BestEffortUSOrZero` functions, closing [#37492](https://github.com/ClickHouse/ClickHouse/issues/37492). [#40015](https://github.com/ClickHouse/ClickHouse/pull/40015) ([Tanya Bragin](https://github.com/tbragin)).
|
||||||
|
* Extend the `system.processors_profile_log` with more information such as input rows. [#40121](https://github.com/ClickHouse/ClickHouse/pull/40121) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Display server-side time in `clickhouse-benchmark` by default if it is available (since ClickHouse version 22.8). This is needed to correctly compare the performance of clouds. This behavior can be changed with the new `--client-side-time` command line option. Change the `--randomize` command line option from `--randomize 1` to the form without argument. [#40193](https://github.com/ClickHouse/ClickHouse/pull/40193) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Add counters (ProfileEvents) for cases when query complexity limitation has been set and has reached (a separate counter for `overflow_mode` = `break` and `throw`). For example, if you have set up `max_rows_to_read` with `read_overflow_mode = 'break'`, looking at the value of `OverflowBreak` counter will allow distinguishing incomplete results. [#40205](https://github.com/ClickHouse/ClickHouse/pull/40205) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix memory accounting in case of "Memory limit exceeded" errors (previously [peak] memory usage was takes failed allocations into account). [#40249](https://github.com/ClickHouse/ClickHouse/pull/40249) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Add metrics for filesystem cache: `FilesystemCacheSize` and `FilesystemCacheElements`. [#40260](https://github.com/ClickHouse/ClickHouse/pull/40260) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Support hadoop secure RPC transfer (hadoop.rpc.protection=privacy and hadoop.rpc.protection=integrity). [#39411](https://github.com/ClickHouse/ClickHouse/pull/39411) ([michael1589](https://github.com/michael1589)).
|
||||||
|
* Avoid continuously growing memory consumption of pattern cache when using functions multi(Fuzzy)Match(Any|AllIndices|AnyIndex)(). [#40264](https://github.com/ClickHouse/ClickHouse/pull/40264) ([Robert Schulze](https://github.com/rschu1ze)).
|
||||||
|
* Add cache for schema inference for file/s3/hdfs/url table functions. Now, schema inference will be performed only on the first query to the file, all subsequent queries to the same file will use the schema from cache if data wasn't changed. Add system table system.schema_inference_cache with all current schemas in cache and system queries SYSTEM DROP SCHEMA CACHE [FOR FILE/S3/HDFS/URL] to drop schemas from cache. [#38286](https://github.com/ClickHouse/ClickHouse/pull/38286) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Add support for LARGE_BINARY/LARGE_STRING with Arrow (Closes [#32401](https://github.com/ClickHouse/ClickHouse/issues/32401)). [#40293](https://github.com/ClickHouse/ClickHouse/pull/40293) ([Josh Taylor](https://github.com/joshuataylor)).
|
||||||
|
|
||||||
|
#### Build/Testing/Packaging Improvement
|
||||||
|
* [ClickFiddle](https://fiddle.clickhouse.com/): A new tool for testing ClickHouse versions in read/write mode (**Igor Baliuk**).
|
||||||
|
* ClickHouse binary is made self-extracting [#35775](https://github.com/ClickHouse/ClickHouse/pull/35775) ([Yakov Olkhovskiy, Arthur Filatenkov](https://github.com/yakov-olkhovskiy)).
|
||||||
|
* Update tzdata to 2022b to support the new timezone changes. See https://github.com/google/cctz/pull/226. Chile's 2022 DST start is delayed from September 4 to September 11. Iran plans to stop observing DST permanently, after it falls back on 2022-09-21. There are corrections of the historical time zone of Asia/Tehran in the year 1977: Iran adopted standard time in 1935, not 1946. In 1977 it observed DST from 03-21 23:00 to 10-20 24:00; its 1978 transitions were on 03-24 and 08-05, not 03-20 and 10-20; and its spring 1979 transition was on 05-27, not 03-21 (https://data.iana.org/time-zones/tzdb/NEWS). ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Former packages used to install systemd.service file to `/etc`. The files there are marked as `conf` and are not cleaned out, and not updated automatically. This PR cleans them out. [#39323](https://github.com/ClickHouse/ClickHouse/pull/39323) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
|
||||||
|
* Ensure LSan is effective. [#39430](https://github.com/ClickHouse/ClickHouse/pull/39430) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* TSAN has issues with clang-14 (https://github.com/google/sanitizers/issues/1552, https://github.com/google/sanitizers/issues/1540), so here we build the TSAN binaries with clang-15. [#39450](https://github.com/ClickHouse/ClickHouse/pull/39450) ([Mikhail f. Shiryaev](https://github.com/Felixoid)).
|
||||||
|
* Remove the option to build ClickHouse tools as separate executable programs. This fixes [#37847](https://github.com/ClickHouse/ClickHouse/issues/37847). [#39520](https://github.com/ClickHouse/ClickHouse/pull/39520) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Small preparations for build on s390x (which is big-endian). [#39627](https://github.com/ClickHouse/ClickHouse/pull/39627) ([Harry Lee](https://github.com/HarryLeeIBM)). [#39656](https://github.com/ClickHouse/ClickHouse/pull/39656) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed Endian issue in BitHelpers for s390x. [#39656](https://github.com/ClickHouse/ClickHouse/pull/39656) ([Harry Lee](https://github.com/HarryLeeIBM)). Implement a piece of code related to SipHash for s390x architecture (which is not supported by ClickHouse). [#39732](https://github.com/ClickHouse/ClickHouse/pull/39732) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed an Endian issue in Coordination snapshot code for s390x architecture (which is not supported by ClickHouse). [#39931](https://github.com/ClickHouse/ClickHouse/pull/39931) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed Endian issues in Codec code for s390x architecture (which is not supported by ClickHouse). [#40008](https://github.com/ClickHouse/ClickHouse/pull/40008) ([Harry Lee](https://github.com/HarryLeeIBM)). Fixed Endian issues in reading/writing BigEndian binary data in ReadHelpers and WriteHelpers code for s390x architecture (which is not supported by ClickHouse). [#40179](https://github.com/ClickHouse/ClickHouse/pull/40179) ([Harry Lee](https://github.com/HarryLeeIBM)).
|
||||||
|
* Support build with `clang-16` (trunk). This closes [#39949](https://github.com/ClickHouse/ClickHouse/issues/39949). [#40181](https://github.com/ClickHouse/ClickHouse/pull/40181) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Prepare RISC-V 64 build to run in CI. This is for [#40141](https://github.com/ClickHouse/ClickHouse/issues/40141). [#40197](https://github.com/ClickHouse/ClickHouse/pull/40197) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Simplified function registration macro interface (`FUNCTION_REGISTER*`) to eliminate the step to add and call an extern function in the registerFunctions.cpp, it also makes incremental builds of a new function faster. [#38615](https://github.com/ClickHouse/ClickHouse/pull/38615) ([Li Yin](https://github.com/liyinsg)).
|
||||||
|
* Docker: Now entrypoint.sh in docker image creates and executes chown for all folders it found in config for multidisk setup [#17717](https://github.com/ClickHouse/ClickHouse/issues/17717). [#39121](https://github.com/ClickHouse/ClickHouse/pull/39121) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
|
||||||
|
|
||||||
|
#### Bug Fix
|
||||||
|
* Fix possible segfault in `CapnProto` input format. This bug was found and send through ClickHouse bug-bounty [program](https://github.com/ClickHouse/ClickHouse/issues/38986) by *kiojj*. [#40241](https://github.com/ClickHouse/ClickHouse/pull/40241) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Fix a very rare case of incorrect behavior of array subscript operator. This closes [#28720](https://github.com/ClickHouse/ClickHouse/issues/28720). [#40185](https://github.com/ClickHouse/ClickHouse/pull/40185) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix insufficient argument check for encryption functions (found by query fuzzer). This closes [#39987](https://github.com/ClickHouse/ClickHouse/issues/39987). [#40194](https://github.com/ClickHouse/ClickHouse/pull/40194) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix the case when the order of columns can be incorrect if the `IN` operator is used with a table with `ENGINE = Set` containing multiple columns. This fixes [#13014](https://github.com/ClickHouse/ClickHouse/issues/13014). [#40225](https://github.com/ClickHouse/ClickHouse/pull/40225) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix seeking while reading from encrypted disk. This PR fixes [#38381](https://github.com/ClickHouse/ClickHouse/issues/38381). [#39687](https://github.com/ClickHouse/ClickHouse/pull/39687) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Fix duplicate columns in join plan. Finally, solve [#26809](https://github.com/ClickHouse/ClickHouse/issues/26809). [#40009](https://github.com/ClickHouse/ClickHouse/pull/40009) ([Vladimir C](https://github.com/vdimir)).
|
||||||
|
* Fixed query hanging for SELECT with ORDER BY WITH FILL with different date/time types. [#37849](https://github.com/ClickHouse/ClickHouse/pull/37849) ([Yakov Olkhovskiy](https://github.com/yakov-olkhovskiy)).
|
||||||
|
* Fix ORDER BY that matches projections ORDER BY (before it simply returns unsorted result). [#38725](https://github.com/ClickHouse/ClickHouse/pull/38725) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Do not optimise functions in GROUP BY statements if they shadow one of the table columns or expressions. Fixes [#37032](https://github.com/ClickHouse/ClickHouse/issues/37032). [#39103](https://github.com/ClickHouse/ClickHouse/pull/39103) ([Anton Kozlov](https://github.com/tonickkozlov)).
|
||||||
|
* Fix wrong table name in logs after RENAME TABLE. This fixes [#38018](https://github.com/ClickHouse/ClickHouse/issues/38018). [#39227](https://github.com/ClickHouse/ClickHouse/pull/39227) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fix positional arguments in case of columns pruning when optimising the query. Closes [#38433](https://github.com/ClickHouse/ClickHouse/issues/38433). [#39293](https://github.com/ClickHouse/ClickHouse/pull/39293) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Fix bug in schema inference in case of empty messages in Protobuf/CapnProto formats that allowed to create column with empty `Tuple` type. Closes [#39051](https://github.com/ClickHouse/ClickHouse/issues/39051) Add 2 new settings `input_format_{protobuf/capnproto}_skip_fields_with_unsupported_types_in_schema_inference` that allow to skip fields with unsupported types while schema inference for Protobuf and CapnProto formats. [#39357](https://github.com/ClickHouse/ClickHouse/pull/39357) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* (Window View is an experimental feature) Fix segmentation fault on `CREATE WINDOW VIEW .. ON CLUSTER ... INNER`. Closes [#39363](https://github.com/ClickHouse/ClickHouse/issues/39363). [#39384](https://github.com/ClickHouse/ClickHouse/pull/39384) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Fix WriteBuffer finalize when cancelling insert into function (in previous versions it may leat to std::terminate). [#39458](https://github.com/ClickHouse/ClickHouse/pull/39458) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Fix storing of columns of type `Object` in sparse serialization. [#39464](https://github.com/ClickHouse/ClickHouse/pull/39464) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Fix possible "Not found column in block" exception when using projections. This closes [#39469](https://github.com/ClickHouse/ClickHouse/issues/39469). [#39470](https://github.com/ClickHouse/ClickHouse/pull/39470) ([小路](https://github.com/nicelulu)).
|
||||||
|
* Fix exception on race between DROP and INSERT with materialized views. [#39477](https://github.com/ClickHouse/ClickHouse/pull/39477) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* A bug in Apache Avro library: fix data race and possible heap-buffer-overflow in Avro format. Closes [#39094](https://github.com/ClickHouse/ClickHouse/issues/39094) Closes [#33652](https://github.com/ClickHouse/ClickHouse/issues/33652). [#39498](https://github.com/ClickHouse/ClickHouse/pull/39498) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Fix rare bug in asynchronous reading (with setting `local_filesystem_read_method='pread_threadpool'`) with enabled `O_DIRECT` (enabled by setting `min_bytes_to_use_direct_io`). [#39506](https://github.com/ClickHouse/ClickHouse/pull/39506) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* (only on FreeBSD) Fixes "Code: 49. DB::Exception: FunctionFactory: the function name '' is not unique. (LOGICAL_ERROR)" observed on FreeBSD when starting clickhouse. [#39551](https://github.com/ClickHouse/ClickHouse/pull/39551) ([Alexander Gololobov](https://github.com/davenger)).
|
||||||
|
* Fix bug with the recently introduced "maxsplit" argument for `splitByChar`, which was not working correctly. [#39552](https://github.com/ClickHouse/ClickHouse/pull/39552) ([filimonov](https://github.com/filimonov)).
|
||||||
|
* Fix bug in ASOF JOIN with `enable_optimize_predicate_expression`, close [#37813](https://github.com/ClickHouse/ClickHouse/issues/37813). [#39556](https://github.com/ClickHouse/ClickHouse/pull/39556) ([Vladimir C](https://github.com/vdimir)).
|
||||||
|
* Fixed `CREATE/DROP INDEX` query with `ON CLUSTER` or `Replicated` database and `ReplicatedMergeTree`. It used to be executed on all replicas (causing error or DDL queue stuck). Fixes [#39511](https://github.com/ClickHouse/ClickHouse/issues/39511). [#39565](https://github.com/ClickHouse/ClickHouse/pull/39565) ([Alexander Tokmakov](https://github.com/tavplubix)).
|
||||||
|
* Fix "column not found" error for push down with join, close [#39505](https://github.com/ClickHouse/ClickHouse/issues/39505). [#39575](https://github.com/ClickHouse/ClickHouse/pull/39575) ([Vladimir C](https://github.com/vdimir)).
|
||||||
|
* Fix the wrong `REGEXP_REPLACE` alias. This fixes https://github.com/ClickHouse/ClickBench/issues/9. [#39592](https://github.com/ClickHouse/ClickHouse/pull/39592) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fixed point of origin for exponential decay window functions to the last value in window. Previously, decay was calculated by formula `exp((t - curr_row_t) / decay_length)`, which is incorrect when right boundary of window is not `CURRENT ROW`. It was changed to: `exp((t - last_row_t) / decay_length)`. There is no change in results for windows with `ROWS BETWEEN (smth) AND CURRENT ROW`. [#39593](https://github.com/ClickHouse/ClickHouse/pull/39593) ([Vladimir Chebotaryov](https://github.com/quickhouse)).
|
||||||
|
* Fix Decimal division overflow, which can be detected based on operands scale. [#39600](https://github.com/ClickHouse/ClickHouse/pull/39600) ([Andrey Zvonov](https://github.com/zvonand)).
|
||||||
|
* Fix settings `output_format_arrow_string_as_string` and `output_format_arrow_low_cardinality_as_dictionary` work in combination. Closes [#39624](https://github.com/ClickHouse/ClickHouse/issues/39624). [#39647](https://github.com/ClickHouse/ClickHouse/pull/39647) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Fixed a bug in default database resolution in distributed table reads. [#39674](https://github.com/ClickHouse/ClickHouse/pull/39674) ([Anton Kozlov](https://github.com/tonickkozlov)).
|
||||||
|
* (Only with the obsolete Ordinary databases) Select might read data of dropped table if cache for mmap IO is used and database engine is Ordinary and new tables was created with the same name as dropped one had. It's fixed. [#39708](https://github.com/ClickHouse/ClickHouse/pull/39708) ([Alexander Tokmakov](https://github.com/tavplubix)).
|
||||||
|
* Fix possible error `Invalid column type for ColumnUnique::insertRangeFrom. Expected String, got ColumnLowCardinality` Fixes [#38460](https://github.com/ClickHouse/ClickHouse/issues/38460). [#39716](https://github.com/ClickHouse/ClickHouse/pull/39716) ([Arthur Passos](https://github.com/arthurpassos)).
|
||||||
|
* Field names in the `meta` section of JSON format were erroneously double escaped. This closes [#39693](https://github.com/ClickHouse/ClickHouse/issues/39693). [#39747](https://github.com/ClickHouse/ClickHouse/pull/39747) ([Alexey Milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix wrong index analysis with tuples and operator `IN`, which could lead to wrong query result. [#39752](https://github.com/ClickHouse/ClickHouse/pull/39752) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Fix `EmbeddedRocksDB` tables filtering by key using params. [#39757](https://github.com/ClickHouse/ClickHouse/pull/39757) ([Antonio Andelic](https://github.com/antonio2368)).
|
||||||
|
* Fix error `Invalid number of columns in chunk pushed to OutputPort` which was caused by ARRAY JOIN optimization. Fixes [#39164](https://github.com/ClickHouse/ClickHouse/issues/39164). [#39799](https://github.com/ClickHouse/ClickHouse/pull/39799) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* A workaround for a bug in Linux kernel. Fix `CANNOT_READ_ALL_DATA` exception with `local_filesystem_read_method=pread_threadpool`. This bug affected only Linux kernel version 5.9 and 5.10 according to [man](https://manpages.debian.org/testing/manpages-dev/preadv2.2.en.html#BUGS). [#39800](https://github.com/ClickHouse/ClickHouse/pull/39800) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* (Only on NFS) Fix broken NFS mkdir for root-squashed volumes. [#39898](https://github.com/ClickHouse/ClickHouse/pull/39898) ([Constantine Peresypkin](https://github.com/pkit)).
|
||||||
|
* Remove dictionaries from prometheus metrics on DETACH/DROP. [#39926](https://github.com/ClickHouse/ClickHouse/pull/39926) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix read of StorageFile with virtual columns. Closes [#39907](https://github.com/ClickHouse/ClickHouse/issues/39907). [#39943](https://github.com/ClickHouse/ClickHouse/pull/39943) ([flynn](https://github.com/ucasfl)).
|
||||||
|
* Fix big memory usage during fetches. Fixes [#39915](https://github.com/ClickHouse/ClickHouse/issues/39915). [#39990](https://github.com/ClickHouse/ClickHouse/pull/39990) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* (experimental feature) Fix `hashId` crash and salt parameter not being used. [#40002](https://github.com/ClickHouse/ClickHouse/pull/40002) ([Raúl Marín](https://github.com/Algunenano)).
|
||||||
|
* `EXCEPT` and `INTERSECT` operators may lead to crash if a specific combination of constant and non-constant columns were used. [#40020](https://github.com/ClickHouse/ClickHouse/pull/40020) ([Duc Canh Le](https://github.com/canhld94)).
|
||||||
|
* Fixed "Part directory doesn't exist" and "`tmp_<part_name>` ... No such file or directory" errors during too slow INSERT or too long merge/mutation. Also fixed issue that may cause some replication queue entries to stuck without any errors or warnings in logs if previous attempt to fetch part failed, but `tmp-fetch_<part_name>` directory was not cleaned up. [#40031](https://github.com/ClickHouse/ClickHouse/pull/40031) ([Alexander Tokmakov](https://github.com/tavplubix)).
|
||||||
|
* Fix rare cases of parsing of arrays of tuples in format `Values`. [#40034](https://github.com/ClickHouse/ClickHouse/pull/40034) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Fixes ArrowColumn format Dictionary(X) & Dictionary(Nullable(X)) conversion to ClickHouse LowCardinality(X) & LowCardinality(Nullable(X)) respectively. [#40037](https://github.com/ClickHouse/ClickHouse/pull/40037) ([Arthur Passos](https://github.com/arthurpassos)).
|
||||||
|
* Fix potential deadlock in writing to S3 during task scheduling failure. [#40070](https://github.com/ClickHouse/ClickHouse/pull/40070) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Fix bug in collectFilesToSkip() by adding correct file extension (.idx or idx2) for indexes to be recalculated, avoid wrong hard links. Fixed [#39896](https://github.com/ClickHouse/ClickHouse/issues/39896). [#40095](https://github.com/ClickHouse/ClickHouse/pull/40095) ([Jianmei Zhang](https://github.com/zhangjmruc)).
|
||||||
|
* A fix for reverse DNS resolution. [#40134](https://github.com/ClickHouse/ClickHouse/pull/40134) ([Arthur Passos](https://github.com/arthurpassos)).
|
||||||
|
* Fix unexpected result `arrayDifference` of `Array(UInt32). [#40211](https://github.com/ClickHouse/ClickHouse/pull/40211) ([Duc Canh Le](https://github.com/canhld94)).
|
||||||
|
|
||||||
|
|
||||||
### <a id="227"></a> ClickHouse release 22.7, 2022-07-21
|
### <a id="227"></a> ClickHouse release 22.7, 2022-07-21
|
||||||
|
|
||||||
#### Upgrade Notes
|
#### Upgrade Notes
|
||||||
@ -258,7 +401,7 @@
|
|||||||
* Allows providing `NULL`/`NOT NULL` right after type in column declaration. [#37337](https://github.com/ClickHouse/ClickHouse/pull/37337) ([Igor Nikonov](https://github.com/devcrafter)).
|
* Allows providing `NULL`/`NOT NULL` right after type in column declaration. [#37337](https://github.com/ClickHouse/ClickHouse/pull/37337) ([Igor Nikonov](https://github.com/devcrafter)).
|
||||||
* optimize file segment PARTIALLY_DOWNLOADED get read buffer. [#37338](https://github.com/ClickHouse/ClickHouse/pull/37338) ([xiedeyantu](https://github.com/xiedeyantu)).
|
* optimize file segment PARTIALLY_DOWNLOADED get read buffer. [#37338](https://github.com/ClickHouse/ClickHouse/pull/37338) ([xiedeyantu](https://github.com/xiedeyantu)).
|
||||||
* Try to improve short circuit functions processing to fix problems with stress tests. [#37384](https://github.com/ClickHouse/ClickHouse/pull/37384) ([Kruglov Pavel](https://github.com/Avogar)).
|
* Try to improve short circuit functions processing to fix problems with stress tests. [#37384](https://github.com/ClickHouse/ClickHouse/pull/37384) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
* Closes [#37395](https://github.com/ClickHouse/ClickHouse/issues/37395). [#37415](https://github.com/ClickHouse/ClickHouse/pull/37415) ([Memo](https://github.com/Joeywzr)).
|
* Generate multiple columns with UUID (generateUUIDv4(1), generateUUIDv4(2)) [#37395](https://github.com/ClickHouse/ClickHouse/issues/37395). [#37415](https://github.com/ClickHouse/ClickHouse/pull/37415) ([Memo](https://github.com/Joeywzr)).
|
||||||
* Fix extremely rare deadlock during part fetch in zero-copy replication. Fixes [#37423](https://github.com/ClickHouse/ClickHouse/issues/37423). [#37424](https://github.com/ClickHouse/ClickHouse/pull/37424) ([metahys](https://github.com/metahys)).
|
* Fix extremely rare deadlock during part fetch in zero-copy replication. Fixes [#37423](https://github.com/ClickHouse/ClickHouse/issues/37423). [#37424](https://github.com/ClickHouse/ClickHouse/pull/37424) ([metahys](https://github.com/metahys)).
|
||||||
* Don't allow to create storage with unknown data format. [#37450](https://github.com/ClickHouse/ClickHouse/pull/37450) ([Kruglov Pavel](https://github.com/Avogar)).
|
* Don't allow to create storage with unknown data format. [#37450](https://github.com/ClickHouse/ClickHouse/pull/37450) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
* Set `global_memory_usage_overcommit_max_wait_microseconds` default value to 5 seconds. Add info about `OvercommitTracker` to OOM exception message. Add `MemoryOvercommitWaitTimeMicroseconds` profile event. [#37460](https://github.com/ClickHouse/ClickHouse/pull/37460) ([Dmitry Novik](https://github.com/novikd)).
|
* Set `global_memory_usage_overcommit_max_wait_microseconds` default value to 5 seconds. Add info about `OvercommitTracker` to OOM exception message. Add `MemoryOvercommitWaitTimeMicroseconds` profile event. [#37460](https://github.com/ClickHouse/ClickHouse/pull/37460) ([Dmitry Novik](https://github.com/novikd)).
|
||||||
|
@ -77,10 +77,9 @@ option(USE_STATIC_LIBRARIES "Disable to use shared libraries" ON)
|
|||||||
# DEVELOPER ONLY.
|
# DEVELOPER ONLY.
|
||||||
# Faster linking if turned on.
|
# Faster linking if turned on.
|
||||||
option(SPLIT_SHARED_LIBRARIES "Keep all internal libraries as separate .so files" OFF)
|
option(SPLIT_SHARED_LIBRARIES "Keep all internal libraries as separate .so files" OFF)
|
||||||
option(CLICKHOUSE_SPLIT_BINARY "Make several binaries (clickhouse-server, clickhouse-client etc.) instead of one bundled" OFF)
|
|
||||||
|
|
||||||
if (USE_STATIC_LIBRARIES AND (SPLIT_SHARED_LIBRARIES OR CLICKHOUSE_SPLIT_BINARY))
|
if (USE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES)
|
||||||
message(FATAL_ERROR "SPLIT_SHARED_LIBRARIES=1 or CLICKHOUSE_SPLIT_BINARY=1 must not be used together with USE_STATIC_LIBRARIES=1")
|
message(FATAL_ERROR "SPLIT_SHARED_LIBRARIES=1 must not be used together with USE_STATIC_LIBRARIES=1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT USE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES)
|
if (NOT USE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES)
|
||||||
@ -144,6 +143,8 @@ include (cmake/add_warning.cmake)
|
|||||||
if (COMPILER_CLANG)
|
if (COMPILER_CLANG)
|
||||||
# generate ranges for fast "addr2line" search
|
# generate ranges for fast "addr2line" search
|
||||||
if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE")
|
if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE")
|
||||||
|
# NOTE: that clang has a bug because of it does not emit .debug_aranges
|
||||||
|
# with ThinLTO, so custom ld.lld wrapper is shipped in docker images.
|
||||||
set(COMPILER_FLAGS "${COMPILER_FLAGS} -gdwarf-aranges")
|
set(COMPILER_FLAGS "${COMPILER_FLAGS} -gdwarf-aranges")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@ -154,6 +155,8 @@ if (COMPILER_CLANG)
|
|||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -fuse-ctor-homing")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -fuse-ctor-homing")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
no_warning(enum-constexpr-conversion) # breaks Protobuf in clang-16
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# If compiler has support for -Wreserved-identifier. It is difficult to detect by clang version,
|
# If compiler has support for -Wreserved-identifier. It is difficult to detect by clang version,
|
||||||
@ -163,7 +166,6 @@ if (HAS_RESERVED_IDENTIFIER)
|
|||||||
add_compile_definitions (HAS_RESERVED_IDENTIFIER)
|
add_compile_definitions (HAS_RESERVED_IDENTIFIER)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# If turned `ON`, assumes the user has either the system GTest library or the bundled one.
|
|
||||||
option(ENABLE_TESTS "Provide unit_test_dbms target with Google.Test unit tests" ON)
|
option(ENABLE_TESTS "Provide unit_test_dbms target with Google.Test unit tests" ON)
|
||||||
option(ENABLE_EXAMPLES "Build all example programs in 'examples' subdirectories" OFF)
|
option(ENABLE_EXAMPLES "Build all example programs in 'examples' subdirectories" OFF)
|
||||||
|
|
||||||
@ -199,8 +201,8 @@ endif ()
|
|||||||
option(ADD_GDB_INDEX_FOR_GOLD "Add .gdb-index to resulting binaries for gold linker.")
|
option(ADD_GDB_INDEX_FOR_GOLD "Add .gdb-index to resulting binaries for gold linker.")
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE")
|
if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE")
|
||||||
# Can be lld or ld-lld.
|
# Can be lld or ld-lld or lld-13 or /path/to/lld.
|
||||||
if (LINKER_NAME MATCHES "lld$")
|
if (LINKER_NAME MATCHES "lld")
|
||||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index")
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index")
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gdb-index")
|
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gdb-index")
|
||||||
message (STATUS "Adding .gdb-index via --gdb-index linker option.")
|
message (STATUS "Adding .gdb-index via --gdb-index linker option.")
|
||||||
@ -245,7 +247,8 @@ else ()
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Create BuildID when using lld. For other linkers it is created by default.
|
# Create BuildID when using lld. For other linkers it is created by default.
|
||||||
if (LINKER_NAME MATCHES "lld$")
|
# (NOTE: LINKER_NAME can be either path or name, and in different variants)
|
||||||
|
if (LINKER_NAME MATCHES "lld")
|
||||||
# SHA1 is not cryptographically secure but it is the best what lld is offering.
|
# SHA1 is not cryptographically secure but it is the best what lld is offering.
|
||||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1")
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1")
|
||||||
endif ()
|
endif ()
|
||||||
@ -502,7 +505,7 @@ endif ()
|
|||||||
message (STATUS
|
message (STATUS
|
||||||
"Building for: ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_PROCESSOR} ${CMAKE_LIBRARY_ARCHITECTURE} ;
|
"Building for: ${CMAKE_SYSTEM} ${CMAKE_SYSTEM_PROCESSOR} ${CMAKE_LIBRARY_ARCHITECTURE} ;
|
||||||
USE_STATIC_LIBRARIES=${USE_STATIC_LIBRARIES}
|
USE_STATIC_LIBRARIES=${USE_STATIC_LIBRARIES}
|
||||||
SPLIT_SHARED=${SPLIT_SHARED_LIBRARIES}")
|
SPLIT_SHARED_LIBRARIES=${SPLIT_SHARED_LIBRARIES}")
|
||||||
|
|
||||||
include (GNUInstallDirs)
|
include (GNUInstallDirs)
|
||||||
|
|
||||||
@ -599,6 +602,8 @@ if (NATIVE_BUILD_TARGETS
|
|||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
"-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
|
"-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}"
|
||||||
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
|
"-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
|
||||||
|
"-DENABLE_CCACHE=${ENABLE_CCACHE}"
|
||||||
|
"-DENABLE_CLICKHOUSE_SELF_EXTRACTING=${ENABLE_CLICKHOUSE_SELF_EXTRACTING}"
|
||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
WORKING_DIRECTORY "${NATIVE_BUILD_DIR}"
|
WORKING_DIRECTORY "${NATIVE_BUILD_DIR}"
|
||||||
COMMAND_ECHO STDOUT)
|
COMMAND_ECHO STDOUT)
|
||||||
@ -607,4 +612,3 @@ if (NATIVE_BUILD_TARGETS
|
|||||||
COMMAND ${CMAKE_COMMAND} --build "${NATIVE_BUILD_DIR}" --target ${NATIVE_BUILD_TARGETS}
|
COMMAND ${CMAKE_COMMAND} --build "${NATIVE_BUILD_DIR}" --target ${NATIVE_BUILD_TARGETS}
|
||||||
COMMAND_ECHO STDOUT)
|
COMMAND_ECHO STDOUT)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -7,12 +7,8 @@
|
|||||||
# How to install Ninja on Ubuntu:
|
# How to install Ninja on Ubuntu:
|
||||||
# sudo apt-get install ninja-build
|
# sudo apt-get install ninja-build
|
||||||
|
|
||||||
# CLion does not support Ninja
|
|
||||||
# You can add your vote on CLion task tracker:
|
|
||||||
# https://youtrack.jetbrains.com/issue/CPP-2659
|
|
||||||
# https://youtrack.jetbrains.com/issue/CPP-870
|
|
||||||
|
|
||||||
if (NOT DEFINED ENV{CLION_IDE} AND NOT DEFINED ENV{XCODE_IDE})
|
if (NOT DEFINED ENV{XCODE_IDE})
|
||||||
find_program(NINJA_PATH ninja)
|
find_program(NINJA_PATH ninja)
|
||||||
if (NINJA_PATH)
|
if (NINJA_PATH)
|
||||||
set(CMAKE_GENERATOR "Ninja" CACHE INTERNAL "")
|
set(CMAKE_GENERATOR "Ninja" CACHE INTERNAL "")
|
||||||
|
11
README.md
11
README.md
@ -1,4 +1,4 @@
|
|||||||
[![ClickHouse — open source distributed column-oriented DBMS](https://github.com/ClickHouse/ClickHouse/raw/master/website/images/logo-400x240.png)](https://clickhouse.com)
|
[![ClickHouse — open source distributed column-oriented DBMS](https://github.com/ClickHouse/clickhouse-presentations/raw/master/images/logo-400x240.png)](https://clickhouse.com)
|
||||||
|
|
||||||
ClickHouse® is an open-source column-oriented database management system that allows generating analytical data reports in real-time.
|
ClickHouse® is an open-source column-oriented database management system that allows generating analytical data reports in real-time.
|
||||||
|
|
||||||
@ -12,11 +12,8 @@ ClickHouse® is an open-source column-oriented database management system that a
|
|||||||
* [Blog](https://clickhouse.com/blog/en/) contains various ClickHouse-related articles, as well as announcements and reports about events.
|
* [Blog](https://clickhouse.com/blog/en/) contains various ClickHouse-related articles, as well as announcements and reports about events.
|
||||||
* [Code Browser (Woboq)](https://clickhouse.com/codebrowser/ClickHouse/index.html) with syntax highlight and navigation.
|
* [Code Browser (Woboq)](https://clickhouse.com/codebrowser/ClickHouse/index.html) with syntax highlight and navigation.
|
||||||
* [Code Browser (github.dev)](https://github.dev/ClickHouse/ClickHouse) with syntax highlight, powered by github.dev.
|
* [Code Browser (github.dev)](https://github.dev/ClickHouse/ClickHouse) with syntax highlight, powered by github.dev.
|
||||||
* [Contacts](https://clickhouse.com/company/#contact) can help to get your questions answered if there are any.
|
* [Contacts](https://clickhouse.com/company/contact) can help to get your questions answered if there are any.
|
||||||
|
|
||||||
## Upcoming events
|
## Upcoming events
|
||||||
* [v22.7 Release Webinar](https://clickhouse.com/company/events/v22-7-release-webinar/) Original creator, co-founder, and CTO of ClickHouse Alexey Milovidov will walk us through the highlights of the release, provide live demos, and share vision into what is coming in the roadmap.
|
* [**v22.9 Release Webinar**](https://clickhouse.com/company/events/v22-9-release-webinar) Original creator, co-founder, and CTO of ClickHouse Alexey Milovidov will walk us through the highlights of the release, provide live demos, and share vision into what is coming in the roadmap.
|
||||||
* [ClickHouse Meetup at the Cloudflare office in London](https://www.meetup.com/clickhouse-london-user-group/events/286891586/) ClickHouse meetup at the Cloudflare office space in central London
|
* [**ClickHouse for Analytics @ Barracuda Networks**](https://www.meetup.com/clickhouse-silicon-valley-meetup-group/events/288140358/) Join us for this in person meetup hosted by our friends at Barracuda in Bay Area.
|
||||||
* [ClickHouse Meetup at the Metoda office in Munich](https://www.meetup.com/clickhouse-meetup-munich/events/286891667/) ClickHouse meetup at the Metoda office in Munich
|
|
||||||
|
|
||||||
|
|
||||||
|
10
SECURITY.md
10
SECURITY.md
@ -10,9 +10,11 @@ The following versions of ClickHouse server are currently being supported with s
|
|||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
|:-|:-|
|
|:-|:-|
|
||||||
|
| 22.8 | ✔️ |
|
||||||
|
| 22.7 | ✔️ |
|
||||||
| 22.6 | ✔️ |
|
| 22.6 | ✔️ |
|
||||||
| 22.5 | ✔️ |
|
| 22.5 | ❌ |
|
||||||
| 22.4 | ✔️ |
|
| 22.4 | ❌ |
|
||||||
| 22.3 | ✔️ |
|
| 22.3 | ✔️ |
|
||||||
| 22.2 | ❌ |
|
| 22.2 | ❌ |
|
||||||
| 22.1 | ❌ |
|
| 22.1 | ❌ |
|
||||||
@ -20,7 +22,7 @@ The following versions of ClickHouse server are currently being supported with s
|
|||||||
| 21.11 | ❌ |
|
| 21.11 | ❌ |
|
||||||
| 21.10 | ❌ |
|
| 21.10 | ❌ |
|
||||||
| 21.9 | ❌ |
|
| 21.9 | ❌ |
|
||||||
| 21.8 | ✔️ |
|
| 21.8 | ❌ |
|
||||||
| 21.7 | ❌ |
|
| 21.7 | ❌ |
|
||||||
| 21.6 | ❌ |
|
| 21.6 | ❌ |
|
||||||
| 21.5 | ❌ |
|
| 21.5 | ❌ |
|
||||||
@ -57,5 +59,5 @@ As the security issue moves from triage, to identified fix, to release planning
|
|||||||
|
|
||||||
## Public Disclosure Timing
|
## Public Disclosure Timing
|
||||||
|
|
||||||
A public disclosure date is negotiated by the ClickHouse maintainers and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known) to 90 days. For a vulnerability with a straightforward mitigation, we expect report date to disclosure date to be on the order of 7 days.
|
A public disclosure date is negotiated by the ClickHouse maintainers and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known) to 90 days. For a vulnerability with a straightforward mitigation, we expect the report date to disclosure date to be on the order of 7 days.
|
||||||
|
|
||||||
|
@ -52,15 +52,15 @@ struct Decimal
|
|||||||
constexpr Decimal(Decimal<T> &&) noexcept = default;
|
constexpr Decimal(Decimal<T> &&) noexcept = default;
|
||||||
constexpr Decimal(const Decimal<T> &) = default;
|
constexpr Decimal(const Decimal<T> &) = default;
|
||||||
|
|
||||||
constexpr Decimal(const T & value_): value(value_) {}
|
constexpr Decimal(const T & value_): value(value_) {} // NOLINT(google-explicit-constructor)
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
constexpr Decimal(const Decimal<U> & x): value(x.value) {}
|
constexpr Decimal(const Decimal<U> & x): value(x.value) {} // NOLINT(google-explicit-constructor)
|
||||||
|
|
||||||
constexpr Decimal<T> & operator=(Decimal<T> &&) noexcept = default;
|
constexpr Decimal<T> & operator=(Decimal<T> &&) noexcept = default;
|
||||||
constexpr Decimal<T> & operator = (const Decimal<T> &) = default;
|
constexpr Decimal<T> & operator = (const Decimal<T> &) = default;
|
||||||
|
|
||||||
constexpr operator T () const { return value; }
|
constexpr operator T () const { return value; } // NOLINT(google-explicit-constructor)
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
constexpr U convertTo() const
|
constexpr U convertTo() const
|
||||||
@ -111,7 +111,7 @@ public:
|
|||||||
using Base::Base;
|
using Base::Base;
|
||||||
using NativeType = Base::NativeType;
|
using NativeType = Base::NativeType;
|
||||||
|
|
||||||
constexpr DateTime64(const Base & v): Base(v) {}
|
constexpr DateTime64(const Base & v): Base(v) {} // NOLINT(google-explicit-constructor)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,14 +36,14 @@ struct DecomposedFloat
|
|||||||
{
|
{
|
||||||
using Traits = FloatTraits<T>;
|
using Traits = FloatTraits<T>;
|
||||||
|
|
||||||
DecomposedFloat(T x)
|
explicit DecomposedFloat(T x)
|
||||||
{
|
{
|
||||||
memcpy(&x_uint, &x, sizeof(x));
|
memcpy(&x_uint, &x, sizeof(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Traits::UInt x_uint;
|
typename Traits::UInt x_uint;
|
||||||
|
|
||||||
bool is_negative() const
|
bool isNegative() const
|
||||||
{
|
{
|
||||||
return x_uint >> (Traits::bits - 1);
|
return x_uint >> (Traits::bits - 1);
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ struct DecomposedFloat
|
|||||||
{
|
{
|
||||||
return (exponent() == 0 && mantissa() == 0)
|
return (exponent() == 0 && mantissa() == 0)
|
||||||
? 0
|
? 0
|
||||||
: (is_negative()
|
: (isNegative()
|
||||||
? -1
|
? -1
|
||||||
: 1);
|
: 1);
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ struct DecomposedFloat
|
|||||||
return (x_uint >> (Traits::mantissa_bits)) & (((1ull << (Traits::exponent_bits + 1)) - 1) >> 1);
|
return (x_uint >> (Traits::mantissa_bits)) & (((1ull << (Traits::exponent_bits + 1)) - 1) >> 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t normalized_exponent() const
|
int16_t normalizedExponent() const
|
||||||
{
|
{
|
||||||
return int16_t(exponent()) - ((1ull << (Traits::exponent_bits - 1)) - 1);
|
return int16_t(exponent()) - ((1ull << (Traits::exponent_bits - 1)) - 1);
|
||||||
}
|
}
|
||||||
@ -73,20 +73,20 @@ struct DecomposedFloat
|
|||||||
return x_uint & ((1ull << Traits::mantissa_bits) - 1);
|
return x_uint & ((1ull << Traits::mantissa_bits) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t mantissa_with_sign() const
|
int64_t mantissaWithSign() const
|
||||||
{
|
{
|
||||||
return is_negative() ? -mantissa() : mantissa();
|
return isNegative() ? -mantissa() : mantissa();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// NOTE Probably floating point instructions can be better.
|
/// NOTE Probably floating point instructions can be better.
|
||||||
bool is_integer_in_representable_range() const
|
bool isIntegerInRepresentableRange() const
|
||||||
{
|
{
|
||||||
return x_uint == 0
|
return x_uint == 0
|
||||||
|| (normalized_exponent() >= 0 /// The number is not less than one
|
|| (normalizedExponent() >= 0 /// The number is not less than one
|
||||||
/// The number is inside the range where every integer has exact representation in float
|
/// The number is inside the range where every integer has exact representation in float
|
||||||
&& normalized_exponent() <= static_cast<int16_t>(Traits::mantissa_bits)
|
&& normalizedExponent() <= static_cast<int16_t>(Traits::mantissa_bits)
|
||||||
/// After multiplying by 2^exp, the fractional part becomes zero, means the number is integer
|
/// After multiplying by 2^exp, the fractional part becomes zero, means the number is integer
|
||||||
&& ((mantissa() & ((1ULL << (Traits::mantissa_bits - normalized_exponent())) - 1)) == 0));
|
&& ((mantissa() & ((1ULL << (Traits::mantissa_bits - normalizedExponent())) - 1)) == 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -102,15 +102,15 @@ struct DecomposedFloat
|
|||||||
return sign();
|
return sign();
|
||||||
|
|
||||||
/// Different signs
|
/// Different signs
|
||||||
if (is_negative() && rhs > 0)
|
if (isNegative() && rhs > 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (!is_negative() && rhs < 0)
|
if (!isNegative() && rhs < 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/// Fractional number with magnitude less than one
|
/// Fractional number with magnitude less than one
|
||||||
if (normalized_exponent() < 0)
|
if (normalizedExponent() < 0)
|
||||||
{
|
{
|
||||||
if (!is_negative())
|
if (!isNegative())
|
||||||
return rhs > 0 ? -1 : 1;
|
return rhs > 0 ? -1 : 1;
|
||||||
else
|
else
|
||||||
return rhs >= 0 ? -1 : 1;
|
return rhs >= 0 ? -1 : 1;
|
||||||
@ -121,11 +121,11 @@ struct DecomposedFloat
|
|||||||
{
|
{
|
||||||
if (rhs == std::numeric_limits<Int>::lowest())
|
if (rhs == std::numeric_limits<Int>::lowest())
|
||||||
{
|
{
|
||||||
assert(is_negative());
|
assert(isNegative());
|
||||||
|
|
||||||
if (normalized_exponent() < static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>))
|
if (normalizedExponent() < static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>))
|
||||||
return 1;
|
return 1;
|
||||||
if (normalized_exponent() > static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>))
|
if (normalizedExponent() > static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (mantissa() == 0)
|
if (mantissa() == 0)
|
||||||
@ -136,44 +136,44 @@ struct DecomposedFloat
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Too large number: abs(float) > abs(rhs). Also the case with infinities and NaN.
|
/// Too large number: abs(float) > abs(rhs). Also the case with infinities and NaN.
|
||||||
if (normalized_exponent() >= static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>))
|
if (normalizedExponent() >= static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>))
|
||||||
return is_negative() ? -1 : 1;
|
return isNegative() ? -1 : 1;
|
||||||
|
|
||||||
using UInt = std::conditional_t<(sizeof(Int) > sizeof(typename Traits::UInt)), make_unsigned_t<Int>, typename Traits::UInt>;
|
using UInt = std::conditional_t<(sizeof(Int) > sizeof(typename Traits::UInt)), make_unsigned_t<Int>, typename Traits::UInt>;
|
||||||
UInt uint_rhs = rhs < 0 ? -rhs : rhs;
|
UInt uint_rhs = rhs < 0 ? -rhs : rhs;
|
||||||
|
|
||||||
/// Smaller octave: abs(rhs) < abs(float)
|
/// Smaller octave: abs(rhs) < abs(float)
|
||||||
/// FYI, TIL: octave is also called "binade", https://en.wikipedia.org/wiki/Binade
|
/// FYI, TIL: octave is also called "binade", https://en.wikipedia.org/wiki/Binade
|
||||||
if (uint_rhs < (static_cast<UInt>(1) << normalized_exponent()))
|
if (uint_rhs < (static_cast<UInt>(1) << normalizedExponent()))
|
||||||
return is_negative() ? -1 : 1;
|
return isNegative() ? -1 : 1;
|
||||||
|
|
||||||
/// Larger octave: abs(rhs) > abs(float)
|
/// Larger octave: abs(rhs) > abs(float)
|
||||||
if (normalized_exponent() + 1 < static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>)
|
if (normalizedExponent() + 1 < static_cast<int16_t>(8 * sizeof(Int) - is_signed_v<Int>)
|
||||||
&& uint_rhs >= (static_cast<UInt>(1) << (normalized_exponent() + 1)))
|
&& uint_rhs >= (static_cast<UInt>(1) << (normalizedExponent() + 1)))
|
||||||
return is_negative() ? 1 : -1;
|
return isNegative() ? 1 : -1;
|
||||||
|
|
||||||
/// The same octave
|
/// The same octave
|
||||||
/// uint_rhs == 2 ^ normalized_exponent + mantissa * 2 ^ (normalized_exponent - mantissa_bits)
|
/// uint_rhs == 2 ^ normalizedExponent + mantissa * 2 ^ (normalizedExponent - mantissa_bits)
|
||||||
|
|
||||||
bool large_and_always_integer = normalized_exponent() >= static_cast<int16_t>(Traits::mantissa_bits);
|
bool large_and_always_integer = normalizedExponent() >= static_cast<int16_t>(Traits::mantissa_bits);
|
||||||
|
|
||||||
UInt a = large_and_always_integer
|
UInt a = large_and_always_integer
|
||||||
? static_cast<UInt>(mantissa()) << (normalized_exponent() - Traits::mantissa_bits)
|
? static_cast<UInt>(mantissa()) << (normalizedExponent() - Traits::mantissa_bits)
|
||||||
: static_cast<UInt>(mantissa()) >> (Traits::mantissa_bits - normalized_exponent());
|
: static_cast<UInt>(mantissa()) >> (Traits::mantissa_bits - normalizedExponent());
|
||||||
|
|
||||||
UInt b = uint_rhs - (static_cast<UInt>(1) << normalized_exponent());
|
UInt b = uint_rhs - (static_cast<UInt>(1) << normalizedExponent());
|
||||||
|
|
||||||
if (a < b)
|
if (a < b)
|
||||||
return is_negative() ? 1 : -1;
|
return isNegative() ? 1 : -1;
|
||||||
if (a > b)
|
if (a > b)
|
||||||
return is_negative() ? -1 : 1;
|
return isNegative() ? -1 : 1;
|
||||||
|
|
||||||
/// Float has no fractional part means that the numbers are equal.
|
/// Float has no fractional part means that the numbers are equal.
|
||||||
if (large_and_always_integer || (mantissa() & ((1ULL << (Traits::mantissa_bits - normalized_exponent())) - 1)) == 0)
|
if (large_and_always_integer || (mantissa() & ((1ULL << (Traits::mantissa_bits - normalizedExponent())) - 1)) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
/// Float has fractional part means its abs value is larger.
|
/// Float has fractional part means its abs value is larger.
|
||||||
return is_negative() ? -1 : 1;
|
return isNegative() ? -1 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ POCO_IMPLEMENT_EXCEPTION(JSONException, Poco::Exception, "JSONException") // NOL
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/// Прочитать беззнаковое целое в простом формате из не-0-terminated строки.
|
/// Read unsigned integer in a simple form from a non-0-terminated string.
|
||||||
static UInt64 readUIntText(const char * buf, const char * end)
|
static UInt64 readUIntText(const char * buf, const char * end)
|
||||||
{
|
{
|
||||||
UInt64 x = 0;
|
UInt64 x = 0;
|
||||||
@ -59,7 +59,7 @@ static UInt64 readUIntText(const char * buf, const char * end)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Прочитать знаковое целое в простом формате из не-0-terminated строки.
|
/// Read signed integer in a simple form from a non-0-terminated string.
|
||||||
static Int64 readIntText(const char * buf, const char * end)
|
static Int64 readIntText(const char * buf, const char * end)
|
||||||
{
|
{
|
||||||
bool negative = false;
|
bool negative = false;
|
||||||
@ -102,7 +102,7 @@ static Int64 readIntText(const char * buf, const char * end)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Прочитать число с плавающей запятой в простом формате, с грубым округлением, из не-0-terminated строки.
|
/// Read floating point number in simple format, imprecisely, from a non-0-terminated string.
|
||||||
static double readFloatText(const char * buf, const char * end)
|
static double readFloatText(const char * buf, const char * end)
|
||||||
{
|
{
|
||||||
bool negative = false;
|
bool negative = false;
|
||||||
@ -151,8 +151,8 @@ static double readFloatText(const char * buf, const char * end)
|
|||||||
case 'E':
|
case 'E':
|
||||||
{
|
{
|
||||||
++buf;
|
++buf;
|
||||||
Int32 exponent = readIntText(buf, end);
|
auto exponent = readIntText(buf, end);
|
||||||
x *= preciseExp10(exponent);
|
x *= preciseExp10(static_cast<double>(exponent));
|
||||||
|
|
||||||
run = false;
|
run = false;
|
||||||
break;
|
break;
|
||||||
@ -207,7 +207,7 @@ JSON::ElementType JSON::getType() const
|
|||||||
return TYPE_NUMBER;
|
return TYPE_NUMBER;
|
||||||
case '"':
|
case '"':
|
||||||
{
|
{
|
||||||
/// Проверим - это просто строка или name-value pair
|
/// Is it a string or a name-value pair?
|
||||||
Pos after_string = skipString();
|
Pos after_string = skipString();
|
||||||
if (after_string < ptr_end && *after_string == ':')
|
if (after_string < ptr_end && *after_string == ':')
|
||||||
return TYPE_NAME_VALUE_PAIR;
|
return TYPE_NAME_VALUE_PAIR;
|
||||||
@ -229,15 +229,13 @@ void JSON::checkPos(Pos pos) const
|
|||||||
|
|
||||||
JSON::Pos JSON::skipString() const
|
JSON::Pos JSON::skipString() const
|
||||||
{
|
{
|
||||||
//std::cerr << "skipString()\t" << data() << std::endl;
|
|
||||||
|
|
||||||
Pos pos = ptr_begin;
|
Pos pos = ptr_begin;
|
||||||
checkPos(pos);
|
checkPos(pos);
|
||||||
if (*pos != '"')
|
if (*pos != '"')
|
||||||
throw JSONException(std::string("JSON: expected \", got ") + *pos);
|
throw JSONException(std::string("JSON: expected \", got ") + *pos);
|
||||||
++pos;
|
++pos;
|
||||||
|
|
||||||
/// fast path: находим следующую двойную кавычку. Если перед ней нет бэкслеша - значит это конец строки (при допущении корректности JSON).
|
/// fast path: find next double quote. If it is not escaped by backslash - then it's an end of string (assuming JSON is valid).
|
||||||
Pos closing_quote = reinterpret_cast<const char *>(memchr(reinterpret_cast<const void *>(pos), '\"', ptr_end - pos));
|
Pos closing_quote = reinterpret_cast<const char *>(memchr(reinterpret_cast<const void *>(pos), '\"', ptr_end - pos));
|
||||||
if (nullptr != closing_quote && closing_quote[-1] != '\\')
|
if (nullptr != closing_quote && closing_quote[-1] != '\\')
|
||||||
return closing_quote + 1;
|
return closing_quote + 1;
|
||||||
@ -269,8 +267,6 @@ JSON::Pos JSON::skipString() const
|
|||||||
|
|
||||||
JSON::Pos JSON::skipNumber() const
|
JSON::Pos JSON::skipNumber() const
|
||||||
{
|
{
|
||||||
//std::cerr << "skipNumber()\t" << data() << std::endl;
|
|
||||||
|
|
||||||
Pos pos = ptr_begin;
|
Pos pos = ptr_begin;
|
||||||
|
|
||||||
checkPos(pos);
|
checkPos(pos);
|
||||||
@ -296,8 +292,6 @@ JSON::Pos JSON::skipNumber() const
|
|||||||
|
|
||||||
JSON::Pos JSON::skipBool() const
|
JSON::Pos JSON::skipBool() const
|
||||||
{
|
{
|
||||||
//std::cerr << "skipBool()\t" << data() << std::endl;
|
|
||||||
|
|
||||||
Pos pos = ptr_begin;
|
Pos pos = ptr_begin;
|
||||||
checkPos(pos);
|
checkPos(pos);
|
||||||
|
|
||||||
@ -314,16 +308,12 @@ JSON::Pos JSON::skipBool() const
|
|||||||
|
|
||||||
JSON::Pos JSON::skipNull() const
|
JSON::Pos JSON::skipNull() const
|
||||||
{
|
{
|
||||||
//std::cerr << "skipNull()\t" << data() << std::endl;
|
|
||||||
|
|
||||||
return ptr_begin + 4;
|
return ptr_begin + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
JSON::Pos JSON::skipNameValuePair() const
|
JSON::Pos JSON::skipNameValuePair() const
|
||||||
{
|
{
|
||||||
//std::cerr << "skipNameValuePair()\t" << data() << std::endl;
|
|
||||||
|
|
||||||
Pos pos = skipString();
|
Pos pos = skipString();
|
||||||
checkPos(pos);
|
checkPos(pos);
|
||||||
|
|
||||||
@ -338,8 +328,6 @@ JSON::Pos JSON::skipNameValuePair() const
|
|||||||
|
|
||||||
JSON::Pos JSON::skipArray() const
|
JSON::Pos JSON::skipArray() const
|
||||||
{
|
{
|
||||||
//std::cerr << "skipArray()\t" << data() << std::endl;
|
|
||||||
|
|
||||||
if (!isArray())
|
if (!isArray())
|
||||||
throw JSONException("JSON: expected [");
|
throw JSONException("JSON: expected [");
|
||||||
Pos pos = ptr_begin;
|
Pos pos = ptr_begin;
|
||||||
@ -370,8 +358,6 @@ JSON::Pos JSON::skipArray() const
|
|||||||
|
|
||||||
JSON::Pos JSON::skipObject() const
|
JSON::Pos JSON::skipObject() const
|
||||||
{
|
{
|
||||||
//std::cerr << "skipObject()\t" << data() << std::endl;
|
|
||||||
|
|
||||||
if (!isObject())
|
if (!isObject())
|
||||||
throw JSONException("JSON: expected {");
|
throw JSONException("JSON: expected {");
|
||||||
Pos pos = ptr_begin;
|
Pos pos = ptr_begin;
|
||||||
@ -402,8 +388,6 @@ JSON::Pos JSON::skipObject() const
|
|||||||
|
|
||||||
JSON::Pos JSON::skipElement() const
|
JSON::Pos JSON::skipElement() const
|
||||||
{
|
{
|
||||||
//std::cerr << "skipElement()\t" << data() << std::endl;
|
|
||||||
|
|
||||||
ElementType type = getType();
|
ElementType type = getType();
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -640,7 +624,7 @@ std::string JSON::getString() const
|
|||||||
{
|
{
|
||||||
throw JSONException("JSON: incorrect syntax: incorrect HEX code.");
|
throw JSONException("JSON: incorrect syntax: incorrect HEX code.");
|
||||||
}
|
}
|
||||||
buf.resize(buf.size() + 6); /// максимальный размер UTF8 многобайтовой последовательности
|
buf.resize(buf.size() + 6); /// Max size of UTF-8 sequence, including pre-standard mapping of UCS-4 to UTF-8.
|
||||||
int res = utf8.convert(unicode,
|
int res = utf8.convert(unicode,
|
||||||
reinterpret_cast<unsigned char *>(const_cast<char*>(buf.data())) + buf.size() - 6, 6);
|
reinterpret_cast<unsigned char *>(const_cast<char*>(buf.data())) + buf.size() - 6, 6);
|
||||||
if (!res)
|
if (!res)
|
||||||
@ -754,8 +738,6 @@ JSON::iterator JSON::iterator::begin() const
|
|||||||
if (type != TYPE_ARRAY && type != TYPE_OBJECT)
|
if (type != TYPE_ARRAY && type != TYPE_OBJECT)
|
||||||
throw JSONException("JSON: not array or object when calling begin() method.");
|
throw JSONException("JSON: not array or object when calling begin() method.");
|
||||||
|
|
||||||
//std::cerr << "begin()\t" << data() << std::endl;
|
|
||||||
|
|
||||||
Pos pos = ptr_begin + 1;
|
Pos pos = ptr_begin + 1;
|
||||||
checkPos(pos);
|
checkPos(pos);
|
||||||
if (*pos == '}' || *pos == ']')
|
if (*pos == '}' || *pos == ']')
|
||||||
@ -846,4 +828,3 @@ bool JSON::isType<bool>() const
|
|||||||
{
|
{
|
||||||
return isBool();
|
return isBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// NOLINTBEGIN(google-explicit-constructor)
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
# pragma clang diagnostic push
|
# pragma clang diagnostic push
|
||||||
# pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
|
# pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
|
||||||
@ -46,6 +47,7 @@ POCO_DECLARE_EXCEPTION(Foundation_API, JSONException, Poco::Exception)
|
|||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
# pragma clang diagnostic pop
|
# pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
// NOLINTEND(google-explicit-constructor)
|
||||||
|
|
||||||
class JSON
|
class JSON
|
||||||
{
|
{
|
||||||
@ -61,7 +63,7 @@ public:
|
|||||||
checkInit();
|
checkInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
JSON(const std::string & s) : ptr_begin(s.data()), ptr_end(s.data() + s.size()), level(0)
|
explicit JSON(std::string_view s) : ptr_begin(s.data()), ptr_end(s.data() + s.size()), level(0)
|
||||||
{
|
{
|
||||||
checkInit();
|
checkInit();
|
||||||
}
|
}
|
||||||
@ -71,13 +73,7 @@ public:
|
|||||||
*this = rhs;
|
*this = rhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSON & operator=(const JSON & rhs)
|
JSON & operator=(const JSON & rhs) = default;
|
||||||
{
|
|
||||||
ptr_begin = rhs.ptr_begin;
|
|
||||||
ptr_end = rhs.ptr_end;
|
|
||||||
level = rhs.level;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char * data() const { return ptr_begin; }
|
const char * data() const { return ptr_begin; }
|
||||||
const char * dataEnd() const { return ptr_end; }
|
const char * dataEnd() const { return ptr_end; }
|
||||||
@ -169,7 +165,7 @@ public:
|
|||||||
|
|
||||||
/// Перейти к следующему элементу массива или следующей name-value паре объекта.
|
/// Перейти к следующему элементу массива или следующей name-value паре объекта.
|
||||||
iterator & operator++();
|
iterator & operator++();
|
||||||
iterator operator++(int);
|
iterator operator++(int); // NOLINT(cert-dcl21-cpp)
|
||||||
|
|
||||||
/// Есть ли в строке escape-последовательности
|
/// Есть ли в строке escape-последовательности
|
||||||
bool hasEscapes() const;
|
bool hasEscapes() const;
|
||||||
|
@ -27,7 +27,7 @@ void trim(String & s)
|
|||||||
|
|
||||||
std::string getEditor()
|
std::string getEditor()
|
||||||
{
|
{
|
||||||
const char * editor = std::getenv("EDITOR");
|
const char * editor = std::getenv("EDITOR"); // NOLINT(concurrency-mt-unsafe)
|
||||||
|
|
||||||
if (!editor || !*editor)
|
if (!editor || !*editor)
|
||||||
editor = "vim";
|
editor = "vim";
|
||||||
@ -76,7 +76,7 @@ void convertHistoryFile(const std::string & path, replxx::Replxx & rx)
|
|||||||
if (!in)
|
if (!in)
|
||||||
{
|
{
|
||||||
rx.print("Cannot open %s reading (for conversion): %s\n",
|
rx.print("Cannot open %s reading (for conversion): %s\n",
|
||||||
path.c_str(), errnoToString(errno).c_str());
|
path.c_str(), errnoToString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ void convertHistoryFile(const std::string & path, replxx::Replxx & rx)
|
|||||||
if (getline(in, line).bad())
|
if (getline(in, line).bad())
|
||||||
{
|
{
|
||||||
rx.print("Cannot read from %s (for conversion): %s\n",
|
rx.print("Cannot read from %s (for conversion): %s\n",
|
||||||
path.c_str(), errnoToString(errno).c_str());
|
path.c_str(), errnoToString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ void convertHistoryFile(const std::string & path, replxx::Replxx & rx)
|
|||||||
if (!out)
|
if (!out)
|
||||||
{
|
{
|
||||||
rx.print("Cannot open %s for writing (for conversion): %s\n",
|
rx.print("Cannot open %s for writing (for conversion): %s\n",
|
||||||
path.c_str(), errnoToString(errno).c_str());
|
path.c_str(), errnoToString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ ReplxxLineReader::ReplxxLineReader(
|
|||||||
history_file_fd = open(history_file_path.c_str(), O_RDWR);
|
history_file_fd = open(history_file_path.c_str(), O_RDWR);
|
||||||
if (history_file_fd < 0)
|
if (history_file_fd < 0)
|
||||||
{
|
{
|
||||||
rx.print("Open of history file failed: %s\n", errnoToString(errno).c_str());
|
rx.print("Open of history file failed: %s\n", errnoToString().c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -159,18 +159,18 @@ ReplxxLineReader::ReplxxLineReader(
|
|||||||
|
|
||||||
if (flock(history_file_fd, LOCK_SH))
|
if (flock(history_file_fd, LOCK_SH))
|
||||||
{
|
{
|
||||||
rx.print("Shared lock of history file failed: %s\n", errnoToString(errno).c_str());
|
rx.print("Shared lock of history file failed: %s\n", errnoToString().c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!rx.history_load(history_file_path))
|
if (!rx.history_load(history_file_path))
|
||||||
{
|
{
|
||||||
rx.print("Loading history failed: %s\n", errnoToString(errno).c_str());
|
rx.print("Loading history failed: %s\n", errnoToString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flock(history_file_fd, LOCK_UN))
|
if (flock(history_file_fd, LOCK_UN))
|
||||||
{
|
{
|
||||||
rx.print("Unlock of history file failed: %s\n", errnoToString(errno).c_str());
|
rx.print("Unlock of history file failed: %s\n", errnoToString().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,12 +220,41 @@ ReplxxLineReader::ReplxxLineReader(
|
|||||||
rx.bind_key(Replxx::KEY::control('W'), [this](char32_t code) { return rx.invoke(Replxx::ACTION::KILL_TO_WHITESPACE_ON_LEFT, code); });
|
rx.bind_key(Replxx::KEY::control('W'), [this](char32_t code) { return rx.invoke(Replxx::ACTION::KILL_TO_WHITESPACE_ON_LEFT, code); });
|
||||||
|
|
||||||
rx.bind_key(Replxx::KEY::meta('E'), [this](char32_t) { openEditor(); return Replxx::ACTION_RESULT::CONTINUE; });
|
rx.bind_key(Replxx::KEY::meta('E'), [this](char32_t) { openEditor(); return Replxx::ACTION_RESULT::CONTINUE; });
|
||||||
|
|
||||||
|
/// readline insert-comment
|
||||||
|
auto insert_comment_action = [this](char32_t code)
|
||||||
|
{
|
||||||
|
replxx::Replxx::State state(rx.get_state());
|
||||||
|
const char * line = state.text();
|
||||||
|
const char * line_end = line + strlen(line);
|
||||||
|
|
||||||
|
std::string commented_line;
|
||||||
|
if (std::find(line, line_end, '\n') != line_end)
|
||||||
|
{
|
||||||
|
/// If query has multiple lines, multiline comment is used over
|
||||||
|
/// commenting each line separately for easier uncomment (though
|
||||||
|
/// with invoking editor it is simpler to uncomment multiple lines)
|
||||||
|
///
|
||||||
|
/// Note, that using multiline comment is OK even with nested
|
||||||
|
/// comments, since nested comments are supported.
|
||||||
|
commented_line = fmt::format("/* {} */", state.text());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// In a simplest case use simple comment.
|
||||||
|
commented_line = fmt::format("-- {}", state.text());
|
||||||
|
}
|
||||||
|
rx.set_state(replxx::Replxx::State(commented_line.c_str(), commented_line.size()));
|
||||||
|
|
||||||
|
return rx.invoke(Replxx::ACTION::COMMIT_LINE, code);
|
||||||
|
};
|
||||||
|
rx.bind_key(Replxx::KEY::meta('#'), insert_comment_action);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReplxxLineReader::~ReplxxLineReader()
|
ReplxxLineReader::~ReplxxLineReader()
|
||||||
{
|
{
|
||||||
if (close(history_file_fd))
|
if (close(history_file_fd))
|
||||||
rx.print("Close of history file failed: %s\n", errnoToString(errno).c_str());
|
rx.print("Close of history file failed: %s\n", errnoToString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
LineReader::InputStatus ReplxxLineReader::readOneLine(const String & prompt)
|
LineReader::InputStatus ReplxxLineReader::readOneLine(const String & prompt)
|
||||||
@ -250,7 +279,7 @@ void ReplxxLineReader::addToHistory(const String & line)
|
|||||||
// and that is why flock() is added here.
|
// and that is why flock() is added here.
|
||||||
bool locked = false;
|
bool locked = false;
|
||||||
if (flock(history_file_fd, LOCK_EX))
|
if (flock(history_file_fd, LOCK_EX))
|
||||||
rx.print("Lock of history file failed: %s\n", errnoToString(errno).c_str());
|
rx.print("Lock of history file failed: %s\n", errnoToString().c_str());
|
||||||
else
|
else
|
||||||
locked = true;
|
locked = true;
|
||||||
|
|
||||||
@ -258,10 +287,10 @@ void ReplxxLineReader::addToHistory(const String & line)
|
|||||||
|
|
||||||
// flush changes to the disk
|
// flush changes to the disk
|
||||||
if (!rx.history_save(history_file_path))
|
if (!rx.history_save(history_file_path))
|
||||||
rx.print("Saving history failed: %s\n", errnoToString(errno).c_str());
|
rx.print("Saving history failed: %s\n", errnoToString().c_str());
|
||||||
|
|
||||||
if (locked && 0 != flock(history_file_fd, LOCK_UN))
|
if (locked && 0 != flock(history_file_fd, LOCK_UN))
|
||||||
rx.print("Unlock of history file failed: %s\n", errnoToString(errno).c_str());
|
rx.print("Unlock of history file failed: %s\n", errnoToString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// See comments in ShellCommand::executeImpl()
|
/// See comments in ShellCommand::executeImpl()
|
||||||
@ -275,7 +304,7 @@ int ReplxxLineReader::executeEditor(const std::string & path)
|
|||||||
static void * real_vfork = dlsym(RTLD_DEFAULT, "vfork");
|
static void * real_vfork = dlsym(RTLD_DEFAULT, "vfork");
|
||||||
if (!real_vfork)
|
if (!real_vfork)
|
||||||
{
|
{
|
||||||
rx.print("Cannot find symbol vfork in myself: %s\n", errnoToString(errno).c_str());
|
rx.print("Cannot find symbol vfork in myself: %s\n", errnoToString().c_str());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,7 +312,7 @@ int ReplxxLineReader::executeEditor(const std::string & path)
|
|||||||
|
|
||||||
if (-1 == pid)
|
if (-1 == pid)
|
||||||
{
|
{
|
||||||
rx.print("Cannot vfork: %s\n", errnoToString(errno).c_str());
|
rx.print("Cannot vfork: %s\n", errnoToString().c_str());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,11 +321,11 @@ int ReplxxLineReader::executeEditor(const std::string & path)
|
|||||||
{
|
{
|
||||||
sigset_t mask;
|
sigset_t mask;
|
||||||
sigemptyset(&mask);
|
sigemptyset(&mask);
|
||||||
sigprocmask(0, nullptr, &mask);
|
sigprocmask(0, nullptr, &mask); // NOLINT(concurrency-mt-unsafe) // ok in newly created process
|
||||||
sigprocmask(SIG_UNBLOCK, &mask, nullptr);
|
sigprocmask(SIG_UNBLOCK, &mask, nullptr); // NOLINT(concurrency-mt-unsafe) // ok in newly created process
|
||||||
|
|
||||||
execvp(editor.c_str(), argv);
|
execvp(editor.c_str(), argv);
|
||||||
rx.print("Cannot execute %s: %s\n", editor.c_str(), errnoToString(errno).c_str());
|
rx.print("Cannot execute %s: %s\n", editor.c_str(), errnoToString().c_str());
|
||||||
_exit(-1);
|
_exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,7 +338,7 @@ int ReplxxLineReader::executeEditor(const std::string & path)
|
|||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
rx.print("Cannot waitpid: %s\n", errnoToString(errno).c_str());
|
rx.print("Cannot waitpid: %s\n", errnoToString().c_str());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -324,7 +353,7 @@ void ReplxxLineReader::openEditor()
|
|||||||
int fd = ::mkstemps(filename, 4);
|
int fd = ::mkstemps(filename, 4);
|
||||||
if (-1 == fd)
|
if (-1 == fd)
|
||||||
{
|
{
|
||||||
rx.print("Cannot create temporary file to edit query: %s\n", errnoToString(errno).c_str());
|
rx.print("Cannot create temporary file to edit query: %s\n", errnoToString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,7 +367,7 @@ void ReplxxLineReader::openEditor()
|
|||||||
ssize_t res = ::write(fd, begin + bytes_written, offset - bytes_written);
|
ssize_t res = ::write(fd, begin + bytes_written, offset - bytes_written);
|
||||||
if ((-1 == res || 0 == res) && errno != EINTR)
|
if ((-1 == res || 0 == res) && errno != EINTR)
|
||||||
{
|
{
|
||||||
rx.print("Cannot write to temporary query file %s: %s\n", filename, errnoToString(errno).c_str());
|
rx.print("Cannot write to temporary query file %s: %s\n", filename, errnoToString().c_str());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
bytes_written += res;
|
bytes_written += res;
|
||||||
@ -346,7 +375,7 @@ void ReplxxLineReader::openEditor()
|
|||||||
|
|
||||||
if (0 != ::close(fd))
|
if (0 != ::close(fd))
|
||||||
{
|
{
|
||||||
rx.print("Cannot close temporary query file %s: %s\n", filename, errnoToString(errno).c_str());
|
rx.print("Cannot close temporary query file %s: %s\n", filename, errnoToString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,7 +393,7 @@ void ReplxxLineReader::openEditor()
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
rx.print("Cannot read from temporary query file %s: %s\n", filename, errnoToString(errno).c_str());
|
rx.print("Cannot read from temporary query file %s: %s\n", filename, errnoToString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -373,7 +402,7 @@ void ReplxxLineReader::openEditor()
|
|||||||
enableBracketedPaste();
|
enableBracketedPaste();
|
||||||
|
|
||||||
if (0 != ::unlink(filename))
|
if (0 != ::unlink(filename))
|
||||||
rx.print("Cannot remove temporary query file %s: %s\n", filename, errnoToString(errno).c_str());
|
rx.print("Cannot remove temporary query file %s: %s\n", filename, errnoToString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReplxxLineReader::enableBracketedPaste()
|
void ReplxxLineReader::enableBracketedPaste()
|
||||||
|
@ -55,18 +55,12 @@ struct StringRef
|
|||||||
bool empty() const { return size == 0; }
|
bool empty() const { return size == 0; }
|
||||||
|
|
||||||
std::string toString() const { return std::string(data, size); }
|
std::string toString() const { return std::string(data, size); }
|
||||||
|
|
||||||
explicit operator std::string() const { return toString(); }
|
explicit operator std::string() const { return toString(); }
|
||||||
std::string_view toView() const { return std::string_view(data, size); }
|
|
||||||
|
|
||||||
|
std::string_view toView() const { return std::string_view(data, size); }
|
||||||
constexpr explicit operator std::string_view() const { return std::string_view(data, size); }
|
constexpr explicit operator std::string_view() const { return std::string_view(data, size); }
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Here constexpr doesn't implicate inline, see https://www.viva64.com/en/w/v1043/
|
|
||||||
/// nullptr can't be used because the StringRef values are used in SipHash's pointer arithmetic
|
|
||||||
/// and the UBSan thinks that something like nullptr + 8 is UB.
|
|
||||||
constexpr const inline char empty_string_ref_addr{};
|
|
||||||
constexpr const inline StringRef EMPTY_STRING_REF{&empty_string_ref_addr, 0};
|
|
||||||
|
|
||||||
using StringRefs = std::vector<StringRef>;
|
using StringRefs = std::vector<StringRef>;
|
||||||
|
|
||||||
@ -228,7 +222,7 @@ inline UInt64 shiftMix(UInt64 val)
|
|||||||
return val ^ (val >> 47);
|
return val ^ (val >> 47);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline UInt64 rotateByAtLeast1(UInt64 val, int shift)
|
inline UInt64 rotateByAtLeast1(UInt64 val, UInt8 shift)
|
||||||
{
|
{
|
||||||
return (val >> shift) | (val << (64 - shift));
|
return (val >> shift) | (val << (64 - shift));
|
||||||
}
|
}
|
||||||
@ -250,7 +244,7 @@ inline size_t hashLessThan8(const char * data, size_t size)
|
|||||||
uint8_t b = data[size >> 1];
|
uint8_t b = data[size >> 1];
|
||||||
uint8_t c = data[size - 1];
|
uint8_t c = data[size - 1];
|
||||||
uint32_t y = static_cast<uint32_t>(a) + (static_cast<uint32_t>(b) << 8);
|
uint32_t y = static_cast<uint32_t>(a) + (static_cast<uint32_t>(b) << 8);
|
||||||
uint32_t z = size + (static_cast<uint32_t>(c) << 2);
|
uint32_t z = static_cast<uint32_t>(size) + (static_cast<uint32_t>(c) << 2);
|
||||||
return shiftMix(y * k2 ^ z * k3) * k2;
|
return shiftMix(y * k2 ^ z * k3) * k2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,7 +257,7 @@ inline size_t hashLessThan16(const char * data, size_t size)
|
|||||||
{
|
{
|
||||||
UInt64 a = unalignedLoad<UInt64>(data);
|
UInt64 a = unalignedLoad<UInt64>(data);
|
||||||
UInt64 b = unalignedLoad<UInt64>(data + size - 8);
|
UInt64 b = unalignedLoad<UInt64>(data + size - 8);
|
||||||
return hashLen16(a, rotateByAtLeast1(b + size, size)) ^ b;
|
return hashLen16(a, rotateByAtLeast1(b + size, static_cast<UInt8>(size))) ^ b;
|
||||||
}
|
}
|
||||||
|
|
||||||
return hashLessThan8(data, size);
|
return hashLessThan8(data, size);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <base/extended_types.h>
|
#include <base/extended_types.h>
|
||||||
#include <base/defines.h>
|
#include <base/defines.h>
|
||||||
|
|
||||||
|
// NOLINTBEGIN(google-runtime-int)
|
||||||
|
|
||||||
namespace common
|
namespace common
|
||||||
{
|
{
|
||||||
@ -206,3 +207,5 @@ namespace common
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOLINTEND(google-runtime-int)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
@ -143,8 +143,8 @@
|
|||||||
|
|
||||||
/// Macros for suppressing TSA warnings for specific reads/writes (instead of suppressing it for the whole function)
|
/// Macros for suppressing TSA warnings for specific reads/writes (instead of suppressing it for the whole function)
|
||||||
/// Consider adding a comment before using these macros.
|
/// Consider adding a comment before using these macros.
|
||||||
# define TSA_SUPPRESS_WARNING_FOR_READ(x) [&]() TSA_NO_THREAD_SAFETY_ANALYSIS -> const auto & { return (x); }()
|
# define TSA_SUPPRESS_WARNING_FOR_READ(x) ([&]() TSA_NO_THREAD_SAFETY_ANALYSIS -> const auto & { return (x); }())
|
||||||
# define TSA_SUPPRESS_WARNING_FOR_WRITE(x) [&]() TSA_NO_THREAD_SAFETY_ANALYSIS -> auto & { return (x); }()
|
# define TSA_SUPPRESS_WARNING_FOR_WRITE(x) ([&]() TSA_NO_THREAD_SAFETY_ANALYSIS -> auto & { return (x); }())
|
||||||
|
|
||||||
/// This macro is useful when only one thread writes to a member
|
/// This macro is useful when only one thread writes to a member
|
||||||
/// and you want to read this member from the same thread without locking a mutex.
|
/// and you want to read this member from the same thread without locking a mutex.
|
||||||
|
@ -3,10 +3,11 @@
|
|||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|
||||||
|
|
||||||
std::string errnoToString(int code, int the_errno)
|
std::string errnoToString(int the_errno)
|
||||||
{
|
{
|
||||||
const size_t buf_size = 128;
|
const size_t buf_size = 128;
|
||||||
char buf[buf_size];
|
char buf[buf_size];
|
||||||
|
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
int rc = strerror_r(the_errno, buf, buf_size);
|
int rc = strerror_r(the_errno, buf, buf_size);
|
||||||
#ifdef OS_DARWIN
|
#ifdef OS_DARWIN
|
||||||
@ -15,7 +16,7 @@ std::string errnoToString(int code, int the_errno)
|
|||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
std::string tmp = std::to_string(code);
|
std::string tmp = std::to_string(the_errno);
|
||||||
const char * code_str = tmp.c_str();
|
const char * code_str = tmp.c_str();
|
||||||
const char * unknown_message = "Unknown error ";
|
const char * unknown_message = "Unknown error ";
|
||||||
strcpy(buf, unknown_message);
|
strcpy(buf, unknown_message);
|
||||||
@ -23,7 +24,6 @@ std::string errnoToString(int code, int the_errno)
|
|||||||
}
|
}
|
||||||
return fmt::format("errno: {}, strerror: {}", the_errno, buf);
|
return fmt::format("errno: {}, strerror: {}", the_errno, buf);
|
||||||
#else
|
#else
|
||||||
(void)code;
|
|
||||||
return fmt::format("errno: {}, strerror: {}", the_errno, strerror_r(the_errno, buf, sizeof(buf)));
|
return fmt::format("errno: {}, strerror: {}", the_errno, strerror_r(the_errno, buf, sizeof(buf)));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
std::string errnoToString(int code, int the_errno = errno);
|
std::string errnoToString(int the_errno = errno);
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#include <base/types.h>
|
#include <base/types.h>
|
||||||
#include <base/wide_integer.h>
|
#include <base/wide_integer.h>
|
||||||
|
|
||||||
|
|
||||||
using Int128 = wide::integer<128, signed>;
|
using Int128 = wide::integer<128, signed>;
|
||||||
using UInt128 = wide::integer<128, unsigned>;
|
using UInt128 = wide::integer<128, unsigned>;
|
||||||
using Int256 = wide::integer<256, signed>;
|
using Int256 = wide::integer<256, signed>;
|
||||||
@ -18,7 +17,7 @@ static_assert(sizeof(UInt256) == 32);
|
|||||||
/// (std::common_type), are "set in stone". Attempting to specialize them causes undefined behavior.
|
/// (std::common_type), are "set in stone". Attempting to specialize them causes undefined behavior.
|
||||||
/// So instead of using the std type_traits, we use our own version which allows extension.
|
/// So instead of using the std type_traits, we use our own version which allows extension.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_signed
|
struct is_signed // NOLINT(readability-identifier-naming)
|
||||||
{
|
{
|
||||||
static constexpr bool value = std::is_signed_v<T>;
|
static constexpr bool value = std::is_signed_v<T>;
|
||||||
};
|
};
|
||||||
@ -30,7 +29,7 @@ template <typename T>
|
|||||||
inline constexpr bool is_signed_v = is_signed<T>::value;
|
inline constexpr bool is_signed_v = is_signed<T>::value;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_unsigned
|
struct is_unsigned // NOLINT(readability-identifier-naming)
|
||||||
{
|
{
|
||||||
static constexpr bool value = std::is_unsigned_v<T>;
|
static constexpr bool value = std::is_unsigned_v<T>;
|
||||||
};
|
};
|
||||||
@ -51,7 +50,7 @@ template <class T> concept is_integer =
|
|||||||
template <class T> concept is_floating_point = std::is_floating_point_v<T>;
|
template <class T> concept is_floating_point = std::is_floating_point_v<T>;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_arithmetic
|
struct is_arithmetic // NOLINT(readability-identifier-naming)
|
||||||
{
|
{
|
||||||
static constexpr bool value = std::is_arithmetic_v<T>;
|
static constexpr bool value = std::is_arithmetic_v<T>;
|
||||||
};
|
};
|
||||||
@ -66,9 +65,9 @@ template <typename T>
|
|||||||
inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
|
inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct make_unsigned
|
struct make_unsigned // NOLINT(readability-identifier-naming)
|
||||||
{
|
{
|
||||||
typedef std::make_unsigned_t<T> type;
|
using type = std::make_unsigned_t<T>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct make_unsigned<Int128> { using type = UInt128; };
|
template <> struct make_unsigned<Int128> { using type = UInt128; };
|
||||||
@ -79,9 +78,9 @@ template <> struct make_unsigned<UInt256> { using type = UInt256; };
|
|||||||
template <typename T> using make_unsigned_t = typename make_unsigned<T>::type;
|
template <typename T> using make_unsigned_t = typename make_unsigned<T>::type;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct make_signed
|
struct make_signed // NOLINT(readability-identifier-naming)
|
||||||
{
|
{
|
||||||
typedef std::make_signed_t<T> type;
|
using type = std::make_signed_t<T>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <> struct make_signed<Int128> { using type = Int128; };
|
template <> struct make_signed<Int128> { using type = Int128; };
|
||||||
@ -92,7 +91,7 @@ template <> struct make_signed<UInt256> { using type = Int256; };
|
|||||||
template <typename T> using make_signed_t = typename make_signed<T>::type;
|
template <typename T> using make_signed_t = typename make_signed<T>::type;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct is_big_int
|
struct is_big_int // NOLINT(readability-identifier-naming)
|
||||||
{
|
{
|
||||||
static constexpr bool value = false;
|
static constexpr bool value = false;
|
||||||
};
|
};
|
||||||
@ -104,4 +103,3 @@ template <> struct is_big_int<UInt256> { static constexpr bool value = true; };
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline constexpr bool is_big_int_v = is_big_int<T>::value;
|
inline constexpr bool is_big_int_v = is_big_int<T>::value;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
* Allow to search for next character from the set of 'symbols...' in a string.
|
* Allow to search for next character from the set of 'symbols...' in a string.
|
||||||
* It is similar to 'strpbrk', 'strcspn' (and 'strchr', 'memchr' in the case of one symbol and '\0'),
|
* It is similar to 'strpbrk', 'strcspn' (and 'strchr', 'memchr' in the case of one symbol and '\0'),
|
||||||
* but with the following differencies:
|
* but with the following differences:
|
||||||
* - works with any memory ranges, including containing zero bytes;
|
* - works with any memory ranges, including containing zero bytes;
|
||||||
* - doesn't require terminating zero byte: end of memory range is passed explicitly;
|
* - doesn't require terminating zero byte: end of memory range is passed explicitly;
|
||||||
* - if not found, returns pointer to end instead of nullptr;
|
* - if not found, returns pointer to end instead of nullptr;
|
||||||
|
@ -22,7 +22,7 @@ uint64_t getThreadId()
|
|||||||
#if defined(OS_ANDROID)
|
#if defined(OS_ANDROID)
|
||||||
current_tid = gettid();
|
current_tid = gettid();
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX)
|
||||||
current_tid = syscall(SYS_gettid); /// This call is always successful. - man gettid
|
current_tid = static_cast<uint64_t>(syscall(SYS_gettid)); /// This call is always successful. - man gettid
|
||||||
#elif defined(OS_FREEBSD)
|
#elif defined(OS_FREEBSD)
|
||||||
current_tid = pthread_getthreadid_np();
|
current_tid = pthread_getthreadid_np();
|
||||||
#elif defined(OS_SUNOS)
|
#elif defined(OS_SUNOS)
|
||||||
|
@ -120,6 +120,7 @@ Out & dumpDispatchPriorities(Out & out, T && x, std::decay_t<decltype(dumpImpl<p
|
|||||||
return dumpImpl<priority>(out, x);
|
return dumpImpl<priority>(out, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOLINTNEXTLINE(google-explicit-constructor)
|
||||||
struct LowPriority { LowPriority(void *) {} };
|
struct LowPriority { LowPriority(void *) {} };
|
||||||
|
|
||||||
template <int priority, typename Out, typename T>
|
template <int priority, typename Out, typename T>
|
||||||
|
@ -91,10 +91,10 @@ template <size_t N>
|
|||||||
using DivisionBy10PowN = typename SelectType
|
using DivisionBy10PowN = typename SelectType
|
||||||
<
|
<
|
||||||
N,
|
N,
|
||||||
Division<uint8_t, 0, 205U, 11>, /// divide by 10
|
Division<uint8_t, false, 205U, 11>, /// divide by 10
|
||||||
Division<uint16_t, 1, 41943U, 22>, /// divide by 100
|
Division<uint16_t, true, 41943U, 22>, /// divide by 100
|
||||||
Division<uint32_t, 0, 3518437209U, 45>, /// divide by 10000
|
Division<uint32_t, false, 3518437209U, 45>, /// divide by 10000
|
||||||
Division<uint64_t, 0, 12379400392853802749ULL, 90> /// divide by 100000000
|
Division<uint64_t, false, 12379400392853802749ULL, 90> /// divide by 100000000
|
||||||
>::Result;
|
>::Result;
|
||||||
|
|
||||||
template <size_t N>
|
template <size_t N>
|
||||||
@ -352,7 +352,7 @@ static inline char * writeUIntText(T x, char * p)
|
|||||||
static_assert(is_unsigned_v<T>);
|
static_assert(is_unsigned_v<T>);
|
||||||
|
|
||||||
int len = digits10(x);
|
int len = digits10(x);
|
||||||
auto pp = p + len;
|
auto * pp = p + len;
|
||||||
while (x >= 100)
|
while (x >= 100)
|
||||||
{
|
{
|
||||||
const auto i = x % 100;
|
const auto i = x % 100;
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
template <class F>
|
template <class F>
|
||||||
class [[nodiscard]] basic_scope_guard
|
class [[nodiscard]] BasicScopeGuard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
constexpr basic_scope_guard() = default;
|
constexpr BasicScopeGuard() = default;
|
||||||
constexpr basic_scope_guard(basic_scope_guard && src) : function{src.release()} {}
|
constexpr BasicScopeGuard(BasicScopeGuard && src) : function{src.release()} {} // NOLINT(hicpp-noexcept-move, performance-noexcept-move-constructor)
|
||||||
|
|
||||||
constexpr basic_scope_guard & operator=(basic_scope_guard && src)
|
constexpr BasicScopeGuard & operator=(BasicScopeGuard && src) // NOLINT(hicpp-noexcept-move, performance-noexcept-move-constructor)
|
||||||
{
|
{
|
||||||
if (this != &src)
|
if (this != &src)
|
||||||
{
|
{
|
||||||
@ -23,11 +23,11 @@ public:
|
|||||||
|
|
||||||
template <typename G>
|
template <typename G>
|
||||||
requires std::is_convertible_v<G, F>
|
requires std::is_convertible_v<G, F>
|
||||||
constexpr basic_scope_guard(basic_scope_guard<G> && src) : function{src.release()} {}
|
constexpr BasicScopeGuard(BasicScopeGuard<G> && src) : function{src.release()} {} // NOLINT(google-explicit-constructor)
|
||||||
|
|
||||||
template <typename G>
|
template <typename G>
|
||||||
requires std::is_convertible_v<G, F>
|
requires std::is_convertible_v<G, F>
|
||||||
constexpr basic_scope_guard & operator=(basic_scope_guard<G> && src)
|
constexpr BasicScopeGuard & operator=(BasicScopeGuard<G> && src)
|
||||||
{
|
{
|
||||||
if (this != &src)
|
if (this != &src)
|
||||||
{
|
{
|
||||||
@ -39,13 +39,13 @@ public:
|
|||||||
|
|
||||||
template <typename G>
|
template <typename G>
|
||||||
requires std::is_convertible_v<G, F>
|
requires std::is_convertible_v<G, F>
|
||||||
constexpr basic_scope_guard(const G & function_) : function{function_} {}
|
constexpr BasicScopeGuard(const G & function_) : function{function_} {} // NOLINT(google-explicit-constructor)
|
||||||
|
|
||||||
template <typename G>
|
template <typename G>
|
||||||
requires std::is_convertible_v<G, F>
|
requires std::is_convertible_v<G, F>
|
||||||
constexpr basic_scope_guard(G && function_) : function{std::move(function_)} {}
|
constexpr BasicScopeGuard(G && function_) : function{std::move(function_)} {} // NOLINT(google-explicit-constructor, bugprone-forwarding-reference-overload, bugprone-move-forwarding-reference)
|
||||||
|
|
||||||
~basic_scope_guard() { invoke(); }
|
~BasicScopeGuard() { invoke(); }
|
||||||
|
|
||||||
static constexpr bool is_nullable = std::is_constructible_v<bool, F>;
|
static constexpr bool is_nullable = std::is_constructible_v<bool, F>;
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ public:
|
|||||||
|
|
||||||
template <typename G>
|
template <typename G>
|
||||||
requires std::is_convertible_v<G, F>
|
requires std::is_convertible_v<G, F>
|
||||||
basic_scope_guard<F> & join(basic_scope_guard<G> && other)
|
BasicScopeGuard<F> & join(BasicScopeGuard<G> && other)
|
||||||
{
|
{
|
||||||
if (other.function)
|
if (other.function)
|
||||||
{
|
{
|
||||||
@ -102,14 +102,13 @@ private:
|
|||||||
F function = F{};
|
F function = F{};
|
||||||
};
|
};
|
||||||
|
|
||||||
using scope_guard = basic_scope_guard<std::function<void(void)>>;
|
using scope_guard = BasicScopeGuard<std::function<void(void)>>;
|
||||||
|
|
||||||
|
|
||||||
template <class F>
|
template <class F>
|
||||||
inline basic_scope_guard<F> make_scope_guard(F && function_) { return std::forward<F>(function_); }
|
inline BasicScopeGuard<F> make_scope_guard(F && function_) { return std::forward<F>(function_); }
|
||||||
|
|
||||||
#define SCOPE_EXIT_CONCAT(n, ...) \
|
#define SCOPE_EXIT_CONCAT(n, ...) \
|
||||||
const auto scope_exit##n = make_scope_guard([&] { __VA_ARGS__; })
|
const auto scope_exit##n = make_scope_guard([&] { __VA_ARGS__; })
|
||||||
#define SCOPE_EXIT_FWD(n, ...) SCOPE_EXIT_CONCAT(n, __VA_ARGS__)
|
#define SCOPE_EXIT_FWD(n, ...) SCOPE_EXIT_CONCAT(n, __VA_ARGS__)
|
||||||
#define SCOPE_EXIT(...) SCOPE_EXIT_FWD(__LINE__, __VA_ARGS__)
|
#define SCOPE_EXIT(...) SCOPE_EXIT_FWD(__LINE__, __VA_ARGS__)
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ void setTerminalEcho(bool enable)
|
|||||||
struct termios tty{};
|
struct termios tty{};
|
||||||
|
|
||||||
if (0 != tcgetattr(STDIN_FILENO, &tty))
|
if (0 != tcgetattr(STDIN_FILENO, &tty))
|
||||||
throw std::runtime_error(std::string("setTerminalEcho failed get: ") + errnoToString(errno));
|
throw std::runtime_error(std::string("setTerminalEcho failed get: ") + errnoToString());
|
||||||
|
|
||||||
if (enable)
|
if (enable)
|
||||||
tty.c_lflag |= ECHO;
|
tty.c_lflag |= ECHO;
|
||||||
@ -24,5 +24,5 @@ void setTerminalEcho(bool enable)
|
|||||||
tty.c_lflag &= ~ECHO;
|
tty.c_lflag &= ~ECHO;
|
||||||
|
|
||||||
if (0 != tcsetattr(STDIN_FILENO, TCSANOW, &tty))
|
if (0 != tcsetattr(STDIN_FILENO, TCSANOW, &tty))
|
||||||
throw std::runtime_error(std::string("setTerminalEcho failed set: ") + errnoToString(errno));
|
throw std::runtime_error(std::string("setTerminalEcho failed set: ") + errnoToString());
|
||||||
}
|
}
|
||||||
|
@ -14,37 +14,37 @@ static T shift10Impl(T x, int exponent)
|
|||||||
static const long double powers10[] =
|
static const long double powers10[] =
|
||||||
{
|
{
|
||||||
1e-323L, 1e-322L, 1e-321L, 1e-320L, 1e-319L, 1e-318L, 1e-317L, 1e-316L, 1e-315L, 1e-314L, 1e-313L, 1e-312L, 1e-311L,
|
1e-323L, 1e-322L, 1e-321L, 1e-320L, 1e-319L, 1e-318L, 1e-317L, 1e-316L, 1e-315L, 1e-314L, 1e-313L, 1e-312L, 1e-311L,
|
||||||
1e-310L,1e-309L,1e-308L,1e-307L,1e-306L,1e-305L,1e-304L,1e-303L,1e-302L,1e-301L,1e-300L,1e-299L,1e-298L,1e-297L,1e-296L,1e-295L,1e-294L,1e-293L,1e-292L,1e-291L,
|
1e-310L, 1e-309L, 1e-308L, 1e-307L, 1e-306L, 1e-305L, 1e-304L, 1e-303L, 1e-302L, 1e-301L, 1e-300L, 1e-299L, 1e-298L, 1e-297L, 1e-296L, 1e-295L, 1e-294L, 1e-293L, 1e-292L, 1e-291L,
|
||||||
1e-290L,1e-289L,1e-288L,1e-287L,1e-286L,1e-285L,1e-284L,1e-283L,1e-282L,1e-281L,1e-280L,1e-279L,1e-278L,1e-277L,1e-276L,1e-275L,1e-274L,1e-273L,1e-272L,1e-271L,
|
1e-290L, 1e-289L, 1e-288L, 1e-287L, 1e-286L, 1e-285L, 1e-284L, 1e-283L, 1e-282L, 1e-281L, 1e-280L, 1e-279L, 1e-278L, 1e-277L, 1e-276L, 1e-275L, 1e-274L, 1e-273L, 1e-272L, 1e-271L,
|
||||||
1e-270L,1e-269L,1e-268L,1e-267L,1e-266L,1e-265L,1e-264L,1e-263L,1e-262L,1e-261L,1e-260L,1e-259L,1e-258L,1e-257L,1e-256L,1e-255L,1e-254L,1e-253L,1e-252L,1e-251L,
|
1e-270L, 1e-269L, 1e-268L, 1e-267L, 1e-266L, 1e-265L, 1e-264L, 1e-263L, 1e-262L, 1e-261L, 1e-260L, 1e-259L, 1e-258L, 1e-257L, 1e-256L, 1e-255L, 1e-254L, 1e-253L, 1e-252L, 1e-251L,
|
||||||
1e-250L,1e-249L,1e-248L,1e-247L,1e-246L,1e-245L,1e-244L,1e-243L,1e-242L,1e-241L,1e-240L,1e-239L,1e-238L,1e-237L,1e-236L,1e-235L,1e-234L,1e-233L,1e-232L,1e-231L,
|
1e-250L, 1e-249L, 1e-248L, 1e-247L, 1e-246L, 1e-245L, 1e-244L, 1e-243L, 1e-242L, 1e-241L, 1e-240L, 1e-239L, 1e-238L, 1e-237L, 1e-236L, 1e-235L, 1e-234L, 1e-233L, 1e-232L, 1e-231L,
|
||||||
1e-230L,1e-229L,1e-228L,1e-227L,1e-226L,1e-225L,1e-224L,1e-223L,1e-222L,1e-221L,1e-220L,1e-219L,1e-218L,1e-217L,1e-216L,1e-215L,1e-214L,1e-213L,1e-212L,1e-211L,
|
1e-230L, 1e-229L, 1e-228L, 1e-227L, 1e-226L, 1e-225L, 1e-224L, 1e-223L, 1e-222L, 1e-221L, 1e-220L, 1e-219L, 1e-218L, 1e-217L, 1e-216L, 1e-215L, 1e-214L, 1e-213L, 1e-212L, 1e-211L,
|
||||||
1e-210L,1e-209L,1e-208L,1e-207L,1e-206L,1e-205L,1e-204L,1e-203L,1e-202L,1e-201L,1e-200L,1e-199L,1e-198L,1e-197L,1e-196L,1e-195L,1e-194L,1e-193L,1e-192L,1e-191L,
|
1e-210L, 1e-209L, 1e-208L, 1e-207L, 1e-206L, 1e-205L, 1e-204L, 1e-203L, 1e-202L, 1e-201L, 1e-200L, 1e-199L, 1e-198L, 1e-197L, 1e-196L, 1e-195L, 1e-194L, 1e-193L, 1e-192L, 1e-191L,
|
||||||
1e-190L,1e-189L,1e-188L,1e-187L,1e-186L,1e-185L,1e-184L,1e-183L,1e-182L,1e-181L,1e-180L,1e-179L,1e-178L,1e-177L,1e-176L,1e-175L,1e-174L,1e-173L,1e-172L,1e-171L,
|
1e-190L, 1e-189L, 1e-188L, 1e-187L, 1e-186L, 1e-185L, 1e-184L, 1e-183L, 1e-182L, 1e-181L, 1e-180L, 1e-179L, 1e-178L, 1e-177L, 1e-176L, 1e-175L, 1e-174L, 1e-173L, 1e-172L, 1e-171L,
|
||||||
1e-170L,1e-169L,1e-168L,1e-167L,1e-166L,1e-165L,1e-164L,1e-163L,1e-162L,1e-161L,1e-160L,1e-159L,1e-158L,1e-157L,1e-156L,1e-155L,1e-154L,1e-153L,1e-152L,1e-151L,
|
1e-170L, 1e-169L, 1e-168L, 1e-167L, 1e-166L, 1e-165L, 1e-164L, 1e-163L, 1e-162L, 1e-161L, 1e-160L, 1e-159L, 1e-158L, 1e-157L, 1e-156L, 1e-155L, 1e-154L, 1e-153L, 1e-152L, 1e-151L,
|
||||||
1e-150L,1e-149L,1e-148L,1e-147L,1e-146L,1e-145L,1e-144L,1e-143L,1e-142L,1e-141L,1e-140L,1e-139L,1e-138L,1e-137L,1e-136L,1e-135L,1e-134L,1e-133L,1e-132L,1e-131L,
|
1e-150L, 1e-149L, 1e-148L, 1e-147L, 1e-146L, 1e-145L, 1e-144L, 1e-143L, 1e-142L, 1e-141L, 1e-140L, 1e-139L, 1e-138L, 1e-137L, 1e-136L, 1e-135L, 1e-134L, 1e-133L, 1e-132L, 1e-131L,
|
||||||
1e-130L,1e-129L,1e-128L,1e-127L,1e-126L,1e-125L,1e-124L,1e-123L,1e-122L,1e-121L,1e-120L,1e-119L,1e-118L,1e-117L,1e-116L,1e-115L,1e-114L,1e-113L,1e-112L,1e-111L,
|
1e-130L, 1e-129L, 1e-128L, 1e-127L, 1e-126L, 1e-125L, 1e-124L, 1e-123L, 1e-122L, 1e-121L, 1e-120L, 1e-119L, 1e-118L, 1e-117L, 1e-116L, 1e-115L, 1e-114L, 1e-113L, 1e-112L, 1e-111L,
|
||||||
1e-110L,1e-109L,1e-108L,1e-107L,1e-106L,1e-105L,1e-104L,1e-103L,1e-102L,1e-101L,1e-100L,1e-99L,1e-98L,1e-97L,1e-96L,1e-95L,1e-94L,1e-93L,1e-92L,1e-91L,1e-90L,
|
1e-110L, 1e-109L, 1e-108L, 1e-107L, 1e-106L, 1e-105L, 1e-104L, 1e-103L, 1e-102L, 1e-101L, 1e-100L, 1e-99L, 1e-98L, 1e-97L, 1e-96L, 1e-95L, 1e-94L, 1e-93L, 1e-92L, 1e-91L, 1e-90L,
|
||||||
1e-89L,1e-88L,1e-87L,1e-86L,1e-85L,1e-84L,1e-83L,1e-82L,1e-81L,1e-80L,1e-79L,1e-78L,1e-77L,1e-76L,1e-75L,1e-74L,1e-73L,1e-72L,1e-71L,1e-70,
|
1e-89L, 1e-88L, 1e-87L, 1e-86L, 1e-85L, 1e-84L, 1e-83L, 1e-82L, 1e-81L, 1e-80L, 1e-79L, 1e-78L, 1e-77L, 1e-76L, 1e-75L, 1e-74L, 1e-73L, 1e-72L, 1e-71L, 1e-70,
|
||||||
1e-69L,1e-68L,1e-67L,1e-66L,1e-65L,1e-64L,1e-63L,1e-62L,1e-61L,1e-60L,1e-59L,1e-58L,1e-57L,1e-56L,1e-55L,1e-54L,1e-53L,1e-52L,1e-51L,1e-50,
|
1e-69L, 1e-68L, 1e-67L, 1e-66L, 1e-65L, 1e-64L, 1e-63L, 1e-62L, 1e-61L, 1e-60L, 1e-59L, 1e-58L, 1e-57L, 1e-56L, 1e-55L, 1e-54L, 1e-53L, 1e-52L, 1e-51L, 1e-50,
|
||||||
1e-49L,1e-48L,1e-47L,1e-46L,1e-45L,1e-44L,1e-43L,1e-42L,1e-41L,1e-40L,1e-39L,1e-38L,1e-37L,1e-36L,1e-35L,1e-34L,1e-33L,1e-32L,1e-31L,1e-30,
|
1e-49L, 1e-48L, 1e-47L, 1e-46L, 1e-45L, 1e-44L, 1e-43L, 1e-42L, 1e-41L, 1e-40L, 1e-39L, 1e-38L, 1e-37L, 1e-36L, 1e-35L, 1e-34L, 1e-33L, 1e-32L, 1e-31L, 1e-30,
|
||||||
1e-29L,1e-28L,1e-27L,1e-26L,1e-25L,1e-24L,1e-23L,1e-22L,1e-21L,1e-20L,1e-19L,1e-18L,1e-17L,1e-16L,1e-15L,1e-14L,1e-13L,1e-12L,1e-11L,1e-10,
|
1e-29L, 1e-28L, 1e-27L, 1e-26L, 1e-25L, 1e-24L, 1e-23L, 1e-22L, 1e-21L, 1e-20L, 1e-19L, 1e-18L, 1e-17L, 1e-16L, 1e-15L, 1e-14L, 1e-13L, 1e-12L, 1e-11L, 1e-10,
|
||||||
1e-9L,1e-8L,1e-7L,1e-6L,1e-5L,1e-4L,1e-3L,1e-2L,1e-1L,1e0L,1e1L,1e2L,1e3L,1e4L,1e5L,1e6L,1e7L,1e8L,1e9L,1e10,
|
1e-9L, 1e-8L, 1e-7L, 1e-6L, 1e-5L, 1e-4L, 1e-3L, 1e-2L, 1e-1L, 1e0L, 1e1L, 1e2L, 1e3L, 1e4L, 1e5L, 1e6L, 1e7L, 1e8L, 1e9L, 1e10,
|
||||||
1e11L,1e12L,1e13L,1e14L,1e15L,1e16L,1e17L,1e18L,1e19L,1e20L,1e21L,1e22L,1e23L,1e24L,1e25L,1e26L,1e27L,1e28L,1e29L,1e30,
|
1e11L, 1e12L, 1e13L, 1e14L, 1e15L, 1e16L, 1e17L, 1e18L, 1e19L, 1e20L, 1e21L, 1e22L, 1e23L, 1e24L, 1e25L, 1e26L, 1e27L, 1e28L, 1e29L, 1e30,
|
||||||
1e31L,1e32L,1e33L,1e34L,1e35L,1e36L,1e37L,1e38L,1e39L,1e40L,1e41L,1e42L,1e43L,1e44L,1e45L,1e46L,1e47L,1e48L,1e49L,1e50,
|
1e31L, 1e32L, 1e33L, 1e34L, 1e35L, 1e36L, 1e37L, 1e38L, 1e39L, 1e40L, 1e41L, 1e42L, 1e43L, 1e44L, 1e45L, 1e46L, 1e47L, 1e48L, 1e49L, 1e50,
|
||||||
1e51L,1e52L,1e53L,1e54L,1e55L,1e56L,1e57L,1e58L,1e59L,1e60L,1e61L,1e62L,1e63L,1e64L,1e65L,1e66L,1e67L,1e68L,1e69L,1e70,
|
1e51L, 1e52L, 1e53L, 1e54L, 1e55L, 1e56L, 1e57L, 1e58L, 1e59L, 1e60L, 1e61L, 1e62L, 1e63L, 1e64L, 1e65L, 1e66L, 1e67L, 1e68L, 1e69L, 1e70,
|
||||||
1e71L,1e72L,1e73L,1e74L,1e75L,1e76L,1e77L,1e78L,1e79L,1e80L,1e81L,1e82L,1e83L,1e84L,1e85L,1e86L,1e87L,1e88L,1e89L,1e90,
|
1e71L, 1e72L, 1e73L, 1e74L, 1e75L, 1e76L, 1e77L, 1e78L, 1e79L, 1e80L, 1e81L, 1e82L, 1e83L, 1e84L, 1e85L, 1e86L, 1e87L, 1e88L, 1e89L, 1e90,
|
||||||
1e91L,1e92L,1e93L,1e94L,1e95L,1e96L,1e97L,1e98L,1e99L,1e100L,1e101L,1e102L,1e103L,1e104L,1e105L,1e106L,1e107L,1e108L,1e109L,1e110,
|
1e91L, 1e92L, 1e93L, 1e94L, 1e95L, 1e96L, 1e97L, 1e98L, 1e99L, 1e100L, 1e101L, 1e102L, 1e103L, 1e104L, 1e105L, 1e106L, 1e107L, 1e108L, 1e109L, 1e110,
|
||||||
1e111L,1e112L,1e113L,1e114L,1e115L,1e116L,1e117L,1e118L,1e119L,1e120L,1e121L,1e122L,1e123L,1e124L,1e125L,1e126L,1e127L,1e128L,1e129L,1e130,
|
1e111L, 1e112L, 1e113L, 1e114L, 1e115L, 1e116L, 1e117L, 1e118L, 1e119L, 1e120L, 1e121L, 1e122L, 1e123L, 1e124L, 1e125L, 1e126L, 1e127L, 1e128L, 1e129L, 1e130,
|
||||||
1e131L,1e132L,1e133L,1e134L,1e135L,1e136L,1e137L,1e138L,1e139L,1e140L,1e141L,1e142L,1e143L,1e144L,1e145L,1e146L,1e147L,1e148L,1e149L,1e150,
|
1e131L, 1e132L, 1e133L, 1e134L, 1e135L, 1e136L, 1e137L, 1e138L, 1e139L, 1e140L, 1e141L, 1e142L, 1e143L, 1e144L, 1e145L, 1e146L, 1e147L, 1e148L, 1e149L, 1e150,
|
||||||
1e151L,1e152L,1e153L,1e154L,1e155L,1e156L,1e157L,1e158L,1e159L,1e160L,1e161L,1e162L,1e163L,1e164L,1e165L,1e166L,1e167L,1e168L,1e169L,1e170,
|
1e151L, 1e152L, 1e153L, 1e154L, 1e155L, 1e156L, 1e157L, 1e158L, 1e159L, 1e160L, 1e161L, 1e162L, 1e163L, 1e164L, 1e165L, 1e166L, 1e167L, 1e168L, 1e169L, 1e170,
|
||||||
1e171L,1e172L,1e173L,1e174L,1e175L,1e176L,1e177L,1e178L,1e179L,1e180L,1e181L,1e182L,1e183L,1e184L,1e185L,1e186L,1e187L,1e188L,1e189L,1e190,
|
1e171L, 1e172L, 1e173L, 1e174L, 1e175L, 1e176L, 1e177L, 1e178L, 1e179L, 1e180L, 1e181L, 1e182L, 1e183L, 1e184L, 1e185L, 1e186L, 1e187L, 1e188L, 1e189L, 1e190,
|
||||||
1e191L,1e192L,1e193L,1e194L,1e195L,1e196L,1e197L,1e198L,1e199L,1e200L,1e201L,1e202L,1e203L,1e204L,1e205L,1e206L,1e207L,1e208L,1e209L,1e210,
|
1e191L, 1e192L, 1e193L, 1e194L, 1e195L, 1e196L, 1e197L, 1e198L, 1e199L, 1e200L, 1e201L, 1e202L, 1e203L, 1e204L, 1e205L, 1e206L, 1e207L, 1e208L, 1e209L, 1e210,
|
||||||
1e211L,1e212L,1e213L,1e214L,1e215L,1e216L,1e217L,1e218L,1e219L,1e220L,1e221L,1e222L,1e223L,1e224L,1e225L,1e226L,1e227L,1e228L,1e229L,1e230,
|
1e211L, 1e212L, 1e213L, 1e214L, 1e215L, 1e216L, 1e217L, 1e218L, 1e219L, 1e220L, 1e221L, 1e222L, 1e223L, 1e224L, 1e225L, 1e226L, 1e227L, 1e228L, 1e229L, 1e230,
|
||||||
1e231L,1e232L,1e233L,1e234L,1e235L,1e236L,1e237L,1e238L,1e239L,1e240L,1e241L,1e242L,1e243L,1e244L,1e245L,1e246L,1e247L,1e248L,1e249L,1e250,
|
1e231L, 1e232L, 1e233L, 1e234L, 1e235L, 1e236L, 1e237L, 1e238L, 1e239L, 1e240L, 1e241L, 1e242L, 1e243L, 1e244L, 1e245L, 1e246L, 1e247L, 1e248L, 1e249L, 1e250,
|
||||||
1e251L,1e252L,1e253L,1e254L,1e255L,1e256L,1e257L,1e258L,1e259L,1e260L,1e261L,1e262L,1e263L,1e264L,1e265L,1e266L,1e267L,1e268L,1e269L,1e270,
|
1e251L, 1e252L, 1e253L, 1e254L, 1e255L, 1e256L, 1e257L, 1e258L, 1e259L, 1e260L, 1e261L, 1e262L, 1e263L, 1e264L, 1e265L, 1e266L, 1e267L, 1e268L, 1e269L, 1e270,
|
||||||
1e271L,1e272L,1e273L,1e274L,1e275L,1e276L,1e277L,1e278L,1e279L,1e280L,1e281L,1e282L,1e283L,1e284L,1e285L,1e286L,1e287L,1e288L,1e289L,1e290,
|
1e271L, 1e272L, 1e273L, 1e274L, 1e275L, 1e276L, 1e277L, 1e278L, 1e279L, 1e280L, 1e281L, 1e282L, 1e283L, 1e284L, 1e285L, 1e286L, 1e287L, 1e288L, 1e289L, 1e290,
|
||||||
1e291L,1e292L,1e293L,1e294L,1e295L,1e296L,1e297L,1e298L,1e299L,1e300L,1e301L,1e302L,1e303L,1e304L,1e305L,1e306L,1e307L,1e308L
|
1e291L, 1e292L, 1e293L, 1e294L, 1e295L, 1e296L, 1e297L, 1e298L, 1e299L, 1e300L, 1e301L, 1e302L, 1e303L, 1e304L, 1e305L, 1e306L, 1e307L, 1e308L
|
||||||
};
|
};
|
||||||
|
|
||||||
if (unlikely(exponent < min_exponent)) /// Note: there are some values below MIN_EXPONENT that is greater than zero.
|
if (unlikely(exponent < min_exponent)) /// Note: there are some values below MIN_EXPONENT that is greater than zero.
|
||||||
@ -52,7 +52,7 @@ static T shift10Impl(T x, int exponent)
|
|||||||
else if (unlikely(exponent > max_exponent))
|
else if (unlikely(exponent > max_exponent))
|
||||||
x *= std::numeric_limits<T>::infinity(); /// Multiplying to keep the sign of infinity.
|
x *= std::numeric_limits<T>::infinity(); /// Multiplying to keep the sign of infinity.
|
||||||
else
|
else
|
||||||
x *= powers10[exponent - min_exponent];
|
x *= static_cast<T>(powers10[exponent - min_exponent]);
|
||||||
|
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
@ -68,12 +68,12 @@ float shift10(float x, int exponent)
|
|||||||
return shift10Impl(x, exponent);
|
return shift10Impl(x, exponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
double shift10(UInt64 x, int exponent)
|
long double shift10(UInt64 x, int exponent)
|
||||||
{
|
{
|
||||||
return shift10Impl(static_cast<long double>(x), exponent);
|
return shift10Impl(static_cast<long double>(x), exponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
double shift10(Int64 x, int exponent)
|
long double shift10(Int64 x, int exponent)
|
||||||
{
|
{
|
||||||
return shift10Impl(static_cast<long double>(x), exponent);
|
return shift10Impl(static_cast<long double>(x), exponent);
|
||||||
}
|
}
|
||||||
|
@ -12,5 +12,5 @@
|
|||||||
double shift10(double x, int exponent);
|
double shift10(double x, int exponent);
|
||||||
float shift10(float x, int exponent);
|
float shift10(float x, int exponent);
|
||||||
|
|
||||||
double shift10(UInt64 x, int exponent);
|
long double shift10(UInt64 x, int exponent);
|
||||||
double shift10(Int64 x, int exponent);
|
long double shift10(Int64 x, int exponent);
|
||||||
|
@ -14,7 +14,7 @@ template <typename Comparator>
|
|||||||
class DebugLessComparator
|
class DebugLessComparator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
constexpr DebugLessComparator(Comparator & cmp_)
|
constexpr DebugLessComparator(Comparator & cmp_) // NOLINT(google-explicit-constructor)
|
||||||
: cmp(cmp_)
|
: cmp(cmp_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -34,8 +34,10 @@ public:
|
|||||||
template <class Enable = typename std::is_move_assignable<T>::type>
|
template <class Enable = typename std::is_move_assignable<T>::type>
|
||||||
Self & operator=(T && rhs) { t = std::move(rhs); return *this;}
|
Self & operator=(T && rhs) { t = std::move(rhs); return *this;}
|
||||||
|
|
||||||
|
// NOLINTBEGIN(google-explicit-constructor)
|
||||||
operator const T & () const { return t; }
|
operator const T & () const { return t; }
|
||||||
operator T & () { return t; }
|
operator T & () { return t; }
|
||||||
|
// NOLINTEND(google-explicit-constructor)
|
||||||
|
|
||||||
bool operator==(const Self & rhs) const { return t == rhs.t; }
|
bool operator==(const Self & rhs) const { return t == rhs.t; }
|
||||||
bool operator<(const Self & rhs) const { return t < rhs.t; }
|
bool operator<(const Self & rhs) const { return t < rhs.t; }
|
||||||
@ -58,7 +60,10 @@ namespace std
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOLINTBEGIN(bugprone-macro-parentheses)
|
||||||
|
|
||||||
#define STRONG_TYPEDEF(T, D) \
|
#define STRONG_TYPEDEF(T, D) \
|
||||||
struct D ## Tag {}; \
|
struct D ## Tag {}; \
|
||||||
using D = StrongTypedef<T, D ## Tag>; \
|
using D = StrongTypedef<T, D ## Tag>; \
|
||||||
|
|
||||||
|
// NOLINTEND(bugprone-macro-parentheses)
|
||||||
|
@ -11,12 +11,12 @@ std::string setColor(UInt64 hash)
|
|||||||
/// It still looks awesome.
|
/// It still looks awesome.
|
||||||
UInt8 y = 128;
|
UInt8 y = 128;
|
||||||
|
|
||||||
UInt8 cb = hash % 256;
|
UInt8 cb = static_cast<UInt8>(hash % 256);
|
||||||
UInt8 cr = hash / 256 % 256;
|
UInt8 cr = static_cast<UInt8>(hash / 256 % 256);
|
||||||
|
|
||||||
UInt8 r = std::max(0.0, std::min(255.0, y + 1.402 * (cr - 128)));
|
UInt8 r = static_cast<UInt8>(std::max(0.0, std::min(255.0, y + 1.402 * (cr - 128))));
|
||||||
UInt8 g = std::max(0.0, std::min(255.0, y - 0.344136 * (cb - 128) - 0.714136 * (cr - 128)));
|
UInt8 g = static_cast<UInt8>(std::max(0.0, std::min(255.0, y - 0.344136 * (cb - 128) - 0.714136 * (cr - 128))));
|
||||||
UInt8 b = std::max(0.0, std::min(255.0, y + 1.772 * (cb - 128)));
|
UInt8 b = static_cast<UInt8>(std::max(0.0, std::min(255.0, y + 1.772 * (cb - 128))));
|
||||||
|
|
||||||
/// ANSI escape sequence to set 24-bit foreground font color in terminal.
|
/// ANSI escape sequence to set 24-bit foreground font color in terminal.
|
||||||
return "\033[38;2;" + std::to_string(r) + ";" + std::to_string(g) + ";" + std::to_string(b) + "m";
|
return "\033[38;2;" + std::to_string(r) + ";" + std::to_string(g) + ";" + std::to_string(b) + "m";
|
||||||
|
@ -2,8 +2,47 @@
|
|||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <bit>
|
||||||
|
|
||||||
|
|
||||||
|
inline void reverseMemcpy(void * dst, const void * src, size_t size)
|
||||||
|
{
|
||||||
|
uint8_t * uint_dst = reinterpret_cast<uint8_t *>(dst);
|
||||||
|
const uint8_t * uint_src = reinterpret_cast<const uint8_t *>(src);
|
||||||
|
|
||||||
|
uint_dst += size;
|
||||||
|
while (size)
|
||||||
|
{
|
||||||
|
--uint_dst;
|
||||||
|
*uint_dst = *uint_src;
|
||||||
|
++uint_src;
|
||||||
|
--size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
inline T unalignedLoadLE(const void * address)
|
||||||
|
{
|
||||||
|
T res {};
|
||||||
|
if constexpr (std::endian::native == std::endian::little)
|
||||||
|
memcpy(&res, address, sizeof(res));
|
||||||
|
else
|
||||||
|
reverseMemcpy(&res, address, sizeof(res));
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
inline void unalignedStoreLE(void * address,
|
||||||
|
const typename std::enable_if<true, T>::type & src)
|
||||||
|
{
|
||||||
|
static_assert(std::is_trivially_copyable_v<T>);
|
||||||
|
if constexpr (std::endian::native == std::endian::little)
|
||||||
|
memcpy(address, &src, sizeof(src));
|
||||||
|
else
|
||||||
|
reverseMemcpy(address, &src, sizeof(src));
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline T unalignedLoad(const void * address)
|
inline T unalignedLoad(const void * address)
|
||||||
{
|
{
|
||||||
|
@ -10,9 +10,11 @@ constexpr size_t GiB = 1024 * MiB;
|
|||||||
# pragma clang diagnostic ignored "-Wreserved-identifier"
|
# pragma clang diagnostic ignored "-Wreserved-identifier"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// NOLINTBEGIN(google-runtime-int)
|
||||||
constexpr size_t operator"" _KiB(unsigned long long val) { return val * KiB; }
|
constexpr size_t operator"" _KiB(unsigned long long val) { return val * KiB; }
|
||||||
constexpr size_t operator"" _MiB(unsigned long long val) { return val * MiB; }
|
constexpr size_t operator"" _MiB(unsigned long long val) { return val * MiB; }
|
||||||
constexpr size_t operator"" _GiB(unsigned long long val) { return val * GiB; }
|
constexpr size_t operator"" _GiB(unsigned long long val) { return val * GiB; }
|
||||||
|
// NOLINTEND(google-runtime-int)
|
||||||
|
|
||||||
#ifdef HAS_RESERVED_IDENTIFIER
|
#ifdef HAS_RESERVED_IDENTIFIER
|
||||||
# pragma clang diagnostic pop
|
# pragma clang diagnostic pop
|
||||||
|
@ -453,7 +453,7 @@ private:
|
|||||||
if constexpr (sizeof(T) <= sizeof(base_type))
|
if constexpr (sizeof(T) <= sizeof(base_type))
|
||||||
{
|
{
|
||||||
if (0 == idx)
|
if (0 == idx)
|
||||||
return x;
|
return static_cast<base_type>(x);
|
||||||
}
|
}
|
||||||
else if (idx * sizeof(base_type) < sizeof(T))
|
else if (idx * sizeof(base_type) < sizeof(T))
|
||||||
return x >> (idx * base_bits); // & std::numeric_limits<base_type>::max()
|
return x >> (idx * base_bits); // & std::numeric_limits<base_type>::max()
|
||||||
@ -1239,13 +1239,13 @@ constexpr integer<Bits, Signed>::operator long double() const noexcept
|
|||||||
template <size_t Bits, typename Signed>
|
template <size_t Bits, typename Signed>
|
||||||
constexpr integer<Bits, Signed>::operator double() const noexcept
|
constexpr integer<Bits, Signed>::operator double() const noexcept
|
||||||
{
|
{
|
||||||
return static_cast<long double>(*this);
|
return static_cast<double>(static_cast<long double>(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <size_t Bits, typename Signed>
|
template <size_t Bits, typename Signed>
|
||||||
constexpr integer<Bits, Signed>::operator float() const noexcept
|
constexpr integer<Bits, Signed>::operator float() const noexcept
|
||||||
{
|
{
|
||||||
return static_cast<long double>(*this);
|
return static_cast<float>(static_cast<long double>(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unary operators
|
// Unary operators
|
||||||
|
@ -51,8 +51,8 @@ struct fmt::formatter<wide::integer<Bits, Signed>>
|
|||||||
{
|
{
|
||||||
constexpr auto parse(format_parse_context & ctx)
|
constexpr auto parse(format_parse_context & ctx)
|
||||||
{
|
{
|
||||||
auto it = ctx.begin();
|
const auto * it = ctx.begin();
|
||||||
auto end = ctx.end();
|
const auto * end = ctx.end();
|
||||||
|
|
||||||
/// Only support {}.
|
/// Only support {}.
|
||||||
if (it != end && *it != '}')
|
if (it != end && *it != '}')
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
* Very large size of memcpy typically indicates suboptimal (not cache friendly) algorithms in code or unrealistic scenarios,
|
* Very large size of memcpy typically indicates suboptimal (not cache friendly) algorithms in code or unrealistic scenarios,
|
||||||
* so we don't pay attention to using non-temporary stores.
|
* so we don't pay attention to using non-temporary stores.
|
||||||
*
|
*
|
||||||
* On recent Intel CPUs, the presence of "erms" makes "rep movsb" the most benefitial,
|
* On recent Intel CPUs, the presence of "erms" makes "rep movsb" the most beneficial,
|
||||||
* even comparing to non-temporary aligned unrolled stores even with the most wide registers.
|
* even comparing to non-temporary aligned unrolled stores even with the most wide registers.
|
||||||
*
|
*
|
||||||
* memcpy can be written in asm, C or C++. The latter can also use inline asm.
|
* memcpy can be written in asm, C or C++. The latter can also use inline asm.
|
||||||
@ -214,4 +214,3 @@ tail:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
22
base/glibc-compatibility/musl/dup3.c
Normal file
22
base/glibc-compatibility/musl/dup3.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include "syscall.h"
|
||||||
|
|
||||||
|
int dup3(int old, int new, int flags)
|
||||||
|
{
|
||||||
|
int r;
|
||||||
|
#ifdef SYS_dup2
|
||||||
|
if (old==new) return __syscall_ret(-EINVAL);
|
||||||
|
if (flags & O_CLOEXEC) {
|
||||||
|
while ((r=__syscall(SYS_dup3, old, new, flags))==-EBUSY);
|
||||||
|
if (r!=-ENOSYS) return __syscall_ret(r);
|
||||||
|
}
|
||||||
|
while ((r=__syscall(SYS_dup2, old, new))==-EBUSY);
|
||||||
|
if (flags & O_CLOEXEC) __syscall(SYS_fcntl, new, F_SETFD, FD_CLOEXEC);
|
||||||
|
#else
|
||||||
|
while ((r=__syscall(SYS_dup3, old, new, flags))==-EBUSY);
|
||||||
|
#endif
|
||||||
|
return __syscall_ret(r);
|
||||||
|
}
|
26
base/glibc-compatibility/musl/inotify.c
Normal file
26
base/glibc-compatibility/musl/inotify.c
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include <sys/inotify.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include "syscall.h"
|
||||||
|
|
||||||
|
int inotify_init()
|
||||||
|
{
|
||||||
|
return inotify_init1(0);
|
||||||
|
}
|
||||||
|
int inotify_init1(int flags)
|
||||||
|
{
|
||||||
|
int r = __syscall(SYS_inotify_init1, flags);
|
||||||
|
#ifdef SYS_inotify_init
|
||||||
|
if (r==-ENOSYS && !flags) r = __syscall(SYS_inotify_init);
|
||||||
|
#endif
|
||||||
|
return __syscall_ret(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
int inotify_add_watch(int fd, const char *pathname, uint32_t mask)
|
||||||
|
{
|
||||||
|
return syscall(SYS_inotify_add_watch, fd, pathname, mask);
|
||||||
|
}
|
||||||
|
|
||||||
|
int inotify_rm_watch(int fd, int wd)
|
||||||
|
{
|
||||||
|
return syscall(SYS_inotify_rm_watch, fd, wd);
|
||||||
|
}
|
@ -49,6 +49,8 @@
|
|||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// NOLINTBEGIN(readability-identifier-naming, modernize-use-using, bugprone-macro-parentheses, google-explicit-constructor)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Abstractions for compiler-specific directives
|
* Abstractions for compiler-specific directives
|
||||||
*/
|
*/
|
||||||
@ -90,8 +92,6 @@
|
|||||||
#define PCG_EMULATED_128BIT_MATH 1
|
#define PCG_EMULATED_128BIT_MATH 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// NOLINTBEGIN(*)
|
|
||||||
|
|
||||||
namespace pcg_extras {
|
namespace pcg_extras {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -553,6 +553,6 @@ std::ostream& operator<<(std::ostream& out, printable_typename<T>) {
|
|||||||
|
|
||||||
} // namespace pcg_extras
|
} // namespace pcg_extras
|
||||||
|
|
||||||
// NOLINTEND(*)
|
// NOLINTEND(readability-identifier-naming, modernize-use-using, bugprone-macro-parentheses, google-explicit-constructor)
|
||||||
|
|
||||||
#endif // PCG_EXTRAS_HPP_INCLUDED
|
#endif // PCG_EXTRAS_HPP_INCLUDED
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The pcg_extras namespace contains some support code that is likley to
|
* The pcg_extras namespace contains some support code that is likely to
|
||||||
* be useful for a variety of RNGs, including:
|
* be useful for a variety of RNGs, including:
|
||||||
* - 128-bit int support for platforms where it isn't available natively
|
* - 128-bit int support for platforms where it isn't available natively
|
||||||
* - bit twiddling operations
|
* - bit twiddling operations
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
/*
|
/*
|
||||||
* This code provides a a C++ class that can provide 128-bit (or higher)
|
* This code provides a a C++ class that can provide 128-bit (or higher)
|
||||||
* integers. To produce 2K-bit integers, it uses two K-bit integers,
|
* integers. To produce 2K-bit integers, it uses two K-bit integers,
|
||||||
* placed in a union that allowes the code to also see them as four K/2 bit
|
* placed in a union that allows the code to also see them as four K/2 bit
|
||||||
* integers (and access them either directly name, or by index).
|
* integers (and access them either directly name, or by index).
|
||||||
*
|
*
|
||||||
* It may seem like we're reinventing the wheel here, because several
|
* It may seem like we're reinventing the wheel here, because several
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
# NOTE: has nothing common with DBMS_TCP_PROTOCOL_VERSION,
|
# NOTE: has nothing common with DBMS_TCP_PROTOCOL_VERSION,
|
||||||
# only DBMS_TCP_PROTOCOL_VERSION should be incremented on protocol changes.
|
# only DBMS_TCP_PROTOCOL_VERSION should be incremented on protocol changes.
|
||||||
SET(VERSION_REVISION 54465)
|
SET(VERSION_REVISION 54466)
|
||||||
SET(VERSION_MAJOR 22)
|
SET(VERSION_MAJOR 22)
|
||||||
SET(VERSION_MINOR 8)
|
SET(VERSION_MINOR 9)
|
||||||
SET(VERSION_PATCH 1)
|
SET(VERSION_PATCH 1)
|
||||||
SET(VERSION_GITHASH f4f05ec786a8b8966dd0ea2a2d7e39a8c7db24f4)
|
SET(VERSION_GITHASH 09a2ff88435f79e5279745bbe1dc0e5e401df38d)
|
||||||
SET(VERSION_DESCRIBE v22.8.1.1-testing)
|
SET(VERSION_DESCRIBE v22.9.1.1-testing)
|
||||||
SET(VERSION_STRING 22.8.1.1)
|
SET(VERSION_STRING 22.9.1.1)
|
||||||
# end of autochange
|
# end of autochange
|
||||||
|
@ -3,7 +3,7 @@ option (ENABLE_CLANG_TIDY "Use clang-tidy static analyzer" OFF)
|
|||||||
|
|
||||||
if (ENABLE_CLANG_TIDY)
|
if (ENABLE_CLANG_TIDY)
|
||||||
|
|
||||||
find_program (CLANG_TIDY_PATH NAMES "clang-tidy" "clang-tidy-14" "clang-tidy-13" "clang-tidy-12")
|
find_program (CLANG_TIDY_PATH NAMES "clang-tidy" "clang-tidy-15" "clang-tidy-14" "clang-tidy-13" "clang-tidy-12")
|
||||||
|
|
||||||
if (CLANG_TIDY_PATH)
|
if (CLANG_TIDY_PATH)
|
||||||
message(STATUS
|
message(STATUS
|
||||||
|
@ -24,6 +24,23 @@ option (ENABLE_BMI "Use BMI instructions on x86_64" 0)
|
|||||||
option (ENABLE_AVX2_FOR_SPEC_OP "Use avx2 instructions for specific operations on x86_64" 0)
|
option (ENABLE_AVX2_FOR_SPEC_OP "Use avx2 instructions for specific operations on x86_64" 0)
|
||||||
option (ENABLE_AVX512_FOR_SPEC_OP "Use avx512 instructions for specific operations on x86_64" 0)
|
option (ENABLE_AVX512_FOR_SPEC_OP "Use avx512 instructions for specific operations on x86_64" 0)
|
||||||
|
|
||||||
|
# X86: Allow compilation for a SSE2-only target machine. Done by a special build in CI for embedded or very old hardware.
|
||||||
|
option (NO_SSE3_OR_HIGHER "Disable SSE3 or higher on x86_64" 0)
|
||||||
|
if (NO_SSE3_OR_HIGHER)
|
||||||
|
SET(ENABLE_SSSE3 0)
|
||||||
|
SET(ENABLE_SSE41 0)
|
||||||
|
SET(ENABLE_SSE42 0)
|
||||||
|
SET(ENABLE_PCLMULQDQ 0)
|
||||||
|
SET(ENABLE_POPCNT 0)
|
||||||
|
SET(ENABLE_AVX 0)
|
||||||
|
SET(ENABLE_AVX2 0)
|
||||||
|
SET(ENABLE_AVX512 0)
|
||||||
|
SET(ENABLE_AVX512_VBMI 0)
|
||||||
|
SET(ENABLE_BMI 0)
|
||||||
|
SET(ENABLE_AVX2_FOR_SPEC_OP 0)
|
||||||
|
SET(ENABLE_AVX512_FOR_SPEC_OP 0)
|
||||||
|
endif()
|
||||||
|
|
||||||
option (ARCH_NATIVE "Add -march=native compiler flag. This makes your binaries non-portable but more performant code may be generated. This option overrides ENABLE_* options for specific instruction set. Highly not recommended to use." 0)
|
option (ARCH_NATIVE "Add -march=native compiler flag. This makes your binaries non-portable but more performant code may be generated. This option overrides ENABLE_* options for specific instruction set. Highly not recommended to use." 0)
|
||||||
|
|
||||||
if (ARCH_NATIVE)
|
if (ARCH_NATIVE)
|
||||||
|
17
cmake/ld.lld.in
Executable file
17
cmake/ld.lld.in
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# This is a workaround for bug in llvm/clang,
|
||||||
|
# that does not produce .debug_aranges with LTO
|
||||||
|
#
|
||||||
|
# NOTE: this is a temporary solution, that should be removed once [1] will be
|
||||||
|
# resolved.
|
||||||
|
#
|
||||||
|
# [1]: https://discourse.llvm.org/t/clang-does-not-produce-full-debug-aranges-section-with-thinlto/64898/8
|
||||||
|
|
||||||
|
# NOTE: only -flto=thin is supported.
|
||||||
|
# NOTE: it is not possible to check was there -gdwarf-aranges initially or not.
|
||||||
|
if [[ "$*" =~ -plugin-opt=thinlto ]]; then
|
||||||
|
exec "@LLD_PATH@" -mllvm -generate-arange-section "$@"
|
||||||
|
else
|
||||||
|
exec "@LLD_PATH@" "$@"
|
||||||
|
fi
|
@ -3,7 +3,7 @@
|
|||||||
# set (MAX_LINKER_MEMORY 3500 CACHE INTERNAL "")
|
# set (MAX_LINKER_MEMORY 3500 CACHE INTERNAL "")
|
||||||
# include (cmake/limit_jobs.cmake)
|
# include (cmake/limit_jobs.cmake)
|
||||||
|
|
||||||
cmake_host_system_information(RESULT AVAILABLE_PHYSICAL_MEMORY QUERY AVAILABLE_PHYSICAL_MEMORY) # Not available under freebsd
|
cmake_host_system_information(RESULT TOTAL_PHYSICAL_MEMORY QUERY TOTAL_PHYSICAL_MEMORY) # Not available under freebsd
|
||||||
cmake_host_system_information(RESULT NUMBER_OF_LOGICAL_CORES QUERY NUMBER_OF_LOGICAL_CORES)
|
cmake_host_system_information(RESULT NUMBER_OF_LOGICAL_CORES QUERY NUMBER_OF_LOGICAL_CORES)
|
||||||
|
|
||||||
# 1 if not set
|
# 1 if not set
|
||||||
@ -12,8 +12,8 @@ option(PARALLEL_COMPILE_JOBS "Maximum number of concurrent compilation jobs" "")
|
|||||||
# 1 if not set
|
# 1 if not set
|
||||||
option(PARALLEL_LINK_JOBS "Maximum number of concurrent link jobs" "")
|
option(PARALLEL_LINK_JOBS "Maximum number of concurrent link jobs" "")
|
||||||
|
|
||||||
if (NOT PARALLEL_COMPILE_JOBS AND AVAILABLE_PHYSICAL_MEMORY AND MAX_COMPILER_MEMORY)
|
if (NOT PARALLEL_COMPILE_JOBS AND TOTAL_PHYSICAL_MEMORY AND MAX_COMPILER_MEMORY)
|
||||||
math(EXPR PARALLEL_COMPILE_JOBS ${AVAILABLE_PHYSICAL_MEMORY}/${MAX_COMPILER_MEMORY})
|
math(EXPR PARALLEL_COMPILE_JOBS ${TOTAL_PHYSICAL_MEMORY}/${MAX_COMPILER_MEMORY})
|
||||||
|
|
||||||
if (NOT PARALLEL_COMPILE_JOBS)
|
if (NOT PARALLEL_COMPILE_JOBS)
|
||||||
set (PARALLEL_COMPILE_JOBS 1)
|
set (PARALLEL_COMPILE_JOBS 1)
|
||||||
@ -27,8 +27,8 @@ if (PARALLEL_COMPILE_JOBS AND (NOT NUMBER_OF_LOGICAL_CORES OR PARALLEL_COMPILE_J
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
if (NOT PARALLEL_LINK_JOBS AND AVAILABLE_PHYSICAL_MEMORY AND MAX_LINKER_MEMORY)
|
if (NOT PARALLEL_LINK_JOBS AND TOTAL_PHYSICAL_MEMORY AND MAX_LINKER_MEMORY)
|
||||||
math(EXPR PARALLEL_LINK_JOBS ${AVAILABLE_PHYSICAL_MEMORY}/${MAX_LINKER_MEMORY})
|
math(EXPR PARALLEL_LINK_JOBS ${TOTAL_PHYSICAL_MEMORY}/${MAX_LINKER_MEMORY})
|
||||||
|
|
||||||
if (NOT PARALLEL_LINK_JOBS)
|
if (NOT PARALLEL_LINK_JOBS)
|
||||||
set (PARALLEL_LINK_JOBS 1)
|
set (PARALLEL_LINK_JOBS 1)
|
||||||
@ -54,6 +54,6 @@ endif ()
|
|||||||
|
|
||||||
if (PARALLEL_COMPILE_JOBS OR PARALLEL_LINK_JOBS)
|
if (PARALLEL_COMPILE_JOBS OR PARALLEL_LINK_JOBS)
|
||||||
message(STATUS
|
message(STATUS
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}: Have ${AVAILABLE_PHYSICAL_MEMORY} megabytes of memory.
|
"${CMAKE_CURRENT_SOURCE_DIR}: Have ${TOTAL_PHYSICAL_MEMORY} megabytes of memory.
|
||||||
Limiting concurrent linkers jobs to ${PARALLEL_LINK_JOBS} and compiler jobs to ${PARALLEL_COMPILE_JOBS} (system has ${NUMBER_OF_LOGICAL_CORES} logical cores)")
|
Limiting concurrent linkers jobs to ${PARALLEL_LINK_JOBS} and compiler jobs to ${PARALLEL_COMPILE_JOBS} (system has ${NUMBER_OF_LOGICAL_CORES} logical cores)")
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -21,6 +21,11 @@ set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
|||||||
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=bfd")
|
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=bfd")
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=bfd")
|
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=bfd")
|
||||||
|
|
||||||
|
# Currently, lld does not work with the error:
|
||||||
|
# ld.lld: error: section size decrease is too large
|
||||||
|
# But GNU BinUtils work.
|
||||||
|
set (LINKER_NAME "riscv64-linux-gnu-ld.bfd" CACHE STRING "Linker name" FORCE)
|
||||||
|
|
||||||
set (HAS_PRE_1970_EXITCODE "0" CACHE STRING "Result from TRY_RUN" FORCE)
|
set (HAS_PRE_1970_EXITCODE "0" CACHE STRING "Result from TRY_RUN" FORCE)
|
||||||
set (HAS_PRE_1970_EXITCODE__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
|
set (HAS_PRE_1970_EXITCODE__TRYRUN_OUTPUT "" CACHE STRING "Output from TRY_RUN" FORCE)
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ macro(clickhouse_split_debug_symbols)
|
|||||||
COMMAND mkdir -p "${STRIP_DESTINATION_DIR}/bin"
|
COMMAND mkdir -p "${STRIP_DESTINATION_DIR}/bin"
|
||||||
COMMAND cp "${STRIP_BINARY_PATH}" "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}"
|
COMMAND cp "${STRIP_BINARY_PATH}" "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}"
|
||||||
# Splits debug symbols into separate file, leaves the binary untouched:
|
# Splits debug symbols into separate file, leaves the binary untouched:
|
||||||
COMMAND "${OBJCOPY_PATH}" --only-keep-debug --compress-debug-sections "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}" "${STRIP_DESTINATION_DIR}/lib/debug/bin/${STRIP_TARGET}.debug"
|
COMMAND "${OBJCOPY_PATH}" --only-keep-debug "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}" "${STRIP_DESTINATION_DIR}/lib/debug/bin/${STRIP_TARGET}.debug"
|
||||||
COMMAND chmod 0644 "${STRIP_DESTINATION_DIR}/lib/debug/bin/${STRIP_TARGET}.debug"
|
COMMAND chmod 0644 "${STRIP_DESTINATION_DIR}/lib/debug/bin/${STRIP_TARGET}.debug"
|
||||||
# Strips binary, sections '.note' & '.comment' are removed in line with Debian's stripping policy: www.debian.org/doc/debian-policy/ch-files.html, section '.clickhouse.hash' is needed for integrity check:
|
# Strips binary, sections '.note' & '.comment' are removed in line with Debian's stripping policy: www.debian.org/doc/debian-policy/ch-files.html, section '.clickhouse.hash' is needed for integrity check:
|
||||||
COMMAND "${STRIP_PATH}" --remove-section=.comment --remove-section=.note --keep-section=.clickhouse.hash "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}"
|
COMMAND "${STRIP_PATH}" --remove-section=.comment --remove-section=.note --keep-section=.clickhouse.hash "${STRIP_DESTINATION_DIR}/bin/${STRIP_TARGET}"
|
||||||
|
@ -45,6 +45,7 @@ if (CMAKE_CROSSCOMPILING)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_MUSL)
|
if (USE_MUSL)
|
||||||
|
# use of undeclared identifier 'PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP'
|
||||||
set (ENABLE_SENTRY OFF CACHE INTERNAL "")
|
set (ENABLE_SENTRY OFF CACHE INTERNAL "")
|
||||||
set (ENABLE_ODBC OFF CACHE INTERNAL "")
|
set (ENABLE_ODBC OFF CACHE INTERNAL "")
|
||||||
set (ENABLE_GRPC OFF CACHE INTERNAL "")
|
set (ENABLE_GRPC OFF CACHE INTERNAL "")
|
||||||
|
@ -94,8 +94,13 @@ if (LINKER_NAME)
|
|||||||
if (NOT LLD_PATH)
|
if (NOT LLD_PATH)
|
||||||
message (FATAL_ERROR "Using linker ${LINKER_NAME} but can't find its path.")
|
message (FATAL_ERROR "Using linker ${LINKER_NAME} but can't find its path.")
|
||||||
endif ()
|
endif ()
|
||||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --ld-path=${LLD_PATH}")
|
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --ld-path=${LLD_PATH}")
|
# This a temporary quirk to emit .debug_aranges with ThinLTO
|
||||||
|
set (LLD_WRAPPER "${CMAKE_CURRENT_BINARY_DIR}/ld.lld")
|
||||||
|
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/ld.lld.in" "${LLD_WRAPPER}" @ONLY)
|
||||||
|
|
||||||
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --ld-path=${LLD_WRAPPER}")
|
||||||
|
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --ld-path=${LLD_WRAPPER}")
|
||||||
else ()
|
else ()
|
||||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}")
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}")
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}")
|
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}")
|
||||||
|
@ -23,6 +23,7 @@ if (COMPILER_CLANG)
|
|||||||
no_warning(zero-length-array)
|
no_warning(zero-length-array)
|
||||||
no_warning(c++98-compat-pedantic)
|
no_warning(c++98-compat-pedantic)
|
||||||
no_warning(c++98-compat)
|
no_warning(c++98-compat)
|
||||||
|
no_warning(c++20-compat) # Use constinit in C++20 without warnings
|
||||||
no_warning(conversion)
|
no_warning(conversion)
|
||||||
no_warning(ctad-maybe-unsupported) # clang 9+, linux-only
|
no_warning(ctad-maybe-unsupported) # clang 9+, linux-only
|
||||||
no_warning(disabled-macro-expansion)
|
no_warning(disabled-macro-expansion)
|
||||||
@ -41,6 +42,7 @@ if (COMPILER_CLANG)
|
|||||||
no_warning(weak-template-vtables)
|
no_warning(weak-template-vtables)
|
||||||
no_warning(weak-vtables)
|
no_warning(weak-vtables)
|
||||||
no_warning(thread-safety-negative) # experimental flag, too many false positives
|
no_warning(thread-safety-negative) # experimental flag, too many false positives
|
||||||
|
no_warning(enum-constexpr-conversion) # breaks magic-enum library in clang-16
|
||||||
# TODO Enable conversion, sign-conversion, double-promotion warnings.
|
# TODO Enable conversion, sign-conversion, double-promotion warnings.
|
||||||
elseif (COMPILER_GCC)
|
elseif (COMPILER_GCC)
|
||||||
# Add compiler options only to c++ compiler
|
# Add compiler options only to c++ compiler
|
||||||
|
2
contrib/NuRaft
vendored
2
contrib/NuRaft
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 1334b9ae72576821a698d657d08838861cf33007
|
Subproject commit e15858f8ad0ce8aba85cf74e3763874c76bf927c
|
2
contrib/arrow
vendored
2
contrib/arrow
vendored
@ -1 +1 @@
|
|||||||
Subproject commit efdcd015cfdee1b6aa349c9ca227ca12c3d697f5
|
Subproject commit 450a5638704386356f8e520080468fc9bc8bcaf8
|
2
contrib/azure
vendored
2
contrib/azure
vendored
@ -1 +1 @@
|
|||||||
Subproject commit ac4b763d4ca40122275f1497cbdc5451337461d9
|
Subproject commit ef75afc075fc71fbcd8fe28dcda3794ae265fd1c
|
@ -1,6 +1,6 @@
|
|||||||
option (ENABLE_AZURE_BLOB_STORAGE "Enable Azure blob storage" ${ENABLE_LIBRARIES})
|
option (ENABLE_AZURE_BLOB_STORAGE "Enable Azure blob storage" ${ENABLE_LIBRARIES})
|
||||||
|
|
||||||
if (NOT ENABLE_AZURE_BLOB_STORAGE)
|
if (NOT ENABLE_AZURE_BLOB_STORAGE OR BUILD_STANDALONE_KEEPER OR OS_FREEBSD)
|
||||||
message(STATUS "Not using Azure blob storage")
|
message(STATUS "Not using Azure blob storage")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
2
contrib/boost
vendored
2
contrib/boost
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c0807e83f2824e8dd67a15b355496a9b784cdcd5
|
Subproject commit 03d9ec9cd159d14bd0b17c05138098451a1ea606
|
2
contrib/boringssl
vendored
2
contrib/boringssl
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c1e01a441d6db234f4f12e63a7657d1f9e6db9c1
|
Subproject commit 8061ac62d67953e61b793042e33baf1352e67510
|
@ -1,35 +1,95 @@
|
|||||||
# Choose to build static or shared library for c-ares.
|
set(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/c-ares")
|
||||||
if (USE_STATIC_LIBRARIES)
|
|
||||||
set(CARES_STATIC ON CACHE BOOL "" FORCE)
|
|
||||||
set(CARES_SHARED OFF CACHE BOOL "" FORCE)
|
|
||||||
else ()
|
|
||||||
set(CARES_STATIC OFF CACHE BOOL "" FORCE)
|
|
||||||
set(CARES_SHARED ON CACHE BOOL "" FORCE)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# Disable looking for libnsl on a platforms that has gethostbyname in glibc
|
# Generated from contrib/c-ares/src/lib/Makefile.inc
|
||||||
#
|
SET(SRCS
|
||||||
# c-ares searching for gethostbyname in the libnsl library, however in the
|
"${LIBRARY_DIR}/src/lib/ares__addrinfo2hostent.c"
|
||||||
# version that shipped with gRPC it doing it wrong [1], since it uses
|
"${LIBRARY_DIR}/src/lib/ares__addrinfo_localhost.c"
|
||||||
# CHECK_LIBRARY_EXISTS(), which will return TRUE even if the function exists in
|
"${LIBRARY_DIR}/src/lib/ares__close_sockets.c"
|
||||||
# another dependent library. The upstream already contains correct macro [2],
|
"${LIBRARY_DIR}/src/lib/ares__get_hostent.c"
|
||||||
# but it is not included in gRPC (even upstream gRPC, not the one that is
|
"${LIBRARY_DIR}/src/lib/ares__parse_into_addrinfo.c"
|
||||||
# shipped with clickhousee).
|
"${LIBRARY_DIR}/src/lib/ares__readaddrinfo.c"
|
||||||
#
|
"${LIBRARY_DIR}/src/lib/ares__sortaddrinfo.c"
|
||||||
# [1]: https://github.com/c-ares/c-ares/blob/e982924acee7f7313b4baa4ee5ec000c5e373c30/CMakeLists.txt#L125
|
"${LIBRARY_DIR}/src/lib/ares__read_line.c"
|
||||||
# [2]: https://github.com/c-ares/c-ares/blob/44fbc813685a1fa8aa3f27fcd7544faf612d376a/CMakeLists.txt#L146
|
"${LIBRARY_DIR}/src/lib/ares__timeval.c"
|
||||||
#
|
"${LIBRARY_DIR}/src/lib/ares_android.c"
|
||||||
# And because if you by some reason have libnsl [3] installed, clickhouse will
|
"${LIBRARY_DIR}/src/lib/ares_cancel.c"
|
||||||
# reject to start w/o it. While this is completelly different library.
|
"${LIBRARY_DIR}/src/lib/ares_data.c"
|
||||||
#
|
"${LIBRARY_DIR}/src/lib/ares_destroy.c"
|
||||||
# [3]: https://packages.debian.org/bullseye/libnsl2
|
"${LIBRARY_DIR}/src/lib/ares_expand_name.c"
|
||||||
if (NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
"${LIBRARY_DIR}/src/lib/ares_expand_string.c"
|
||||||
set(HAVE_LIBNSL OFF CACHE BOOL "" FORCE)
|
"${LIBRARY_DIR}/src/lib/ares_fds.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_free_hostent.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_free_string.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_freeaddrinfo.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_getaddrinfo.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_getenv.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_gethostbyaddr.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_gethostbyname.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_getnameinfo.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_getsock.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_init.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_library_init.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_llist.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_mkquery.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_create_query.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_nowarn.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_options.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_a_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_aaaa_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_caa_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_mx_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_naptr_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_ns_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_ptr_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_soa_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_srv_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_txt_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_parse_uri_reply.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_platform.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_process.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_query.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_search.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_send.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_strcasecmp.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_strdup.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_strerror.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_strsplit.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_timeout.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_version.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/ares_writev.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/bitncmp.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/inet_net_pton.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/inet_ntop.c"
|
||||||
|
"${LIBRARY_DIR}/src/lib/windows_port.c"
|
||||||
|
)
|
||||||
|
|
||||||
|
if (USE_STATIC_LIBRARIES)
|
||||||
|
add_library(_c-ares STATIC ${SRCS})
|
||||||
|
target_compile_definitions(_c-ares PUBLIC CARES_STATICLIB)
|
||||||
|
else()
|
||||||
|
add_library(_c-ares SHARED ${SRCS})
|
||||||
|
target_compile_definitions(_c-ares PUBLIC CARES_BUILDING_LIBRARY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Force use of c-ares inet_net_pton instead of libresolv one
|
target_compile_definitions(_c-ares PRIVATE HAVE_CONFIG_H=1)
|
||||||
set(HAVE_INET_NET_PTON OFF CACHE BOOL "" FORCE)
|
|
||||||
|
|
||||||
add_subdirectory("../c-ares/" "../c-ares/")
|
target_include_directories(_c-ares SYSTEM PUBLIC
|
||||||
|
"${LIBRARY_DIR}/src/lib"
|
||||||
|
"${LIBRARY_DIR}/include"
|
||||||
|
)
|
||||||
|
|
||||||
add_library(ch_contrib::c-ares ALIAS c-ares)
|
# Platform-specific include directories. The original build system does a lot of checks to eventually generate two header files with defines:
|
||||||
|
# ares_build.h and ares_config.h. To update, run the original CMake build in c-ares for each platform and copy the headers into the
|
||||||
|
# platform-specific folder.
|
||||||
|
# For the platform-specific compile definitions, see c-ares top-level CMakeLists.txt.
|
||||||
|
if (OS_LINUX)
|
||||||
|
target_include_directories(_c-ares SYSTEM PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/c-ares-cmake/linux")
|
||||||
|
target_compile_definitions(_c-ares PRIVATE -D_GNU_SOURCE -D_POSIX_C_SOURCE=199309L -D_XOPEN_SOURCE=600)
|
||||||
|
elseif (OS_DARWIN)
|
||||||
|
target_include_directories(_c-ares SYSTEM PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/c-ares-cmake/darwin")
|
||||||
|
target_compile_definitions(_c-ares PRIVATE -D_DARWIN_C_SOURCE)
|
||||||
|
elseif (OS_FREEBSD)
|
||||||
|
target_include_directories(_c-ares SYSTEM PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/c-ares-cmake/freebsd")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(ch_contrib::c-ares ALIAS _c-ares)
|
||||||
|
43
contrib/c-ares-cmake/darwin/ares_build.h
Normal file
43
contrib/c-ares-cmake/darwin/ares_build.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#ifndef __CARES_BUILD_H
|
||||||
|
#define __CARES_BUILD_H
|
||||||
|
|
||||||
|
#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
|
||||||
|
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t
|
||||||
|
|
||||||
|
/* Prefix names with CARES_ to make sure they don't conflict with other config.h
|
||||||
|
* files. We need to include some dependent headers that may be system specific
|
||||||
|
* for C-Ares */
|
||||||
|
#define CARES_HAVE_SYS_TYPES_H
|
||||||
|
#define CARES_HAVE_SYS_SOCKET_H
|
||||||
|
/* #undef CARES_HAVE_WINDOWS_H */
|
||||||
|
/* #undef CARES_HAVE_WS2TCPIP_H */
|
||||||
|
/* #undef CARES_HAVE_WINSOCK2_H */
|
||||||
|
/* #undef CARES_HAVE_WINDOWS_H */
|
||||||
|
#define CARES_HAVE_ARPA_NAMESER_H
|
||||||
|
#define CARES_HAVE_ARPA_NAMESER_COMPAT_H
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_WS2TCPIP_H
|
||||||
|
# include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_WINDOWS_H
|
||||||
|
# include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
|
||||||
|
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
|
||||||
|
|
||||||
|
#endif /* __CARES_BUILD_H */
|
432
contrib/c-ares-cmake/darwin/ares_config.h
Normal file
432
contrib/c-ares-cmake/darwin/ares_config.h
Normal file
@ -0,0 +1,432 @@
|
|||||||
|
/* Generated from ares_config.h.cmake */
|
||||||
|
|
||||||
|
/* Define if building universal (internal helper macro) */
|
||||||
|
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
|
||||||
|
/* define this if ares is built for a big endian system */
|
||||||
|
#undef ARES_BIG_ENDIAN
|
||||||
|
|
||||||
|
/* when building as static part of libcurl */
|
||||||
|
#undef BUILDING_LIBCURL
|
||||||
|
|
||||||
|
/* Defined for build that exposes internal static functions for testing. */
|
||||||
|
#undef CARES_EXPOSE_STATICS
|
||||||
|
|
||||||
|
/* Defined for build with symbol hiding. */
|
||||||
|
#undef CARES_SYMBOL_HIDING
|
||||||
|
|
||||||
|
/* Definition to make a library symbol externally visible. */
|
||||||
|
#undef CARES_SYMBOL_SCOPE_EXTERN
|
||||||
|
|
||||||
|
/* Use resolver library to configure cares */
|
||||||
|
/* #undef CARES_USE_LIBRESOLV */
|
||||||
|
|
||||||
|
/* if a /etc/inet dir is being used */
|
||||||
|
#undef ETC_INET
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for gethostname. */
|
||||||
|
#define GETHOSTNAME_TYPE_ARG2 size_t
|
||||||
|
|
||||||
|
/* Define to the type qualifier of arg 1 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_QUAL_ARG1
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG2 socklen_t
|
||||||
|
|
||||||
|
/* Define to the type of args 4 and 6 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG46 socklen_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 7 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG7 int
|
||||||
|
|
||||||
|
/* Specifies the number of arguments to getservbyport_r */
|
||||||
|
#define GETSERVBYPORT_R_ARGS
|
||||||
|
|
||||||
|
/* Specifies the number of arguments to getservbyname_r */
|
||||||
|
#define GETSERVBYNAME_R_ARGS
|
||||||
|
|
||||||
|
/* Define to 1 if you have AF_INET6. */
|
||||||
|
#define HAVE_AF_INET6
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||||
|
#define HAVE_ARPA_INET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
|
||||||
|
#define HAVE_ARPA_NAMESER_COMPAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
||||||
|
#define HAVE_ARPA_NAMESER_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <assert.h> header file. */
|
||||||
|
#define HAVE_ASSERT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `bitncmp' function. */
|
||||||
|
/* #undef HAVE_BITNCMP */
|
||||||
|
|
||||||
|
/* Define to 1 if bool is an available type. */
|
||||||
|
#define HAVE_BOOL_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
||||||
|
#define HAVE_CLOCK_GETTIME_MONOTONIC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the closesocket function. */
|
||||||
|
/* #undef HAVE_CLOSESOCKET */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the CloseSocket camel case function. */
|
||||||
|
/* #undef HAVE_CLOSESOCKET_CAMEL */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the connect function. */
|
||||||
|
#define HAVE_CONNECT
|
||||||
|
|
||||||
|
/* define if the compiler supports basic C++11 syntax */
|
||||||
|
/* #undef HAVE_CXX11 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#define HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <errno.h> header file. */
|
||||||
|
#define HAVE_ERRNO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the fcntl function. */
|
||||||
|
#define HAVE_FCNTL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
|
#define HAVE_FCNTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
|
||||||
|
#define HAVE_FCNTL_O_NONBLOCK
|
||||||
|
|
||||||
|
/* Define to 1 if you have the freeaddrinfo function. */
|
||||||
|
#define HAVE_FREEADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working getaddrinfo function. */
|
||||||
|
#define HAVE_GETADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if the getaddrinfo function is threadsafe. */
|
||||||
|
#define HAVE_GETADDRINFO_THREADSAFE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getenv function. */
|
||||||
|
#define HAVE_GETENV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the gethostbyaddr function. */
|
||||||
|
#define HAVE_GETHOSTBYADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the gethostbyname function. */
|
||||||
|
#define HAVE_GETHOSTBYNAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the gethostname function. */
|
||||||
|
#define HAVE_GETHOSTNAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getnameinfo function. */
|
||||||
|
#define HAVE_GETNAMEINFO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getservbyport_r function. */
|
||||||
|
/* #undef HAVE_GETSERVBYPORT_R */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getservbyname_r function. */
|
||||||
|
/* #undef HAVE_GETSERVBYNAME_R */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `gettimeofday' function. */
|
||||||
|
#define HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `if_indextoname' function. */
|
||||||
|
#define HAVE_IF_INDEXTONAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */
|
||||||
|
/* #undef HAVE_INET_NET_PTON */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
|
||||||
|
#define HAVE_INET_NTOP
|
||||||
|
|
||||||
|
/* Define to 1 if you have a IPv6 capable working inet_pton function. */
|
||||||
|
#define HAVE_INET_PTON
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#define HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ioctl function. */
|
||||||
|
#define HAVE_IOCTL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ioctlsocket function. */
|
||||||
|
/* #undef HAVE_IOCTLSOCKET */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the IoctlSocket camel case function. */
|
||||||
|
/* #undef HAVE_IOCTLSOCKET_CAMEL */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function.
|
||||||
|
*/
|
||||||
|
/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working ioctlsocket FIONBIO function. */
|
||||||
|
/* #undef HAVE_IOCTLSOCKET_FIONBIO */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working ioctl FIONBIO function. */
|
||||||
|
#define HAVE_IOCTL_FIONBIO
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
|
||||||
|
#define HAVE_IOCTL_SIOCGIFADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||||
|
/* #undef HAVE_LIBRESOLV */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
|
#define HAVE_LIMITS_H
|
||||||
|
|
||||||
|
/* if your compiler supports LL */
|
||||||
|
#define HAVE_LL
|
||||||
|
|
||||||
|
/* Define to 1 if the compiler supports the 'long long' data type. */
|
||||||
|
#define HAVE_LONGLONG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the malloc.h header file. */
|
||||||
|
/* #undef HAVE_MALLOC_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the memory.h header file. */
|
||||||
|
#define HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the MSG_NOSIGNAL flag. */
|
||||||
|
/* #undef HAVE_MSG_NOSIGNAL */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netdb.h> header file. */
|
||||||
|
#define HAVE_NETDB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||||
|
#define HAVE_NETINET_IN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||||
|
#define HAVE_NETINET_TCP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/if.h> header file. */
|
||||||
|
#define HAVE_NET_IF_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have PF_INET6. */
|
||||||
|
#define HAVE_PF_INET6
|
||||||
|
|
||||||
|
/* Define to 1 if you have the recv function. */
|
||||||
|
#define HAVE_RECV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the recvfrom function. */
|
||||||
|
#define HAVE_RECVFROM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the send function. */
|
||||||
|
#define HAVE_SEND
|
||||||
|
|
||||||
|
/* Define to 1 if you have the setsockopt function. */
|
||||||
|
#define HAVE_SETSOCKOPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
|
||||||
|
/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <signal.h> header file. */
|
||||||
|
#define HAVE_SIGNAL_H
|
||||||
|
|
||||||
|
/* Define to 1 if sig_atomic_t is an available typedef. */
|
||||||
|
#define HAVE_SIG_ATOMIC_T
|
||||||
|
|
||||||
|
/* Define to 1 if sig_atomic_t is already defined as volatile. */
|
||||||
|
/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
|
||||||
|
|
||||||
|
/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */
|
||||||
|
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
|
||||||
|
|
||||||
|
/* Define to 1 if you have the socket function. */
|
||||||
|
#define HAVE_SOCKET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <socket.h> header file. */
|
||||||
|
/* #undef HAVE_SOCKET_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdbool.h> header file. */
|
||||||
|
#define HAVE_STDBOOL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#define HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#define HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strcasecmp function. */
|
||||||
|
#define HAVE_STRCASECMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strcmpi function. */
|
||||||
|
/* #undef HAVE_STRCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strdup function. */
|
||||||
|
#define HAVE_STRDUP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the stricmp function. */
|
||||||
|
/* #undef HAVE_STRICMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#define HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#define HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strncasecmp function. */
|
||||||
|
#define HAVE_STRNCASECMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strncmpi function. */
|
||||||
|
/* #undef HAVE_STRNCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strnicmp function. */
|
||||||
|
/* #undef HAVE_STRNICMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stropts.h> header file. */
|
||||||
|
/* #undef HAVE_STROPTS_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have struct addrinfo. */
|
||||||
|
#define HAVE_STRUCT_ADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if you have struct in6_addr. */
|
||||||
|
#define HAVE_STRUCT_IN6_ADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have struct sockaddr_in6. */
|
||||||
|
#define HAVE_STRUCT_SOCKADDR_IN6
|
||||||
|
|
||||||
|
/* if struct sockaddr_storage is defined */
|
||||||
|
#define HAVE_STRUCT_SOCKADDR_STORAGE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the timeval struct. */
|
||||||
|
#define HAVE_STRUCT_TIMEVAL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||||
|
#define HAVE_SYS_IOCTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
|
#define HAVE_SYS_PARAM_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||||
|
#define HAVE_SYS_SELECT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||||
|
#define HAVE_SYS_SOCKET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#define HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#define HAVE_SYS_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#define HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||||
|
#define HAVE_SYS_UIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <time.h> header file. */
|
||||||
|
#define HAVE_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#define HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the windows.h header file. */
|
||||||
|
/* #undef HAVE_WINDOWS_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the winsock2.h header file. */
|
||||||
|
/* #undef HAVE_WINSOCK2_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the winsock.h header file. */
|
||||||
|
/* #undef HAVE_WINSOCK_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the writev function. */
|
||||||
|
#define HAVE_WRITEV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ws2tcpip.h header file. */
|
||||||
|
/* #undef HAVE_WS2TCPIP_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the __system_property_get function */
|
||||||
|
#define HAVE___SYSTEM_PROPERTY_GET
|
||||||
|
|
||||||
|
/* Define to 1 if you need the malloc.h header file even with stdlib.h */
|
||||||
|
/* #undef NEED_MALLOC_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you need the memory.h header file even with stdlib.h */
|
||||||
|
/* #undef NEED_MEMORY_H */
|
||||||
|
|
||||||
|
/* a suitable file/device to read random data from */
|
||||||
|
#define CARES_RANDOM_FILE "/dev/urandom"
|
||||||
|
|
||||||
|
/* Define to the type qualifier pointed by arg 5 for recvfrom. */
|
||||||
|
#define RECVFROM_QUAL_ARG5
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG1 int
|
||||||
|
|
||||||
|
/* Define to the type pointed by arg 2 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG2 void *
|
||||||
|
|
||||||
|
/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
|
||||||
|
#define RECVFROM_TYPE_ARG2_IS_VOID 0
|
||||||
|
|
||||||
|
/* Define to the type of arg 3 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG3 size_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 4 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG4 int
|
||||||
|
|
||||||
|
/* Define to the type pointed by arg 5 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG5 struct sockaddr *
|
||||||
|
|
||||||
|
/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
|
||||||
|
#define RECVFROM_TYPE_ARG5_IS_VOID 0
|
||||||
|
|
||||||
|
/* Define to the type pointed by arg 6 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG6 socklen_t *
|
||||||
|
|
||||||
|
/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
|
||||||
|
#define RECVFROM_TYPE_ARG6_IS_VOID 0
|
||||||
|
|
||||||
|
/* Define to the function return type for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_RETV ssize_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for recv. */
|
||||||
|
#define RECV_TYPE_ARG1 int
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for recv. */
|
||||||
|
#define RECV_TYPE_ARG2 void *
|
||||||
|
|
||||||
|
/* Define to the type of arg 3 for recv. */
|
||||||
|
#define RECV_TYPE_ARG3 size_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 4 for recv. */
|
||||||
|
#define RECV_TYPE_ARG4 int
|
||||||
|
|
||||||
|
/* Define to the function return type for recv. */
|
||||||
|
#define RECV_TYPE_RETV ssize_t
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||||
|
#define RETSIGTYPE
|
||||||
|
|
||||||
|
/* Define to the type qualifier of arg 2 for send. */
|
||||||
|
#define SEND_QUAL_ARG2
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for send. */
|
||||||
|
#define SEND_TYPE_ARG1 int
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for send. */
|
||||||
|
#define SEND_TYPE_ARG2 void *
|
||||||
|
|
||||||
|
/* Define to the type of arg 3 for send. */
|
||||||
|
#define SEND_TYPE_ARG3 size_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 4 for send. */
|
||||||
|
#define SEND_TYPE_ARG4 int
|
||||||
|
|
||||||
|
/* Define to the function return type for send. */
|
||||||
|
#define SEND_TYPE_RETV ssize_t
|
||||||
|
|
||||||
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#define TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
|
/* Define to disable non-blocking sockets. */
|
||||||
|
#undef USE_BLOCKING_SOCKETS
|
||||||
|
|
||||||
|
/* Define to avoid automatic inclusion of winsock.h */
|
||||||
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
/* Type to use in place of in_addr_t when system does not provide it. */
|
||||||
|
#undef in_addr_t
|
||||||
|
|
43
contrib/c-ares-cmake/freebsd/ares_build.h
Normal file
43
contrib/c-ares-cmake/freebsd/ares_build.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#ifndef __CARES_BUILD_H
|
||||||
|
#define __CARES_BUILD_H
|
||||||
|
|
||||||
|
#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
|
||||||
|
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t
|
||||||
|
|
||||||
|
/* Prefix names with CARES_ to make sure they don't conflict with other config.h
|
||||||
|
* files. We need to include some dependent headers that may be system specific
|
||||||
|
* for C-Ares */
|
||||||
|
#define CARES_HAVE_SYS_TYPES_H
|
||||||
|
#define CARES_HAVE_SYS_SOCKET_H
|
||||||
|
/* #undef CARES_HAVE_WINDOWS_H */
|
||||||
|
/* #undef CARES_HAVE_WS2TCPIP_H */
|
||||||
|
/* #undef CARES_HAVE_WINSOCK2_H */
|
||||||
|
/* #undef CARES_HAVE_WINDOWS_H */
|
||||||
|
#define CARES_HAVE_ARPA_NAMESER_H
|
||||||
|
#define CARES_HAVE_ARPA_NAMESER_COMPAT_H
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_WS2TCPIP_H
|
||||||
|
# include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_WINDOWS_H
|
||||||
|
# include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
|
||||||
|
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
|
||||||
|
|
||||||
|
#endif /* __CARES_BUILD_H */
|
432
contrib/c-ares-cmake/freebsd/ares_config.h
Normal file
432
contrib/c-ares-cmake/freebsd/ares_config.h
Normal file
@ -0,0 +1,432 @@
|
|||||||
|
/* Generated from ares_config.h.cmake */
|
||||||
|
|
||||||
|
/* Define if building universal (internal helper macro) */
|
||||||
|
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
|
||||||
|
/* define this if ares is built for a big endian system */
|
||||||
|
#undef ARES_BIG_ENDIAN
|
||||||
|
|
||||||
|
/* when building as static part of libcurl */
|
||||||
|
#undef BUILDING_LIBCURL
|
||||||
|
|
||||||
|
/* Defined for build that exposes internal static functions for testing. */
|
||||||
|
#undef CARES_EXPOSE_STATICS
|
||||||
|
|
||||||
|
/* Defined for build with symbol hiding. */
|
||||||
|
#undef CARES_SYMBOL_HIDING
|
||||||
|
|
||||||
|
/* Definition to make a library symbol externally visible. */
|
||||||
|
#undef CARES_SYMBOL_SCOPE_EXTERN
|
||||||
|
|
||||||
|
/* Use resolver library to configure cares */
|
||||||
|
/* #undef CARES_USE_LIBRESOLV */
|
||||||
|
|
||||||
|
/* if a /etc/inet dir is being used */
|
||||||
|
#undef ETC_INET
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for gethostname. */
|
||||||
|
#define GETHOSTNAME_TYPE_ARG2 size_t
|
||||||
|
|
||||||
|
/* Define to the type qualifier of arg 1 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_QUAL_ARG1
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG2 socklen_t
|
||||||
|
|
||||||
|
/* Define to the type of args 4 and 6 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG46 socklen_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 7 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG7 int
|
||||||
|
|
||||||
|
/* Specifies the number of arguments to getservbyport_r */
|
||||||
|
#define GETSERVBYPORT_R_ARGS 6
|
||||||
|
|
||||||
|
/* Specifies the number of arguments to getservbyname_r */
|
||||||
|
#define GETSERVBYNAME_R_ARGS 6
|
||||||
|
|
||||||
|
/* Define to 1 if you have AF_INET6. */
|
||||||
|
#define HAVE_AF_INET6
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||||
|
#define HAVE_ARPA_INET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
|
||||||
|
#define HAVE_ARPA_NAMESER_COMPAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
||||||
|
#define HAVE_ARPA_NAMESER_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <assert.h> header file. */
|
||||||
|
#define HAVE_ASSERT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `bitncmp' function. */
|
||||||
|
/* #undef HAVE_BITNCMP */
|
||||||
|
|
||||||
|
/* Define to 1 if bool is an available type. */
|
||||||
|
#define HAVE_BOOL_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
||||||
|
#define HAVE_CLOCK_GETTIME_MONOTONIC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the closesocket function. */
|
||||||
|
/* #undef HAVE_CLOSESOCKET */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the CloseSocket camel case function. */
|
||||||
|
/* #undef HAVE_CLOSESOCKET_CAMEL */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the connect function. */
|
||||||
|
#define HAVE_CONNECT
|
||||||
|
|
||||||
|
/* define if the compiler supports basic C++11 syntax */
|
||||||
|
/* #undef HAVE_CXX11 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#define HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <errno.h> header file. */
|
||||||
|
#define HAVE_ERRNO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the fcntl function. */
|
||||||
|
#define HAVE_FCNTL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
|
#define HAVE_FCNTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
|
||||||
|
#define HAVE_FCNTL_O_NONBLOCK
|
||||||
|
|
||||||
|
/* Define to 1 if you have the freeaddrinfo function. */
|
||||||
|
#define HAVE_FREEADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working getaddrinfo function. */
|
||||||
|
#define HAVE_GETADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if the getaddrinfo function is threadsafe. */
|
||||||
|
#define HAVE_GETADDRINFO_THREADSAFE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getenv function. */
|
||||||
|
#define HAVE_GETENV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the gethostbyaddr function. */
|
||||||
|
#define HAVE_GETHOSTBYADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the gethostbyname function. */
|
||||||
|
#define HAVE_GETHOSTBYNAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the gethostname function. */
|
||||||
|
#define HAVE_GETHOSTNAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getnameinfo function. */
|
||||||
|
#define HAVE_GETNAMEINFO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getservbyport_r function. */
|
||||||
|
#define HAVE_GETSERVBYPORT_R
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getservbyname_r function. */
|
||||||
|
#define HAVE_GETSERVBYNAME_R
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `gettimeofday' function. */
|
||||||
|
#define HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `if_indextoname' function. */
|
||||||
|
#define HAVE_IF_INDEXTONAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */
|
||||||
|
/* #undef HAVE_INET_NET_PTON */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
|
||||||
|
#define HAVE_INET_NTOP
|
||||||
|
|
||||||
|
/* Define to 1 if you have a IPv6 capable working inet_pton function. */
|
||||||
|
#define HAVE_INET_PTON
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#define HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ioctl function. */
|
||||||
|
#define HAVE_IOCTL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ioctlsocket function. */
|
||||||
|
/* #undef HAVE_IOCTLSOCKET */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the IoctlSocket camel case function. */
|
||||||
|
/* #undef HAVE_IOCTLSOCKET_CAMEL */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function.
|
||||||
|
*/
|
||||||
|
/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working ioctlsocket FIONBIO function. */
|
||||||
|
/* #undef HAVE_IOCTLSOCKET_FIONBIO */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working ioctl FIONBIO function. */
|
||||||
|
#define HAVE_IOCTL_FIONBIO
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
|
||||||
|
#define HAVE_IOCTL_SIOCGIFADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||||
|
/* #undef HAVE_LIBRESOLV */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
|
#define HAVE_LIMITS_H
|
||||||
|
|
||||||
|
/* if your compiler supports LL */
|
||||||
|
#define HAVE_LL
|
||||||
|
|
||||||
|
/* Define to 1 if the compiler supports the 'long long' data type. */
|
||||||
|
#define HAVE_LONGLONG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the malloc.h header file. */
|
||||||
|
/* #undef HAVE_MALLOC_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the memory.h header file. */
|
||||||
|
#define HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the MSG_NOSIGNAL flag. */
|
||||||
|
#define HAVE_MSG_NOSIGNAL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netdb.h> header file. */
|
||||||
|
#define HAVE_NETDB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||||
|
#define HAVE_NETINET_IN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||||
|
#define HAVE_NETINET_TCP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/if.h> header file. */
|
||||||
|
#define HAVE_NET_IF_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have PF_INET6. */
|
||||||
|
#define HAVE_PF_INET6
|
||||||
|
|
||||||
|
/* Define to 1 if you have the recv function. */
|
||||||
|
#define HAVE_RECV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the recvfrom function. */
|
||||||
|
#define HAVE_RECVFROM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the send function. */
|
||||||
|
#define HAVE_SEND
|
||||||
|
|
||||||
|
/* Define to 1 if you have the setsockopt function. */
|
||||||
|
#define HAVE_SETSOCKOPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
|
||||||
|
/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <signal.h> header file. */
|
||||||
|
#define HAVE_SIGNAL_H
|
||||||
|
|
||||||
|
/* Define to 1 if sig_atomic_t is an available typedef. */
|
||||||
|
#define HAVE_SIG_ATOMIC_T
|
||||||
|
|
||||||
|
/* Define to 1 if sig_atomic_t is already defined as volatile. */
|
||||||
|
/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
|
||||||
|
|
||||||
|
/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */
|
||||||
|
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
|
||||||
|
|
||||||
|
/* Define to 1 if you have the socket function. */
|
||||||
|
#define HAVE_SOCKET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <socket.h> header file. */
|
||||||
|
/* #undef HAVE_SOCKET_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdbool.h> header file. */
|
||||||
|
#define HAVE_STDBOOL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#define HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#define HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strcasecmp function. */
|
||||||
|
#define HAVE_STRCASECMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strcmpi function. */
|
||||||
|
/* #undef HAVE_STRCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strdup function. */
|
||||||
|
#define HAVE_STRDUP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the stricmp function. */
|
||||||
|
/* #undef HAVE_STRICMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#define HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#define HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strncasecmp function. */
|
||||||
|
#define HAVE_STRNCASECMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strncmpi function. */
|
||||||
|
/* #undef HAVE_STRNCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strnicmp function. */
|
||||||
|
/* #undef HAVE_STRNICMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stropts.h> header file. */
|
||||||
|
/* #undef HAVE_STROPTS_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have struct addrinfo. */
|
||||||
|
#define HAVE_STRUCT_ADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if you have struct in6_addr. */
|
||||||
|
#define HAVE_STRUCT_IN6_ADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have struct sockaddr_in6. */
|
||||||
|
#define HAVE_STRUCT_SOCKADDR_IN6
|
||||||
|
|
||||||
|
/* if struct sockaddr_storage is defined */
|
||||||
|
#define HAVE_STRUCT_SOCKADDR_STORAGE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the timeval struct. */
|
||||||
|
#define HAVE_STRUCT_TIMEVAL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||||
|
#define HAVE_SYS_IOCTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
|
#define HAVE_SYS_PARAM_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||||
|
#define HAVE_SYS_SELECT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||||
|
#define HAVE_SYS_SOCKET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#define HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#define HAVE_SYS_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#define HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||||
|
#define HAVE_SYS_UIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <time.h> header file. */
|
||||||
|
#define HAVE_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#define HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the windows.h header file. */
|
||||||
|
/* #undef HAVE_WINDOWS_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the winsock2.h header file. */
|
||||||
|
/* #undef HAVE_WINSOCK2_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the winsock.h header file. */
|
||||||
|
/* #undef HAVE_WINSOCK_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the writev function. */
|
||||||
|
#define HAVE_WRITEV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ws2tcpip.h header file. */
|
||||||
|
/* #undef HAVE_WS2TCPIP_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the __system_property_get function */
|
||||||
|
#define HAVE___SYSTEM_PROPERTY_GET
|
||||||
|
|
||||||
|
/* Define to 1 if you need the malloc.h header file even with stdlib.h */
|
||||||
|
/* #undef NEED_MALLOC_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you need the memory.h header file even with stdlib.h */
|
||||||
|
/* #undef NEED_MEMORY_H */
|
||||||
|
|
||||||
|
/* a suitable file/device to read random data from */
|
||||||
|
#define CARES_RANDOM_FILE "/dev/urandom"
|
||||||
|
|
||||||
|
/* Define to the type qualifier pointed by arg 5 for recvfrom. */
|
||||||
|
#define RECVFROM_QUAL_ARG5
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG1 int
|
||||||
|
|
||||||
|
/* Define to the type pointed by arg 2 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG2 void *
|
||||||
|
|
||||||
|
/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
|
||||||
|
#define RECVFROM_TYPE_ARG2_IS_VOID 0
|
||||||
|
|
||||||
|
/* Define to the type of arg 3 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG3 size_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 4 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG4 int
|
||||||
|
|
||||||
|
/* Define to the type pointed by arg 5 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG5 struct sockaddr *
|
||||||
|
|
||||||
|
/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
|
||||||
|
#define RECVFROM_TYPE_ARG5_IS_VOID 0
|
||||||
|
|
||||||
|
/* Define to the type pointed by arg 6 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG6 socklen_t *
|
||||||
|
|
||||||
|
/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
|
||||||
|
#define RECVFROM_TYPE_ARG6_IS_VOID 0
|
||||||
|
|
||||||
|
/* Define to the function return type for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_RETV ssize_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for recv. */
|
||||||
|
#define RECV_TYPE_ARG1 int
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for recv. */
|
||||||
|
#define RECV_TYPE_ARG2 void *
|
||||||
|
|
||||||
|
/* Define to the type of arg 3 for recv. */
|
||||||
|
#define RECV_TYPE_ARG3 size_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 4 for recv. */
|
||||||
|
#define RECV_TYPE_ARG4 int
|
||||||
|
|
||||||
|
/* Define to the function return type for recv. */
|
||||||
|
#define RECV_TYPE_RETV ssize_t
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||||
|
#define RETSIGTYPE
|
||||||
|
|
||||||
|
/* Define to the type qualifier of arg 2 for send. */
|
||||||
|
#define SEND_QUAL_ARG2
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for send. */
|
||||||
|
#define SEND_TYPE_ARG1 int
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for send. */
|
||||||
|
#define SEND_TYPE_ARG2 void *
|
||||||
|
|
||||||
|
/* Define to the type of arg 3 for send. */
|
||||||
|
#define SEND_TYPE_ARG3 size_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 4 for send. */
|
||||||
|
#define SEND_TYPE_ARG4 int
|
||||||
|
|
||||||
|
/* Define to the function return type for send. */
|
||||||
|
#define SEND_TYPE_RETV ssize_t
|
||||||
|
|
||||||
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#define TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
|
/* Define to disable non-blocking sockets. */
|
||||||
|
#undef USE_BLOCKING_SOCKETS
|
||||||
|
|
||||||
|
/* Define to avoid automatic inclusion of winsock.h */
|
||||||
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
/* Type to use in place of in_addr_t when system does not provide it. */
|
||||||
|
#undef in_addr_t
|
||||||
|
|
43
contrib/c-ares-cmake/linux/ares_build.h
Normal file
43
contrib/c-ares-cmake/linux/ares_build.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#ifndef __CARES_BUILD_H
|
||||||
|
#define __CARES_BUILD_H
|
||||||
|
|
||||||
|
#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
|
||||||
|
#define CARES_TYPEOF_ARES_SSIZE_T ssize_t
|
||||||
|
|
||||||
|
/* Prefix names with CARES_ to make sure they don't conflict with other config.h
|
||||||
|
* files. We need to include some dependent headers that may be system specific
|
||||||
|
* for C-Ares */
|
||||||
|
#define CARES_HAVE_SYS_TYPES_H
|
||||||
|
#define CARES_HAVE_SYS_SOCKET_H
|
||||||
|
/* #undef CARES_HAVE_WINDOWS_H */
|
||||||
|
/* #undef CARES_HAVE_WS2TCPIP_H */
|
||||||
|
/* #undef CARES_HAVE_WINSOCK2_H */
|
||||||
|
/* #undef CARES_HAVE_WINDOWS_H */
|
||||||
|
#define CARES_HAVE_ARPA_NAMESER_H
|
||||||
|
#define CARES_HAVE_ARPA_NAMESER_COMPAT_H
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_SYS_TYPES_H
|
||||||
|
# include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_SYS_SOCKET_H
|
||||||
|
# include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_WINSOCK2_H
|
||||||
|
# include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_WS2TCPIP_H
|
||||||
|
# include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CARES_HAVE_WINDOWS_H
|
||||||
|
# include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
|
||||||
|
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
|
||||||
|
|
||||||
|
#endif /* __CARES_BUILD_H */
|
432
contrib/c-ares-cmake/linux/ares_config.h
Normal file
432
contrib/c-ares-cmake/linux/ares_config.h
Normal file
@ -0,0 +1,432 @@
|
|||||||
|
/* Generated from ares_config.h.cmake */
|
||||||
|
|
||||||
|
/* Define if building universal (internal helper macro) */
|
||||||
|
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||||
|
|
||||||
|
/* define this if ares is built for a big endian system */
|
||||||
|
#undef ARES_BIG_ENDIAN
|
||||||
|
|
||||||
|
/* when building as static part of libcurl */
|
||||||
|
#undef BUILDING_LIBCURL
|
||||||
|
|
||||||
|
/* Defined for build that exposes internal static functions for testing. */
|
||||||
|
#undef CARES_EXPOSE_STATICS
|
||||||
|
|
||||||
|
/* Defined for build with symbol hiding. */
|
||||||
|
#undef CARES_SYMBOL_HIDING
|
||||||
|
|
||||||
|
/* Definition to make a library symbol externally visible. */
|
||||||
|
#undef CARES_SYMBOL_SCOPE_EXTERN
|
||||||
|
|
||||||
|
/* Use resolver library to configure cares */
|
||||||
|
/* #undef CARES_USE_LIBRESOLV */
|
||||||
|
|
||||||
|
/* if a /etc/inet dir is being used */
|
||||||
|
#undef ETC_INET
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for gethostname. */
|
||||||
|
#define GETHOSTNAME_TYPE_ARG2 size_t
|
||||||
|
|
||||||
|
/* Define to the type qualifier of arg 1 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_QUAL_ARG1
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG2 socklen_t
|
||||||
|
|
||||||
|
/* Define to the type of args 4 and 6 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG46 socklen_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 7 for getnameinfo. */
|
||||||
|
#define GETNAMEINFO_TYPE_ARG7 int
|
||||||
|
|
||||||
|
/* Specifies the number of arguments to getservbyport_r */
|
||||||
|
#define GETSERVBYPORT_R_ARGS 6
|
||||||
|
|
||||||
|
/* Specifies the number of arguments to getservbyname_r */
|
||||||
|
#define GETSERVBYNAME_R_ARGS 6
|
||||||
|
|
||||||
|
/* Define to 1 if you have AF_INET6. */
|
||||||
|
#define HAVE_AF_INET6
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||||
|
#define HAVE_ARPA_INET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
|
||||||
|
#define HAVE_ARPA_NAMESER_COMPAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
||||||
|
#define HAVE_ARPA_NAMESER_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <assert.h> header file. */
|
||||||
|
#define HAVE_ASSERT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `bitncmp' function. */
|
||||||
|
/* #undef HAVE_BITNCMP */
|
||||||
|
|
||||||
|
/* Define to 1 if bool is an available type. */
|
||||||
|
#define HAVE_BOOL_T
|
||||||
|
|
||||||
|
/* Define to 1 if you have the clock_gettime function and monotonic timer. */
|
||||||
|
#define HAVE_CLOCK_GETTIME_MONOTONIC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the closesocket function. */
|
||||||
|
/* #undef HAVE_CLOSESOCKET */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the CloseSocket camel case function. */
|
||||||
|
/* #undef HAVE_CLOSESOCKET_CAMEL */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the connect function. */
|
||||||
|
#define HAVE_CONNECT
|
||||||
|
|
||||||
|
/* define if the compiler supports basic C++11 syntax */
|
||||||
|
/* #undef HAVE_CXX11 */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#define HAVE_DLFCN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <errno.h> header file. */
|
||||||
|
#define HAVE_ERRNO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the fcntl function. */
|
||||||
|
#define HAVE_FCNTL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
|
#define HAVE_FCNTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
|
||||||
|
#define HAVE_FCNTL_O_NONBLOCK
|
||||||
|
|
||||||
|
/* Define to 1 if you have the freeaddrinfo function. */
|
||||||
|
#define HAVE_FREEADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working getaddrinfo function. */
|
||||||
|
#define HAVE_GETADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if the getaddrinfo function is threadsafe. */
|
||||||
|
/* #undef HAVE_GETADDRINFO_THREADSAFE */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getenv function. */
|
||||||
|
#define HAVE_GETENV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the gethostbyaddr function. */
|
||||||
|
#define HAVE_GETHOSTBYADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the gethostbyname function. */
|
||||||
|
#define HAVE_GETHOSTBYNAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the gethostname function. */
|
||||||
|
#define HAVE_GETHOSTNAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getnameinfo function. */
|
||||||
|
#define HAVE_GETNAMEINFO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getservbyport_r function. */
|
||||||
|
#define HAVE_GETSERVBYPORT_R
|
||||||
|
|
||||||
|
/* Define to 1 if you have the getservbyname_r function. */
|
||||||
|
#define HAVE_GETSERVBYNAME_R
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `gettimeofday' function. */
|
||||||
|
#define HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `if_indextoname' function. */
|
||||||
|
#define HAVE_IF_INDEXTONAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */
|
||||||
|
/* #undef HAVE_INET_NET_PTON */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a IPv6 capable working inet_ntop function. */
|
||||||
|
#define HAVE_INET_NTOP
|
||||||
|
|
||||||
|
/* Define to 1 if you have a IPv6 capable working inet_pton function. */
|
||||||
|
#define HAVE_INET_PTON
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#define HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ioctl function. */
|
||||||
|
#define HAVE_IOCTL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ioctlsocket function. */
|
||||||
|
/* #undef HAVE_IOCTLSOCKET */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the IoctlSocket camel case function. */
|
||||||
|
/* #undef HAVE_IOCTLSOCKET_CAMEL */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function.
|
||||||
|
*/
|
||||||
|
/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working ioctlsocket FIONBIO function. */
|
||||||
|
/* #undef HAVE_IOCTLSOCKET_FIONBIO */
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working ioctl FIONBIO function. */
|
||||||
|
#define HAVE_IOCTL_FIONBIO
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
|
||||||
|
#define HAVE_IOCTL_SIOCGIFADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||||
|
/* #undef HAVE_LIBRESOLV */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <limits.h> header file. */
|
||||||
|
#define HAVE_LIMITS_H
|
||||||
|
|
||||||
|
/* if your compiler supports LL */
|
||||||
|
#define HAVE_LL
|
||||||
|
|
||||||
|
/* Define to 1 if the compiler supports the 'long long' data type. */
|
||||||
|
#define HAVE_LONGLONG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the malloc.h header file. */
|
||||||
|
#define HAVE_MALLOC_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the memory.h header file. */
|
||||||
|
#define HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the MSG_NOSIGNAL flag. */
|
||||||
|
#define HAVE_MSG_NOSIGNAL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netdb.h> header file. */
|
||||||
|
#define HAVE_NETDB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||||
|
#define HAVE_NETINET_IN_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||||
|
#define HAVE_NETINET_TCP_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <net/if.h> header file. */
|
||||||
|
#define HAVE_NET_IF_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have PF_INET6. */
|
||||||
|
#define HAVE_PF_INET6
|
||||||
|
|
||||||
|
/* Define to 1 if you have the recv function. */
|
||||||
|
#define HAVE_RECV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the recvfrom function. */
|
||||||
|
#define HAVE_RECVFROM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the send function. */
|
||||||
|
#define HAVE_SEND
|
||||||
|
|
||||||
|
/* Define to 1 if you have the setsockopt function. */
|
||||||
|
#define HAVE_SETSOCKOPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */
|
||||||
|
/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <signal.h> header file. */
|
||||||
|
#define HAVE_SIGNAL_H
|
||||||
|
|
||||||
|
/* Define to 1 if sig_atomic_t is an available typedef. */
|
||||||
|
#define HAVE_SIG_ATOMIC_T
|
||||||
|
|
||||||
|
/* Define to 1 if sig_atomic_t is already defined as volatile. */
|
||||||
|
/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
|
||||||
|
|
||||||
|
/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */
|
||||||
|
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
|
||||||
|
|
||||||
|
/* Define to 1 if you have the socket function. */
|
||||||
|
#define HAVE_SOCKET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <socket.h> header file. */
|
||||||
|
/* #undef HAVE_SOCKET_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdbool.h> header file. */
|
||||||
|
#define HAVE_STDBOOL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#define HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#define HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strcasecmp function. */
|
||||||
|
#define HAVE_STRCASECMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strcmpi function. */
|
||||||
|
/* #undef HAVE_STRCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strdup function. */
|
||||||
|
#define HAVE_STRDUP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the stricmp function. */
|
||||||
|
/* #undef HAVE_STRICMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#define HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#define HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strncasecmp function. */
|
||||||
|
#define HAVE_STRNCASECMP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strncmpi function. */
|
||||||
|
/* #undef HAVE_STRNCMPI */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the strnicmp function. */
|
||||||
|
/* #undef HAVE_STRNICMP */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stropts.h> header file. */
|
||||||
|
#define HAVE_STROPTS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have struct addrinfo. */
|
||||||
|
#define HAVE_STRUCT_ADDRINFO
|
||||||
|
|
||||||
|
/* Define to 1 if you have struct in6_addr. */
|
||||||
|
#define HAVE_STRUCT_IN6_ADDR
|
||||||
|
|
||||||
|
/* Define to 1 if you have struct sockaddr_in6. */
|
||||||
|
#define HAVE_STRUCT_SOCKADDR_IN6
|
||||||
|
|
||||||
|
/* if struct sockaddr_storage is defined */
|
||||||
|
#define HAVE_STRUCT_SOCKADDR_STORAGE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the timeval struct. */
|
||||||
|
#define HAVE_STRUCT_TIMEVAL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||||
|
#define HAVE_SYS_IOCTL_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||||
|
#define HAVE_SYS_PARAM_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||||
|
#define HAVE_SYS_SELECT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||||
|
#define HAVE_SYS_SOCKET_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#define HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||||
|
#define HAVE_SYS_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#define HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||||
|
#define HAVE_SYS_UIO_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <time.h> header file. */
|
||||||
|
#define HAVE_TIME_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#define HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the windows.h header file. */
|
||||||
|
/* #undef HAVE_WINDOWS_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the winsock2.h header file. */
|
||||||
|
/* #undef HAVE_WINSOCK2_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the winsock.h header file. */
|
||||||
|
/* #undef HAVE_WINSOCK_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the writev function. */
|
||||||
|
#define HAVE_WRITEV
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ws2tcpip.h header file. */
|
||||||
|
/* #undef HAVE_WS2TCPIP_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the __system_property_get function */
|
||||||
|
#define HAVE___SYSTEM_PROPERTY_GET
|
||||||
|
|
||||||
|
/* Define to 1 if you need the malloc.h header file even with stdlib.h */
|
||||||
|
/* #undef NEED_MALLOC_H */
|
||||||
|
|
||||||
|
/* Define to 1 if you need the memory.h header file even with stdlib.h */
|
||||||
|
/* #undef NEED_MEMORY_H */
|
||||||
|
|
||||||
|
/* a suitable file/device to read random data from */
|
||||||
|
#define CARES_RANDOM_FILE "/dev/urandom"
|
||||||
|
|
||||||
|
/* Define to the type qualifier pointed by arg 5 for recvfrom. */
|
||||||
|
#define RECVFROM_QUAL_ARG5
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG1 int
|
||||||
|
|
||||||
|
/* Define to the type pointed by arg 2 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG2 void *
|
||||||
|
|
||||||
|
/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */
|
||||||
|
#define RECVFROM_TYPE_ARG2_IS_VOID 0
|
||||||
|
|
||||||
|
/* Define to the type of arg 3 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG3 size_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 4 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG4 int
|
||||||
|
|
||||||
|
/* Define to the type pointed by arg 5 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG5 struct sockaddr *
|
||||||
|
|
||||||
|
/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */
|
||||||
|
#define RECVFROM_TYPE_ARG5_IS_VOID 0
|
||||||
|
|
||||||
|
/* Define to the type pointed by arg 6 for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_ARG6 socklen_t *
|
||||||
|
|
||||||
|
/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */
|
||||||
|
#define RECVFROM_TYPE_ARG6_IS_VOID 0
|
||||||
|
|
||||||
|
/* Define to the function return type for recvfrom. */
|
||||||
|
#define RECVFROM_TYPE_RETV ssize_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for recv. */
|
||||||
|
#define RECV_TYPE_ARG1 int
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for recv. */
|
||||||
|
#define RECV_TYPE_ARG2 void *
|
||||||
|
|
||||||
|
/* Define to the type of arg 3 for recv. */
|
||||||
|
#define RECV_TYPE_ARG3 size_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 4 for recv. */
|
||||||
|
#define RECV_TYPE_ARG4 int
|
||||||
|
|
||||||
|
/* Define to the function return type for recv. */
|
||||||
|
#define RECV_TYPE_RETV ssize_t
|
||||||
|
|
||||||
|
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||||
|
#define RETSIGTYPE
|
||||||
|
|
||||||
|
/* Define to the type qualifier of arg 2 for send. */
|
||||||
|
#define SEND_QUAL_ARG2
|
||||||
|
|
||||||
|
/* Define to the type of arg 1 for send. */
|
||||||
|
#define SEND_TYPE_ARG1 int
|
||||||
|
|
||||||
|
/* Define to the type of arg 2 for send. */
|
||||||
|
#define SEND_TYPE_ARG2 void *
|
||||||
|
|
||||||
|
/* Define to the type of arg 3 for send. */
|
||||||
|
#define SEND_TYPE_ARG3 size_t
|
||||||
|
|
||||||
|
/* Define to the type of arg 4 for send. */
|
||||||
|
#define SEND_TYPE_ARG4 int
|
||||||
|
|
||||||
|
/* Define to the function return type for send. */
|
||||||
|
#define SEND_TYPE_RETV ssize_t
|
||||||
|
|
||||||
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
|
#define TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
|
/* Define to disable non-blocking sockets. */
|
||||||
|
#undef USE_BLOCKING_SOCKETS
|
||||||
|
|
||||||
|
/* Define to avoid automatic inclusion of winsock.h */
|
||||||
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
/* Type to use in place of in_addr_t when system does not provide it. */
|
||||||
|
#undef in_addr_t
|
||||||
|
|
2
contrib/capnproto
vendored
2
contrib/capnproto
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c8189ec3c27dacbd4a3288e682473010e377f593
|
Subproject commit 2e88221d3dde22266bfccf40eaee6ff9b40d113d
|
2
contrib/cctz
vendored
2
contrib/cctz
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 8c71d74bdf76c3fa401da845089ae60a6c0aeefa
|
Subproject commit 49c656c62fbd36a1bc20d64c476853bdb7cf7bb9
|
@ -44,6 +44,8 @@
|
|||||||
#define HAVE_SETJMP_H
|
#define HAVE_SETJMP_H
|
||||||
#define HAVE_SYS_STAT_H
|
#define HAVE_SYS_STAT_H
|
||||||
#define HAVE_UNISTD_H
|
#define HAVE_UNISTD_H
|
||||||
|
#define HAVE_POLL_H
|
||||||
|
#define HAVE_PTHREAD_H
|
||||||
|
|
||||||
#define ENABLE_IPV6
|
#define ENABLE_IPV6
|
||||||
#define USE_OPENSSL
|
#define USE_OPENSSL
|
||||||
|
2
contrib/datasketches-cpp
vendored
2
contrib/datasketches-cpp
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 7d73d7610db31d4e1ecde0fb3a7ee90ef371207f
|
Subproject commit 7abd49bb2e72bf9a5029993d31dcb1872da88292
|
@ -415,7 +415,7 @@
|
|||||||
/*
|
/*
|
||||||
* Defined if strerror_r returns char * if _GNU_SOURCE is defined.
|
* Defined if strerror_r returns char * if _GNU_SOURCE is defined.
|
||||||
*/
|
*/
|
||||||
#define JEMALLOC_STRERROR_R_RETURNS_CHAR_WITH_GNU_SOURCE
|
/* #undef JEMALLOC_STRERROR_R_RETURNS_CHAR_WITH_GNU_SOURCE */
|
||||||
|
|
||||||
/* Performs additional safety checks when defined. */
|
/* Performs additional safety checks when defined. */
|
||||||
/* #undef JEMALLOC_OPT_SAFETY_CHECKS */
|
/* #undef JEMALLOC_OPT_SAFETY_CHECKS */
|
||||||
|
2
contrib/krb5
vendored
2
contrib/krb5
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 5149dea4e2be0f67707383d2682b897c14631374
|
Subproject commit d879821c7a4c70b0c3ad739d9951d1a2b1903df7
|
@ -440,7 +440,9 @@
|
|||||||
#define HAVE_STRERROR 1
|
#define HAVE_STRERROR 1
|
||||||
|
|
||||||
/* Define to 1 if you have the `strerror_r' function. */
|
/* Define to 1 if you have the `strerror_r' function. */
|
||||||
|
#ifndef USE_MUSL
|
||||||
#define HAVE_STRERROR_R 1
|
#define HAVE_STRERROR_R 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
#define HAVE_STRINGS_H 1
|
#define HAVE_STRINGS_H 1
|
||||||
|
2
contrib/libcpuid
vendored
2
contrib/libcpuid
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 8db3b8d2d32d22437f063ce692a1b9bb15e42d18
|
Subproject commit 503083acb77edf9fbce22a05826307dff2ce96e6
|
@ -54,9 +54,8 @@ set(SRCS
|
|||||||
add_library(cxx ${SRCS})
|
add_library(cxx ${SRCS})
|
||||||
set_target_properties(cxx PROPERTIES FOLDER "contrib/libcxx-cmake")
|
set_target_properties(cxx PROPERTIES FOLDER "contrib/libcxx-cmake")
|
||||||
|
|
||||||
target_include_directories(cxx SYSTEM BEFORE PUBLIC
|
target_include_directories(cxx SYSTEM BEFORE PRIVATE $<BUILD_INTERFACE:${LIBCXX_SOURCE_DIR}/src>)
|
||||||
$<BUILD_INTERFACE:${LIBCXX_SOURCE_DIR}/include>
|
target_include_directories(cxx SYSTEM BEFORE PUBLIC $<BUILD_INTERFACE:${LIBCXX_SOURCE_DIR}/include>)
|
||||||
$<BUILD_INTERFACE:${LIBCXX_SOURCE_DIR}>/src)
|
|
||||||
target_compile_definitions(cxx PRIVATE -D_LIBCPP_BUILDING_LIBRARY -DLIBCXX_BUILDING_LIBCXXABI)
|
target_compile_definitions(cxx PRIVATE -D_LIBCPP_BUILDING_LIBRARY -DLIBCXX_BUILDING_LIBCXXABI)
|
||||||
|
|
||||||
# Enable capturing stack traces for all exceptions.
|
# Enable capturing stack traces for all exceptions.
|
||||||
|
2
contrib/libgsasl
vendored
2
contrib/libgsasl
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 383ee28e82f69fa16ed43b48bd9c8ee5b313ab84
|
Subproject commit 0324680f13f22bb43df5353a08e26453d7d640ac
|
@ -63,6 +63,13 @@ target_include_directories (_libpq SYSTEM PUBLIC ${LIBPQ_SOURCE_DIR})
|
|||||||
target_include_directories (_libpq SYSTEM PUBLIC "${LIBPQ_SOURCE_DIR}/include")
|
target_include_directories (_libpq SYSTEM PUBLIC "${LIBPQ_SOURCE_DIR}/include")
|
||||||
target_include_directories (_libpq SYSTEM PRIVATE "${LIBPQ_SOURCE_DIR}/configs")
|
target_include_directories (_libpq SYSTEM PRIVATE "${LIBPQ_SOURCE_DIR}/configs")
|
||||||
|
|
||||||
|
# NOTE: this is a dirty hack to avoid and instead pg_config.h should be shipped
|
||||||
|
# for different OS'es like for jemalloc, not one generic for all OS'es like
|
||||||
|
# now.
|
||||||
|
if (OS_DARWIN OR OS_FREEBSD OR USE_MUSL)
|
||||||
|
target_compile_definitions(_libpq PRIVATE -DSTRERROR_R_INT=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries (_libpq PRIVATE OpenSSL::SSL)
|
target_link_libraries (_libpq PRIVATE OpenSSL::SSL)
|
||||||
|
|
||||||
add_library(ch_contrib::libpq ALIAS _libpq)
|
add_library(ch_contrib::libpq ALIAS _libpq)
|
||||||
|
2
contrib/librdkafka
vendored
2
contrib/librdkafka
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 6062e711a919fb3b669b243b7dceabd045d0e4a2
|
Subproject commit 6f3b483426a8c8ec950e27e446bec175cf8b553f
|
2
contrib/libuv
vendored
2
contrib/libuv
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 95081e7c16c9857babe6d4e2bc1c779198ea89ae
|
Subproject commit 3a85b2eb3d83f369b8a8cafd329d7e9dc28f60cf
|
@ -15,6 +15,7 @@ set(uv_sources
|
|||||||
src/inet.c
|
src/inet.c
|
||||||
src/random.c
|
src/random.c
|
||||||
src/strscpy.c
|
src/strscpy.c
|
||||||
|
src/strtok.c
|
||||||
src/threadpool.c
|
src/threadpool.c
|
||||||
src/timer.c
|
src/timer.c
|
||||||
src/uv-common.c
|
src/uv-common.c
|
||||||
@ -75,13 +76,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|||||||
list(APPEND uv_defines _GNU_SOURCE _POSIX_C_SOURCE=200112)
|
list(APPEND uv_defines _GNU_SOURCE _POSIX_C_SOURCE=200112)
|
||||||
list(APPEND uv_libraries rt)
|
list(APPEND uv_libraries rt)
|
||||||
list(APPEND uv_sources
|
list(APPEND uv_sources
|
||||||
|
src/unix/epoll.c
|
||||||
src/unix/linux-core.c
|
src/unix/linux-core.c
|
||||||
src/unix/linux-inotify.c
|
src/unix/linux-inotify.c
|
||||||
src/unix/linux-syscalls.c
|
src/unix/linux-syscalls.c
|
||||||
src/unix/procfs-exepath.c
|
src/unix/procfs-exepath.c
|
||||||
src/unix/random-getrandom.c
|
src/unix/random-getrandom.c
|
||||||
src/unix/random-sysctl-linux.c
|
src/unix/random-sysctl-linux.c)
|
||||||
src/unix/sysinfo-loadavg.c)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
|
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
|
||||||
@ -111,6 +112,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS/390")
|
|||||||
src/unix/pthread-fixes.c
|
src/unix/pthread-fixes.c
|
||||||
src/unix/pthread-barrier.c
|
src/unix/pthread-barrier.c
|
||||||
src/unix/os390.c
|
src/unix/os390.c
|
||||||
|
src/unix/os390-proctitle.c
|
||||||
src/unix/os390-syscalls.c)
|
src/unix/os390-syscalls.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
2
contrib/llvm
vendored
2
contrib/llvm
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 20607e61728e97c969e536644c3c0c1bb1a50672
|
Subproject commit 0db5bf5bd2452cd8f1283a1fcdc04845af705bfc
|
2
contrib/nats-io
vendored
2
contrib/nats-io
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 6b2227f36757da090321e2d317569d2bd42c4cc1
|
Subproject commit 1e2597c54616015077e53a26d56b6bac448eb1b6
|
@ -18,6 +18,8 @@ elseif(WIN32)
|
|||||||
set(NATS_PLATFORM_INCLUDE "apple")
|
set(NATS_PLATFORM_INCLUDE "apple")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_definitions(-DNATS_HAS_TLS)
|
||||||
|
|
||||||
file(GLOB PS_SOURCES "${NATS_IO_SOURCE_DIR}/${NATS_PLATFORM_INCLUDE}/*.c")
|
file(GLOB PS_SOURCES "${NATS_IO_SOURCE_DIR}/${NATS_PLATFORM_INCLUDE}/*.c")
|
||||||
set(SRCS
|
set(SRCS
|
||||||
"${NATS_IO_SOURCE_DIR}/asynccb.c"
|
"${NATS_IO_SOURCE_DIR}/asynccb.c"
|
||||||
|
2
contrib/sentry-native
vendored
2
contrib/sentry-native
vendored
@ -1 +1 @@
|
|||||||
Subproject commit f431047ac8da13179c488018dddf1c0d0771a997
|
Subproject commit ae10fb8c224c3f41571446e1ed7fd57b9e5e366b
|
2
contrib/vectorscan
vendored
2
contrib/vectorscan
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 73695e419c27af7fe2a099c7aa57931cc02aea5d
|
Subproject commit f6250ae3e5a3085000239313ad0689cc1e00cdc2
|
@ -1,11 +1,9 @@
|
|||||||
# We use vectorscan, a portable and API/ABI-compatible drop-in replacement for hyperscan.
|
# We use vectorscan, a portable and API/ABI-compatible drop-in replacement for hyperscan.
|
||||||
|
|
||||||
if (ARCH_AMD64)
|
if ((ARCH_AMD64 AND NOT NO_SSE3_OR_HIGHER) OR ARCH_AARCH64)
|
||||||
option (ENABLE_VECTORSCAN "Enable vectorscan library" ${ENABLE_LIBRARIES})
|
option (ENABLE_VECTORSCAN "Enable vectorscan library" ${ENABLE_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# TODO: vectorscan supports ARM yet some tests involving cyrillic letters fail (PR #38171) ... needs further investigation
|
|
||||||
|
|
||||||
# TODO PPC should generally work but needs manual generation of ppc/config.h file on a PPC machine
|
# TODO PPC should generally work but needs manual generation of ppc/config.h file on a PPC machine
|
||||||
|
|
||||||
if (NOT ENABLE_VECTORSCAN)
|
if (NOT ENABLE_VECTORSCAN)
|
||||||
@ -236,11 +234,27 @@ set (SRCS
|
|||||||
|
|
||||||
# The original build system invokes ragel on src/parser/{Parser|control_verbs}.rl (+ a few more .rl files which are unneeded). To avoid a
|
# The original build system invokes ragel on src/parser/{Parser|control_verbs}.rl (+ a few more .rl files which are unneeded). To avoid a
|
||||||
# build-time dependency on ragel (via contrib/ or find_program()), add the manually generated output of ragel to the sources.
|
# build-time dependency on ragel (via contrib/ or find_program()), add the manually generated output of ragel to the sources.
|
||||||
# Please regenerate these files if you update vectorscan.
|
#
|
||||||
list (APPEND SRCS
|
# Please regenerate these files if you update vectorscan. They must be regenerated for each platform separately because ragel produces for
|
||||||
"${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/Parser.cpp"
|
# weird reasons different constants in the output.
|
||||||
"${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/control_verbs.cpp"
|
#
|
||||||
)
|
# Also, please use upstream versions of colm and ragel, the packages in Ubuntu 22.04 seem to produce wrong output on ARM.
|
||||||
|
if (ARCH_AMD64)
|
||||||
|
list (APPEND SRCS
|
||||||
|
"${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/amd64/Parser.cpp"
|
||||||
|
"${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/amd64/control_verbs.cpp"
|
||||||
|
)
|
||||||
|
elseif (ARCH_AARCH64)
|
||||||
|
list (APPEND SRCS
|
||||||
|
"${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/aarch64/Parser.cpp"
|
||||||
|
"${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/aarch64/control_verbs.cpp"
|
||||||
|
)
|
||||||
|
set_source_files_properties(
|
||||||
|
"${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/aarch64/Parser.cpp"
|
||||||
|
"${LIBRARY_DIR}/../vectorscan-cmake/rageled_files/aarch64/control_verbs.cpp"
|
||||||
|
COMPILE_FLAGS -Wno-c++11-narrowing
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Platform-dependent files
|
# Platform-dependent files
|
||||||
if (ARCH_AMD64)
|
if (ARCH_AMD64)
|
||||||
@ -290,7 +304,7 @@ target_include_directories (_vectorscan SYSTEM PUBLIC "${LIBRARY_DIR}/src")
|
|||||||
# Please regenerate these files if you update vectorscan.
|
# Please regenerate these files if you update vectorscan.
|
||||||
|
|
||||||
if (ARCH_AMD64)
|
if (ARCH_AMD64)
|
||||||
target_include_directories (_vectorscan PRIVATE x86_64)
|
target_include_directories (_vectorscan PRIVATE amd64)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (ARCH_AARCH64)
|
if (ARCH_AARCH64)
|
||||||
|
File diff suppressed because it is too large
Load Diff
10725
contrib/vectorscan-cmake/rageled_files/aarch64/Parser.cpp
Normal file
10725
contrib/vectorscan-cmake/rageled_files/aarch64/Parser.cpp
Normal file
File diff suppressed because it is too large
Load Diff
547
contrib/vectorscan-cmake/rageled_files/aarch64/control_verbs.cpp
Normal file
547
contrib/vectorscan-cmake/rageled_files/aarch64/control_verbs.cpp
Normal file
@ -0,0 +1,547 @@
|
|||||||
|
#line 1 "control_verbs.rl"
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2017, Intel Corporation
|
||||||
|
*
|
||||||
|
* 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 of Intel Corporation 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 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Parser for control verbs that can occur at the beginning of a pattern.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "parser/control_verbs.h"
|
||||||
|
|
||||||
|
#include "parser/Parser.h"
|
||||||
|
#include "parser/parse_error.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
namespace ue2 {
|
||||||
|
|
||||||
|
const char *read_control_verbs(const char *ptr, const char *end, size_t start,
|
||||||
|
ParseMode &mode) {
|
||||||
|
const char *p = ptr;
|
||||||
|
const char *pe = end;
|
||||||
|
const char *eof = pe;
|
||||||
|
const char *ts, *te;
|
||||||
|
int cs;
|
||||||
|
UNUSED int act;
|
||||||
|
|
||||||
|
|
||||||
|
#line 56 "control_verbs.cpp"
|
||||||
|
static const signed char _ControlVerbs_actions[] = {
|
||||||
|
0, 1, 0, 1, 1, 1, 2, 1,
|
||||||
|
3, 1, 4, 1, 5, 1, 6, 1,
|
||||||
|
7, 1, 8, 1, 9, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const short _ControlVerbs_key_offsets[] = {
|
||||||
|
0, 7, 8, 10, 12, 14, 16, 18,
|
||||||
|
20, 21, 23, 25, 27, 30, 32, 34,
|
||||||
|
36, 38, 40, 42, 44, 46, 48, 50,
|
||||||
|
52, 55, 57, 59, 61, 63, 66, 68,
|
||||||
|
70, 72, 74, 76, 79, 82, 84, 86,
|
||||||
|
88, 90, 92, 94, 96, 98, 100, 102,
|
||||||
|
105, 107, 109, 111, 113, 115, 117, 119,
|
||||||
|
121, 123, 125, 127, 129, 131, 133, 135,
|
||||||
|
137, 139, 141, 143, 146, 148, 149, 151,
|
||||||
|
155, 157, 159, 160, 161, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char _ControlVerbs_trans_keys[] = {
|
||||||
|
41u, 65u, 66u, 67u, 76u, 78u, 85u, 41u,
|
||||||
|
41u, 78u, 41u, 89u, 41u, 67u, 41u, 82u,
|
||||||
|
41u, 76u, 41u, 70u, 41u, 41u, 83u, 41u,
|
||||||
|
82u, 41u, 95u, 41u, 65u, 85u, 41u, 78u,
|
||||||
|
41u, 89u, 41u, 67u, 41u, 78u, 41u, 73u,
|
||||||
|
41u, 67u, 41u, 79u, 41u, 68u, 41u, 69u,
|
||||||
|
41u, 82u, 41u, 76u, 41u, 70u, 73u, 41u,
|
||||||
|
77u, 41u, 73u, 41u, 84u, 41u, 95u, 41u,
|
||||||
|
77u, 82u, 41u, 65u, 41u, 84u, 41u, 67u,
|
||||||
|
41u, 72u, 41u, 61u, 41u, 48u, 57u, 41u,
|
||||||
|
48u, 57u, 41u, 69u, 41u, 67u, 41u, 85u,
|
||||||
|
41u, 82u, 41u, 83u, 41u, 73u, 41u, 79u,
|
||||||
|
41u, 78u, 41u, 79u, 41u, 95u, 41u, 65u,
|
||||||
|
83u, 41u, 85u, 41u, 84u, 41u, 79u, 41u,
|
||||||
|
95u, 41u, 80u, 41u, 79u, 41u, 83u, 41u,
|
||||||
|
83u, 41u, 69u, 41u, 83u, 41u, 83u, 41u,
|
||||||
|
84u, 41u, 65u, 41u, 82u, 41u, 84u, 41u,
|
||||||
|
95u, 41u, 79u, 41u, 80u, 41u, 84u, 41u,
|
||||||
|
67u, 84u, 41u, 80u, 41u, 41u, 70u, 41u,
|
||||||
|
49u, 51u, 56u, 41u, 54u, 41u, 50u, 41u,
|
||||||
|
40u, 42u, 0u
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_single_lengths[] = {
|
||||||
|
7, 1, 2, 2, 2, 2, 2, 2,
|
||||||
|
1, 2, 2, 2, 3, 2, 2, 2,
|
||||||
|
2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
|
3, 2, 2, 2, 2, 3, 2, 2,
|
||||||
|
2, 2, 2, 1, 1, 2, 2, 2,
|
||||||
|
2, 2, 2, 2, 2, 2, 2, 3,
|
||||||
|
2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
|
2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
|
2, 2, 2, 3, 2, 1, 2, 4,
|
||||||
|
2, 2, 1, 1, 1, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_range_lengths[] = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const short _ControlVerbs_index_offsets[] = {
|
||||||
|
0, 8, 10, 13, 16, 19, 22, 25,
|
||||||
|
28, 30, 33, 36, 39, 43, 46, 49,
|
||||||
|
52, 55, 58, 61, 64, 67, 70, 73,
|
||||||
|
76, 80, 83, 86, 89, 92, 96, 99,
|
||||||
|
102, 105, 108, 111, 114, 117, 120, 123,
|
||||||
|
126, 129, 132, 135, 138, 141, 144, 147,
|
||||||
|
151, 154, 157, 160, 163, 166, 169, 172,
|
||||||
|
175, 178, 181, 184, 187, 190, 193, 196,
|
||||||
|
199, 202, 205, 208, 212, 215, 217, 220,
|
||||||
|
225, 228, 231, 233, 235, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_cond_targs[] = {
|
||||||
|
75, 2, 9, 22, 24, 45, 67, 1,
|
||||||
|
75, 1, 75, 3, 1, 75, 4, 1,
|
||||||
|
75, 5, 1, 75, 6, 1, 75, 7,
|
||||||
|
1, 75, 8, 1, 75, 1, 75, 10,
|
||||||
|
1, 75, 11, 1, 75, 12, 1, 75,
|
||||||
|
13, 16, 1, 75, 14, 1, 75, 15,
|
||||||
|
1, 75, 5, 1, 75, 17, 1, 75,
|
||||||
|
18, 1, 75, 19, 1, 75, 20, 1,
|
||||||
|
75, 21, 1, 75, 8, 1, 75, 23,
|
||||||
|
1, 75, 7, 1, 75, 8, 25, 1,
|
||||||
|
75, 26, 1, 75, 27, 1, 75, 28,
|
||||||
|
1, 75, 29, 1, 75, 30, 37, 1,
|
||||||
|
75, 31, 1, 75, 32, 1, 75, 33,
|
||||||
|
1, 75, 34, 1, 75, 35, 1, 75,
|
||||||
|
36, 1, 75, 36, 1, 75, 38, 1,
|
||||||
|
75, 39, 1, 75, 40, 1, 75, 41,
|
||||||
|
1, 75, 42, 1, 75, 43, 1, 75,
|
||||||
|
44, 1, 75, 34, 1, 75, 46, 1,
|
||||||
|
75, 47, 1, 75, 48, 59, 1, 75,
|
||||||
|
49, 1, 75, 50, 1, 75, 51, 1,
|
||||||
|
75, 52, 1, 75, 53, 1, 75, 54,
|
||||||
|
1, 75, 55, 1, 75, 56, 1, 75,
|
||||||
|
57, 1, 75, 58, 1, 75, 8, 1,
|
||||||
|
75, 60, 1, 75, 61, 1, 75, 62,
|
||||||
|
1, 75, 63, 1, 75, 64, 1, 75,
|
||||||
|
65, 1, 75, 66, 1, 75, 8, 1,
|
||||||
|
75, 68, 70, 1, 75, 69, 1, 75,
|
||||||
|
1, 75, 71, 1, 75, 72, 73, 74,
|
||||||
|
1, 75, 8, 1, 75, 8, 1, 75,
|
||||||
|
1, 76, 75, 0, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_cond_actions[] = {
|
||||||
|
19, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
13, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
11, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 11, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 11, 0, 0, 13, 0, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 11, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 0, 13, 0, 0, 9,
|
||||||
|
0, 13, 0, 0, 7, 0, 0, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 7,
|
||||||
|
0, 5, 15, 0, 17, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
0, 17, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_to_state_actions[] = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_from_state_actions[] = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 3, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const short _ControlVerbs_eof_trans[] = {
|
||||||
|
238, 239, 240, 241, 242, 243, 244, 245,
|
||||||
|
246, 247, 248, 249, 250, 251, 252, 253,
|
||||||
|
254, 255, 256, 257, 258, 259, 260, 261,
|
||||||
|
262, 263, 264, 265, 266, 267, 268, 269,
|
||||||
|
270, 271, 272, 273, 274, 275, 276, 277,
|
||||||
|
278, 279, 280, 281, 282, 283, 284, 285,
|
||||||
|
286, 287, 288, 289, 290, 291, 292, 293,
|
||||||
|
294, 295, 296, 297, 298, 299, 300, 301,
|
||||||
|
302, 303, 304, 305, 306, 307, 308, 309,
|
||||||
|
310, 311, 312, 313, 314, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const int ControlVerbs_start = 75;
|
||||||
|
static const int ControlVerbs_first_final = 75;
|
||||||
|
static const int ControlVerbs_error = -1;
|
||||||
|
|
||||||
|
static const int ControlVerbs_en_main = 75;
|
||||||
|
|
||||||
|
|
||||||
|
#line 269 "control_verbs.cpp"
|
||||||
|
{
|
||||||
|
cs = (int)ControlVerbs_start;
|
||||||
|
ts = 0;
|
||||||
|
te = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#line 105 "control_verbs.rl"
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
#line 278 "control_verbs.cpp"
|
||||||
|
{
|
||||||
|
int _klen;
|
||||||
|
unsigned int _trans = 0;
|
||||||
|
const char * _keys;
|
||||||
|
const signed char * _acts;
|
||||||
|
unsigned int _nacts;
|
||||||
|
_resume: {}
|
||||||
|
if ( p == pe && p != eof )
|
||||||
|
goto _out;
|
||||||
|
_acts = ( _ControlVerbs_actions + (_ControlVerbs_from_state_actions[cs]));
|
||||||
|
_nacts = (unsigned int)(*( _acts));
|
||||||
|
_acts += 1;
|
||||||
|
while ( _nacts > 0 ) {
|
||||||
|
switch ( (*( _acts)) ) {
|
||||||
|
case 1: {
|
||||||
|
{
|
||||||
|
#line 1 "NONE"
|
||||||
|
{ts = p;}}
|
||||||
|
|
||||||
|
#line 297 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_nacts -= 1;
|
||||||
|
_acts += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( p == eof ) {
|
||||||
|
if ( _ControlVerbs_eof_trans[cs] > 0 ) {
|
||||||
|
_trans = (unsigned int)_ControlVerbs_eof_trans[cs] - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_keys = ( _ControlVerbs_trans_keys + (_ControlVerbs_key_offsets[cs]));
|
||||||
|
_trans = (unsigned int)_ControlVerbs_index_offsets[cs];
|
||||||
|
|
||||||
|
_klen = (int)_ControlVerbs_single_lengths[cs];
|
||||||
|
if ( _klen > 0 ) {
|
||||||
|
const char *_lower = _keys;
|
||||||
|
const char *_upper = _keys + _klen - 1;
|
||||||
|
const char *_mid;
|
||||||
|
while ( 1 ) {
|
||||||
|
if ( _upper < _lower ) {
|
||||||
|
_keys += _klen;
|
||||||
|
_trans += (unsigned int)_klen;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_mid = _lower + ((_upper-_lower) >> 1);
|
||||||
|
if ( ( (*( p))) < (*( _mid)) )
|
||||||
|
_upper = _mid - 1;
|
||||||
|
else if ( ( (*( p))) > (*( _mid)) )
|
||||||
|
_lower = _mid + 1;
|
||||||
|
else {
|
||||||
|
_trans += (unsigned int)(_mid - _keys);
|
||||||
|
goto _match;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_klen = (int)_ControlVerbs_range_lengths[cs];
|
||||||
|
if ( _klen > 0 ) {
|
||||||
|
const char *_lower = _keys;
|
||||||
|
const char *_upper = _keys + (_klen<<1) - 2;
|
||||||
|
const char *_mid;
|
||||||
|
while ( 1 ) {
|
||||||
|
if ( _upper < _lower ) {
|
||||||
|
_trans += (unsigned int)_klen;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
|
||||||
|
if ( ( (*( p))) < (*( _mid)) )
|
||||||
|
_upper = _mid - 2;
|
||||||
|
else if ( ( (*( p))) > (*( _mid + 1)) )
|
||||||
|
_lower = _mid + 2;
|
||||||
|
else {
|
||||||
|
_trans += (unsigned int)((_mid - _keys)>>1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_match: {}
|
||||||
|
}
|
||||||
|
cs = (int)_ControlVerbs_cond_targs[_trans];
|
||||||
|
|
||||||
|
if ( _ControlVerbs_cond_actions[_trans] != 0 ) {
|
||||||
|
|
||||||
|
_acts = ( _ControlVerbs_actions + (_ControlVerbs_cond_actions[_trans]));
|
||||||
|
_nacts = (unsigned int)(*( _acts));
|
||||||
|
_acts += 1;
|
||||||
|
while ( _nacts > 0 ) {
|
||||||
|
switch ( (*( _acts)) )
|
||||||
|
{
|
||||||
|
case 2: {
|
||||||
|
{
|
||||||
|
#line 1 "NONE"
|
||||||
|
{te = p+1;}}
|
||||||
|
|
||||||
|
#line 378 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
{
|
||||||
|
#line 76 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 76 "control_verbs.rl"
|
||||||
|
|
||||||
|
mode.utf8 = true;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 391 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4: {
|
||||||
|
{
|
||||||
|
#line 80 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 80 "control_verbs.rl"
|
||||||
|
|
||||||
|
mode.ucp = true;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 404 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 5: {
|
||||||
|
{
|
||||||
|
#line 84 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 84 "control_verbs.rl"
|
||||||
|
|
||||||
|
ostringstream str;
|
||||||
|
str << "Unsupported control verb " << string(ts, te - ts);
|
||||||
|
throw LocatedParseError(str.str());
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 419 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 6: {
|
||||||
|
{
|
||||||
|
#line 90 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 90 "control_verbs.rl"
|
||||||
|
|
||||||
|
ostringstream str;
|
||||||
|
str << "Unknown control verb " << string(ts, te - ts);
|
||||||
|
throw LocatedParseError(str.str());
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 434 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 7: {
|
||||||
|
{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
|
||||||
|
{p = p - 1; }
|
||||||
|
{p += 1; goto _out; }
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 448 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 8: {
|
||||||
|
{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
{te = p;p = p - 1;{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
|
||||||
|
{p = p - 1; }
|
||||||
|
{p += 1; goto _out; }
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 462 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 9: {
|
||||||
|
{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
{p = ((te))-1;
|
||||||
|
{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
|
||||||
|
{p = p - 1; }
|
||||||
|
{p += 1; goto _out; }
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 477 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_nacts -= 1;
|
||||||
|
_acts += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( p == eof ) {
|
||||||
|
if ( cs >= 75 )
|
||||||
|
goto _out;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_acts = ( _ControlVerbs_actions + (_ControlVerbs_to_state_actions[cs]));
|
||||||
|
_nacts = (unsigned int)(*( _acts));
|
||||||
|
_acts += 1;
|
||||||
|
while ( _nacts > 0 ) {
|
||||||
|
switch ( (*( _acts)) ) {
|
||||||
|
case 0: {
|
||||||
|
{
|
||||||
|
#line 1 "NONE"
|
||||||
|
{ts = 0;}}
|
||||||
|
|
||||||
|
#line 502 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_nacts -= 1;
|
||||||
|
_acts += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
p += 1;
|
||||||
|
goto _resume;
|
||||||
|
}
|
||||||
|
_out: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
#line 108 "control_verbs.rl"
|
||||||
|
|
||||||
|
} catch (LocatedParseError &error) {
|
||||||
|
if (ts >= ptr && ts <= pe) {
|
||||||
|
error.locate(ts - ptr + start);
|
||||||
|
} else {
|
||||||
|
error.locate(0);
|
||||||
|
}
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace ue2
|
10725
contrib/vectorscan-cmake/rageled_files/amd64/Parser.cpp
Normal file
10725
contrib/vectorscan-cmake/rageled_files/amd64/Parser.cpp
Normal file
File diff suppressed because it is too large
Load Diff
547
contrib/vectorscan-cmake/rageled_files/amd64/control_verbs.cpp
Normal file
547
contrib/vectorscan-cmake/rageled_files/amd64/control_verbs.cpp
Normal file
@ -0,0 +1,547 @@
|
|||||||
|
#line 1 "control_verbs.rl"
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2017, Intel Corporation
|
||||||
|
*
|
||||||
|
* 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 of Intel Corporation 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 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Parser for control verbs that can occur at the beginning of a pattern.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "parser/control_verbs.h"
|
||||||
|
|
||||||
|
#include "parser/Parser.h"
|
||||||
|
#include "parser/parse_error.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
namespace ue2 {
|
||||||
|
|
||||||
|
const char *read_control_verbs(const char *ptr, const char *end, size_t start,
|
||||||
|
ParseMode &mode) {
|
||||||
|
const char *p = ptr;
|
||||||
|
const char *pe = end;
|
||||||
|
const char *eof = pe;
|
||||||
|
const char *ts, *te;
|
||||||
|
int cs;
|
||||||
|
UNUSED int act;
|
||||||
|
|
||||||
|
|
||||||
|
#line 56 "control_verbs.cpp"
|
||||||
|
static const signed char _ControlVerbs_actions[] = {
|
||||||
|
0, 1, 0, 1, 1, 1, 2, 1,
|
||||||
|
3, 1, 4, 1, 5, 1, 6, 1,
|
||||||
|
7, 1, 8, 1, 9, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const short _ControlVerbs_key_offsets[] = {
|
||||||
|
0, 7, 8, 10, 12, 14, 16, 18,
|
||||||
|
20, 21, 23, 25, 27, 30, 32, 34,
|
||||||
|
36, 38, 40, 42, 44, 46, 48, 50,
|
||||||
|
52, 55, 57, 59, 61, 63, 66, 68,
|
||||||
|
70, 72, 74, 76, 79, 82, 84, 86,
|
||||||
|
88, 90, 92, 94, 96, 98, 100, 102,
|
||||||
|
105, 107, 109, 111, 113, 115, 117, 119,
|
||||||
|
121, 123, 125, 127, 129, 131, 133, 135,
|
||||||
|
137, 139, 141, 143, 146, 148, 149, 151,
|
||||||
|
155, 157, 159, 160, 161, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char _ControlVerbs_trans_keys[] = {
|
||||||
|
41, 65, 66, 67, 76, 78, 85, 41,
|
||||||
|
41, 78, 41, 89, 41, 67, 41, 82,
|
||||||
|
41, 76, 41, 70, 41, 41, 83, 41,
|
||||||
|
82, 41, 95, 41, 65, 85, 41, 78,
|
||||||
|
41, 89, 41, 67, 41, 78, 41, 73,
|
||||||
|
41, 67, 41, 79, 41, 68, 41, 69,
|
||||||
|
41, 82, 41, 76, 41, 70, 73, 41,
|
||||||
|
77, 41, 73, 41, 84, 41, 95, 41,
|
||||||
|
77, 82, 41, 65, 41, 84, 41, 67,
|
||||||
|
41, 72, 41, 61, 41, 48, 57, 41,
|
||||||
|
48, 57, 41, 69, 41, 67, 41, 85,
|
||||||
|
41, 82, 41, 83, 41, 73, 41, 79,
|
||||||
|
41, 78, 41, 79, 41, 95, 41, 65,
|
||||||
|
83, 41, 85, 41, 84, 41, 79, 41,
|
||||||
|
95, 41, 80, 41, 79, 41, 83, 41,
|
||||||
|
83, 41, 69, 41, 83, 41, 83, 41,
|
||||||
|
84, 41, 65, 41, 82, 41, 84, 41,
|
||||||
|
95, 41, 79, 41, 80, 41, 84, 41,
|
||||||
|
67, 84, 41, 80, 41, 41, 70, 41,
|
||||||
|
49, 51, 56, 41, 54, 41, 50, 41,
|
||||||
|
40, 42, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_single_lengths[] = {
|
||||||
|
7, 1, 2, 2, 2, 2, 2, 2,
|
||||||
|
1, 2, 2, 2, 3, 2, 2, 2,
|
||||||
|
2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
|
3, 2, 2, 2, 2, 3, 2, 2,
|
||||||
|
2, 2, 2, 1, 1, 2, 2, 2,
|
||||||
|
2, 2, 2, 2, 2, 2, 2, 3,
|
||||||
|
2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
|
2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
|
2, 2, 2, 3, 2, 1, 2, 4,
|
||||||
|
2, 2, 1, 1, 1, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_range_lengths[] = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const short _ControlVerbs_index_offsets[] = {
|
||||||
|
0, 8, 10, 13, 16, 19, 22, 25,
|
||||||
|
28, 30, 33, 36, 39, 43, 46, 49,
|
||||||
|
52, 55, 58, 61, 64, 67, 70, 73,
|
||||||
|
76, 80, 83, 86, 89, 92, 96, 99,
|
||||||
|
102, 105, 108, 111, 114, 117, 120, 123,
|
||||||
|
126, 129, 132, 135, 138, 141, 144, 147,
|
||||||
|
151, 154, 157, 160, 163, 166, 169, 172,
|
||||||
|
175, 178, 181, 184, 187, 190, 193, 196,
|
||||||
|
199, 202, 205, 208, 212, 215, 217, 220,
|
||||||
|
225, 228, 231, 233, 235, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_cond_targs[] = {
|
||||||
|
75, 2, 9, 22, 24, 45, 67, 1,
|
||||||
|
75, 1, 75, 3, 1, 75, 4, 1,
|
||||||
|
75, 5, 1, 75, 6, 1, 75, 7,
|
||||||
|
1, 75, 8, 1, 75, 1, 75, 10,
|
||||||
|
1, 75, 11, 1, 75, 12, 1, 75,
|
||||||
|
13, 16, 1, 75, 14, 1, 75, 15,
|
||||||
|
1, 75, 5, 1, 75, 17, 1, 75,
|
||||||
|
18, 1, 75, 19, 1, 75, 20, 1,
|
||||||
|
75, 21, 1, 75, 8, 1, 75, 23,
|
||||||
|
1, 75, 7, 1, 75, 8, 25, 1,
|
||||||
|
75, 26, 1, 75, 27, 1, 75, 28,
|
||||||
|
1, 75, 29, 1, 75, 30, 37, 1,
|
||||||
|
75, 31, 1, 75, 32, 1, 75, 33,
|
||||||
|
1, 75, 34, 1, 75, 35, 1, 75,
|
||||||
|
36, 1, 75, 36, 1, 75, 38, 1,
|
||||||
|
75, 39, 1, 75, 40, 1, 75, 41,
|
||||||
|
1, 75, 42, 1, 75, 43, 1, 75,
|
||||||
|
44, 1, 75, 34, 1, 75, 46, 1,
|
||||||
|
75, 47, 1, 75, 48, 59, 1, 75,
|
||||||
|
49, 1, 75, 50, 1, 75, 51, 1,
|
||||||
|
75, 52, 1, 75, 53, 1, 75, 54,
|
||||||
|
1, 75, 55, 1, 75, 56, 1, 75,
|
||||||
|
57, 1, 75, 58, 1, 75, 8, 1,
|
||||||
|
75, 60, 1, 75, 61, 1, 75, 62,
|
||||||
|
1, 75, 63, 1, 75, 64, 1, 75,
|
||||||
|
65, 1, 75, 66, 1, 75, 8, 1,
|
||||||
|
75, 68, 70, 1, 75, 69, 1, 75,
|
||||||
|
1, 75, 71, 1, 75, 72, 73, 74,
|
||||||
|
1, 75, 8, 1, 75, 8, 1, 75,
|
||||||
|
1, 76, 75, 0, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 75, 75, 75, 75, 75, 75,
|
||||||
|
75, 75, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_cond_actions[] = {
|
||||||
|
19, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
13, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
11, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 11, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 11, 0, 0, 13, 0, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 11, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 13, 0, 0, 13, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 13,
|
||||||
|
0, 0, 13, 0, 0, 13, 0, 0,
|
||||||
|
13, 0, 0, 0, 13, 0, 0, 9,
|
||||||
|
0, 13, 0, 0, 7, 0, 0, 0,
|
||||||
|
0, 13, 0, 0, 13, 0, 0, 7,
|
||||||
|
0, 5, 15, 0, 17, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
19, 19, 19, 19, 19, 19, 19, 19,
|
||||||
|
0, 17, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_to_state_actions[] = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const signed char _ControlVerbs_from_state_actions[] = {
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 3, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const short _ControlVerbs_eof_trans[] = {
|
||||||
|
238, 239, 240, 241, 242, 243, 244, 245,
|
||||||
|
246, 247, 248, 249, 250, 251, 252, 253,
|
||||||
|
254, 255, 256, 257, 258, 259, 260, 261,
|
||||||
|
262, 263, 264, 265, 266, 267, 268, 269,
|
||||||
|
270, 271, 272, 273, 274, 275, 276, 277,
|
||||||
|
278, 279, 280, 281, 282, 283, 284, 285,
|
||||||
|
286, 287, 288, 289, 290, 291, 292, 293,
|
||||||
|
294, 295, 296, 297, 298, 299, 300, 301,
|
||||||
|
302, 303, 304, 305, 306, 307, 308, 309,
|
||||||
|
310, 311, 312, 313, 314, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static const int ControlVerbs_start = 75;
|
||||||
|
static const int ControlVerbs_first_final = 75;
|
||||||
|
static const int ControlVerbs_error = -1;
|
||||||
|
|
||||||
|
static const int ControlVerbs_en_main = 75;
|
||||||
|
|
||||||
|
|
||||||
|
#line 269 "control_verbs.cpp"
|
||||||
|
{
|
||||||
|
cs = (int)ControlVerbs_start;
|
||||||
|
ts = 0;
|
||||||
|
te = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#line 105 "control_verbs.rl"
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
#line 278 "control_verbs.cpp"
|
||||||
|
{
|
||||||
|
int _klen;
|
||||||
|
unsigned int _trans = 0;
|
||||||
|
const char * _keys;
|
||||||
|
const signed char * _acts;
|
||||||
|
unsigned int _nacts;
|
||||||
|
_resume: {}
|
||||||
|
if ( p == pe && p != eof )
|
||||||
|
goto _out;
|
||||||
|
_acts = ( _ControlVerbs_actions + (_ControlVerbs_from_state_actions[cs]));
|
||||||
|
_nacts = (unsigned int)(*( _acts));
|
||||||
|
_acts += 1;
|
||||||
|
while ( _nacts > 0 ) {
|
||||||
|
switch ( (*( _acts)) ) {
|
||||||
|
case 1: {
|
||||||
|
{
|
||||||
|
#line 1 "NONE"
|
||||||
|
{ts = p;}}
|
||||||
|
|
||||||
|
#line 297 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_nacts -= 1;
|
||||||
|
_acts += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( p == eof ) {
|
||||||
|
if ( _ControlVerbs_eof_trans[cs] > 0 ) {
|
||||||
|
_trans = (unsigned int)_ControlVerbs_eof_trans[cs] - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_keys = ( _ControlVerbs_trans_keys + (_ControlVerbs_key_offsets[cs]));
|
||||||
|
_trans = (unsigned int)_ControlVerbs_index_offsets[cs];
|
||||||
|
|
||||||
|
_klen = (int)_ControlVerbs_single_lengths[cs];
|
||||||
|
if ( _klen > 0 ) {
|
||||||
|
const char *_lower = _keys;
|
||||||
|
const char *_upper = _keys + _klen - 1;
|
||||||
|
const char *_mid;
|
||||||
|
while ( 1 ) {
|
||||||
|
if ( _upper < _lower ) {
|
||||||
|
_keys += _klen;
|
||||||
|
_trans += (unsigned int)_klen;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_mid = _lower + ((_upper-_lower) >> 1);
|
||||||
|
if ( ( (*( p))) < (*( _mid)) )
|
||||||
|
_upper = _mid - 1;
|
||||||
|
else if ( ( (*( p))) > (*( _mid)) )
|
||||||
|
_lower = _mid + 1;
|
||||||
|
else {
|
||||||
|
_trans += (unsigned int)(_mid - _keys);
|
||||||
|
goto _match;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_klen = (int)_ControlVerbs_range_lengths[cs];
|
||||||
|
if ( _klen > 0 ) {
|
||||||
|
const char *_lower = _keys;
|
||||||
|
const char *_upper = _keys + (_klen<<1) - 2;
|
||||||
|
const char *_mid;
|
||||||
|
while ( 1 ) {
|
||||||
|
if ( _upper < _lower ) {
|
||||||
|
_trans += (unsigned int)_klen;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
|
||||||
|
if ( ( (*( p))) < (*( _mid)) )
|
||||||
|
_upper = _mid - 2;
|
||||||
|
else if ( ( (*( p))) > (*( _mid + 1)) )
|
||||||
|
_lower = _mid + 2;
|
||||||
|
else {
|
||||||
|
_trans += (unsigned int)((_mid - _keys)>>1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_match: {}
|
||||||
|
}
|
||||||
|
cs = (int)_ControlVerbs_cond_targs[_trans];
|
||||||
|
|
||||||
|
if ( _ControlVerbs_cond_actions[_trans] != 0 ) {
|
||||||
|
|
||||||
|
_acts = ( _ControlVerbs_actions + (_ControlVerbs_cond_actions[_trans]));
|
||||||
|
_nacts = (unsigned int)(*( _acts));
|
||||||
|
_acts += 1;
|
||||||
|
while ( _nacts > 0 ) {
|
||||||
|
switch ( (*( _acts)) )
|
||||||
|
{
|
||||||
|
case 2: {
|
||||||
|
{
|
||||||
|
#line 1 "NONE"
|
||||||
|
{te = p+1;}}
|
||||||
|
|
||||||
|
#line 378 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
{
|
||||||
|
#line 76 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 76 "control_verbs.rl"
|
||||||
|
|
||||||
|
mode.utf8 = true;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 391 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4: {
|
||||||
|
{
|
||||||
|
#line 80 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 80 "control_verbs.rl"
|
||||||
|
|
||||||
|
mode.ucp = true;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 404 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 5: {
|
||||||
|
{
|
||||||
|
#line 84 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 84 "control_verbs.rl"
|
||||||
|
|
||||||
|
ostringstream str;
|
||||||
|
str << "Unsupported control verb " << string(ts, te - ts);
|
||||||
|
throw LocatedParseError(str.str());
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 419 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 6: {
|
||||||
|
{
|
||||||
|
#line 90 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 90 "control_verbs.rl"
|
||||||
|
|
||||||
|
ostringstream str;
|
||||||
|
str << "Unknown control verb " << string(ts, te - ts);
|
||||||
|
throw LocatedParseError(str.str());
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 434 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 7: {
|
||||||
|
{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
{te = p+1;{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
|
||||||
|
{p = p - 1; }
|
||||||
|
{p += 1; goto _out; }
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 448 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 8: {
|
||||||
|
{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
{te = p;p = p - 1;{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
|
||||||
|
{p = p - 1; }
|
||||||
|
{p += 1; goto _out; }
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 462 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 9: {
|
||||||
|
{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
{p = ((te))-1;
|
||||||
|
{
|
||||||
|
#line 97 "control_verbs.rl"
|
||||||
|
|
||||||
|
{p = p - 1; }
|
||||||
|
{p += 1; goto _out; }
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
|
||||||
|
#line 477 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_nacts -= 1;
|
||||||
|
_acts += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( p == eof ) {
|
||||||
|
if ( cs >= 75 )
|
||||||
|
goto _out;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_acts = ( _ControlVerbs_actions + (_ControlVerbs_to_state_actions[cs]));
|
||||||
|
_nacts = (unsigned int)(*( _acts));
|
||||||
|
_acts += 1;
|
||||||
|
while ( _nacts > 0 ) {
|
||||||
|
switch ( (*( _acts)) ) {
|
||||||
|
case 0: {
|
||||||
|
{
|
||||||
|
#line 1 "NONE"
|
||||||
|
{ts = 0;}}
|
||||||
|
|
||||||
|
#line 502 "control_verbs.cpp"
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_nacts -= 1;
|
||||||
|
_acts += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
p += 1;
|
||||||
|
goto _resume;
|
||||||
|
}
|
||||||
|
_out: {}
|
||||||
|
}
|
||||||
|
|
||||||
|
#line 108 "control_verbs.rl"
|
||||||
|
|
||||||
|
} catch (LocatedParseError &error) {
|
||||||
|
if (ts >= ptr && ts <= pe) {
|
||||||
|
error.locate(ts - ptr + start);
|
||||||
|
} else {
|
||||||
|
error.locate(0);
|
||||||
|
}
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace ue2
|
@ -1,443 +0,0 @@
|
|||||||
|
|
||||||
#line 1 "control_verbs.rl"
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2017, Intel Corporation
|
|
||||||
*
|
|
||||||
* 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 of Intel Corporation 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 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file
|
|
||||||
* \brief Parser for control verbs that can occur at the beginning of a pattern.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "parser/control_verbs.h"
|
|
||||||
|
|
||||||
#include "parser/Parser.h"
|
|
||||||
#include "parser/parse_error.h"
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
namespace ue2 {
|
|
||||||
|
|
||||||
const char *read_control_verbs(const char *ptr, const char *end, size_t start,
|
|
||||||
ParseMode &mode) {
|
|
||||||
const char *p = ptr;
|
|
||||||
const char *pe = end;
|
|
||||||
const char *eof = pe;
|
|
||||||
const char *ts, *te;
|
|
||||||
int cs;
|
|
||||||
UNUSED int act;
|
|
||||||
|
|
||||||
|
|
||||||
#line 59 "control_verbs.cpp"
|
|
||||||
static const char _ControlVerbs_actions[] = {
|
|
||||||
0, 1, 0, 1, 1, 1, 2, 1,
|
|
||||||
3, 1, 4, 1, 5, 1, 6, 1,
|
|
||||||
7, 1, 8, 1, 9
|
|
||||||
};
|
|
||||||
|
|
||||||
static const unsigned char _ControlVerbs_key_offsets[] = {
|
|
||||||
0, 7, 8, 10, 12, 14, 16, 18,
|
|
||||||
20, 21, 23, 25, 27, 30, 32, 34,
|
|
||||||
36, 38, 40, 42, 44, 46, 48, 50,
|
|
||||||
52, 55, 57, 59, 61, 63, 66, 68,
|
|
||||||
70, 72, 74, 76, 79, 82, 84, 86,
|
|
||||||
88, 90, 92, 94, 96, 98, 100, 102,
|
|
||||||
105, 107, 109, 111, 113, 115, 117, 119,
|
|
||||||
121, 123, 125, 127, 129, 131, 133, 135,
|
|
||||||
137, 139, 141, 143, 146, 148, 149, 151,
|
|
||||||
155, 157, 159, 160, 161
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char _ControlVerbs_trans_keys[] = {
|
|
||||||
41, 65, 66, 67, 76, 78, 85, 41,
|
|
||||||
41, 78, 41, 89, 41, 67, 41, 82,
|
|
||||||
41, 76, 41, 70, 41, 41, 83, 41,
|
|
||||||
82, 41, 95, 41, 65, 85, 41, 78,
|
|
||||||
41, 89, 41, 67, 41, 78, 41, 73,
|
|
||||||
41, 67, 41, 79, 41, 68, 41, 69,
|
|
||||||
41, 82, 41, 76, 41, 70, 73, 41,
|
|
||||||
77, 41, 73, 41, 84, 41, 95, 41,
|
|
||||||
77, 82, 41, 65, 41, 84, 41, 67,
|
|
||||||
41, 72, 41, 61, 41, 48, 57, 41,
|
|
||||||
48, 57, 41, 69, 41, 67, 41, 85,
|
|
||||||
41, 82, 41, 83, 41, 73, 41, 79,
|
|
||||||
41, 78, 41, 79, 41, 95, 41, 65,
|
|
||||||
83, 41, 85, 41, 84, 41, 79, 41,
|
|
||||||
95, 41, 80, 41, 79, 41, 83, 41,
|
|
||||||
83, 41, 69, 41, 83, 41, 83, 41,
|
|
||||||
84, 41, 65, 41, 82, 41, 84, 41,
|
|
||||||
95, 41, 79, 41, 80, 41, 84, 41,
|
|
||||||
67, 84, 41, 80, 41, 41, 70, 41,
|
|
||||||
49, 51, 56, 41, 54, 41, 50, 41,
|
|
||||||
40, 42, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char _ControlVerbs_single_lengths[] = {
|
|
||||||
7, 1, 2, 2, 2, 2, 2, 2,
|
|
||||||
1, 2, 2, 2, 3, 2, 2, 2,
|
|
||||||
2, 2, 2, 2, 2, 2, 2, 2,
|
|
||||||
3, 2, 2, 2, 2, 3, 2, 2,
|
|
||||||
2, 2, 2, 1, 1, 2, 2, 2,
|
|
||||||
2, 2, 2, 2, 2, 2, 2, 3,
|
|
||||||
2, 2, 2, 2, 2, 2, 2, 2,
|
|
||||||
2, 2, 2, 2, 2, 2, 2, 2,
|
|
||||||
2, 2, 2, 3, 2, 1, 2, 4,
|
|
||||||
2, 2, 1, 1, 1
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char _ControlVerbs_range_lengths[] = {
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 1, 1, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static const short _ControlVerbs_index_offsets[] = {
|
|
||||||
0, 8, 10, 13, 16, 19, 22, 25,
|
|
||||||
28, 30, 33, 36, 39, 43, 46, 49,
|
|
||||||
52, 55, 58, 61, 64, 67, 70, 73,
|
|
||||||
76, 80, 83, 86, 89, 92, 96, 99,
|
|
||||||
102, 105, 108, 111, 114, 117, 120, 123,
|
|
||||||
126, 129, 132, 135, 138, 141, 144, 147,
|
|
||||||
151, 154, 157, 160, 163, 166, 169, 172,
|
|
||||||
175, 178, 181, 184, 187, 190, 193, 196,
|
|
||||||
199, 202, 205, 208, 212, 215, 217, 220,
|
|
||||||
225, 228, 231, 233, 235
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char _ControlVerbs_indicies[] = {
|
|
||||||
0, 2, 3, 4, 5, 6, 7, 1,
|
|
||||||
8, 1, 8, 9, 1, 8, 10, 1,
|
|
||||||
11, 12, 1, 8, 13, 1, 8, 14,
|
|
||||||
1, 8, 15, 1, 11, 1, 8, 16,
|
|
||||||
1, 8, 17, 1, 8, 18, 1, 8,
|
|
||||||
19, 20, 1, 8, 21, 1, 8, 22,
|
|
||||||
1, 8, 12, 1, 8, 23, 1, 8,
|
|
||||||
24, 1, 8, 25, 1, 8, 26, 1,
|
|
||||||
8, 27, 1, 8, 15, 1, 8, 28,
|
|
||||||
1, 11, 14, 1, 8, 15, 29, 1,
|
|
||||||
8, 30, 1, 8, 31, 1, 8, 32,
|
|
||||||
1, 8, 33, 1, 8, 34, 35, 1,
|
|
||||||
8, 36, 1, 8, 37, 1, 8, 38,
|
|
||||||
1, 8, 39, 1, 8, 40, 1, 8,
|
|
||||||
41, 1, 11, 41, 1, 8, 42, 1,
|
|
||||||
8, 43, 1, 8, 44, 1, 8, 45,
|
|
||||||
1, 8, 46, 1, 8, 47, 1, 8,
|
|
||||||
48, 1, 8, 39, 1, 8, 49, 1,
|
|
||||||
8, 50, 1, 8, 51, 52, 1, 8,
|
|
||||||
53, 1, 8, 54, 1, 8, 55, 1,
|
|
||||||
8, 56, 1, 8, 57, 1, 8, 58,
|
|
||||||
1, 8, 59, 1, 8, 60, 1, 8,
|
|
||||||
61, 1, 8, 62, 1, 8, 15, 1,
|
|
||||||
8, 63, 1, 8, 64, 1, 8, 65,
|
|
||||||
1, 8, 66, 1, 8, 67, 1, 8,
|
|
||||||
68, 1, 8, 69, 1, 8, 15, 1,
|
|
||||||
8, 70, 71, 1, 8, 72, 1, 73,
|
|
||||||
1, 8, 74, 1, 75, 76, 77, 78,
|
|
||||||
1, 8, 15, 1, 8, 15, 1, 75,
|
|
||||||
1, 80, 79, 82, 81, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char _ControlVerbs_trans_targs[] = {
|
|
||||||
75, 1, 2, 9, 22, 24, 45, 67,
|
|
||||||
75, 3, 4, 75, 5, 6, 7, 8,
|
|
||||||
10, 11, 12, 13, 16, 14, 15, 17,
|
|
||||||
18, 19, 20, 21, 23, 25, 26, 27,
|
|
||||||
28, 29, 30, 37, 31, 32, 33, 34,
|
|
||||||
35, 36, 38, 39, 40, 41, 42, 43,
|
|
||||||
44, 46, 47, 48, 59, 49, 50, 51,
|
|
||||||
52, 53, 54, 55, 56, 57, 58, 60,
|
|
||||||
61, 62, 63, 64, 65, 66, 68, 70,
|
|
||||||
69, 75, 71, 75, 72, 73, 74, 75,
|
|
||||||
76, 75, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char _ControlVerbs_trans_actions[] = {
|
|
||||||
19, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
13, 0, 0, 11, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 9, 0, 7, 0, 0, 0, 15,
|
|
||||||
5, 17, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char _ControlVerbs_to_state_actions[] = {
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 1, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char _ControlVerbs_from_state_actions[] = {
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 3, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
static const short _ControlVerbs_eof_trans[] = {
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 0, 82
|
|
||||||
};
|
|
||||||
|
|
||||||
static const int ControlVerbs_start = 75;
|
|
||||||
static const int ControlVerbs_first_final = 75;
|
|
||||||
static const int ControlVerbs_error = -1;
|
|
||||||
|
|
||||||
static const int ControlVerbs_en_main = 75;
|
|
||||||
|
|
||||||
|
|
||||||
#line 249 "control_verbs.cpp"
|
|
||||||
{
|
|
||||||
cs = ControlVerbs_start;
|
|
||||||
ts = 0;
|
|
||||||
te = 0;
|
|
||||||
act = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#line 105 "control_verbs.rl"
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
|
||||||
|
|
||||||
#line 262 "control_verbs.cpp"
|
|
||||||
{
|
|
||||||
int _klen;
|
|
||||||
unsigned int _trans;
|
|
||||||
const char *_acts;
|
|
||||||
unsigned int _nacts;
|
|
||||||
const char *_keys;
|
|
||||||
|
|
||||||
if ( p == pe )
|
|
||||||
goto _test_eof;
|
|
||||||
_resume:
|
|
||||||
_acts = _ControlVerbs_actions + _ControlVerbs_from_state_actions[cs];
|
|
||||||
_nacts = (unsigned int) *_acts++;
|
|
||||||
while ( _nacts-- > 0 ) {
|
|
||||||
switch ( *_acts++ ) {
|
|
||||||
case 1:
|
|
||||||
#line 1 "NONE"
|
|
||||||
{ts = p;}
|
|
||||||
break;
|
|
||||||
#line 281 "control_verbs.cpp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_keys = _ControlVerbs_trans_keys + _ControlVerbs_key_offsets[cs];
|
|
||||||
_trans = _ControlVerbs_index_offsets[cs];
|
|
||||||
|
|
||||||
_klen = _ControlVerbs_single_lengths[cs];
|
|
||||||
if ( _klen > 0 ) {
|
|
||||||
const char *_lower = _keys;
|
|
||||||
const char *_mid;
|
|
||||||
const char *_upper = _keys + _klen - 1;
|
|
||||||
while (1) {
|
|
||||||
if ( _upper < _lower )
|
|
||||||
break;
|
|
||||||
|
|
||||||
_mid = _lower + ((_upper-_lower) >> 1);
|
|
||||||
if ( (*p) < *_mid )
|
|
||||||
_upper = _mid - 1;
|
|
||||||
else if ( (*p) > *_mid )
|
|
||||||
_lower = _mid + 1;
|
|
||||||
else {
|
|
||||||
_trans += (unsigned int)(_mid - _keys);
|
|
||||||
goto _match;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_keys += _klen;
|
|
||||||
_trans += _klen;
|
|
||||||
}
|
|
||||||
|
|
||||||
_klen = _ControlVerbs_range_lengths[cs];
|
|
||||||
if ( _klen > 0 ) {
|
|
||||||
const char *_lower = _keys;
|
|
||||||
const char *_mid;
|
|
||||||
const char *_upper = _keys + (_klen<<1) - 2;
|
|
||||||
while (1) {
|
|
||||||
if ( _upper < _lower )
|
|
||||||
break;
|
|
||||||
|
|
||||||
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
|
|
||||||
if ( (*p) < _mid[0] )
|
|
||||||
_upper = _mid - 2;
|
|
||||||
else if ( (*p) > _mid[1] )
|
|
||||||
_lower = _mid + 2;
|
|
||||||
else {
|
|
||||||
_trans += (unsigned int)((_mid - _keys)>>1);
|
|
||||||
goto _match;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_trans += _klen;
|
|
||||||
}
|
|
||||||
|
|
||||||
_match:
|
|
||||||
_trans = _ControlVerbs_indicies[_trans];
|
|
||||||
_eof_trans:
|
|
||||||
cs = _ControlVerbs_trans_targs[_trans];
|
|
||||||
|
|
||||||
if ( _ControlVerbs_trans_actions[_trans] == 0 )
|
|
||||||
goto _again;
|
|
||||||
|
|
||||||
_acts = _ControlVerbs_actions + _ControlVerbs_trans_actions[_trans];
|
|
||||||
_nacts = (unsigned int) *_acts++;
|
|
||||||
while ( _nacts-- > 0 )
|
|
||||||
{
|
|
||||||
switch ( *_acts++ )
|
|
||||||
{
|
|
||||||
case 2:
|
|
||||||
#line 1 "NONE"
|
|
||||||
{te = p+1;}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
#line 76 "control_verbs.rl"
|
|
||||||
{te = p+1;{
|
|
||||||
mode.utf8 = true;
|
|
||||||
}}
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#line 80 "control_verbs.rl"
|
|
||||||
{te = p+1;{
|
|
||||||
mode.ucp = true;
|
|
||||||
}}
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
#line 84 "control_verbs.rl"
|
|
||||||
{te = p+1;{
|
|
||||||
ostringstream str;
|
|
||||||
str << "Unsupported control verb " << string(ts, te - ts);
|
|
||||||
throw LocatedParseError(str.str());
|
|
||||||
}}
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
#line 90 "control_verbs.rl"
|
|
||||||
{te = p+1;{
|
|
||||||
ostringstream str;
|
|
||||||
str << "Unknown control verb " << string(ts, te - ts);
|
|
||||||
throw LocatedParseError(str.str());
|
|
||||||
}}
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
#line 97 "control_verbs.rl"
|
|
||||||
{te = p+1;{
|
|
||||||
p--;
|
|
||||||
{p++; goto _out; }
|
|
||||||
}}
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
#line 97 "control_verbs.rl"
|
|
||||||
{te = p;p--;{
|
|
||||||
p--;
|
|
||||||
{p++; goto _out; }
|
|
||||||
}}
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
#line 97 "control_verbs.rl"
|
|
||||||
{{p = ((te))-1;}{
|
|
||||||
p--;
|
|
||||||
{p++; goto _out; }
|
|
||||||
}}
|
|
||||||
break;
|
|
||||||
#line 400 "control_verbs.cpp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_again:
|
|
||||||
_acts = _ControlVerbs_actions + _ControlVerbs_to_state_actions[cs];
|
|
||||||
_nacts = (unsigned int) *_acts++;
|
|
||||||
while ( _nacts-- > 0 ) {
|
|
||||||
switch ( *_acts++ ) {
|
|
||||||
case 0:
|
|
||||||
#line 1 "NONE"
|
|
||||||
{ts = 0;}
|
|
||||||
break;
|
|
||||||
#line 413 "control_verbs.cpp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ++p != pe )
|
|
||||||
goto _resume;
|
|
||||||
_test_eof: {}
|
|
||||||
if ( p == eof )
|
|
||||||
{
|
|
||||||
if ( _ControlVerbs_eof_trans[cs] > 0 ) {
|
|
||||||
_trans = _ControlVerbs_eof_trans[cs] - 1;
|
|
||||||
goto _eof_trans;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_out: {}
|
|
||||||
}
|
|
||||||
|
|
||||||
#line 109 "control_verbs.rl"
|
|
||||||
} catch (LocatedParseError &error) {
|
|
||||||
if (ts >= ptr && ts <= pe) {
|
|
||||||
error.locate(ts - ptr + start);
|
|
||||||
} else {
|
|
||||||
error.locate(0);
|
|
||||||
}
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ue2
|
|
@ -29,6 +29,7 @@
|
|||||||
"docker/test/util": {
|
"docker/test/util": {
|
||||||
"name": "clickhouse/test-util",
|
"name": "clickhouse/test-util",
|
||||||
"dependent": [
|
"dependent": [
|
||||||
|
"docker/packager/binary",
|
||||||
"docker/test/base",
|
"docker/test/base",
|
||||||
"docker/test/fasttest"
|
"docker/test/fasttest"
|
||||||
]
|
]
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user