mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 11:32:03 +00:00
Merge branch 'master' into feature-support-bool-type
This commit is contained in:
commit
8d5460b469
32
.github/workflows/backport.yml
vendored
Normal file
32
.github/workflows/backport.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: CherryPick
|
||||||
|
concurrency:
|
||||||
|
group: cherry-pick
|
||||||
|
on: # yamllint disable-line rule:truthy
|
||||||
|
schedule:
|
||||||
|
- cron: '0 */3 * * *'
|
||||||
|
jobs:
|
||||||
|
CherryPick:
|
||||||
|
runs-on: [self-hosted, style-checker]
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}}
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Cherry pick
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/cherry_pick
|
||||||
|
ROBOT_CLICKHOUSE_SSH_KEY: ${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
|
||||||
|
REPO_OWNER: "ClickHouse"
|
||||||
|
REPO_NAME: "ClickHouse"
|
||||||
|
REPO_TEAM: "core"
|
||||||
|
run: |
|
||||||
|
sudo pip install GitPython
|
||||||
|
cd $GITHUB_WORKSPACE/tests/ci
|
||||||
|
python3 cherry_pick.py
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
2
.github/workflows/cancel.yml
vendored
2
.github/workflows/cancel.yml
vendored
@ -1,7 +1,7 @@
|
|||||||
name: Cancel
|
name: Cancel
|
||||||
on: # yamllint disable-line rule:truthy
|
on: # yamllint disable-line rule:truthy
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: ["CIGithubActions"]
|
workflows: ["CIGithubActions", "ReleaseCI"]
|
||||||
types:
|
types:
|
||||||
- requested
|
- requested
|
||||||
jobs:
|
jobs:
|
||||||
|
1562
.github/workflows/main.yml
vendored
1562
.github/workflows/main.yml
vendored
File diff suppressed because it is too large
Load Diff
1384
.github/workflows/master.yml
vendored
Normal file
1384
.github/workflows/master.yml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
933
.github/workflows/release_branches.yml
vendored
Normal file
933
.github/workflows/release_branches.yml
vendored
Normal file
@ -0,0 +1,933 @@
|
|||||||
|
name: ReleaseCI
|
||||||
|
on: # yamllint disable-line rule:truthy
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '21.**'
|
||||||
|
- '22.**'
|
||||||
|
- '23.**'
|
||||||
|
- '24.**'
|
||||||
|
- 'backport/**'
|
||||||
|
jobs:
|
||||||
|
DockerHubPush:
|
||||||
|
runs-on: [self-hosted, style-checker]
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Images check
|
||||||
|
run: |
|
||||||
|
cd $GITHUB_WORKSPACE/tests/ci
|
||||||
|
python3 docker_images_check.py
|
||||||
|
- name: Upload images files to artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ runner.temp }}/docker_images_check/changed_images.json
|
||||||
|
CompatibilityCheck:
|
||||||
|
needs: [BuilderDebRelease]
|
||||||
|
runs-on: [self-hosted, style-checker]
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: CompatibilityCheck
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/compatibility_check
|
||||||
|
REPO_COPY: ${{runner.temp}}/compatibility_check/ClickHouse
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci && python3 compatibility_check.py
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
#########################################################################################
|
||||||
|
#################################### ORDINARY BUILDS ####################################
|
||||||
|
#########################################################################################
|
||||||
|
BuilderDebRelease:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ runner.temp }}/images_path
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
||||||
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
||||||
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
||||||
|
BUILD_NAME: 'package_release'
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_NAME }}
|
||||||
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
BuilderDebAsan:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ runner.temp }}/images_path
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
||||||
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
||||||
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
||||||
|
BUILD_NAME: 'package_asan'
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_NAME }}
|
||||||
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
BuilderDebUBsan:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ runner.temp }}/images_path
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
||||||
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
||||||
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
||||||
|
BUILD_NAME: 'package_ubsan'
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_NAME }}
|
||||||
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
BuilderDebTsan:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ runner.temp }}/images_path
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
||||||
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
||||||
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
||||||
|
BUILD_NAME: 'package_tsan'
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_NAME }}
|
||||||
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
BuilderDebMsan:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ runner.temp }}/images_path
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
||||||
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
||||||
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
||||||
|
BUILD_NAME: 'package_msan'
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_NAME }}
|
||||||
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
BuilderDebDebug:
|
||||||
|
needs: [DockerHubPush]
|
||||||
|
runs-on: [self-hosted, builder]
|
||||||
|
steps:
|
||||||
|
- name: Download changed images
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: changed_images
|
||||||
|
path: ${{ runner.temp }}/images_path
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/build_check
|
||||||
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
||||||
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
||||||
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
||||||
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
||||||
|
BUILD_NAME: 'package_debug'
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
||||||
|
- name: Upload build URLs to artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.BUILD_NAME }}
|
||||||
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
############################################################################################
|
||||||
|
##################################### BUILD REPORTER #######################################
|
||||||
|
############################################################################################
|
||||||
|
BuilderReport:
|
||||||
|
needs:
|
||||||
|
- BuilderDebRelease
|
||||||
|
- BuilderDebAsan
|
||||||
|
- BuilderDebTsan
|
||||||
|
- BuilderDebUBsan
|
||||||
|
- BuilderDebMsan
|
||||||
|
- BuilderDebDebug
|
||||||
|
runs-on: [self-hosted, style-checker]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Report Builder
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/report_check
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cd $GITHUB_WORKSPACE/tests/ci
|
||||||
|
python3 build_report_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
##############################################################################################
|
||||||
|
########################### FUNCTIONAl STATELESS TESTS #######################################
|
||||||
|
##############################################################################################
|
||||||
|
FunctionalStatelessTestRelease:
|
||||||
|
needs: [BuilderDebRelease]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateless_debug
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateless tests (release, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
|
KILL_TIMEOUT: 10800
|
||||||
|
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
|
||||||
|
FunctionalStatelessTestAsan:
|
||||||
|
needs: [BuilderDebAsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateless_debug
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateless tests (address, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
|
KILL_TIMEOUT: 10800
|
||||||
|
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
|
||||||
|
FunctionalStatelessTestTsan:
|
||||||
|
needs: [BuilderDebTsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateless_tsan
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateless tests (thread, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateless_tsan/ClickHouse
|
||||||
|
KILL_TIMEOUT: 10800
|
||||||
|
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
|
||||||
|
FunctionalStatelessTestUBsan:
|
||||||
|
needs: [BuilderDebUBsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateless_ubsan
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateless tests (ubsan, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateless_ubsan/ClickHouse
|
||||||
|
KILL_TIMEOUT: 10800
|
||||||
|
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
|
||||||
|
FunctionalStatelessTestMsan:
|
||||||
|
needs: [BuilderDebMsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateless_memory
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateless tests (memory, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateless_memory/ClickHouse
|
||||||
|
KILL_TIMEOUT: 10800
|
||||||
|
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
|
||||||
|
FunctionalStatelessTestDebug:
|
||||||
|
needs: [BuilderDebDebug]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateless_debug
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateless tests (debug, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateless_debug/ClickHouse
|
||||||
|
KILL_TIMEOUT: 10800
|
||||||
|
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
|
||||||
|
##############################################################################################
|
||||||
|
############################ FUNCTIONAl STATEFUL TESTS #######################################
|
||||||
|
##############################################################################################
|
||||||
|
FunctionalStatefulTestRelease:
|
||||||
|
needs: [BuilderDebRelease]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateful_debug
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateful tests (release, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateful_debug/ClickHouse
|
||||||
|
KILL_TIMEOUT: 3600
|
||||||
|
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
|
||||||
|
FunctionalStatefulTestAsan:
|
||||||
|
needs: [BuilderDebAsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateful_debug
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateful tests (address, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateful_debug/ClickHouse
|
||||||
|
KILL_TIMEOUT: 3600
|
||||||
|
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
|
||||||
|
FunctionalStatefulTestTsan:
|
||||||
|
needs: [BuilderDebTsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateful_tsan
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateful tests (thread, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateful_tsan/ClickHouse
|
||||||
|
KILL_TIMEOUT: 3600
|
||||||
|
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
|
||||||
|
FunctionalStatefulTestMsan:
|
||||||
|
needs: [BuilderDebMsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateful_msan
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateful tests (memory, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateful_msan/ClickHouse
|
||||||
|
KILL_TIMEOUT: 3600
|
||||||
|
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
|
||||||
|
FunctionalStatefulTestUBsan:
|
||||||
|
needs: [BuilderDebUBsan]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateful_ubsan
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateful tests (ubsan, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateful_ubsan/ClickHouse
|
||||||
|
KILL_TIMEOUT: 3600
|
||||||
|
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
|
||||||
|
FunctionalStatefulTestDebug:
|
||||||
|
needs: [BuilderDebDebug]
|
||||||
|
runs-on: [self-hosted, func-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Functional test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stateful_debug
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stateful tests (debug, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stateful_debug/ClickHouse
|
||||||
|
KILL_TIMEOUT: 3600
|
||||||
|
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
|
||||||
|
##############################################################################################
|
||||||
|
######################################### STRESS TESTS #######################################
|
||||||
|
##############################################################################################
|
||||||
|
StressTestAsan:
|
||||||
|
needs: [BuilderDebAsan]
|
||||||
|
runs-on: [self-hosted, stress-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Stress test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stress_thread
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stress test (address, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stress_thread/ClickHouse
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci
|
||||||
|
python3 stress_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
StressTestTsan:
|
||||||
|
needs: [BuilderDebTsan]
|
||||||
|
runs-on: [self-hosted, stress-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Stress test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stress_thread
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stress test (thread, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stress_thread/ClickHouse
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci
|
||||||
|
python3 stress_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
StressTestMsan:
|
||||||
|
needs: [BuilderDebMsan]
|
||||||
|
runs-on: [self-hosted, stress-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Stress test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stress_memory
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stress test (memory, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stress_memory/ClickHouse
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci
|
||||||
|
python3 stress_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
StressTestUBsan:
|
||||||
|
needs: [BuilderDebUBsan]
|
||||||
|
runs-on: [self-hosted, stress-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Stress test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stress_undefined
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stress test (undefined, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stress_undefined/ClickHouse
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci
|
||||||
|
python3 stress_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
StressTestDebug:
|
||||||
|
needs: [BuilderDebDebug]
|
||||||
|
runs-on: [self-hosted, stress-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Stress test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/stress_debug
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Stress test (debug, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/stress_debug/ClickHouse
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci
|
||||||
|
python3 stress_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
#############################################################################################
|
||||||
|
############################# INTEGRATION TESTS #############################################
|
||||||
|
#############################################################################################
|
||||||
|
IntegrationTestsAsan:
|
||||||
|
needs: [BuilderDebAsan, FunctionalStatelessTestAsan]
|
||||||
|
runs-on: [self-hosted, stress-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Integration test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/integration_tests_asan
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Integration tests (asan, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/integration_tests_asan/ClickHouse
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci
|
||||||
|
python3 integration_test_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
IntegrationTestsTsan:
|
||||||
|
needs: [BuilderDebTsan, FunctionalStatelessTestTsan]
|
||||||
|
runs-on: [self-hosted, stress-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Integration test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/integration_tests_tsan
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Integration tests (thread, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/integration_tests_tsan/ClickHouse
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci
|
||||||
|
python3 integration_test_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
IntegrationTestsRelease:
|
||||||
|
needs: [BuilderDebRelease, FunctionalStatelessTestRelease]
|
||||||
|
runs-on: [self-hosted, stress-tester]
|
||||||
|
steps:
|
||||||
|
- name: Download json reports
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: ${{runner.temp}}/reports_dir
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Integration test
|
||||||
|
env:
|
||||||
|
TEMP_PATH: ${{runner.temp}}/integration_tests_release
|
||||||
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
||||||
|
CHECK_NAME: 'Integration tests (release, actions)'
|
||||||
|
REPO_COPY: ${{runner.temp}}/integration_tests_release/ClickHouse
|
||||||
|
run: |
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
mkdir -p $TEMP_PATH
|
||||||
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
||||||
|
cd $REPO_COPY/tests/ci
|
||||||
|
python3 integration_test_check.py "$CHECK_NAME"
|
||||||
|
- name: Cleanup
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
docker kill $(docker ps -q) ||:
|
||||||
|
docker rm -f $(docker ps -a -q) ||:
|
||||||
|
sudo rm -fr $TEMP_PATH
|
||||||
|
FinishCheck:
|
||||||
|
needs:
|
||||||
|
- DockerHubPush
|
||||||
|
- BuilderReport
|
||||||
|
- FunctionalStatelessTestDebug
|
||||||
|
- FunctionalStatelessTestRelease
|
||||||
|
- FunctionalStatelessTestAsan
|
||||||
|
- FunctionalStatelessTestTsan
|
||||||
|
- FunctionalStatelessTestMsan
|
||||||
|
- FunctionalStatelessTestUBsan
|
||||||
|
- FunctionalStatefulTestDebug
|
||||||
|
- FunctionalStatefulTestRelease
|
||||||
|
- FunctionalStatefulTestAsan
|
||||||
|
- FunctionalStatefulTestTsan
|
||||||
|
- FunctionalStatefulTestMsan
|
||||||
|
- FunctionalStatefulTestUBsan
|
||||||
|
- StressTestDebug
|
||||||
|
- StressTestAsan
|
||||||
|
- StressTestTsan
|
||||||
|
- StressTestMsan
|
||||||
|
- StressTestUBsan
|
||||||
|
- IntegrationTestsAsan
|
||||||
|
- IntegrationTestsRelease
|
||||||
|
- IntegrationTestsTsan
|
||||||
|
- CompatibilityCheck
|
||||||
|
runs-on: [self-hosted, style-checker]
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Finish label
|
||||||
|
run: |
|
||||||
|
cd $GITHUB_WORKSPACE/tests/ci
|
||||||
|
python3 finish_check.py
|
8
.gitmodules
vendored
8
.gitmodules
vendored
@ -140,7 +140,7 @@
|
|||||||
url = https://github.com/ClickHouse-Extras/libc-headers.git
|
url = https://github.com/ClickHouse-Extras/libc-headers.git
|
||||||
[submodule "contrib/replxx"]
|
[submodule "contrib/replxx"]
|
||||||
path = contrib/replxx
|
path = contrib/replxx
|
||||||
url = https://github.com/AmokHuginnsson/replxx.git
|
url = https://github.com/ClickHouse-Extras/replxx.git
|
||||||
[submodule "contrib/avro"]
|
[submodule "contrib/avro"]
|
||||||
path = contrib/avro
|
path = contrib/avro
|
||||||
url = https://github.com/ClickHouse-Extras/avro.git
|
url = https://github.com/ClickHouse-Extras/avro.git
|
||||||
@ -171,12 +171,6 @@
|
|||||||
[submodule "contrib/sentry-native"]
|
[submodule "contrib/sentry-native"]
|
||||||
path = contrib/sentry-native
|
path = contrib/sentry-native
|
||||||
url = https://github.com/ClickHouse-Extras/sentry-native.git
|
url = https://github.com/ClickHouse-Extras/sentry-native.git
|
||||||
[submodule "contrib/gcem"]
|
|
||||||
path = contrib/gcem
|
|
||||||
url = https://github.com/kthohr/gcem.git
|
|
||||||
[submodule "contrib/stats"]
|
|
||||||
path = contrib/stats
|
|
||||||
url = https://github.com/kthohr/stats.git
|
|
||||||
[submodule "contrib/krb5"]
|
[submodule "contrib/krb5"]
|
||||||
path = contrib/krb5
|
path = contrib/krb5
|
||||||
url = https://github.com/ClickHouse-Extras/krb5
|
url = https://github.com/ClickHouse-Extras/krb5
|
||||||
|
266
CHANGELOG.md
266
CHANGELOG.md
@ -1,3 +1,269 @@
|
|||||||
|
### ClickHouse release v21.11, 2021-11-09
|
||||||
|
|
||||||
|
#### Backward Incompatible Change
|
||||||
|
|
||||||
|
* Change order of json_path and json arguments in SQL/JSON functions (to be consistent with the standard). Closes [#30449](https://github.com/ClickHouse/ClickHouse/issues/30449). [#30474](https://github.com/ClickHouse/ClickHouse/pull/30474) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Remove `MergeTree` table setting `write_final_mark`. It will be always `true`. [#30455](https://github.com/ClickHouse/ClickHouse/pull/30455) ([Kseniia Sumarokova](https://github.com/kssenii)). No actions required, all tables are compatible with the new version.
|
||||||
|
* Function `bayesAB` is removed. Please help to return this function back, refreshed. This closes [#26233](https://github.com/ClickHouse/ClickHouse/issues/26233). [#29934](https://github.com/ClickHouse/ClickHouse/pull/29934) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* This is relevant only if you already started using the experimental `clickhouse-keeper` support. Now ClickHouse Keeper snapshots compressed with `ZSTD` codec by default instead of custom ClickHouse LZ4 block compression. This behavior can be turned off with `compress_snapshots_with_zstd_format` coordination setting (must be equal on all quorum replicas). Backward incompatibility is quite rare and may happen only when new node will send snapshot (happens in case of recovery) to the old node which is unable to read snapshots in ZSTD format. [#29417](https://github.com/ClickHouse/ClickHouse/pull/29417) ([alesapin](https://github.com/alesapin)).
|
||||||
|
|
||||||
|
#### New Feature
|
||||||
|
|
||||||
|
* New asynchronous INSERT mode allows to accumulate inserted data and store it in a single batch in background. On client it can be enabled by setting `async_insert` for `INSERT` queries with data inlined in query or in separate buffer (e.g. for `INSERT` queries via HTTP protocol). If `wait_for_async_insert` is true (by default) the client will wait until data will be flushed to table. On server-side it controlled by the settings `async_insert_threads`, `async_insert_max_data_size` and `async_insert_busy_timeout_ms`. Implements [#18282](https://github.com/ClickHouse/ClickHouse/issues/18282). [#27537](https://github.com/ClickHouse/ClickHouse/pull/27537) ([Anton Popov](https://github.com/CurtizJ)). [#20557](https://github.com/ClickHouse/ClickHouse/pull/20557) ([Ivan](https://github.com/abyss7)). Notes on performance: with asynchronous inserts you can do up to around 10 000 individual INSERT queries per second, so it is still recommended to insert in batches if you want to achieve performance up to millions inserted rows per second.
|
||||||
|
* Add interactive mode for `clickhouse-local`. So, you can just run `clickhouse-local` to get a command line ClickHouse interface without connecting to a server and process data from files and external data sources. Also merge the code of `clickhouse-client` and `clickhouse-local` together. Closes [#7203](https://github.com/ClickHouse/ClickHouse/issues/7203). Closes [#25516](https://github.com/ClickHouse/ClickHouse/issues/25516). Closes [#22401](https://github.com/ClickHouse/ClickHouse/issues/22401). [#26231](https://github.com/ClickHouse/ClickHouse/pull/26231) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Added support for executable (scriptable) user defined functions. These are UDFs that can be written in any programming language. [#28803](https://github.com/ClickHouse/ClickHouse/pull/28803) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Allow predefined connections to external data sources. This allows to avoid specifying credentials or addresses while using external data sources, they can be referenced by names instead. Closes [#28367](https://github.com/ClickHouse/ClickHouse/issues/28367). [#28577](https://github.com/ClickHouse/ClickHouse/pull/28577) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Added `INFORMATION_SCHEMA` database with `SCHEMATA`, `TABLES`, `VIEWS` and `COLUMNS` views to the corresponding tables in `system` database. Closes [#9770](https://github.com/ClickHouse/ClickHouse/issues/9770). [#28691](https://github.com/ClickHouse/ClickHouse/pull/28691) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Support `EXISTS (subquery)`. Closes [#6852](https://github.com/ClickHouse/ClickHouse/issues/6852). [#29731](https://github.com/ClickHouse/ClickHouse/pull/29731) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Session logging for audit. Logging all successful and failed login and logout events to a new `system.session_log` table. [#22415](https://github.com/ClickHouse/ClickHouse/pull/22415) ([Vasily Nemkov](https://github.com/Enmk)) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Support multidimensional cosine distance and euclidean distance functions; L1, L2, Lp, Linf distances and norms. Scalar product on tuples and various arithmetic operators on tuples. This fully closes [#4509](https://github.com/ClickHouse/ClickHouse/issues/4509) and even more. [#27933](https://github.com/ClickHouse/ClickHouse/pull/27933) ([Alexey Boykov](https://github.com/mathalex)).
|
||||||
|
* Add support for compression and decompression for `INTO OUTFILE` and `FROM INFILE` (with autodetect or with additional optional parameter). [#27135](https://github.com/ClickHouse/ClickHouse/pull/27135) ([Filatenkov Artur](https://github.com/FArthur-cmd)).
|
||||||
|
* Add CORS (Cross Origin Resource Sharing) support with HTTP `OPTIONS` request. It means, now Grafana will work with serverless requests without a kludges. Closes [#18693](https://github.com/ClickHouse/ClickHouse/issues/18693). [#29155](https://github.com/ClickHouse/ClickHouse/pull/29155) ([Filatenkov Artur](https://github.com/FArthur-cmd)).
|
||||||
|
* Queries with JOIN ON now supports disjunctions (OR). [#21320](https://github.com/ClickHouse/ClickHouse/pull/21320) ([Ilya Golshtein](https://github.com/ilejn)).
|
||||||
|
* Added function `tokens`. That allow to split string into tokens using non-alpha numeric ASCII characters as separators. [#29981](https://github.com/ClickHouse/ClickHouse/pull/29981) ([Maksim Kita](https://github.com/kitaisreal)). Added function `ngrams` to extract ngrams from text. Closes [#29699](https://github.com/ClickHouse/ClickHouse/issues/29699). [#29738](https://github.com/ClickHouse/ClickHouse/pull/29738) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Add functions for Unicode normalization: `normalizeUTF8NFC`, `normalizeUTF8NFD`, `normalizeUTF8NFKC`, `normalizeUTF8NFKD` functions. [#28633](https://github.com/ClickHouse/ClickHouse/pull/28633) ([darkkeks](https://github.com/darkkeks)).
|
||||||
|
* Streaming consumption of application log files in ClickHouse with `FileLog` table engine. It's like `Kafka` or `RabbitMQ` engine but for append-only and rotated logs in local filesystem. Closes [#6953](https://github.com/ClickHouse/ClickHouse/issues/6953). [#25969](https://github.com/ClickHouse/ClickHouse/pull/25969) ([flynn](https://github.com/ucasfl)) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Add `CapnProto` output format, refactor `CapnProto` input format. [#29291](https://github.com/ClickHouse/ClickHouse/pull/29291) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Allow to write number in query as binary literal. Example `SELECT 0b001;`. [#29304](https://github.com/ClickHouse/ClickHouse/pull/29304) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Added `hashed_array` dictionary type. It saves memory when using dictionaries with multiple attributes. Closes [#30236](https://github.com/ClickHouse/ClickHouse/issues/30236). [#30242](https://github.com/ClickHouse/ClickHouse/pull/30242) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Added `JSONExtractKeys` function. [#30056](https://github.com/ClickHouse/ClickHouse/pull/30056) ([Vitaly](https://github.com/orloffv)).
|
||||||
|
* Add a function `getOSKernelVersion` - it returns a string with OS kernel version. [#29755](https://github.com/ClickHouse/ClickHouse/pull/29755) ([Memo](https://github.com/Joeywzr)).
|
||||||
|
* Added `MD4` and `SHA384` functions. MD4 is an obsolete and insecure hash function, it can be used only in rare cases when MD4 is already being used in some legacy system and you need to get exactly the same result. [#29602](https://github.com/ClickHouse/ClickHouse/pull/29602) ([Nikita Tikhomirov](https://github.com/NSTikhomirov)).
|
||||||
|
* HSTS can be enabled for Clickhouse HTTP server by setting `hsts_max_age` in configuration file with a positive number. [#29516](https://github.com/ClickHouse/ClickHouse/pull/29516) ([凌涛](https://github.com/lingtaolf)).
|
||||||
|
* Huawei OBS Storage support. Closes [#24294](https://github.com/ClickHouse/ClickHouse/issues/24294). [#29511](https://github.com/ClickHouse/ClickHouse/pull/29511) ([kevin wan](https://github.com/MaxWk)).
|
||||||
|
* New function `mapContainsKeyLike` to get the map that key matches a simple regular expression. [#29471](https://github.com/ClickHouse/ClickHouse/pull/29471) ([凌涛](https://github.com/lingtaolf)). New function `mapExtractKeyLike` to get the map only kept elements matched specified pattern. [#30793](https://github.com/ClickHouse/ClickHouse/pull/30793) ([凌涛](https://github.com/lingtaolf)).
|
||||||
|
* Implemented `ALTER TABLE x MODIFY COMMENT`. [#29264](https://github.com/ClickHouse/ClickHouse/pull/29264) ([Vasily Nemkov](https://github.com/Enmk)).
|
||||||
|
* Adds H3 inspection functions that are missing from ClickHouse but are available via the H3 api: https://h3geo.org/docs/api/inspection. [#29209](https://github.com/ClickHouse/ClickHouse/pull/29209) ([Bharat Nallan](https://github.com/bharatnc)).
|
||||||
|
* Allow non-replicated ALTER TABLE FETCH and ATTACH in Replicated databases. [#29202](https://github.com/ClickHouse/ClickHouse/pull/29202) ([Kevin Michel](https://github.com/kmichel-aiven)).
|
||||||
|
* Added a setting `output_format_csv_null_representation`: This is the same as `output_format_tsv_null_representation` but is for CSV output. [#29123](https://github.com/ClickHouse/ClickHouse/pull/29123) ([PHO](https://github.com/depressed-pho)).
|
||||||
|
* Added function `zookeeperSessionUptime()` which returns uptime of current ZooKeeper session in seconds. [#28983](https://github.com/ClickHouse/ClickHouse/pull/28983) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Implements the `h3ToGeoBoundary` function. [#28952](https://github.com/ClickHouse/ClickHouse/pull/28952) ([Ivan Veselov](https://github.com/fuzzERot)).
|
||||||
|
* Add aggregate function `exponentialMovingAverage` that can be used as window function. This closes [#27511](https://github.com/ClickHouse/ClickHouse/issues/27511). [#28914](https://github.com/ClickHouse/ClickHouse/pull/28914) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Allow to include subcolumns of table columns into `DESCRIBE` query result (can be enabled by setting `describe_include_subcolumns`). [#28905](https://github.com/ClickHouse/ClickHouse/pull/28905) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* `Executable`, `ExecutablePool` added option `send_chunk_header`. If this option is true then chunk rows_count with line break will be sent to client before chunk. [#28833](https://github.com/ClickHouse/ClickHouse/pull/28833) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* `tokenbf_v1` and `ngram` support Map with key of String of FixedSring type. It enhance data skipping in query with map key filter. ```sql CREATE TABLE map_tokenbf ( row_id UInt32, map Map(String, String), INDEX map_tokenbf map TYPE ngrambf_v1(4,256,2,0) GRANULARITY 1 ) Engine=MergeTree() Order by id ``` With table above, the query `select * from map_tokebf where map['K']='V'` will skip the granule that doesn't contain key `A` . Of course, how many rows will skipped is depended on the `granularity` and `index_granularity` you set. [#28511](https://github.com/ClickHouse/ClickHouse/pull/28511) ([凌涛](https://github.com/lingtaolf)).
|
||||||
|
* Send profile events from server to client. New packet type `ProfileEvents` was introduced. Closes [#26177](https://github.com/ClickHouse/ClickHouse/issues/26177). [#28364](https://github.com/ClickHouse/ClickHouse/pull/28364) ([Dmitry Novik](https://github.com/novikd)).
|
||||||
|
* Bit shift operations for `FixedString` and `String` data types. This closes [#27763](https://github.com/ClickHouse/ClickHouse/issues/27763). [#28325](https://github.com/ClickHouse/ClickHouse/pull/28325) ([小路](https://github.com/nicelulu)).
|
||||||
|
* Support adding / deleting tables to replication from PostgreSQL dynamically in database engine MaterializedPostgreSQL. Support alter for database settings. Closes [#27573](https://github.com/ClickHouse/ClickHouse/issues/27573). [#28301](https://github.com/ClickHouse/ClickHouse/pull/28301) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Added function accurateCastOrDefault(x, T). Closes [#21330](https://github.com/ClickHouse/ClickHouse/issues/21330). Authors @taiyang-li. [#23028](https://github.com/ClickHouse/ClickHouse/pull/23028) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Add Function `toUUIDOrDefault`, `toUInt8/16/32/64/256OrDefault`, `toInt8/16/32/64/128/256OrDefault`, which enables user defining default value(not null) when string parsing is failed. [#21330](https://github.com/ClickHouse/ClickHouse/pull/21330) ([taiyang-li](https://github.com/taiyang-li)).
|
||||||
|
|
||||||
|
#### Performance Improvement
|
||||||
|
|
||||||
|
* Background merges can be preempted by each other and they are scheduled with appropriate priorities. Now long running merges won't prevent short merges to proceed. This is needed for a better scheduling and controlling of merges execution. It reduces the chances to get "too many parts" error. [#22381](https://github.com/ClickHouse/ClickHouse/issues/22381). [#25165](https://github.com/ClickHouse/ClickHouse/pull/25165) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). Added an ability to execute more merges and mutations than the number of threads in background pool. Merges and mutations will be executed step by step according to their sizes (lower is more prioritized). The ratio of the number of tasks to threads to execute is controlled by a setting `background_merges_mutations_concurrency_ratio`, 2 by default. [#29140](https://github.com/ClickHouse/ClickHouse/pull/29140) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
|
||||||
|
* Allow to use asynchronous reads for remote filesystems. Lower the number of seeks while reading from remote filesystems. It improves performance tremendously and makes the experimental `web` and `s3` disks to work faster than EBS under certain conditions. [#29205](https://github.com/ClickHouse/ClickHouse/pull/29205) ([Kseniia Sumarokova](https://github.com/kssenii)). In the meantime, the `web` disk type (static dataset hosted on a web server) is graduated from being experimental to be production ready.
|
||||||
|
* Queries with `INTO OUTFILE` in `clickhouse-client` will use multiple threads. Fix the issue with flickering progress-bar when using `INTO OUTFILE`. This closes [#30873](https://github.com/ClickHouse/ClickHouse/issues/30873). This closes [#30872](https://github.com/ClickHouse/ClickHouse/issues/30872). [#30886](https://github.com/ClickHouse/ClickHouse/pull/30886) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Reduce amount of redundant compressed data read from disk for some types `SELECT` queries (only for `MergeTree` engines family). [#30111](https://github.com/ClickHouse/ClickHouse/pull/30111) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Remove some redundant `seek` calls while reading compressed blocks in MergeTree table engines family. [#29766](https://github.com/ClickHouse/ClickHouse/pull/29766) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Make `url` table function to process multiple URLs in parallel. This closes [#29670](https://github.com/ClickHouse/ClickHouse/issues/29670) and closes [#29671](https://github.com/ClickHouse/ClickHouse/issues/29671). [#29673](https://github.com/ClickHouse/ClickHouse/pull/29673) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Improve performance of aggregation in order of primary key (with enabled setting `optimize_aggregation_in_order`). [#30266](https://github.com/ClickHouse/ClickHouse/pull/30266) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Now clickhouse is using DNS cache while communicating with external S3. [#29999](https://github.com/ClickHouse/ClickHouse/pull/29999) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Add support for pushdown of `IS NULL`/`IS NOT NULL` to external databases (i.e. MySQL). [#29463](https://github.com/ClickHouse/ClickHouse/pull/29463) ([Azat Khuzhin](https://github.com/azat)). Transform `isNull`/`isNotNull` to `IS NULL`/`IS NOT NULL` (for external dbs, i.e. MySQL). [#29446](https://github.com/ClickHouse/ClickHouse/pull/29446) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* SELECT queries from Dictionary tables will use multiple threads. [#30500](https://github.com/ClickHouse/ClickHouse/pull/30500) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Improve performance for filtering (WHERE operation) of `Decimal` columns. [#30431](https://github.com/ClickHouse/ClickHouse/pull/30431) ([Jun Jin](https://github.com/vesslanjin)).
|
||||||
|
* Remove branchy code in filter operation with a better implementation with popcnt/ctz which have better performance. [#29881](https://github.com/ClickHouse/ClickHouse/pull/29881) ([Jun Jin](https://github.com/vesslanjin)).
|
||||||
|
* Improve filter bytemask generator (used for WHERE operator) function all in one with SSE/AVX2/AVX512 instructions. Note that by default ClickHouse is only using SSE, so it's only relevant for custom builds. [#30014](https://github.com/ClickHouse/ClickHouse/pull/30014) ([jasperzhu](https://github.com/jinjunzh)). [#30670](https://github.com/ClickHouse/ClickHouse/pull/30670) ([jasperzhu](https://github.com/jinjunzh)).
|
||||||
|
* Improve the performance of SUM aggregate function of Nullable floating point numbers. [#28906](https://github.com/ClickHouse/ClickHouse/pull/28906) ([Raúl Marín](https://github.com/Algunenano)).
|
||||||
|
* Speed up part loading process with multiple disks are in use. The idea is similar to https://github.com/ClickHouse/ClickHouse/pull/16423 . Prod env shows improvement: 24 min -> 16 min . [#28363](https://github.com/ClickHouse/ClickHouse/pull/28363) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Reduce default settings for S3 multipart upload part size to lower memory usage. [#28679](https://github.com/ClickHouse/ClickHouse/pull/28679) ([ianton-ru](https://github.com/ianton-ru)).
|
||||||
|
* Speed up `bitmapAnd` function. [#28332](https://github.com/ClickHouse/ClickHouse/pull/28332) ([dddounaiking](https://github.com/OodounaikingoO)).
|
||||||
|
* Removed sub-optimal mutation notifications in `StorageMergeTree` when merges are still going. [#27552](https://github.com/ClickHouse/ClickHouse/pull/27552) ([Vladimir Chebotarev](https://github.com/excitoon)).
|
||||||
|
* Attempt to improve performance of string comparison. [#28767](https://github.com/ClickHouse/ClickHouse/pull/28767) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Primary key index and partition filter can work in tuple. [#29281](https://github.com/ClickHouse/ClickHouse/pull/29281) ([凌涛](https://github.com/lingtaolf)).
|
||||||
|
* If query has multiple quantile aggregate functions with the same arguments but different level parameter, they will be fused together and executed in one pass if the setting `optimize_syntax_fuse_functions` is enabled. [#26657](https://github.com/ClickHouse/ClickHouse/pull/26657) ([hexiaoting](https://github.com/hexiaoting)).
|
||||||
|
* Now min-max aggregation over the first expression of primary key is optimized by projection. This is for [#329](https://github.com/ClickHouse/ClickHouse/issues/329). [#29918](https://github.com/ClickHouse/ClickHouse/pull/29918) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
|
||||||
|
#### Experimental Feature
|
||||||
|
|
||||||
|
* Add ability to change nodes configuration (in `.xml` file) for ClickHouse Keeper. [#30372](https://github.com/ClickHouse/ClickHouse/pull/30372) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Add `sparkbar` aggregate function. This closes [#26175](https://github.com/ClickHouse/ClickHouse/issues/26175). [#27481](https://github.com/ClickHouse/ClickHouse/pull/27481) ([小路](https://github.com/nicelulu)). Note: there is one flaw in this function, the behaviour will be changed in future releases.
|
||||||
|
|
||||||
|
#### Improvement
|
||||||
|
|
||||||
|
* Allow user to change log levels without restart. [#29586](https://github.com/ClickHouse/ClickHouse/pull/29586) ([Nikolay Degterinsky](https://github.com/evillique)).
|
||||||
|
* Multiple improvements for SQL UDF. Queries for manipulation of SQL User Defined Functions now support ON CLUSTER clause. Example `CREATE FUNCTION test_function ON CLUSTER 'cluster' AS x -> x + 1;`. Closes [#30666](https://github.com/ClickHouse/ClickHouse/issues/30666). [#30734](https://github.com/ClickHouse/ClickHouse/pull/30734) ([Maksim Kita](https://github.com/kitaisreal)). Support `CREATE OR REPLACE`, `CREATE IF NOT EXISTS` syntaxes. [#30454](https://github.com/ClickHouse/ClickHouse/pull/30454) ([Maksim Kita](https://github.com/kitaisreal)). Added DROP IF EXISTS support. Example `DROP FUNCTION IF EXISTS test_function`. [#30437](https://github.com/ClickHouse/ClickHouse/pull/30437) ([Maksim Kita](https://github.com/kitaisreal)). Support lambdas. Example `CREATE FUNCTION lambda_function AS x -> arrayMap(element -> element * 2, x);`. [#30435](https://github.com/ClickHouse/ClickHouse/pull/30435) ([Maksim Kita](https://github.com/kitaisreal)). Support SQL user defined functions for `clickhouse-local`. [#30179](https://github.com/ClickHouse/ClickHouse/pull/30179) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Enable per-query memory profiler (set to `memory_profiler_step` = 4MiB) globally. [#29455](https://github.com/ClickHouse/ClickHouse/pull/29455) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Added columns `data_compressed_bytes`, `data_uncompressed_bytes`, `marks_bytes` into `system.data_skipping_indices`. Added columns `secondary_indices_compressed_bytes`, `secondary_indices_uncompressed_bytes`, `secondary_indices_marks_bytes` into `system.parts`. Closes [#29697](https://github.com/ClickHouse/ClickHouse/issues/29697). [#29896](https://github.com/ClickHouse/ClickHouse/pull/29896) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Add `table` alias to system.tables and `database` alias to system.databases [#29677](https://github.com/ClickHouse/ClickHouse/issues/29677). [#29882](https://github.com/ClickHouse/ClickHouse/pull/29882) ([kevin wan](https://github.com/MaxWk)).
|
||||||
|
* Correctly resolve interdependencies between tables on server startup. Closes [#8004](https://github.com/ClickHouse/ClickHouse/issues/8004), closes [#15170](https://github.com/ClickHouse/ClickHouse/issues/15170). [#28373](https://github.com/ClickHouse/ClickHouse/pull/28373) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Avoid error "Division by zero" when denominator is Nullable in functions `divide`, `intDiv` and `modulo`. Closes [#22621](https://github.com/ClickHouse/ClickHouse/issues/22621). [#28352](https://github.com/ClickHouse/ClickHouse/pull/28352) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Allow to parse values of `Date` data type in text formats as `YYYYMMDD` in addition to `YYYY-MM-DD`. This closes [#30870](https://github.com/ClickHouse/ClickHouse/issues/30870). [#30871](https://github.com/ClickHouse/ClickHouse/pull/30871) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Web UI: render bars in table cells. [#29792](https://github.com/ClickHouse/ClickHouse/pull/29792) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* User can now create dictionaries with comments: `CREATE DICTIONARY ... COMMENT 'vaue'` ... [#29899](https://github.com/ClickHouse/ClickHouse/pull/29899) ([Vasily Nemkov](https://github.com/Enmk)). Users now can set comments to database in `CREATE DATABASE` statement ... [#29429](https://github.com/ClickHouse/ClickHouse/pull/29429) ([Vasily Nemkov](https://github.com/Enmk)).
|
||||||
|
* Introduce `compiled_expression_cache_elements_size` setting. If you will ever want to use this setting, you will already know what it does. [#30667](https://github.com/ClickHouse/ClickHouse/pull/30667) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* clickhouse-format now supports option `--query`. In previous versions you have to pass the query to stdin. [#29325](https://github.com/ClickHouse/ClickHouse/pull/29325) ([凌涛](https://github.com/lingtaolf)).
|
||||||
|
* Support `ALTER TABLE` for tables in `Memory` databases. Memory databases are used in `clickhouse-local`. [#30866](https://github.com/ClickHouse/ClickHouse/pull/30866) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Arrays of all serializable types are now supported by `arrayStringConcat`. [#30840](https://github.com/ClickHouse/ClickHouse/pull/30840) ([Nickita Taranov](https://github.com/nickitat)).
|
||||||
|
* ClickHouse now will account docker/cgroups limitations to get system memory amount. See [#25662](https://github.com/ClickHouse/ClickHouse/issues/25662). [#30574](https://github.com/ClickHouse/ClickHouse/pull/30574) ([Pavel Medvedev](https://github.com/pmed)).
|
||||||
|
* Fetched table structure for PostgreSQL database is more reliable now. [#30477](https://github.com/ClickHouse/ClickHouse/pull/30477) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Full support of positional arguments in GROUP BY and ORDER BY. [#30433](https://github.com/ClickHouse/ClickHouse/pull/30433) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Allow extracting non-string element as string using JSONExtractString. This is for [pull/25452#issuecomment-927123287](https://github.com/ClickHouse/ClickHouse/pull/25452#issuecomment-927123287). [#30426](https://github.com/ClickHouse/ClickHouse/pull/30426) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Added an ability to use FINAL clause in SELECT queries from `GraphiteMergeTree`. [#30360](https://github.com/ClickHouse/ClickHouse/pull/30360) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
|
||||||
|
* Minor improvements in replica cloning and enqueuing fetch for broken parts, that should avoid extremely rare hanging of `GET_PART` entries in replication queue. [#30346](https://github.com/ClickHouse/ClickHouse/pull/30346) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Allow symlinks to files in `user_files` directory for file table function. [#30309](https://github.com/ClickHouse/ClickHouse/pull/30309) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Fixed comparison of `Date32` with `Date`, `DateTime`, `DateTime64` and `String`. [#30219](https://github.com/ClickHouse/ClickHouse/pull/30219) ([liang.huang](https://github.com/lhuang09287750)).
|
||||||
|
* Allow to remove `SAMPLE BY` expression from `MergeTree` tables (`ALTER TABLE <table> REMOVE SAMPLE BY`). [#30180](https://github.com/ClickHouse/ClickHouse/pull/30180) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Now `Keeper` (as part of `clickhouse-server`) will start asynchronously if it can connect to some other node. [#30170](https://github.com/ClickHouse/ClickHouse/pull/30170) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Now `clickhouse-client` supports native multi-line editing. [#30143](https://github.com/ClickHouse/ClickHouse/pull/30143) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* `polygon` dictionaries (reverse geocoding): added support for reading the dictionary content with SELECT query method if setting `store_polygon_key_column` = true. Closes [#30090](https://github.com/ClickHouse/ClickHouse/issues/30090). [#30142](https://github.com/ClickHouse/ClickHouse/pull/30142) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Add ClickHouse logo to Play UI. [#29674](https://github.com/ClickHouse/ClickHouse/pull/29674) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Better exception message while reading column from Arrow-supported formats like `Arrow`, `ArrowStream`, `Parquet` and `ORC`. This closes [#29926](https://github.com/ClickHouse/ClickHouse/issues/29926). [#29927](https://github.com/ClickHouse/ClickHouse/pull/29927) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix data-race between flush and startup in `Buffer` tables. This can appear in tests. [#29930](https://github.com/ClickHouse/ClickHouse/pull/29930) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix `lock-order-inversion` between `DROP TABLE` for `DatabaseMemory` and `LiveView`. Live View is an experimental feature. Memory database is used in clickhouse-local. [#29929](https://github.com/ClickHouse/ClickHouse/pull/29929) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix lock-order-inversion between periodic dictionary reload and config reload. [#29928](https://github.com/ClickHouse/ClickHouse/pull/29928) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Update zoneinfo files to 2021c. [#29925](https://github.com/ClickHouse/ClickHouse/pull/29925) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Add ability to configure retries and delays between them for `clickhouse-copier`. [#29921](https://github.com/ClickHouse/ClickHouse/pull/29921) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Add `shutdown_wait_unfinished_queries` server setting to allowing waiting for running queries up to `shutdown_wait_unfinished` time. This is for [#24451](https://github.com/ClickHouse/ClickHouse/issues/24451). [#29914](https://github.com/ClickHouse/ClickHouse/pull/29914) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Add ability to trace peak memory usage (with new trace_type in `system.trace_log` - `MemoryPeak`). [#29858](https://github.com/ClickHouse/ClickHouse/pull/29858) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* PostgreSQL foreign tables: Added partitioned table prefix 'p' for the query for fetching replica identity index. [#29828](https://github.com/ClickHouse/ClickHouse/pull/29828) ([Shoh Jahon](https://github.com/Shohjahon)).
|
||||||
|
* Apply `max_untracked_memory`/`memory_profiler_step`/`memory_profiler_sample_probability` during mutate/merge to profile memory usage during merges. [#29681](https://github.com/ClickHouse/ClickHouse/pull/29681) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Query obfuscator: `clickhouse-format --obfuscate` now works with more types of queries. [#29672](https://github.com/ClickHouse/ClickHouse/pull/29672) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fixed the issue: `clickhouse-format --obfuscate` cannot process queries with embedded dictionaries (functions `regionTo...`). [#29667](https://github.com/ClickHouse/ClickHouse/pull/29667) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix incorrect Nullable processing of JSON functions. This fixes [#29615](https://github.com/ClickHouse/ClickHouse/issues/29615) . Mark as improvement because https://github.com/ClickHouse/ClickHouse/pull/28012 is not released. [#29659](https://github.com/ClickHouse/ClickHouse/pull/29659) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Increase `listen_backlog` by default (to match default in newer linux kernel). [#29643](https://github.com/ClickHouse/ClickHouse/pull/29643) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Reload dictionaries, models, user defined executable functions if servers config `dictionaries_config`, `models_config`, `user_defined_executable_functions_config` changes. Closes [#28142](https://github.com/ClickHouse/ClickHouse/issues/28142). [#29529](https://github.com/ClickHouse/ClickHouse/pull/29529) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Get rid of pointless restriction on projection name. Now projection name can start with `tmp_`. [#29520](https://github.com/ClickHouse/ClickHouse/pull/29520) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fixed `There is no query or query context has expired` error in mutations with nested subqueries. Do not allow subqueries in mutation if table is replicated and `allow_nondeterministic_mutations` setting is disabled. [#29495](https://github.com/ClickHouse/ClickHouse/pull/29495) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Apply config changes to `max_concurrent_queries` during runtime (no need to restart). [#29414](https://github.com/ClickHouse/ClickHouse/pull/29414) ([Raúl Marín](https://github.com/Algunenano)).
|
||||||
|
* Added setting `use_skip_indexes`. [#29405](https://github.com/ClickHouse/ClickHouse/pull/29405) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Add support for `FREEZE`ing in-memory parts (for backups). [#29376](https://github.com/ClickHouse/ClickHouse/pull/29376) ([Mo Xuan](https://github.com/mo-avatar)).
|
||||||
|
* Pass through initial query_id for `clickhouse-benchmark` (previously if you run remote query via `clickhouse-benchmark`, queries on shards will not be linked to the initial query via `initial_query_id`). [#29364](https://github.com/ClickHouse/ClickHouse/pull/29364) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Skip indexes `tokenbf_v1` and `ngrambf_v1`: added support for `Array` data type with key of `String` of `FixedString` type. [#29280](https://github.com/ClickHouse/ClickHouse/pull/29280) ([Maksim Kita](https://github.com/kitaisreal)). Skip indexes `tokenbf_v1` and `ngrambf_v1` added support for `Map` data type with key of `String` of `FixedString` type. Author @lingtaolf. [#29220](https://github.com/ClickHouse/ClickHouse/pull/29220) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Function `has`: added support for `Map` data type. [#29267](https://github.com/ClickHouse/ClickHouse/pull/29267) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Add `compress_logs` settings for clickhouse-keeper which allow to compress clickhouse-keeper logs (for replicated state machine) in `ZSTD` . Implements: [#26977](https://github.com/ClickHouse/ClickHouse/issues/26977). [#29223](https://github.com/ClickHouse/ClickHouse/pull/29223) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Add a setting `external_table_strict_query` - it will force passing the whole WHERE expression in queries to foreign databases even if it is incompatible. [#29206](https://github.com/ClickHouse/ClickHouse/pull/29206) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Disable projections when `ARRAY JOIN` is used. In previous versions projection analysis may break aliases in array join. [#29139](https://github.com/ClickHouse/ClickHouse/pull/29139) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Support more types in `MsgPack` input/output format. [#29077](https://github.com/ClickHouse/ClickHouse/pull/29077) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Allow to input and output `LowCardinality` columns in `ORC` input/output format. [#29062](https://github.com/ClickHouse/ClickHouse/pull/29062) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Select from `system.distributed_ddl_queue` might show incorrect values, it's fixed. [#29061](https://github.com/ClickHouse/ClickHouse/pull/29061) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Correct behaviour with unknown methods for HTTP connection. Solves [#29050](https://github.com/ClickHouse/ClickHouse/issues/29050). [#29057](https://github.com/ClickHouse/ClickHouse/pull/29057) ([Filatenkov Artur](https://github.com/FArthur-cmd)).
|
||||||
|
* `clickhouse-keeper`: Fix bug in `clickhouse-keeper-converter` which can lead to some data loss while restoring from ZooKeeper logs (not snapshot). [#29030](https://github.com/ClickHouse/ClickHouse/pull/29030) ([小路](https://github.com/nicelulu)). Fix bug in `clickhouse-keeper-converter` which can lead to incorrect ZooKeeper log deserialization. [#29071](https://github.com/ClickHouse/ClickHouse/pull/29071) ([小路](https://github.com/nicelulu)).
|
||||||
|
* Apply settings from `CREATE ... AS SELECT` queries (fixes: [#28810](https://github.com/ClickHouse/ClickHouse/issues/28810)). [#28962](https://github.com/ClickHouse/ClickHouse/pull/28962) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Respect default database setting for ALTER TABLE ... ON CLUSTER ... REPLACE/MOVE PARTITION FROM/TO ... [#28955](https://github.com/ClickHouse/ClickHouse/pull/28955) ([anneji-dev](https://github.com/anneji-dev)).
|
||||||
|
* gRPC protocol: Allow change server-side compression from client. [#28953](https://github.com/ClickHouse/ClickHouse/pull/28953) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Skip "no data" exception when reading thermal sensors for asynchronous metrics. This closes [#28852](https://github.com/ClickHouse/ClickHouse/issues/28852). [#28882](https://github.com/ClickHouse/ClickHouse/pull/28882) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fixed logical race condition that might cause `Dictionary not found` error for existing dictionary in rare cases. [#28853](https://github.com/ClickHouse/ClickHouse/pull/28853) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Relax nested function for If-combinator check (but forbid nested identical combinators). [#28828](https://github.com/ClickHouse/ClickHouse/pull/28828) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix possible uncaught exception during server termination. [#28761](https://github.com/ClickHouse/ClickHouse/pull/28761) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Forbid cleaning of tmp directories that can be used by an active mutation/merge if mutation/merge is extraordinarily long. [#28760](https://github.com/ClickHouse/ClickHouse/pull/28760) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Allow optimization `optimize_arithmetic_operations_in_aggregate_functions = 1` when alias is used. [#28746](https://github.com/ClickHouse/ClickHouse/pull/28746) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Implement `detach_not_byte_identical_parts` setting for `ReplicatedMergeTree`, that will detach instead of remove not byte-identical parts (after mege/mutate). [#28708](https://github.com/ClickHouse/ClickHouse/pull/28708) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Implement `max_suspicious_broken_parts_bytes` setting for `MergeTree` (to limit total size of all broken parts, default is `1GiB`). [#28707](https://github.com/ClickHouse/ClickHouse/pull/28707) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Enable expanding macros in `RabbitMQ` table settings. [#28683](https://github.com/ClickHouse/ClickHouse/pull/28683) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Restore the possibility to read data of a table using the `Log` engine in multiple threads. [#28125](https://github.com/ClickHouse/ClickHouse/pull/28125) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Fix misbehavior of NULL column handling in JSON functions. This fixes [#27930](https://github.com/ClickHouse/ClickHouse/issues/27930). [#28012](https://github.com/ClickHouse/ClickHouse/pull/28012) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Allow to set the size of Mark/Uncompressed cache for skip indices separately from columns. [#27961](https://github.com/ClickHouse/ClickHouse/pull/27961) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Allow to mix JOIN with `USING` with other JOIN types. [#23881](https://github.com/ClickHouse/ClickHouse/pull/23881) ([darkkeks](https://github.com/darkkeks)).
|
||||||
|
* Update aws-sdk submodule for throttling in Yandex Cloud S3. [#30646](https://github.com/ClickHouse/ClickHouse/pull/30646) ([ianton-ru](https://github.com/ianton-ru)).
|
||||||
|
* Fix releasing query ID and session ID at the end of query processing while handing gRPC call. [#29954](https://github.com/ClickHouse/ClickHouse/pull/29954) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Fix shutdown of `AccessControlManager` to fix flaky test. [#29951](https://github.com/ClickHouse/ClickHouse/pull/29951) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Fix failed assertion in reading from `HDFS`. Update libhdfs3 library to be able to run in tests in debug. Closes [#29251](https://github.com/ClickHouse/ClickHouse/issues/29251). Closes [#27814](https://github.com/ClickHouse/ClickHouse/issues/27814). [#29276](https://github.com/ClickHouse/ClickHouse/pull/29276) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
|
||||||
|
|
||||||
|
#### Build/Testing/Packaging Improvement
|
||||||
|
|
||||||
|
* Add support for FreeBSD builds for Aarch64 machines. [#29952](https://github.com/ClickHouse/ClickHouse/pull/29952) ([MikaelUrankar](https://github.com/MikaelUrankar)).
|
||||||
|
* Recursive submodules are no longer needed for ClickHouse. [#30315](https://github.com/ClickHouse/ClickHouse/pull/30315) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* ClickHouse can be statically built with Musl. This is added as experiment, it does not support building `odbc-bridge`, `library-bridge`, integration with CatBoost and some libraries. [#30248](https://github.com/ClickHouse/ClickHouse/pull/30248) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Enable `Protobuf`, `Arrow`, `ORC`, `Parquet` for `AArch64` and `Darwin` (macOS) builds. This closes [#29248](https://github.com/ClickHouse/ClickHouse/issues/29248). This closes [#28018](https://github.com/ClickHouse/ClickHouse/issues/28018). [#30015](https://github.com/ClickHouse/ClickHouse/pull/30015) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Add cross-build for PowerPC (powerpc64le). This closes [#9589](https://github.com/ClickHouse/ClickHouse/issues/9589). Enable support for interaction with MySQL for AArch64 and PowerPC. This closes [#26301](https://github.com/ClickHouse/ClickHouse/issues/26301). [#30010](https://github.com/ClickHouse/ClickHouse/pull/30010) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Leave only required files in cross-compile toolchains. Include them as submodules (earlier they were downloaded as tarballs). [#29974](https://github.com/ClickHouse/ClickHouse/pull/29974) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Implemented structure-aware fuzzing approach in ClickHouse for select statement parser. [#30012](https://github.com/ClickHouse/ClickHouse/pull/30012) ([Paul](https://github.com/PaulCher)).
|
||||||
|
* Turning on experimental constexpr expressions evaluator for clang to speed up template code compilation. [#29668](https://github.com/ClickHouse/ClickHouse/pull/29668) ([myrrc](https://github.com/myrrc)).
|
||||||
|
* Add ability to compile using newer version fo glibc without using new symbols. [#29594](https://github.com/ClickHouse/ClickHouse/pull/29594) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Reduce Debug build binary size by clang optimization option. [#28736](https://github.com/ClickHouse/ClickHouse/pull/28736) ([flynn](https://github.com/ucasfl)).
|
||||||
|
* Now all images for CI will be placed in the separate dockerhub repo. [#28656](https://github.com/ClickHouse/ClickHouse/pull/28656) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Improve support for build with clang-13. [#28046](https://github.com/ClickHouse/ClickHouse/pull/28046) ([Sergei Semin](https://github.com/syominsergey)).
|
||||||
|
* Add ability to print raw profile events to `clickhouse-client` (This can be useful for debugging and for testing). [#30064](https://github.com/ClickHouse/ClickHouse/pull/30064) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Add time dependency for clickhouse-server unit (systemd and sysvinit init). [#28891](https://github.com/ClickHouse/ClickHouse/pull/28891) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Reload stacktrace cache when symbol is reloaded. [#28137](https://github.com/ClickHouse/ClickHouse/pull/28137) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
|
||||||
|
#### Bug Fix
|
||||||
|
|
||||||
|
* Functions for case-insensitive search in UTF-8 strings like `positionCaseInsensitiveUTF8` and `countSubstringsCaseInsensitiveUTF8` might find substrings that actually does not match in very rare cases, it's fixed. [#30663](https://github.com/ClickHouse/ClickHouse/pull/30663) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Fix reading from empty file on encrypted disk. [#30494](https://github.com/ClickHouse/ClickHouse/pull/30494) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Fix transformation of disjunctions chain to `IN` (controlled by settings `optimize_min_equality_disjunction_chain_length`) in distributed queries with settings `legacy_column_name_of_tuple_literal = 0`. [#28658](https://github.com/ClickHouse/ClickHouse/pull/28658) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Allow using a materialized column as the sharding key in a distributed table even if `insert_allow_materialized_columns=0`:. [#28637](https://github.com/ClickHouse/ClickHouse/pull/28637) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||||
|
* Fix `ORDER BY ... WITH FILL` with set `TO` and `FROM` and no rows in result set. [#30888](https://github.com/ClickHouse/ClickHouse/pull/30888) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Fix set index not used in AND/OR expressions when there are more than two operands. This fixes [#30416](https://github.com/ClickHouse/ClickHouse/issues/30416) . [#30887](https://github.com/ClickHouse/ClickHouse/pull/30887) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fix crash when projection with hashing function is materialized. This fixes [#30861](https://github.com/ClickHouse/ClickHouse/issues/30861) . The issue is similar to https://github.com/ClickHouse/ClickHouse/pull/28560 which is a lack of proper understanding of the invariant of header's emptyness. [#30877](https://github.com/ClickHouse/ClickHouse/pull/30877) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fixed ambiguity when extracting auxiliary ZooKeeper name from ZooKeeper path in `ReplicatedMergeTree`. Previously server might fail to start with `Unknown auxiliary ZooKeeper name` if ZooKeeper path contains a colon. Fixes [#29052](https://github.com/ClickHouse/ClickHouse/issues/29052). Also it was allowed to specify ZooKeeper path that does not start with slash, but now it's deprecated and creation of new tables with such path is not allowed. Slashes and colons in auxiliary ZooKeeper names are not allowed too. [#30822](https://github.com/ClickHouse/ClickHouse/pull/30822) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Clean temporary directory when localBackup failed by some reason. [#30797](https://github.com/ClickHouse/ClickHouse/pull/30797) ([ianton-ru](https://github.com/ianton-ru)).
|
||||||
|
* Fixed a race condition between `REPLACE/MOVE PARTITION` and background merge in non-replicated `MergeTree` that might cause a part of moved/replaced data to remain in partition. Fixes [#29327](https://github.com/ClickHouse/ClickHouse/issues/29327). [#30717](https://github.com/ClickHouse/ClickHouse/pull/30717) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Fix PREWHERE with WHERE in case of always true PREWHERE. [#30668](https://github.com/ClickHouse/ClickHouse/pull/30668) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Limit push down optimization could cause a error `Cannot find column`. Fixes [#30438](https://github.com/ClickHouse/ClickHouse/issues/30438). [#30562](https://github.com/ClickHouse/ClickHouse/pull/30562) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* Add missing parenthesis for `isNotNull`/`isNull` rewrites to `IS [NOT] NULL` (fixes queries that has something like `isNotNull(1)+isNotNull(2)`). [#30520](https://github.com/ClickHouse/ClickHouse/pull/30520) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix deadlock on ALTER with scalar subquery to the same table, close [#30461](https://github.com/ClickHouse/ClickHouse/issues/30461). [#30492](https://github.com/ClickHouse/ClickHouse/pull/30492) ([Vladimir C](https://github.com/vdimir)).
|
||||||
|
* Fixed segfault which might happen if session expired during execution of REPLACE PARTITION. [#30432](https://github.com/ClickHouse/ClickHouse/pull/30432) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Queries with condition like `IN (subquery)` could return incorrect result in case if aggregate projection applied. Fixed creation of sets for projections. [#30310](https://github.com/ClickHouse/ClickHouse/pull/30310) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fix column alias resolution of JOIN queries when projection is enabled. This fixes [#30146](https://github.com/ClickHouse/ClickHouse/issues/30146). [#30293](https://github.com/ClickHouse/ClickHouse/pull/30293) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fix some deficiency in `replaceRegexpAll` function. [#30292](https://github.com/ClickHouse/ClickHouse/pull/30292) ([Memo](https://github.com/Joeywzr)).
|
||||||
|
* Fix ComplexKeyHashedDictionary, ComplexKeySparseHashedDictionary parsing `preallocate` option from layout config. [#30246](https://github.com/ClickHouse/ClickHouse/pull/30246) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Fix `[I]LIKE` function. Closes [#28661](https://github.com/ClickHouse/ClickHouse/issues/28661). [#30244](https://github.com/ClickHouse/ClickHouse/pull/30244) ([Nikolay Degterinsky](https://github.com/evillique)).
|
||||||
|
* Fix crash with shortcircuit and lowcardinality in multiIf. [#30243](https://github.com/ClickHouse/ClickHouse/pull/30243) ([Raúl Marín](https://github.com/Algunenano)).
|
||||||
|
* FlatDictionary, HashedDictionary fix bytes_allocated calculation for nullable attributes. [#30238](https://github.com/ClickHouse/ClickHouse/pull/30238) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Allow identifiers starting with numbers in multiple joins. [#30230](https://github.com/ClickHouse/ClickHouse/pull/30230) ([Vladimir C](https://github.com/vdimir)).
|
||||||
|
* Fix reading from `MergeTree` with `max_read_buffer_size = 0` (when the user wants to shoot himself in the foot) (can lead to exceptions `Can't adjust last granule`, `LOGICAL_ERROR`, or even data loss). [#30192](https://github.com/ClickHouse/ClickHouse/pull/30192) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix `pread_fake_async`/`pread_threadpool` with `min_bytes_to_use_direct_io`. [#30191](https://github.com/ClickHouse/ClickHouse/pull/30191) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix INSERT SELECT incorrectly fills MATERIALIZED column based of Nullable column. [#30189](https://github.com/ClickHouse/ClickHouse/pull/30189) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Support nullable arguments in function `initializeAggregation`. [#30177](https://github.com/ClickHouse/ClickHouse/pull/30177) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Fix error `Port is already connected` for queries with `GLOBAL IN` and `WITH TOTALS`. Only for 21.9 and 21.10. [#30086](https://github.com/ClickHouse/ClickHouse/pull/30086) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* Fix race between MOVE PARTITION and merges/mutations for MergeTree. [#30074](https://github.com/ClickHouse/ClickHouse/pull/30074) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Dropped `Memory` database might reappear after server restart, it's fixed ([#29795](https://github.com/ClickHouse/ClickHouse/issues/29795)). Also added `force_remove_data_recursively_on_drop` setting as a workaround for `Directory not empty` error when dropping `Ordinary` database (because it's not possible to remove data leftovers manually in cloud environment). [#30054](https://github.com/ClickHouse/ClickHouse/pull/30054) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Fix crash of sample by `tuple()`, closes [#30004](https://github.com/ClickHouse/ClickHouse/issues/30004). [#30016](https://github.com/ClickHouse/ClickHouse/pull/30016) ([flynn](https://github.com/ucasfl)).
|
||||||
|
* try to close issue: [#29965](https://github.com/ClickHouse/ClickHouse/issues/29965). [#29976](https://github.com/ClickHouse/ClickHouse/pull/29976) ([hexiaoting](https://github.com/hexiaoting)).
|
||||||
|
* Fix possible data-race between `FileChecker` and `StorageLog`/`StorageStripeLog`. [#29959](https://github.com/ClickHouse/ClickHouse/pull/29959) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix data-race between `LogSink::writeMarks()` and `LogSource` in `StorageLog`. [#29946](https://github.com/ClickHouse/ClickHouse/pull/29946) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix potential resource leak of the concurrent query limit of merge tree tables introduced in https://github.com/ClickHouse/ClickHouse/pull/19544. [#29879](https://github.com/ClickHouse/ClickHouse/pull/29879) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fix system tables recreation check (fails to detect changes in enum values). [#29857](https://github.com/ClickHouse/ClickHouse/pull/29857) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* MaterializedMySQL: Fix an issue where if the connection to MySQL was lost, only parts of a transaction could be processed. [#29837](https://github.com/ClickHouse/ClickHouse/pull/29837) ([Håvard Kvålen](https://github.com/havardk)).
|
||||||
|
* Avoid `Timeout exceeded: elapsed 18446744073.709553 seconds` error that might happen in extremely rare cases, presumably due to some bug in kernel. Fixes [#29154](https://github.com/ClickHouse/ClickHouse/issues/29154). [#29811](https://github.com/ClickHouse/ClickHouse/pull/29811) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Fix bad cast in `ATTACH TABLE ... FROM 'path'` query when non-string literal is used instead of path. It may lead to reading of uninitialized memory. [#29790](https://github.com/ClickHouse/ClickHouse/pull/29790) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix concurrent access to `LowCardinality` during `GROUP BY` (in combination with `Buffer` tables it may lead to troubles). [#29782](https://github.com/ClickHouse/ClickHouse/pull/29782) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix incorrect `GROUP BY` (multiple rows with the same keys in result) in case of distributed query when shards had mixed versions `<= 21.3` and `>= 21.4`, `GROUP BY` key had several columns all with fixed size, and two-level aggregation was activated (see `group_by_two_level_threshold` and `group_by_two_level_threshold_bytes`). Fixes [#29580](https://github.com/ClickHouse/ClickHouse/issues/29580). [#29735](https://github.com/ClickHouse/ClickHouse/pull/29735) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* Fixed incorrect behaviour of setting `materialized_postgresql_tables_list` at server restart. Found in [#28529](https://github.com/ClickHouse/ClickHouse/issues/28529). [#29686](https://github.com/ClickHouse/ClickHouse/pull/29686) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Condition in filter predicate could be lost after push-down optimisation. [#29625](https://github.com/ClickHouse/ClickHouse/pull/29625) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* Fix JIT expression compilation with aliases and short-circuit expression evaluation. Closes [#29403](https://github.com/ClickHouse/ClickHouse/issues/29403). [#29574](https://github.com/ClickHouse/ClickHouse/pull/29574) ([Maksim Kita](https://github.com/kitaisreal)).
|
||||||
|
* Fix rare segfault in `ALTER MODIFY` query when using incorrect table identifier in `DEFAULT` expression like `x.y.z...` Fixes [#29184](https://github.com/ClickHouse/ClickHouse/issues/29184). [#29573](https://github.com/ClickHouse/ClickHouse/pull/29573) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Fix nullptr deference for `GROUP BY WITH TOTALS HAVING` (when the column from `HAVING` wasn't selected). [#29553](https://github.com/ClickHouse/ClickHouse/pull/29553) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Avoid deadlocks when reading and writting on Join table engine tables at the same time. [#29544](https://github.com/ClickHouse/ClickHouse/pull/29544) ([Raúl Marín](https://github.com/Algunenano)).
|
||||||
|
* Fix bug in check `pathStartsWith` becuase there was bug with the usage of `std::mismatch`: ` The behavior is undefined if the second range is shorter than the first range.`. [#29531](https://github.com/ClickHouse/ClickHouse/pull/29531) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* In ODBC bridge add retries for error Invalid cursor state. It is a retriable error. Closes [#29473](https://github.com/ClickHouse/ClickHouse/issues/29473). [#29518](https://github.com/ClickHouse/ClickHouse/pull/29518) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Fixed incorrect table name parsing on loading of `Lazy` database. Fixes [#29456](https://github.com/ClickHouse/ClickHouse/issues/29456). [#29476](https://github.com/ClickHouse/ClickHouse/pull/29476) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Fix possible `Block structure mismatch` for subqueries with pushed-down `HAVING` predicate. Fixes [#29010](https://github.com/ClickHouse/ClickHouse/issues/29010). [#29475](https://github.com/ClickHouse/ClickHouse/pull/29475) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* Fix Logical error `Cannot capture columns` in functions greatest/least. Closes [#29334](https://github.com/ClickHouse/ClickHouse/issues/29334). [#29454](https://github.com/ClickHouse/ClickHouse/pull/29454) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* RocksDB table engine: fix race condition during multiple DB opening (and get back some tests that triggers the problem on CI). [#29393](https://github.com/ClickHouse/ClickHouse/pull/29393) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix replicated access storage not shutting down cleanly when misconfigured. [#29388](https://github.com/ClickHouse/ClickHouse/pull/29388) ([Kevin Michel](https://github.com/kmichel-aiven)).
|
||||||
|
* Remove window function `nth_value` as it is not memory-safe. This closes [#29347](https://github.com/ClickHouse/ClickHouse/issues/29347). [#29348](https://github.com/ClickHouse/ClickHouse/pull/29348) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix vertical merges of projection parts. This fixes [#29253](https://github.com/ClickHouse/ClickHouse/issues/29253) . This PR also fixes several projection merge/mutation issues introduced in https://github.com/ClickHouse/ClickHouse/pull/25165. [#29337](https://github.com/ClickHouse/ClickHouse/pull/29337) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fix hanging DDL queries on Replicated database while adding a new replica. [#29328](https://github.com/ClickHouse/ClickHouse/pull/29328) ([Kevin Michel](https://github.com/kmichel-aiven)).
|
||||||
|
* Fix connection timeouts (`send_timeout`/`receive_timeout`). [#29282](https://github.com/ClickHouse/ClickHouse/pull/29282) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix possible `Table columns structure in ZooKeeper is different from local table structure` exception while recreating or creating new replicas of `ReplicatedMergeTree`, when one of table columns have default expressions with case-insensitive functions. [#29266](https://github.com/ClickHouse/ClickHouse/pull/29266) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Send normal `Database doesn't exist error` (`UNKNOWN_DATABASE`) to the client (via TCP) instead of `Attempt to read after eof` (`ATTEMPT_TO_READ_AFTER_EOF`). [#29229](https://github.com/ClickHouse/ClickHouse/pull/29229) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix segfault while inserting into column with type LowCardinality(Nullable) in Avro input format. [#29132](https://github.com/ClickHouse/ClickHouse/pull/29132) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Do not allow to reuse previous credentials in case of inter-server secret (Before INSERT via Buffer/Kafka to Distributed table with interserver secret configured for that cluster, may re-use previously set user for that connection). [#29060](https://github.com/ClickHouse/ClickHouse/pull/29060) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Handle `any_join_distinct_right_table_keys` when join with dictionary, close [#29007](https://github.com/ClickHouse/ClickHouse/issues/29007). [#29014](https://github.com/ClickHouse/ClickHouse/pull/29014) ([Vladimir C](https://github.com/vdimir)).
|
||||||
|
* Fix "Not found column ... in block" error, when join on alias column, close [#26980](https://github.com/ClickHouse/ClickHouse/issues/26980). [#29008](https://github.com/ClickHouse/ClickHouse/pull/29008) ([Vladimir C](https://github.com/vdimir)).
|
||||||
|
* Fix the number of threads used in `GLOBAL IN` subquery (it was executed in single threads since [#19414](https://github.com/ClickHouse/ClickHouse/issues/19414) bugfix). [#28997](https://github.com/ClickHouse/ClickHouse/pull/28997) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||||
|
* Fix bad optimizations of ORDER BY if it contains WITH FILL. This closes [#28908](https://github.com/ClickHouse/ClickHouse/issues/28908). This closes [#26049](https://github.com/ClickHouse/ClickHouse/issues/26049). [#28910](https://github.com/ClickHouse/ClickHouse/pull/28910) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||||
|
* Fix higher-order array functions (`SIGSEGV` for `arrayCompact`/`ILLEGAL_COLUMN` for `arrayDifference`/`arrayCumSumNonNegative`) with consts. [#28904](https://github.com/ClickHouse/ClickHouse/pull/28904) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix waiting for mutation with `mutations_sync=2`. [#28889](https://github.com/ClickHouse/ClickHouse/pull/28889) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix queries to external databases (i.e. MySQL) with multiple columns in IN ( i.e. `(k,v) IN ((1, 2))` ). [#28888](https://github.com/ClickHouse/ClickHouse/pull/28888) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix bug with `LowCardinality` in short-curcuit function evaluation. Closes [#28884](https://github.com/ClickHouse/ClickHouse/issues/28884). [#28887](https://github.com/ClickHouse/ClickHouse/pull/28887) ([Kruglov Pavel](https://github.com/Avogar)).
|
||||||
|
* Fix reading of subcolumns from compact parts. [#28873](https://github.com/ClickHouse/ClickHouse/pull/28873) ([Anton Popov](https://github.com/CurtizJ)).
|
||||||
|
* Fixed a race condition between `DROP PART` and `REPLACE/MOVE PARTITION` that might cause replicas to diverge in rare cases. [#28864](https://github.com/ClickHouse/ClickHouse/pull/28864) ([tavplubix](https://github.com/tavplubix)).
|
||||||
|
* Fix expressions compilation with short circuit evaluation. [#28821](https://github.com/ClickHouse/ClickHouse/pull/28821) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
* Fix extremely rare case when ReplicatedMergeTree replicas can diverge after hard reboot of all replicas. The error looks like `Part ... intersects (previous|next) part ...`. [#28817](https://github.com/ClickHouse/ClickHouse/pull/28817) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Better check for connection usability and also catch any exception in `RabbitMQ` shutdown just in case. [#28797](https://github.com/ClickHouse/ClickHouse/pull/28797) ([Kseniia Sumarokova](https://github.com/kssenii)).
|
||||||
|
* Fix benign race condition in ReplicatedMergeTreeQueue. Shouldn't be visible for user, but can lead to subtle bugs. [#28734](https://github.com/ClickHouse/ClickHouse/pull/28734) ([alesapin](https://github.com/alesapin)).
|
||||||
|
* Fix possible crash for `SELECT` with partially created aggregate projection in case of exception. [#28700](https://github.com/ClickHouse/ClickHouse/pull/28700) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fix the coredump in the creation of distributed tables, when the parameters passed in are wrong. [#28686](https://github.com/ClickHouse/ClickHouse/pull/28686) ([Zhiyong Wang](https://github.com/ljcui)).
|
||||||
|
* Add Settings.Names, Settings.Values aliases for system.processes table. [#28685](https://github.com/ClickHouse/ClickHouse/pull/28685) ([Vitaly](https://github.com/orloffv)).
|
||||||
|
* Support for S2 Geometry library: Fix the number of arguments required by `s2RectAdd` and `s2RectContains` functions. [#28663](https://github.com/ClickHouse/ClickHouse/pull/28663) ([Bharat Nallan](https://github.com/bharatnc)).
|
||||||
|
* Fix invalid constant type conversion when Nullable or LowCardinality primary key is used. [#28636](https://github.com/ClickHouse/ClickHouse/pull/28636) ([Amos Bird](https://github.com/amosbird)).
|
||||||
|
* Fix "Column is not under aggregate function and not in GROUP BY" with PREWHERE (Fixes: [#28461](https://github.com/ClickHouse/ClickHouse/issues/28461)). [#28502](https://github.com/ClickHouse/ClickHouse/pull/28502) ([Azat Khuzhin](https://github.com/azat)).
|
||||||
|
|
||||||
|
|
||||||
### ClickHouse release v21.10, 2021-10-16
|
### ClickHouse release v21.10, 2021-10-16
|
||||||
|
|
||||||
#### Backward Incompatible Change
|
#### Backward Incompatible Change
|
||||||
|
103
CMakeLists.txt
103
CMakeLists.txt
@ -169,9 +169,7 @@ endif ()
|
|||||||
include (cmake/check_flags.cmake)
|
include (cmake/check_flags.cmake)
|
||||||
include (cmake/add_warning.cmake)
|
include (cmake/add_warning.cmake)
|
||||||
|
|
||||||
if (NOT MSVC)
|
set (COMMON_WARNING_FLAGS "${COMMON_WARNING_FLAGS} -Wall") # -Werror and many more is also added inside cmake/warnings.cmake
|
||||||
set (COMMON_WARNING_FLAGS "${COMMON_WARNING_FLAGS} -Wall") # -Werror and many more is also added inside cmake/warnings.cmake
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (COMPILER_CLANG)
|
if (COMPILER_CLANG)
|
||||||
# clang: warning: argument unused during compilation: '-specs=/usr/share/dpkg/no-pie-compile.specs' [-Wunused-command-line-argument]
|
# clang: warning: argument unused during compilation: '-specs=/usr/share/dpkg/no-pie-compile.specs' [-Wunused-command-line-argument]
|
||||||
@ -201,7 +199,7 @@ endif ()
|
|||||||
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)
|
||||||
|
|
||||||
if (OS_LINUX AND (ARCH_AMD64 OR ARCH_AARCH64) AND NOT UNBUNDLED AND MAKE_STATIC_LIBRARIES AND NOT SPLIT_SHARED_LIBRARIES AND NOT USE_MUSL)
|
if (OS_LINUX AND (ARCH_AMD64 OR ARCH_AARCH64) AND MAKE_STATIC_LIBRARIES AND NOT SPLIT_SHARED_LIBRARIES AND NOT USE_MUSL)
|
||||||
# Only for Linux, x86_64 or aarch64.
|
# Only for Linux, x86_64 or aarch64.
|
||||||
option(GLIBC_COMPATIBILITY "Enable compatibility with older glibc libraries." ON)
|
option(GLIBC_COMPATIBILITY "Enable compatibility with older glibc libraries." ON)
|
||||||
elseif(GLIBC_COMPATIBILITY)
|
elseif(GLIBC_COMPATIBILITY)
|
||||||
@ -219,30 +217,6 @@ endif()
|
|||||||
# Make sure the final executable has symbols exported
|
# Make sure the final executable has symbols exported
|
||||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
|
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
|
||||||
|
|
||||||
find_program (OBJCOPY_PATH NAMES "llvm-objcopy" "llvm-objcopy-13" "llvm-objcopy-12" "llvm-objcopy-11" "llvm-objcopy-10" "llvm-objcopy-9" "llvm-objcopy-8" "objcopy")
|
|
||||||
|
|
||||||
if (NOT OBJCOPY_PATH AND OS_DARWIN)
|
|
||||||
find_program (BREW_PATH NAMES "brew")
|
|
||||||
if (BREW_PATH)
|
|
||||||
execute_process (COMMAND ${BREW_PATH} --prefix llvm ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE LLVM_PREFIX)
|
|
||||||
if (LLVM_PREFIX)
|
|
||||||
find_program (OBJCOPY_PATH NAMES "llvm-objcopy" PATHS "${LLVM_PREFIX}/bin" NO_DEFAULT_PATH)
|
|
||||||
endif ()
|
|
||||||
if (NOT OBJCOPY_PATH)
|
|
||||||
execute_process (COMMAND ${BREW_PATH} --prefix binutils ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE BINUTILS_PREFIX)
|
|
||||||
if (BINUTILS_PREFIX)
|
|
||||||
find_program (OBJCOPY_PATH NAMES "objcopy" PATHS "${BINUTILS_PREFIX}/bin" NO_DEFAULT_PATH)
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (OBJCOPY_PATH)
|
|
||||||
message (STATUS "Using objcopy: ${OBJCOPY_PATH}")
|
|
||||||
else ()
|
|
||||||
message (FATAL_ERROR "Cannot find objcopy.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (OS_DARWIN)
|
if (OS_DARWIN)
|
||||||
# The `-all_load` flag forces loading of all symbols from all libraries,
|
# The `-all_load` flag forces loading of all symbols from all libraries,
|
||||||
# and leads to multiply-defined symbols. This flag allows force loading
|
# and leads to multiply-defined symbols. This flag allows force loading
|
||||||
@ -278,6 +252,13 @@ if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE")
|
|||||||
endif ()
|
endif ()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG")
|
||||||
|
set(USE_DEBUG_HELPERS ON)
|
||||||
|
else ()
|
||||||
|
set(USE_DEBUG_HELPERS ON)
|
||||||
|
endif()
|
||||||
|
option(USE_DEBUG_HELPERS "Enable debug helpers" ${USE_DEBUG_HELPERS})
|
||||||
|
|
||||||
# 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$")
|
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.
|
||||||
@ -312,6 +293,10 @@ include(cmake/cpu_features.cmake)
|
|||||||
# Enable it explicitly.
|
# Enable it explicitly.
|
||||||
set (COMPILER_FLAGS "${COMPILER_FLAGS} -fasynchronous-unwind-tables")
|
set (COMPILER_FLAGS "${COMPILER_FLAGS} -fasynchronous-unwind-tables")
|
||||||
|
|
||||||
|
# Reproducible builds
|
||||||
|
set (COMPILER_FLAGS "${COMPILER_FLAGS} -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
|
||||||
|
set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
|
||||||
|
|
||||||
if (${CMAKE_VERSION} VERSION_LESS "3.12.4")
|
if (${CMAKE_VERSION} VERSION_LESS "3.12.4")
|
||||||
# CMake < 3.12 doesn't support setting 20 as a C++ standard version.
|
# CMake < 3.12 doesn't support setting 20 as a C++ standard version.
|
||||||
# We will add C++ standard controlling flag in CMAKE_CXX_FLAGS manually for now.
|
# We will add C++ standard controlling flag in CMAKE_CXX_FLAGS manually for now.
|
||||||
@ -392,6 +377,8 @@ if (COMPILER_CLANG)
|
|||||||
option(ENABLE_THINLTO "Clang-specific link time optimization" ON)
|
option(ENABLE_THINLTO "Clang-specific link time optimization" ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstrict-vtable-pointers")
|
||||||
|
|
||||||
# Set new experimental pass manager, it's a performance, build time and binary size win.
|
# Set new experimental pass manager, it's a performance, build time and binary size win.
|
||||||
# Can be removed after https://reviews.llvm.org/D66490 merged and released to at least two versions of clang.
|
# Can be removed after https://reviews.llvm.org/D66490 merged and released to at least two versions of clang.
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-new-pass-manager")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexperimental-new-pass-manager")
|
||||||
@ -402,32 +389,13 @@ if (COMPILER_CLANG)
|
|||||||
# completely.
|
# completely.
|
||||||
if (ENABLE_THINLTO AND NOT ENABLE_TESTS AND NOT SANITIZE)
|
if (ENABLE_THINLTO AND NOT ENABLE_TESTS AND NOT SANITIZE)
|
||||||
# Link time optimization
|
# Link time optimization
|
||||||
set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -flto=thin")
|
set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -flto=thin -fwhole-program-vtables")
|
||||||
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -flto=thin")
|
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -flto=thin -fwhole-program-vtables")
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} -flto=thin")
|
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} -flto=thin -fwhole-program-vtables")
|
||||||
elseif (ENABLE_THINLTO)
|
elseif (ENABLE_THINLTO)
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable ThinLTO")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable ThinLTO")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# Always prefer llvm tools when using clang. For instance, we cannot use GNU ar when llvm LTO is enabled
|
|
||||||
find_program (LLVM_AR_PATH NAMES "llvm-ar" "llvm-ar-13" "llvm-ar-12" "llvm-ar-11" "llvm-ar-10" "llvm-ar-9" "llvm-ar-8")
|
|
||||||
|
|
||||||
if (LLVM_AR_PATH)
|
|
||||||
message(STATUS "Using llvm-ar: ${LLVM_AR_PATH}.")
|
|
||||||
set (CMAKE_AR ${LLVM_AR_PATH})
|
|
||||||
else ()
|
|
||||||
message(WARNING "Cannot find llvm-ar. System ar will be used instead. It does not work with ThinLTO.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib" "llvm-ranlib-13" "llvm-ranlib-12" "llvm-ranlib-11" "llvm-ranlib-10" "llvm-ranlib-9" "llvm-ranlib-8")
|
|
||||||
|
|
||||||
if (LLVM_RANLIB_PATH)
|
|
||||||
message(STATUS "Using llvm-ranlib: ${LLVM_RANLIB_PATH}.")
|
|
||||||
set (CMAKE_RANLIB ${LLVM_RANLIB_PATH})
|
|
||||||
else ()
|
|
||||||
message(WARNING "Cannot find llvm-ranlib. System ranlib will be used instead. It does not work with ThinLTO.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
elseif (ENABLE_THINLTO)
|
elseif (ENABLE_THINLTO)
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "ThinLTO is only available with CLang")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "ThinLTO is only available with CLang")
|
||||||
endif ()
|
endif ()
|
||||||
@ -435,20 +403,7 @@ endif ()
|
|||||||
# Turns on all external libs like s3, kafka, ODBC, ...
|
# Turns on all external libs like s3, kafka, ODBC, ...
|
||||||
option(ENABLE_LIBRARIES "Enable all external libraries by default" ON)
|
option(ENABLE_LIBRARIES "Enable all external libraries by default" ON)
|
||||||
|
|
||||||
# We recommend avoiding this mode for production builds because we can't guarantee
|
if (NOT (OS_LINUX OR OS_DARWIN))
|
||||||
# all needed libraries exist in your system.
|
|
||||||
# This mode exists for enthusiastic developers who are searching for trouble.
|
|
||||||
# The whole idea of using unknown version of libraries from the OS distribution is deeply flawed.
|
|
||||||
# Useful for maintainers of OS packages.
|
|
||||||
option (UNBUNDLED "Use system libraries instead of ones in contrib/" OFF)
|
|
||||||
|
|
||||||
if (UNBUNDLED)
|
|
||||||
set(NOT_UNBUNDLED OFF)
|
|
||||||
else ()
|
|
||||||
set(NOT_UNBUNDLED ON)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (UNBUNDLED OR NOT (OS_LINUX OR OS_DARWIN))
|
|
||||||
# Using system libs can cause a lot of warnings in includes (on macro expansion).
|
# Using system libs can cause a lot of warnings in includes (on macro expansion).
|
||||||
option(WERROR "Enable -Werror compiler option" OFF)
|
option(WERROR "Enable -Werror compiler option" OFF)
|
||||||
else ()
|
else ()
|
||||||
@ -494,19 +449,6 @@ else ()
|
|||||||
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# https://github.com/include-what-you-use/include-what-you-use
|
|
||||||
option (USE_INCLUDE_WHAT_YOU_USE "Automatically reduce unneeded includes in source code (external tool)" OFF)
|
|
||||||
|
|
||||||
if (USE_INCLUDE_WHAT_YOU_USE)
|
|
||||||
find_program(IWYU_PATH NAMES include-what-you-use iwyu)
|
|
||||||
if (NOT IWYU_PATH)
|
|
||||||
message(FATAL_ERROR "Could not find the program include-what-you-use")
|
|
||||||
endif()
|
|
||||||
if (${CMAKE_VERSION} VERSION_LESS "3.3.0")
|
|
||||||
message(FATAL_ERROR "include-what-you-use requires CMake version at least 3.3.")
|
|
||||||
endif()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (ENABLE_TESTS)
|
if (ENABLE_TESTS)
|
||||||
message (STATUS "Unit tests are enabled")
|
message (STATUS "Unit tests are enabled")
|
||||||
else()
|
else()
|
||||||
@ -527,7 +469,6 @@ message (STATUS
|
|||||||
USE_STATIC_LIBRARIES=${USE_STATIC_LIBRARIES}
|
USE_STATIC_LIBRARIES=${USE_STATIC_LIBRARIES}
|
||||||
MAKE_STATIC_LIBRARIES=${MAKE_STATIC_LIBRARIES}
|
MAKE_STATIC_LIBRARIES=${MAKE_STATIC_LIBRARIES}
|
||||||
SPLIT_SHARED=${SPLIT_SHARED_LIBRARIES}
|
SPLIT_SHARED=${SPLIT_SHARED_LIBRARIES}
|
||||||
UNBUNDLED=${UNBUNDLED}
|
|
||||||
CCACHE=${CCACHE_FOUND} ${CCACHE_VERSION}")
|
CCACHE=${CCACHE_FOUND} ${CCACHE_VERSION}")
|
||||||
|
|
||||||
include (GNUInstallDirs)
|
include (GNUInstallDirs)
|
||||||
@ -590,7 +531,6 @@ include (cmake/find/avro.cmake)
|
|||||||
include (cmake/find/msgpack.cmake)
|
include (cmake/find/msgpack.cmake)
|
||||||
include (cmake/find/cassandra.cmake)
|
include (cmake/find/cassandra.cmake)
|
||||||
include (cmake/find/sentry.cmake)
|
include (cmake/find/sentry.cmake)
|
||||||
include (cmake/find/stats.cmake)
|
|
||||||
include (cmake/find/datasketches.cmake)
|
include (cmake/find/datasketches.cmake)
|
||||||
include (cmake/find/libprotobuf-mutator.cmake)
|
include (cmake/find/libprotobuf-mutator.cmake)
|
||||||
|
|
||||||
@ -608,8 +548,6 @@ include (cmake/find/mysqlclient.cmake)
|
|||||||
|
|
||||||
# When testing for memory leaks with Valgrind, don't link tcmalloc or jemalloc.
|
# When testing for memory leaks with Valgrind, don't link tcmalloc or jemalloc.
|
||||||
|
|
||||||
include (cmake/print_flags.cmake)
|
|
||||||
|
|
||||||
if (TARGET global-group)
|
if (TARGET global-group)
|
||||||
install (EXPORT global DESTINATION cmake)
|
install (EXPORT global DESTINATION cmake)
|
||||||
endif ()
|
endif ()
|
||||||
@ -624,7 +562,7 @@ macro (add_executable target)
|
|||||||
# invoke built-in add_executable
|
# invoke built-in add_executable
|
||||||
# explicitly acquire and interpose malloc symbols by clickhouse_malloc
|
# explicitly acquire and interpose malloc symbols by clickhouse_malloc
|
||||||
# if GLIBC_COMPATIBILITY is ON and ENABLE_THINLTO is on than provide memcpy symbol explicitly to neutrialize thinlto's libcall generation.
|
# if GLIBC_COMPATIBILITY is ON and ENABLE_THINLTO is on than provide memcpy symbol explicitly to neutrialize thinlto's libcall generation.
|
||||||
if (GLIBC_COMPATIBILITY AND ENABLE_THINLTO)
|
if (ARCH_AMD64 AND GLIBC_COMPATIBILITY AND ENABLE_THINLTO)
|
||||||
_add_executable (${ARGV} $<TARGET_OBJECTS:clickhouse_malloc> $<TARGET_OBJECTS:memcpy>)
|
_add_executable (${ARGV} $<TARGET_OBJECTS:clickhouse_malloc> $<TARGET_OBJECTS:memcpy>)
|
||||||
else ()
|
else ()
|
||||||
_add_executable (${ARGV} $<TARGET_OBJECTS:clickhouse_malloc>)
|
_add_executable (${ARGV} $<TARGET_OBJECTS:clickhouse_malloc>)
|
||||||
@ -661,6 +599,7 @@ include_directories(${ConfigIncludePath})
|
|||||||
|
|
||||||
# Add as many warnings as possible for our own code.
|
# Add as many warnings as possible for our own code.
|
||||||
include (cmake/warnings.cmake)
|
include (cmake/warnings.cmake)
|
||||||
|
include (cmake/print_flags.cmake)
|
||||||
|
|
||||||
add_subdirectory (base)
|
add_subdirectory (base)
|
||||||
add_subdirectory (src)
|
add_subdirectory (src)
|
||||||
|
@ -18,3 +18,26 @@ if (NOT DEFINED ENV{CLION_IDE} AND NOT DEFINED ENV{XCODE_IDE})
|
|||||||
set(CMAKE_GENERATOR "Ninja" CACHE INTERNAL "" FORCE)
|
set(CMAKE_GENERATOR "Ninja" CACHE INTERNAL "" FORCE)
|
||||||
endif ()
|
endif ()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# Default toolchain - this is needed to avoid dependency on OS files.
|
||||||
|
execute_process(COMMAND uname -s OUTPUT_VARIABLE OS)
|
||||||
|
execute_process(COMMAND uname -m OUTPUT_VARIABLE ARCH)
|
||||||
|
|
||||||
|
if (OS MATCHES "Linux"
|
||||||
|
AND NOT DEFINED CMAKE_TOOLCHAIN_FILE
|
||||||
|
AND NOT DISABLE_HERMETIC_BUILD
|
||||||
|
AND ($ENV{CC} MATCHES ".*clang.*" OR CMAKE_C_COMPILER MATCHES ".*clang.*")
|
||||||
|
AND (USE_STATIC_LIBRARIES OR NOT DEFINED USE_STATIC_LIBRARIES))
|
||||||
|
|
||||||
|
if (ARCH MATCHES "amd64|x86_64")
|
||||||
|
set (CMAKE_TOOLCHAIN_FILE "cmake/linux/toolchain-x86_64.cmake" CACHE INTERNAL "" FORCE)
|
||||||
|
elseif (ARCH MATCHES "^(aarch64.*|AARCH64.*|arm64.*|ARM64.*)")
|
||||||
|
set (CMAKE_TOOLCHAIN_FILE "cmake/linux/toolchain-aarch64.cmake" CACHE INTERNAL "" FORCE)
|
||||||
|
elseif (ARCH MATCHES "^(ppc64le.*|PPC64LE.*)")
|
||||||
|
set (CMAKE_TOOLCHAIN_FILE "cmake/linux/toolchain-ppc64le.cmake" CACHE INTERNAL "" FORCE)
|
||||||
|
else ()
|
||||||
|
message (FATAL_ERROR "Unsupported architecture: ${ARCH}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
endif()
|
||||||
|
@ -19,9 +19,11 @@ The following versions of ClickHouse server are currently being supported with s
|
|||||||
| 21.4 | :x: |
|
| 21.4 | :x: |
|
||||||
| 21.5 | :x: |
|
| 21.5 | :x: |
|
||||||
| 21.6 | :x: |
|
| 21.6 | :x: |
|
||||||
| 21.7 | ✅ |
|
| 21.7 | :x: |
|
||||||
| 21.8 | ✅ |
|
| 21.8 | ✅ |
|
||||||
| 21.9 | ✅ |
|
| 21.9 | ✅ |
|
||||||
|
| 21.10 | ✅ |
|
||||||
|
| 21.11 | ✅ |
|
||||||
|
|
||||||
## Reporting a Vulnerability
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
@ -29,7 +29,8 @@ elseif (ENABLE_READLINE)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_DEBUG_HELPERS)
|
if (USE_DEBUG_HELPERS)
|
||||||
set (INCLUDE_DEBUG_HELPERS "-include \"${ClickHouse_SOURCE_DIR}/base/base/iostream_debug_helpers.h\"")
|
get_target_property(MAGIC_ENUM_INCLUDE_DIR magic_enum INTERFACE_INCLUDE_DIRECTORIES)
|
||||||
|
set (INCLUDE_DEBUG_HELPERS "-I\"${MAGIC_ENUM_INCLUDE_DIR}\" -include \"${ClickHouse_SOURCE_DIR}/base/base/iostream_debug_helpers.h\"")
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${INCLUDE_DEBUG_HELPERS}")
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${INCLUDE_DEBUG_HELPERS}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@ struct CachedFn
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
using Traits = FnTraits<decltype(Func)>;
|
using Traits = FnTraits<decltype(Func)>;
|
||||||
using DecayedArgs = TLMap<std::decay_t, typename Traits::Args>;
|
using DecayedArgs = TypeListMap<std::decay_t, typename Traits::Args>;
|
||||||
using Key = TLChangeRoot<std::tuple, DecayedArgs>;
|
using Key = TypeListChangeRoot<std::tuple, DecayedArgs>;
|
||||||
using Result = typename Traits::Ret;
|
using Result = typename Traits::Ret;
|
||||||
|
|
||||||
std::map<Key, Result> cache; // Can't use hashmap as tuples are unhashable by default
|
std::map<Key, Result> cache; // Can't use hashmap as tuples are unhashable by default
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Typelist.h"
|
#include "TypeList.h"
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
@ -14,7 +14,7 @@ struct FnTraits<R(A...)>
|
|||||||
static constexpr bool value = std::is_invocable_r_v<R, F, A...>;
|
static constexpr bool value = std::is_invocable_r_v<R, F, A...>;
|
||||||
|
|
||||||
using Ret = R;
|
using Ret = R;
|
||||||
using Args = Typelist<A...>;
|
using Args = TypeList<A...>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class R, class ...A>
|
template <class R, class ...A>
|
||||||
|
@ -108,6 +108,11 @@ public:
|
|||||||
LocalDate toDate() const { return LocalDate(m_year, m_month, m_day); }
|
LocalDate toDate() const { return LocalDate(m_year, m_month, m_day); }
|
||||||
LocalDateTime toStartOfDate() const { return LocalDateTime(m_year, m_month, m_day, 0, 0, 0); }
|
LocalDateTime toStartOfDate() const { return LocalDateTime(m_year, m_month, m_day, 0, 0, 0); }
|
||||||
|
|
||||||
|
time_t to_time_t(const DateLUTImpl & time_zone = DateLUT::instance()) const
|
||||||
|
{
|
||||||
|
return time_zone.makeDateTime(m_year, m_month, m_day, m_hour, m_minute, m_second);
|
||||||
|
}
|
||||||
|
|
||||||
std::string toString() const
|
std::string toString() const
|
||||||
{
|
{
|
||||||
std::string s{"0000-00-00 00:00:00"};
|
std::string s{"0000-00-00 00:00:00"};
|
||||||
|
@ -25,6 +25,16 @@ void trim(String & s)
|
|||||||
s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !std::isspace(ch); }).base(), s.end());
|
s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !std::isspace(ch); }).base(), s.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string getEditor()
|
||||||
|
{
|
||||||
|
const char * editor = std::getenv("EDITOR");
|
||||||
|
|
||||||
|
if (!editor || !*editor)
|
||||||
|
editor = "vim";
|
||||||
|
|
||||||
|
return editor;
|
||||||
|
}
|
||||||
|
|
||||||
/// Copied from replxx::src/util.cxx::now_ms_str() under the terms of 3-clause BSD license of Replxx.
|
/// Copied from replxx::src/util.cxx::now_ms_str() under the terms of 3-clause BSD license of Replxx.
|
||||||
/// Copyright (c) 2017-2018, Marcin Konarski (amok at codestation.org)
|
/// Copyright (c) 2017-2018, Marcin Konarski (amok at codestation.org)
|
||||||
/// Copyright (c) 2010, Salvatore Sanfilippo (antirez at gmail dot com)
|
/// Copyright (c) 2010, Salvatore Sanfilippo (antirez at gmail dot com)
|
||||||
@ -123,6 +133,7 @@ ReplxxLineReader::ReplxxLineReader(
|
|||||||
Patterns delimiters_,
|
Patterns delimiters_,
|
||||||
replxx::Replxx::highlighter_callback_t highlighter_)
|
replxx::Replxx::highlighter_callback_t highlighter_)
|
||||||
: LineReader(history_file_path_, multiline_, std::move(extenders_), std::move(delimiters_)), highlighter(std::move(highlighter_))
|
: LineReader(history_file_path_, multiline_, std::move(extenders_), std::move(delimiters_)), highlighter(std::move(highlighter_))
|
||||||
|
, editor(getEditor())
|
||||||
{
|
{
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
using Replxx = replxx::Replxx;
|
using Replxx = replxx::Replxx;
|
||||||
@ -236,14 +247,13 @@ void ReplxxLineReader::addToHistory(const String & line)
|
|||||||
rx.print("Unlock of history file failed: %s\n", errnoToString(errno).c_str());
|
rx.print("Unlock of history file failed: %s\n", errnoToString(errno).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
int ReplxxLineReader::execute(const std::string & command)
|
/// See comments in ShellCommand::executeImpl()
|
||||||
|
/// (for the vfork via dlsym())
|
||||||
|
int ReplxxLineReader::executeEditor(const std::string & path)
|
||||||
{
|
{
|
||||||
std::vector<char> argv0("sh", &("sh"[3]));
|
std::vector<char> argv0(editor.data(), editor.data() + editor.size() + 1);
|
||||||
std::vector<char> argv1("-c", &("-c"[3]));
|
std::vector<char> argv1(path.data(), path.data() + path.size() + 1);
|
||||||
std::vector<char> argv2(command.data(), command.data() + command.size() + 1);
|
char * const argv[] = {argv0.data(), argv1.data(), nullptr};
|
||||||
|
|
||||||
const char * filename = "/bin/sh";
|
|
||||||
char * const argv[] = {argv0.data(), argv1.data(), argv2.data(), nullptr};
|
|
||||||
|
|
||||||
static void * real_vfork = dlsym(RTLD_DEFAULT, "vfork");
|
static void * real_vfork = dlsym(RTLD_DEFAULT, "vfork");
|
||||||
if (!real_vfork)
|
if (!real_vfork)
|
||||||
@ -260,6 +270,7 @@ int ReplxxLineReader::execute(const std::string & command)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Child
|
||||||
if (0 == pid)
|
if (0 == pid)
|
||||||
{
|
{
|
||||||
sigset_t mask;
|
sigset_t mask;
|
||||||
@ -267,16 +278,26 @@ int ReplxxLineReader::execute(const std::string & command)
|
|||||||
sigprocmask(0, nullptr, &mask);
|
sigprocmask(0, nullptr, &mask);
|
||||||
sigprocmask(SIG_UNBLOCK, &mask, nullptr);
|
sigprocmask(SIG_UNBLOCK, &mask, nullptr);
|
||||||
|
|
||||||
execv(filename, argv);
|
execvp(editor.c_str(), argv);
|
||||||
|
rx.print("Cannot execute %s: %s\n", editor.c_str(), errnoToString(errno).c_str());
|
||||||
_exit(-1);
|
_exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int status = 0;
|
int status = 0;
|
||||||
if (-1 == waitpid(pid, &status, 0))
|
do
|
||||||
{
|
{
|
||||||
rx.print("Cannot waitpid: %s\n", errnoToString(errno).c_str());
|
int exited_pid = waitpid(pid, &status, 0);
|
||||||
return -1;
|
if (exited_pid == -1)
|
||||||
}
|
{
|
||||||
|
if (errno == EINTR)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
rx.print("Cannot waitpid: %s\n", errnoToString(errno).c_str());
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
} while (true);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -290,10 +311,6 @@ void ReplxxLineReader::openEditor()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * editor = std::getenv("EDITOR");
|
|
||||||
if (!editor || !*editor)
|
|
||||||
editor = "vim";
|
|
||||||
|
|
||||||
replxx::Replxx::State state(rx.get_state());
|
replxx::Replxx::State state(rx.get_state());
|
||||||
|
|
||||||
size_t bytes_written = 0;
|
size_t bytes_written = 0;
|
||||||
@ -316,7 +333,7 @@ void ReplxxLineReader::openEditor()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == execute(fmt::format("{} {}", editor, filename)))
|
if (0 == executeEditor(filename))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
InputStatus readOneLine(const String & prompt) override;
|
InputStatus readOneLine(const String & prompt) override;
|
||||||
void addToHistory(const String & line) override;
|
void addToHistory(const String & line) override;
|
||||||
int execute(const std::string & command);
|
int executeEditor(const std::string & path);
|
||||||
void openEditor();
|
void openEditor();
|
||||||
|
|
||||||
replxx::Replxx rx;
|
replxx::Replxx rx;
|
||||||
@ -31,4 +31,6 @@ private:
|
|||||||
// used to call flock() to synchronize multiple clients using same history file
|
// used to call flock() to synchronize multiple clients using same history file
|
||||||
int history_file_fd = -1;
|
int history_file_fd = -1;
|
||||||
bool bracketed_paste_enabled = false;
|
bool bracketed_paste_enabled = false;
|
||||||
|
|
||||||
|
std::string editor;
|
||||||
};
|
};
|
||||||
|
44
base/base/TypeList.h
Normal file
44
base/base/TypeList.h
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
|
#include "defines.h"
|
||||||
|
#include "TypePair.h"
|
||||||
|
|
||||||
|
/// General-purpose typelist. Easy on compilation times as it does not use recursion.
|
||||||
|
template <typename ...Args>
|
||||||
|
struct TypeList { static constexpr size_t size = sizeof...(Args); };
|
||||||
|
|
||||||
|
namespace TypeListUtils /// In some contexts it's more handy to use functions instead of aliases
|
||||||
|
{
|
||||||
|
template <typename ...LArgs, typename ...RArgs>
|
||||||
|
constexpr TypeList<LArgs..., RArgs...> concat(TypeList<LArgs...>, TypeList<RArgs...>) { return {}; }
|
||||||
|
|
||||||
|
template <typename T, typename ...Args>
|
||||||
|
constexpr TypeList<T, Args...> prepend(TypeList<Args...>) { return {}; }
|
||||||
|
|
||||||
|
template <typename T, typename ...Args>
|
||||||
|
constexpr TypeList<Args..., T> append(TypeList<Args...>) { return {}; }
|
||||||
|
|
||||||
|
template <template <typename> typename F, typename ...Args>
|
||||||
|
constexpr TypeList<F<Args>...> map(TypeList<Args...>) { return {}; }
|
||||||
|
|
||||||
|
template <template <typename...> typename Root, typename ...Args>
|
||||||
|
constexpr Root<Args...> changeRoot(TypeList<Args...>) { return {}; }
|
||||||
|
|
||||||
|
template <typename F, typename ...Args>
|
||||||
|
constexpr void forEach(TypeList<Args...>, F && f) { (std::forward<F>(f)(Id<Args>{}), ...); }
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename TypeListLeft, typename TypeListRight>
|
||||||
|
using TypeListConcat = decltype(TypeListUtils::concat(TypeListLeft{}, TypeListRight{}));
|
||||||
|
|
||||||
|
template <typename T, typename List> using TypeListPrepend = decltype(TypeListUtils::prepend<T>(List{}));
|
||||||
|
template <typename T, typename List> using TypeListAppend = decltype(TypeListUtils::append<T>(List{}));
|
||||||
|
|
||||||
|
template <template <typename> typename F, typename List>
|
||||||
|
using TypeListMap = decltype(TypeListUtils::map<F>(List{}));
|
||||||
|
|
||||||
|
template <template <typename...> typename Root, typename List>
|
||||||
|
using TypeListChangeRoot = decltype(TypeListUtils::changeRoot<Root>(List{}));
|
21
base/base/TypeLists.h
Normal file
21
base/base/TypeLists.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "TypeList.h"
|
||||||
|
#include "extended_types.h"
|
||||||
|
#include "Decimal.h"
|
||||||
|
#include "UUID.h"
|
||||||
|
|
||||||
|
namespace DB
|
||||||
|
{
|
||||||
|
|
||||||
|
using TypeListNativeInt = TypeList<UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64>;
|
||||||
|
using TypeListFloat = TypeList<Float32, Float64>;
|
||||||
|
using TypeListNativeNumber = TypeListConcat<TypeListNativeInt, TypeListFloat>;
|
||||||
|
using TypeListWideInt = TypeList<UInt128, Int128, UInt256, Int256>;
|
||||||
|
using TypeListInt = TypeListConcat<TypeListNativeInt, TypeListWideInt>;
|
||||||
|
using TypeListIntAndFloat = TypeListConcat<TypeListInt, TypeListFloat>;
|
||||||
|
using TypeListDecimal = TypeList<Decimal32, Decimal64, Decimal128, Decimal256>;
|
||||||
|
using TypeListNumber = TypeListConcat<TypeListIntAndFloat, TypeListDecimal>;
|
||||||
|
using TypeListNumberWithUUID = TypeListAppend<UUID, TypeListNumber>;
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
template <class T, class V> struct TypePair { };
|
template <typename T, typename V> struct TypePair {};
|
||||||
template <class T> struct Id { };
|
template <typename T> struct Id {};
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
#include <type_traits>
|
|
||||||
#include <utility>
|
|
||||||
#include "defines.h"
|
|
||||||
#include "TypePair.h"
|
|
||||||
|
|
||||||
/// General-purpose typelist. Easy on compilation times as it does not use recursion.
|
|
||||||
template <class ...Args>
|
|
||||||
struct Typelist { static constexpr size_t size = sizeof...(Args); };
|
|
||||||
|
|
||||||
namespace TLUtils /// In some contexts it's more handy to use functions instead of aliases
|
|
||||||
{
|
|
||||||
template <class ...LArgs, class ...RArgs>
|
|
||||||
constexpr Typelist<LArgs..., RArgs...> concat(Typelist<LArgs...>, Typelist<RArgs...>) { return {}; }
|
|
||||||
|
|
||||||
template <class T, class ...Args>
|
|
||||||
constexpr Typelist<T, Args...> prepend(Typelist<Args...>) { return {}; }
|
|
||||||
|
|
||||||
template <class T, class ...Args>
|
|
||||||
constexpr Typelist<Args..., T> append(Typelist<Args...>) { return {}; }
|
|
||||||
|
|
||||||
template <template<class> class F, class ...Args>
|
|
||||||
constexpr Typelist<F<Args>...> map(Typelist<Args...>) { return {}; }
|
|
||||||
|
|
||||||
template <template<class...> class Root, class ...Args>
|
|
||||||
constexpr Root<Args...> changeRoot(Typelist<Args...>) { return {}; }
|
|
||||||
|
|
||||||
template <class F, class ...Args>
|
|
||||||
constexpr void forEach(Typelist<Args...>, F && f) { (std::forward<F>(f)(Id<Args>{}), ...); }
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class TLLeft, class TLRight>
|
|
||||||
using TLConcat = decltype(TLUtils::concat(TLLeft{}, TLRight{}));
|
|
||||||
|
|
||||||
template <class T, class Typelist> using TLPrepend = decltype(TLUtils::prepend<T>(Typelist{}));
|
|
||||||
template <class T, class Typelist> using TLAppend = decltype(TLUtils::append<T>(Typelist{}));
|
|
||||||
|
|
||||||
template <template<class> class F, class Typelist>
|
|
||||||
using TLMap = decltype(TLUtils::map<F>(Typelist{}));
|
|
||||||
|
|
||||||
template <template<class...> class Root, class Typelist>
|
|
||||||
using TLChangeRoot = decltype(TLUtils::changeRoot<Root>(Typelist{}));
|
|
@ -1,18 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Typelist.h"
|
|
||||||
#include "extended_types.h"
|
|
||||||
#include "Decimal.h"
|
|
||||||
#include "UUID.h"
|
|
||||||
|
|
||||||
namespace DB
|
|
||||||
{
|
|
||||||
using TLIntegral = Typelist<UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64, Float32, Float64>;
|
|
||||||
using TLExtendedIntegral = Typelist<UInt128, Int128, UInt256, Int256>;
|
|
||||||
using TLDecimals = Typelist<Decimal32, Decimal64, Decimal128, Decimal256>;
|
|
||||||
|
|
||||||
using TLIntegralWithExtended = TLConcat<TLIntegral, TLExtendedIntegral>;
|
|
||||||
|
|
||||||
using TLNumbers = TLConcat<TLIntegralWithExtended, TLDecimals>;
|
|
||||||
using TLNumbersWithUUID = TLAppend<UUID, TLNumbers>;
|
|
||||||
}
|
|
@ -5,5 +5,5 @@
|
|||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
using UUID = StrongTypedef<UInt128, struct UUIDTag>;
|
using UUID = StrongTypedef<UInt128, struct UUIDTag>;
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
#define NO_INLINE __attribute__((__noinline__))
|
#define NO_INLINE __attribute__((__noinline__))
|
||||||
#define MAY_ALIAS __attribute__((__may_alias__))
|
#define MAY_ALIAS __attribute__((__may_alias__))
|
||||||
|
|
||||||
#if !defined(__x86_64__) && !defined(__aarch64__) && !defined(__PPC__)
|
#if !defined(__x86_64__) && !defined(__aarch64__) && !defined(__PPC__) && !(defined(__riscv) && (__riscv_xlen == 64))
|
||||||
# error "The only supported platforms are x86_64 and AArch64, PowerPC (work in progress)"
|
# error "The only supported platforms are x86_64 and AArch64, PowerPC (work in progress) and RISC-V 64 (experimental)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Check for presence of address sanitizer
|
/// Check for presence of address sanitizer
|
||||||
|
@ -16,17 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
uint64_t getMemoryAmountOrZero()
|
uint64_t getMemoryAmountOrZero()
|
||||||
{
|
{
|
||||||
#if defined(OS_LINUX)
|
|
||||||
// Try to lookup at the Cgroup limit
|
|
||||||
std::ifstream cgroup_limit("/sys/fs/cgroup/memory/memory.limit_in_bytes");
|
|
||||||
if (cgroup_limit.is_open())
|
|
||||||
{
|
|
||||||
uint64_t amount = 0; // in case of read error
|
|
||||||
cgroup_limit >> amount;
|
|
||||||
return amount;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int64_t num_pages = sysconf(_SC_PHYS_PAGES);
|
int64_t num_pages = sysconf(_SC_PHYS_PAGES);
|
||||||
if (num_pages <= 0)
|
if (num_pages <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -35,7 +24,22 @@ uint64_t getMemoryAmountOrZero()
|
|||||||
if (page_size <= 0)
|
if (page_size <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return num_pages * page_size;
|
uint64_t memory_amount = num_pages * page_size;
|
||||||
|
|
||||||
|
#if defined(OS_LINUX)
|
||||||
|
// Try to lookup at the Cgroup limit
|
||||||
|
std::ifstream cgroup_limit("/sys/fs/cgroup/memory/memory.limit_in_bytes");
|
||||||
|
if (cgroup_limit.is_open())
|
||||||
|
{
|
||||||
|
uint64_t memory_limit = 0; // in case of read error
|
||||||
|
cgroup_limit >> memory_limit;
|
||||||
|
if (memory_limit > 0 && memory_limit < memory_amount)
|
||||||
|
memory_amount = memory_limit;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return memory_amount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <tuple>
|
#include <tuple>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <magic_enum.hpp>
|
||||||
|
|
||||||
/** Usage:
|
/** Usage:
|
||||||
*
|
*
|
||||||
@ -61,6 +62,13 @@ std::enable_if_t<priority == 2, Out> & dumpImpl(Out & out, T && x, std::decay_t<
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <int priority, typename Out, typename T>
|
||||||
|
std::enable_if_t<priority == 3 && std::is_enum_v<std::decay_t<T>>, Out> &
|
||||||
|
dumpImpl(Out & out, T && x)
|
||||||
|
{
|
||||||
|
return out << magic_enum::enum_name(x);
|
||||||
|
}
|
||||||
|
|
||||||
/// string and const char * - output not as container or pointer.
|
/// string and const char * - output not as container or pointer.
|
||||||
|
|
||||||
template <int priority, typename Out, typename T>
|
template <int priority, typename Out, typename T>
|
||||||
@ -131,15 +139,26 @@ Out & dumpValue(Out & out, T && x)
|
|||||||
template <typename Out, typename T>
|
template <typename Out, typename T>
|
||||||
Out & dump(Out & out, const char * name, T && x)
|
Out & dump(Out & out, const char * name, T && x)
|
||||||
{
|
{
|
||||||
|
// Dumping string literal, printing name and demangled type is irrelevant.
|
||||||
|
if constexpr (std::is_same_v<const char *, std::decay_t<std::remove_reference_t<T>>>)
|
||||||
|
{
|
||||||
|
const auto name_len = strlen(name);
|
||||||
|
const auto value_len = strlen(x);
|
||||||
|
// `name` is the same as quoted `x`
|
||||||
|
if (name_len > 2 && value_len > 0 && name[0] == '"' && name[name_len - 1] == '"'
|
||||||
|
&& strncmp(name + 1, x, std::min(value_len, name_len) - 1) == 0)
|
||||||
|
return out << x;
|
||||||
|
}
|
||||||
|
|
||||||
out << demangle(typeid(x).name()) << " " << name << " = ";
|
out << demangle(typeid(x).name()) << " " << name << " = ";
|
||||||
return dumpValue(out, x);
|
return dumpValue(out, x) << "; ";
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
|
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DUMPVAR(VAR) ::dump(std::cerr, #VAR, (VAR)); std::cerr << "; ";
|
#define DUMPVAR(VAR) ::dump(std::cerr, #VAR, (VAR));
|
||||||
#define DUMPHEAD std::cerr << __FILE__ << ':' << __LINE__ << " [ " << getThreadId() << " ] ";
|
#define DUMPHEAD std::cerr << __FILE__ << ':' << __LINE__ << " [ " << getThreadId() << " ] ";
|
||||||
#define DUMPTAIL std::cerr << '\n';
|
#define DUMPTAIL std::cerr << '\n';
|
||||||
|
|
||||||
|
@ -13,30 +13,21 @@
|
|||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
#endif
|
#endif
|
||||||
#include <fcntl.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <cxxabi.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <base/scope_guard.h>
|
#include <base/scope_guard.h>
|
||||||
|
|
||||||
#include <Poco/Observer.h>
|
|
||||||
#include <Poco/AutoPtr.h>
|
|
||||||
#include <Poco/PatternFormatter.h>
|
|
||||||
#include <Poco/Message.h>
|
#include <Poco/Message.h>
|
||||||
#include <Poco/Util/Application.h>
|
#include <Poco/Util/Application.h>
|
||||||
#include <Poco/Exception.h>
|
#include <Poco/Exception.h>
|
||||||
#include <Poco/ErrorHandler.h>
|
#include <Poco/ErrorHandler.h>
|
||||||
#include <Poco/Condition.h>
|
|
||||||
#include <Poco/SyslogChannel.h>
|
|
||||||
#include <Poco/DirectoryIterator.h>
|
|
||||||
|
|
||||||
#include <base/logger_useful.h>
|
#include <base/logger_useful.h>
|
||||||
#include <base/ErrorHandlers.h>
|
#include <base/ErrorHandlers.h>
|
||||||
@ -56,13 +47,15 @@
|
|||||||
#include <Common/getMultipleKeysFromConfig.h>
|
#include <Common/getMultipleKeysFromConfig.h>
|
||||||
#include <Common/ClickHouseRevision.h>
|
#include <Common/ClickHouseRevision.h>
|
||||||
#include <Common/Config/ConfigProcessor.h>
|
#include <Common/Config/ConfigProcessor.h>
|
||||||
#include <Common/MemorySanitizer.h>
|
|
||||||
#include <Common/SymbolIndex.h>
|
#include <Common/SymbolIndex.h>
|
||||||
#include <Common/getExecutablePath.h>
|
#include <Common/getExecutablePath.h>
|
||||||
#include <Common/getHashOfLoadedBinary.h>
|
#include <Common/getHashOfLoadedBinary.h>
|
||||||
#include <Common/Elf.h>
|
#include <Common/Elf.h>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
|
#include <loggers/OwnFormattingChannel.h>
|
||||||
|
#include <loggers/OwnPatternFormatter.h>
|
||||||
|
|
||||||
#include <Common/config_version.h>
|
#include <Common/config_version.h>
|
||||||
|
|
||||||
#if defined(OS_DARWIN)
|
#if defined(OS_DARWIN)
|
||||||
@ -675,6 +668,34 @@ void BaseDaemon::initialize(Application & self)
|
|||||||
if ((!log_path.empty() && is_daemon) || config().has("logger.stderr"))
|
if ((!log_path.empty() && is_daemon) || config().has("logger.stderr"))
|
||||||
{
|
{
|
||||||
std::string stderr_path = config().getString("logger.stderr", log_path + "/stderr.log");
|
std::string stderr_path = config().getString("logger.stderr", log_path + "/stderr.log");
|
||||||
|
|
||||||
|
/// Check that stderr is writable before freopen(),
|
||||||
|
/// since freopen() will make stderr invalid on error,
|
||||||
|
/// and logging to stderr will be broken,
|
||||||
|
/// so the following code (that is used in every program) will not write anything:
|
||||||
|
///
|
||||||
|
/// int main(int argc, char ** argv)
|
||||||
|
/// {
|
||||||
|
/// try
|
||||||
|
/// {
|
||||||
|
/// DB::SomeApp app;
|
||||||
|
/// return app.run(argc, argv);
|
||||||
|
/// }
|
||||||
|
/// catch (...)
|
||||||
|
/// {
|
||||||
|
/// std::cerr << DB::getCurrentExceptionMessage(true) << "\n";
|
||||||
|
/// return 1;
|
||||||
|
/// }
|
||||||
|
/// }
|
||||||
|
if (access(stderr_path.c_str(), W_OK))
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
if ((fd = creat(stderr_path.c_str(), 0600)) == -1 && errno != EEXIST)
|
||||||
|
throw Poco::OpenFileException("File " + stderr_path + " (logger.stderr) is not writable");
|
||||||
|
if (fd != -1)
|
||||||
|
::close(fd);
|
||||||
|
}
|
||||||
|
|
||||||
if (!freopen(stderr_path.c_str(), "a+", stderr))
|
if (!freopen(stderr_path.c_str(), "a+", stderr))
|
||||||
throw Poco::OpenFileException("Cannot attach stderr to " + stderr_path);
|
throw Poco::OpenFileException("Cannot attach stderr to " + stderr_path);
|
||||||
|
|
||||||
@ -973,6 +994,14 @@ void BaseDaemon::setupWatchdog()
|
|||||||
memcpy(argv0, new_process_name, std::min(strlen(new_process_name), original_process_name.size()));
|
memcpy(argv0, new_process_name, std::min(strlen(new_process_name), original_process_name.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// If streaming compression of logs is used then we write watchdog logs to cerr
|
||||||
|
if (config().getRawString("logger.stream_compress", "false") == "true")
|
||||||
|
{
|
||||||
|
Poco::AutoPtr<OwnPatternFormatter> pf = new OwnPatternFormatter;
|
||||||
|
Poco::AutoPtr<DB::OwnFormattingChannel> log = new DB::OwnFormattingChannel(pf, new Poco::ConsoleChannel(std::cerr));
|
||||||
|
logger().setChannel(log);
|
||||||
|
}
|
||||||
|
|
||||||
logger().information(fmt::format("Will watch for the process with pid {}", pid));
|
logger().information(fmt::format("Will watch for the process with pid {}", pid));
|
||||||
|
|
||||||
/// Forward signals to the child process.
|
/// Forward signals to the child process.
|
||||||
|
@ -37,11 +37,3 @@ GraphiteWriter::GraphiteWriter(const std::string & config_name, const std::strin
|
|||||||
root_path += sub_path;
|
root_path += sub_path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string GraphiteWriter::getPerServerPath(const std::string & server_name, const std::string & root_path)
|
|
||||||
{
|
|
||||||
std::string path = root_path + "." + server_name;
|
|
||||||
std::replace(path.begin() + root_path.size() + 1, path.end(), '.', '_');
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
#include <base/logger_useful.h>
|
#include <base/logger_useful.h>
|
||||||
|
|
||||||
|
|
||||||
/// пишет в Graphite данные в формате
|
/// Writes to Graphite in the following format
|
||||||
/// path value timestamp\n
|
/// path value timestamp\n
|
||||||
/// path может иметь любую вложенность. Директории разделяются с помощью "."
|
/// path can be arbitrary nested. Elements are separated by '.'
|
||||||
/// у нас принят следующий формат path - root_path.server_name.sub_path.key
|
/// Example: root_path.server_name.sub_path.key
|
||||||
class GraphiteWriter
|
class GraphiteWriter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -32,8 +32,6 @@ public:
|
|||||||
writeImpl(key_val_vec, timestamp, custom_root_path);
|
writeImpl(key_val_vec, timestamp, custom_root_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// возвращает путь root_path.server_name
|
|
||||||
static std::string getPerServerPath(const std::string & server_name, const std::string & root_path = "one_min");
|
|
||||||
private:
|
private:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void writeImpl(const T & data, time_t timestamp, const std::string & custom_root_path)
|
void writeImpl(const T & data, time_t timestamp, const std::string & custom_root_path)
|
||||||
|
@ -62,7 +62,13 @@ void Loggers::buildLoggers(Poco::Util::AbstractConfiguration & config, Poco::Log
|
|||||||
if (!log_path.empty())
|
if (!log_path.empty())
|
||||||
{
|
{
|
||||||
createDirectory(log_path);
|
createDirectory(log_path);
|
||||||
std::cerr << "Logging " << log_level_string << " to " << log_path << std::endl;
|
|
||||||
|
std::string ext;
|
||||||
|
if (config.getRawString("logger.stream_compress", "false") == "true")
|
||||||
|
ext = ".lz4";
|
||||||
|
|
||||||
|
std::cerr << "Logging " << log_level_string << " to " << log_path << ext << std::endl;
|
||||||
|
|
||||||
auto log_level = Poco::Logger::parseLevel(log_level_string);
|
auto log_level = Poco::Logger::parseLevel(log_level_string);
|
||||||
if (log_level > max_log_level)
|
if (log_level > max_log_level)
|
||||||
{
|
{
|
||||||
@ -75,6 +81,7 @@ void Loggers::buildLoggers(Poco::Util::AbstractConfiguration & config, Poco::Log
|
|||||||
log_file->setProperty(Poco::FileChannel::PROP_ROTATION, config.getRawString("logger.size", "100M"));
|
log_file->setProperty(Poco::FileChannel::PROP_ROTATION, config.getRawString("logger.size", "100M"));
|
||||||
log_file->setProperty(Poco::FileChannel::PROP_ARCHIVE, "number");
|
log_file->setProperty(Poco::FileChannel::PROP_ARCHIVE, "number");
|
||||||
log_file->setProperty(Poco::FileChannel::PROP_COMPRESS, config.getRawString("logger.compress", "true"));
|
log_file->setProperty(Poco::FileChannel::PROP_COMPRESS, config.getRawString("logger.compress", "true"));
|
||||||
|
log_file->setProperty(Poco::FileChannel::PROP_STREAMCOMPRESS, config.getRawString("logger.stream_compress", "false"));
|
||||||
log_file->setProperty(Poco::FileChannel::PROP_PURGECOUNT, config.getRawString("logger.count", "1"));
|
log_file->setProperty(Poco::FileChannel::PROP_PURGECOUNT, config.getRawString("logger.count", "1"));
|
||||||
log_file->setProperty(Poco::FileChannel::PROP_FLUSH, config.getRawString("logger.flush", "true"));
|
log_file->setProperty(Poco::FileChannel::PROP_FLUSH, config.getRawString("logger.flush", "true"));
|
||||||
log_file->setProperty(Poco::FileChannel::PROP_ROTATEONOPEN, config.getRawString("logger.rotateOnOpen", "false"));
|
log_file->setProperty(Poco::FileChannel::PROP_ROTATEONOPEN, config.getRawString("logger.rotateOnOpen", "false"));
|
||||||
@ -100,13 +107,18 @@ void Loggers::buildLoggers(Poco::Util::AbstractConfiguration & config, Poco::Log
|
|||||||
max_log_level = errorlog_level;
|
max_log_level = errorlog_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cerr << "Logging errors to " << errorlog_path << std::endl;
|
std::string ext;
|
||||||
|
if (config.getRawString("logger.stream_compress", "false") == "true")
|
||||||
|
ext = ".lz4";
|
||||||
|
|
||||||
|
std::cerr << "Logging errors to " << errorlog_path << ext << std::endl;
|
||||||
|
|
||||||
error_log_file = new Poco::FileChannel;
|
error_log_file = new Poco::FileChannel;
|
||||||
error_log_file->setProperty(Poco::FileChannel::PROP_PATH, fs::weakly_canonical(errorlog_path));
|
error_log_file->setProperty(Poco::FileChannel::PROP_PATH, fs::weakly_canonical(errorlog_path));
|
||||||
error_log_file->setProperty(Poco::FileChannel::PROP_ROTATION, config.getRawString("logger.size", "100M"));
|
error_log_file->setProperty(Poco::FileChannel::PROP_ROTATION, config.getRawString("logger.size", "100M"));
|
||||||
error_log_file->setProperty(Poco::FileChannel::PROP_ARCHIVE, "number");
|
error_log_file->setProperty(Poco::FileChannel::PROP_ARCHIVE, "number");
|
||||||
error_log_file->setProperty(Poco::FileChannel::PROP_COMPRESS, config.getRawString("logger.compress", "true"));
|
error_log_file->setProperty(Poco::FileChannel::PROP_COMPRESS, config.getRawString("logger.compress", "true"));
|
||||||
|
error_log_file->setProperty(Poco::FileChannel::PROP_STREAMCOMPRESS, config.getRawString("logger.stream_compress", "false"));
|
||||||
error_log_file->setProperty(Poco::FileChannel::PROP_PURGECOUNT, config.getRawString("logger.count", "1"));
|
error_log_file->setProperty(Poco::FileChannel::PROP_PURGECOUNT, config.getRawString("logger.count", "1"));
|
||||||
error_log_file->setProperty(Poco::FileChannel::PROP_FLUSH, config.getRawString("logger.flush", "true"));
|
error_log_file->setProperty(Poco::FileChannel::PROP_FLUSH, config.getRawString("logger.flush", "true"));
|
||||||
error_log_file->setProperty(Poco::FileChannel::PROP_ROTATEONOPEN, config.getRawString("logger.rotateOnOpen", "false"));
|
error_log_file->setProperty(Poco::FileChannel::PROP_ROTATEONOPEN, config.getRawString("logger.rotateOnOpen", "false"));
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
#include "OwnPatternFormatter.h"
|
#include "OwnPatternFormatter.h"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <optional>
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <IO/WriteBufferFromString.h>
|
#include <IO/WriteBufferFromString.h>
|
||||||
#include <IO/WriteHelpers.h>
|
#include <IO/WriteHelpers.h>
|
||||||
#include <Common/HashTable/Hash.h>
|
#include <Common/HashTable/Hash.h>
|
||||||
#include <Interpreters/InternalTextLogsQueue.h>
|
#include <Interpreters/InternalTextLogsQueue.h>
|
||||||
#include <Common/CurrentThread.h>
|
#include <Common/CurrentThread.h>
|
||||||
#include <base/getThreadId.h>
|
|
||||||
#include <base/terminalColors.h>
|
#include <base/terminalColors.h>
|
||||||
#include "Loggers.h"
|
|
||||||
|
|
||||||
|
|
||||||
OwnPatternFormatter::OwnPatternFormatter(bool color_)
|
OwnPatternFormatter::OwnPatternFormatter(bool color_)
|
||||||
|
@ -13,10 +13,7 @@ add_library (mysqlxx
|
|||||||
|
|
||||||
target_include_directories (mysqlxx PUBLIC ..)
|
target_include_directories (mysqlxx PUBLIC ..)
|
||||||
|
|
||||||
if (USE_INTERNAL_MYSQL_LIBRARY)
|
if (NOT USE_INTERNAL_MYSQL_LIBRARY)
|
||||||
target_include_directories (mysqlxx PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/mariadb-connector-c/include")
|
|
||||||
target_include_directories (mysqlxx PUBLIC "${ClickHouse_BINARY_DIR}/contrib/mariadb-connector-c/include")
|
|
||||||
else ()
|
|
||||||
set(PLATFORM_LIBRARIES ${CMAKE_DL_LIBS})
|
set(PLATFORM_LIBRARIES ${CMAKE_DL_LIBS})
|
||||||
|
|
||||||
if (USE_MYSQL)
|
if (USE_MYSQL)
|
||||||
|
@ -12,13 +12,13 @@ macro (add_warning flag)
|
|||||||
if (SUPPORTS_CXXFLAG_${underscored_flag})
|
if (SUPPORTS_CXXFLAG_${underscored_flag})
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W${flag}")
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W${flag}")
|
||||||
else ()
|
else ()
|
||||||
message (WARNING "Flag -W${flag} is unsupported")
|
message (STATUS "Flag -W${flag} is unsupported")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (SUPPORTS_CFLAG_${underscored_flag})
|
if (SUPPORTS_CFLAG_${underscored_flag})
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W${flag}")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W${flag}")
|
||||||
else ()
|
else ()
|
||||||
message (WARNING "Flag -W${flag} is unsupported")
|
message (STATUS "Flag -W${flag} is unsupported")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
endmacro ()
|
endmacro ()
|
||||||
@ -39,7 +39,7 @@ macro (target_add_warning target flag)
|
|||||||
if (SUPPORTS_CXXFLAG_${underscored_flag})
|
if (SUPPORTS_CXXFLAG_${underscored_flag})
|
||||||
target_compile_options (${target} PRIVATE "-W${flag}")
|
target_compile_options (${target} PRIVATE "-W${flag}")
|
||||||
else ()
|
else ()
|
||||||
message (WARNING "Flag -W${flag} is unsupported")
|
message (STATUS "Flag -W${flag} is unsupported")
|
||||||
endif ()
|
endif ()
|
||||||
endmacro ()
|
endmacro ()
|
||||||
|
|
||||||
|
@ -16,3 +16,7 @@ endif ()
|
|||||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64le.*|PPC64LE.*)")
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64le.*|PPC64LE.*)")
|
||||||
set (ARCH_PPC64LE 1)
|
set (ARCH_PPC64LE 1)
|
||||||
endif ()
|
endif ()
|
||||||
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
|
||||||
|
set (ARCH_RISCV64 1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ macro(find_contrib_lib LIB_NAME)
|
|||||||
string(TOUPPER ${LIB_NAME} LIB_NAME_UC)
|
string(TOUPPER ${LIB_NAME} LIB_NAME_UC)
|
||||||
string(REPLACE "-" "_" LIB_NAME_UC ${LIB_NAME_UC})
|
string(REPLACE "-" "_" LIB_NAME_UC ${LIB_NAME_UC})
|
||||||
|
|
||||||
option (USE_INTERNAL_${LIB_NAME_UC}_LIBRARY "Use bundled library ${LIB_NAME} instead of system" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_${LIB_NAME_UC}_LIBRARY "Use bundled library ${LIB_NAME} instead of system" ON)
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_${LIB_NAME_UC}_LIBRARY)
|
if (NOT USE_INTERNAL_${LIB_NAME_UC}_LIBRARY)
|
||||||
find_package ("${LIB_NAME}")
|
find_package ("${LIB_NAME}")
|
||||||
|
@ -28,6 +28,9 @@ option (ARCH_NATIVE "Add -march=native compiler flag. This makes your binaries n
|
|||||||
if (ARCH_NATIVE)
|
if (ARCH_NATIVE)
|
||||||
set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=native")
|
set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=native")
|
||||||
|
|
||||||
|
elseif (ARCH_AARCH64)
|
||||||
|
set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=armv8-a+crc")
|
||||||
|
|
||||||
else ()
|
else ()
|
||||||
set (TEST_FLAG "-mssse3")
|
set (TEST_FLAG "-mssse3")
|
||||||
set (CMAKE_REQUIRED_FLAGS "${TEST_FLAG} -O0")
|
set (CMAKE_REQUIRED_FLAGS "${TEST_FLAG} -O0")
|
||||||
@ -43,7 +46,6 @@ else ()
|
|||||||
set (COMPILER_FLAGS "${COMPILER_FLAGS} ${TEST_FLAG}")
|
set (COMPILER_FLAGS "${COMPILER_FLAGS} ${TEST_FLAG}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
set (TEST_FLAG "-msse4.1")
|
set (TEST_FLAG "-msse4.1")
|
||||||
set (CMAKE_REQUIRED_FLAGS "${TEST_FLAG} -O0")
|
set (CMAKE_REQUIRED_FLAGS "${TEST_FLAG} -O0")
|
||||||
check_cxx_source_compiles("
|
check_cxx_source_compiles("
|
||||||
@ -138,7 +140,7 @@ else ()
|
|||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
int main() {
|
int main() {
|
||||||
auto a = _mm512_setzero_epi32();
|
auto a = _mm512_setzero_epi32();
|
||||||
(void)a;
|
(void)a;
|
||||||
auto b = _mm512_add_epi16(__m512i(), __m512i());
|
auto b = _mm512_add_epi16(__m512i(), __m512i());
|
||||||
(void)b;
|
(void)b;
|
||||||
return 0;
|
return 0;
|
||||||
@ -160,9 +162,9 @@ else ()
|
|||||||
" HAVE_BMI)
|
" HAVE_BMI)
|
||||||
if (HAVE_BMI AND ENABLE_BMI)
|
if (HAVE_BMI AND ENABLE_BMI)
|
||||||
set (COMPILER_FLAGS "${COMPILER_FLAGS} ${TEST_FLAG}")
|
set (COMPILER_FLAGS "${COMPILER_FLAGS} ${TEST_FLAG}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
#Limit avx2/avx512 flag for specific source build
|
# Limit avx2/avx512 flag for specific source build
|
||||||
set (X86_INTRINSICS_FLAGS "")
|
set (X86_INTRINSICS_FLAGS "")
|
||||||
if (ENABLE_AVX2_FOR_SPEC_OP)
|
if (ENABLE_AVX2_FOR_SPEC_OP)
|
||||||
if (HAVE_BMI)
|
if (HAVE_BMI)
|
||||||
|
@ -9,7 +9,7 @@ if (NOT ENABLE_AMQPCPP)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/src")
|
||||||
message (WARNING "submodule contrib/AMQP-CPP is missing. to fix try run: \n git submodule update --init")
|
message (WARNING "submodule contrib/AMQP-CPP is missing. to fix try run: \n git submodule update --init")
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal AMQP-CPP library")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal AMQP-CPP library")
|
||||||
set (USE_AMQPCPP 0)
|
set (USE_AMQPCPP 0)
|
||||||
|
@ -8,10 +8,9 @@ if (NOT ENABLE_AVRO)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_AVRO_LIBRARY
|
option (USE_INTERNAL_AVRO_LIBRARY "Set to FALSE to use system avro library instead of bundled" ON)
|
||||||
"Set to FALSE to use system avro library instead of bundled" ON) # TODO: provide unbundled support
|
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/avro/lang/c++/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/avro/lang")
|
||||||
if (USE_INTERNAL_AVRO_LIBRARY)
|
if (USE_INTERNAL_AVRO_LIBRARY)
|
||||||
message(WARNING "submodule contrib/avro is missing. to fix try run: \n git submodule update --init")
|
message(WARNING "submodule contrib/avro is missing. to fix try run: \n git submodule update --init")
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot find internal avro")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot find internal avro")
|
||||||
|
@ -7,12 +7,7 @@ if (NOT ENABLE_BROTLI)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (UNBUNDLED)
|
option (USE_INTERNAL_BROTLI_LIBRARY "Set to FALSE to use system libbrotli library instead of bundled" ON)
|
||||||
# Many system ship only dynamic brotly libraries, so we back off to bundled by default
|
|
||||||
option (USE_INTERNAL_BROTLI_LIBRARY "Set to FALSE to use system libbrotli library instead of bundled" ${USE_STATIC_LIBRARIES})
|
|
||||||
else()
|
|
||||||
option (USE_INTERNAL_BROTLI_LIBRARY "Set to FALSE to use system libbrotli library instead of bundled" ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/brotli/c/include/brotli/decode.h")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/brotli/c/include/brotli/decode.h")
|
||||||
if (USE_INTERNAL_BROTLI_LIBRARY)
|
if (USE_INTERNAL_BROTLI_LIBRARY)
|
||||||
|
@ -7,9 +7,9 @@ if (NOT ENABLE_CAPNP)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_CAPNP_LIBRARY "Set to FALSE to use system capnproto library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_CAPNP_LIBRARY "Set to FALSE to use system capnproto library instead of bundled" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/capnproto/CMakeLists.txt")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/capnproto/c++")
|
||||||
if(USE_INTERNAL_CAPNP_LIBRARY)
|
if(USE_INTERNAL_CAPNP_LIBRARY)
|
||||||
message(WARNING "submodule contrib/capnproto is missing. to fix try run: \n git submodule update --init")
|
message(WARNING "submodule contrib/capnproto is missing. to fix try run: \n git submodule update --init")
|
||||||
message(${RECONFIGURE_MESSAGE_LEVEL} "cannot find internal capnproto")
|
message(${RECONFIGURE_MESSAGE_LEVEL} "cannot find internal capnproto")
|
||||||
|
@ -7,7 +7,7 @@ if (NOT ENABLE_CURL)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_CURL "Use internal curl library" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_CURL "Use internal curl library" ON)
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_CURL)
|
if (NOT USE_INTERNAL_CURL)
|
||||||
find_package (CURL)
|
find_package (CURL)
|
||||||
@ -22,8 +22,6 @@ if (NOT CURL_FOUND)
|
|||||||
|
|
||||||
# find_package(CURL) compatibility for the following packages that uses
|
# find_package(CURL) compatibility for the following packages that uses
|
||||||
# find_package(CURL)/include(FindCURL):
|
# find_package(CURL)/include(FindCURL):
|
||||||
# - mariadb-connector-c
|
|
||||||
# - aws-s3-cmake
|
|
||||||
# - sentry-native
|
# - sentry-native
|
||||||
set (CURL_FOUND ON CACHE BOOL "")
|
set (CURL_FOUND ON CACHE BOOL "")
|
||||||
set (CURL_ROOT_DIR ${CURL_LIBRARY_DIR} CACHE PATH "")
|
set (CURL_ROOT_DIR ${CURL_LIBRARY_DIR} CACHE PATH "")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
option (USE_LIBCXX "Use libc++ and libc++abi instead of libstdc++" ${NOT_UNBUNDLED})
|
option (USE_LIBCXX "Use libc++ and libc++abi instead of libstdc++" ON)
|
||||||
|
|
||||||
if (NOT USE_LIBCXX)
|
if (NOT USE_LIBCXX)
|
||||||
if (USE_INTERNAL_LIBCXX_LIBRARY)
|
if (USE_INTERNAL_LIBCXX_LIBRARY)
|
||||||
@ -10,12 +10,12 @@ if (NOT USE_LIBCXX)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(USE_INTERNAL_LIBCXX_LIBRARY_DEFAULT ${NOT_UNBUNDLED})
|
set(USE_INTERNAL_LIBCXX_LIBRARY_DEFAULT ON)
|
||||||
|
|
||||||
option (USE_INTERNAL_LIBCXX_LIBRARY "Disable to use system libcxx and libcxxabi libraries instead of bundled"
|
option (USE_INTERNAL_LIBCXX_LIBRARY "Disable to use system libcxx and libcxxabi libraries instead of bundled"
|
||||||
${USE_INTERNAL_LIBCXX_LIBRARY_DEFAULT})
|
${USE_INTERNAL_LIBCXX_LIBRARY_DEFAULT})
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libcxx/CMakeLists.txt")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libcxx/src")
|
||||||
if (USE_INTERNAL_LIBCXX_LIBRARY)
|
if (USE_INTERNAL_LIBCXX_LIBRARY)
|
||||||
message(WARNING "submodule contrib/libcxx is missing. to fix try run: \n git submodule update --init")
|
message(WARNING "submodule contrib/libcxx is missing. to fix try run: \n git submodule update --init")
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libcxx")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libcxx")
|
||||||
|
@ -2,7 +2,7 @@ option (ENABLE_DATASKETCHES "Enable DataSketches" ${ENABLE_LIBRARIES})
|
|||||||
|
|
||||||
if (ENABLE_DATASKETCHES)
|
if (ENABLE_DATASKETCHES)
|
||||||
|
|
||||||
option (USE_INTERNAL_DATASKETCHES_LIBRARY "Set to FALSE to use system DataSketches library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_DATASKETCHES_LIBRARY "Set to FALSE to use system DataSketches library instead of bundled" ON)
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/datasketches-cpp/theta/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/datasketches-cpp/theta/CMakeLists.txt")
|
||||||
if (USE_INTERNAL_DATASKETCHES_LIBRARY)
|
if (USE_INTERNAL_DATASKETCHES_LIBRARY)
|
||||||
|
@ -22,7 +22,7 @@ endif()
|
|||||||
# You can set USE_INTERNAL_GRPC_LIBRARY to OFF to force using the external gRPC framework, which should be installed in the system in this case.
|
# You can set USE_INTERNAL_GRPC_LIBRARY to OFF to force using the external gRPC framework, which should be installed in the system in this case.
|
||||||
# The external gRPC framework can be installed in the system by running
|
# The external gRPC framework can be installed in the system by running
|
||||||
# sudo apt-get install libgrpc++-dev protobuf-compiler-grpc
|
# sudo apt-get install libgrpc++-dev protobuf-compiler-grpc
|
||||||
option(USE_INTERNAL_GRPC_LIBRARY "Set to FALSE to use system gRPC library instead of bundled. (Experimental. Set to OFF on your own risk)" ${NOT_UNBUNDLED})
|
option(USE_INTERNAL_GRPC_LIBRARY "Set to FALSE to use system gRPC library instead of bundled. (Experimental. Set to OFF on your own risk)" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/grpc/CMakeLists.txt")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/grpc/CMakeLists.txt")
|
||||||
if(USE_INTERNAL_GRPC_LIBRARY)
|
if(USE_INTERNAL_GRPC_LIBRARY)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# included only if ENABLE_TESTS=1
|
# included only if ENABLE_TESTS=1
|
||||||
|
|
||||||
option (USE_INTERNAL_GTEST_LIBRARY "Set to FALSE to use system Google Test instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_GTEST_LIBRARY "Set to FALSE to use system Google Test instead of bundled" ON)
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest/CMakeLists.txt")
|
||||||
if (USE_INTERNAL_GTEST_LIBRARY)
|
if (USE_INTERNAL_GTEST_LIBRARY)
|
||||||
|
@ -12,7 +12,7 @@ if (NOT ENABLE_ICU)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_ICU_LIBRARY "Set to FALSE to use system ICU library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_ICU_LIBRARY "Set to FALSE to use system ICU library instead of bundled" ON)
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/icu/icu4c/LICENSE")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/icu/icu4c/LICENSE")
|
||||||
if (USE_INTERNAL_ICU_LIBRARY)
|
if (USE_INTERNAL_ICU_LIBRARY)
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
if (UNBUNDLED AND USE_STATIC_LIBRARIES)
|
|
||||||
set (ENABLE_LDAP OFF CACHE INTERNAL "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
option (ENABLE_LDAP "Enable LDAP" ${ENABLE_LIBRARIES})
|
option (ENABLE_LDAP "Enable LDAP" ${ENABLE_LIBRARIES})
|
||||||
|
|
||||||
if (NOT ENABLE_LDAP)
|
if (NOT ENABLE_LDAP)
|
||||||
@ -11,7 +7,7 @@ if (NOT ENABLE_LDAP)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_LDAP_LIBRARY "Set to FALSE to use system *LDAP library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_LDAP_LIBRARY "Set to FALSE to use system *LDAP library instead of bundled" ON)
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/openldap/README")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/openldap/README")
|
||||||
if (USE_INTERNAL_LDAP_LIBRARY)
|
if (USE_INTERNAL_LDAP_LIBRARY)
|
||||||
|
@ -7,12 +7,7 @@ if (NOT ENABLE_GSASL_LIBRARY)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (UNBUNDLED)
|
option (USE_INTERNAL_LIBGSASL_LIBRARY "Set to FALSE to use system libgsasl library instead of bundled" ON)
|
||||||
# when USE_STATIC_LIBRARIES we usually need to pick up hell a lot of dependencies for libgsasl
|
|
||||||
option (USE_INTERNAL_LIBGSASL_LIBRARY "Set to FALSE to use system libgsasl library instead of bundled" ${USE_STATIC_LIBRARIES})
|
|
||||||
else()
|
|
||||||
option (USE_INTERNAL_LIBGSASL_LIBRARY "Set to FALSE to use system libgsasl library instead of bundled" ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src/gsasl.h")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src/gsasl.h")
|
||||||
if (USE_INTERNAL_LIBGSASL_LIBRARY)
|
if (USE_INTERNAL_LIBGSASL_LIBRARY)
|
||||||
@ -35,7 +30,7 @@ if (LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR)
|
|||||||
elseif (NOT MISSING_INTERNAL_LIBGSASL_LIBRARY)
|
elseif (NOT MISSING_INTERNAL_LIBGSASL_LIBRARY)
|
||||||
set (LIBGSASL_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src" "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/linux_x86_64/include")
|
set (LIBGSASL_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src" "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/linux_x86_64/include")
|
||||||
set (USE_INTERNAL_LIBGSASL_LIBRARY 1)
|
set (USE_INTERNAL_LIBGSASL_LIBRARY 1)
|
||||||
set (LIBGSASL_LIBRARY libgsasl)
|
set (LIBGSASL_LIBRARY gsasl)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if(LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR)
|
if(LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR)
|
||||||
|
@ -4,7 +4,7 @@ if (NOT ENABLE_LIBPQXX)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libpqxx/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libpqxx/src")
|
||||||
message (WARNING "submodule contrib/libpqxx is missing. to fix try run: \n git submodule update --init")
|
message (WARNING "submodule contrib/libpqxx is missing. to fix try run: \n git submodule update --init")
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libpqxx library")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libpqxx library")
|
||||||
set (USE_LIBPQXX 0)
|
set (USE_LIBPQXX 0)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
option (USE_INTERNAL_LIBXML2_LIBRARY "Set to FALSE to use system libxml2 library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_LIBXML2_LIBRARY "Set to FALSE to use system libxml2 library instead of bundled" ON)
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libxml2/libxml.h")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libxml2/libxml.h")
|
||||||
if (USE_INTERNAL_LIBXML2_LIBRARY)
|
if (USE_INTERNAL_LIBXML2_LIBRARY)
|
||||||
|
@ -7,7 +7,7 @@ if(NOT ENABLE_MSGPACK)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_MSGPACK_LIBRARY "Set to FALSE to use system msgpack library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_MSGPACK_LIBRARY "Set to FALSE to use system msgpack library instead of bundled" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/msgpack-c/include/msgpack.hpp")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/msgpack-c/include/msgpack.hpp")
|
||||||
if(USE_INTERNAL_MSGPACK_LIBRARY)
|
if(USE_INTERNAL_MSGPACK_LIBRARY)
|
||||||
|
@ -12,7 +12,7 @@ if(NOT ENABLE_MYSQL)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ${NOT_UNBUNDLED})
|
option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mariadb-connector-c/README")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mariadb-connector-c/README")
|
||||||
if(USE_INTERNAL_MYSQL_LIBRARY)
|
if(USE_INTERNAL_MYSQL_LIBRARY)
|
||||||
|
@ -6,7 +6,7 @@ if (NOT USE_INTERNAL_NANODBC_LIBRARY)
|
|||||||
message (FATAL_ERROR "Only the bundled nanodbc library can be used")
|
message (FATAL_ERROR "Only the bundled nanodbc library can be used")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/nanodbc/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/nanodbc/nanodbc")
|
||||||
message (FATAL_ERROR "submodule contrib/nanodbc is missing. to fix try run: \n git submodule update --init")
|
message (FATAL_ERROR "submodule contrib/nanodbc is missing. to fix try run: \n git submodule update --init")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libstemmer_c/Makefile")
|
|||||||
return()
|
return()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/wordnet-blast/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/wordnet-blast/wnb")
|
||||||
message (WARNING "submodule contrib/wordnet-blast is missing. to fix try run: \n git submodule update --init")
|
message (WARNING "submodule contrib/wordnet-blast is missing. to fix try run: \n git submodule update --init")
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal wordnet-blast library, NLP functions will be disabled")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal wordnet-blast library, NLP functions will be disabled")
|
||||||
set (USE_NLP 0)
|
set (USE_NLP 0)
|
||||||
|
@ -4,7 +4,7 @@ if (NOT ENABLE_NURAFT)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/NuRaft/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/NuRaft/src")
|
||||||
message (WARNING "submodule contrib/NuRaft is missing. to fix try run: \n git submodule update --init")
|
message (WARNING "submodule contrib/NuRaft is missing. to fix try run: \n git submodule update --init")
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal NuRaft library")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal NuRaft library")
|
||||||
set (USE_NURAFT 0)
|
set (USE_NURAFT 0)
|
||||||
|
@ -19,7 +19,7 @@ if (NOT ENABLE_ODBC)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_ODBC_LIBRARY "Use internal ODBC library" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_ODBC_LIBRARY "Use internal ODBC library" ON)
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_ODBC_LIBRARY)
|
if (NOT USE_INTERNAL_ODBC_LIBRARY)
|
||||||
find_library (LIBRARY_ODBC NAMES unixodbc odbc)
|
find_library (LIBRARY_ODBC NAMES unixodbc odbc)
|
||||||
|
@ -13,7 +13,7 @@ if (NOT ENABLE_PARQUET)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT OS_FREEBSD) # Freebsd: ../contrib/arrow/cpp/src/arrow/util/bit-util.h:27:10: fatal error: endian.h: No such file or directory
|
if (NOT OS_FREEBSD) # Freebsd: ../contrib/arrow/cpp/src/arrow/util/bit-util.h:27:10: fatal error: endian.h: No such file or directory
|
||||||
option(USE_INTERNAL_PARQUET_LIBRARY "Set to FALSE to use system parquet library instead of bundled" ${NOT_UNBUNDLED})
|
option(USE_INTERNAL_PARQUET_LIBRARY "Set to FALSE to use system parquet library instead of bundled" ON)
|
||||||
elseif(USE_INTERNAL_PARQUET_LIBRARY)
|
elseif(USE_INTERNAL_PARQUET_LIBRARY)
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Using internal parquet is not supported on freebsd")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Using internal parquet is not supported on freebsd")
|
||||||
endif()
|
endif()
|
||||||
|
@ -11,7 +11,7 @@ endif()
|
|||||||
# You can set USE_INTERNAL_PROTOBUF_LIBRARY to OFF to force using the external protobuf library, which should be installed in the system in this case.
|
# You can set USE_INTERNAL_PROTOBUF_LIBRARY to OFF to force using the external protobuf library, which should be installed in the system in this case.
|
||||||
# The external protobuf library can be installed in the system by running
|
# The external protobuf library can be installed in the system by running
|
||||||
# sudo apt-get install libprotobuf-dev protobuf-compiler libprotoc-dev
|
# sudo apt-get install libprotobuf-dev protobuf-compiler libprotoc-dev
|
||||||
option(USE_INTERNAL_PROTOBUF_LIBRARY "Set to FALSE to use system protobuf instead of bundled. (Experimental. Set to OFF on your own risk)" ${NOT_UNBUNDLED})
|
option(USE_INTERNAL_PROTOBUF_LIBRARY "Set to FALSE to use system protobuf instead of bundled. (Experimental. Set to OFF on your own risk)" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/protobuf/cmake/CMakeLists.txt")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/protobuf/cmake/CMakeLists.txt")
|
||||||
if(USE_INTERNAL_PROTOBUF_LIBRARY)
|
if(USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||||
|
@ -6,7 +6,7 @@ if(NOT ENABLE_RAPIDJSON)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(USE_INTERNAL_RAPIDJSON_LIBRARY "Set to FALSE to use system rapidjson library instead of bundled" ${NOT_UNBUNDLED})
|
option(USE_INTERNAL_RAPIDJSON_LIBRARY "Set to FALSE to use system rapidjson library instead of bundled" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/rapidjson/include/rapidjson/rapidjson.h")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/rapidjson/include/rapidjson/rapidjson.h")
|
||||||
if(USE_INTERNAL_RAPIDJSON_LIBRARY)
|
if(USE_INTERNAL_RAPIDJSON_LIBRARY)
|
||||||
|
@ -7,9 +7,9 @@ if (NOT ENABLE_RDKAFKA)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_RDKAFKA_LIBRARY "Set to FALSE to use system librdkafka instead of the bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_RDKAFKA_LIBRARY "Set to FALSE to use system librdkafka instead of the bundled" ON)
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cppkafka/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cppkafka/src")
|
||||||
if(USE_INTERNAL_RDKAFKA_LIBRARY)
|
if(USE_INTERNAL_RDKAFKA_LIBRARY)
|
||||||
message (WARNING "submodule contrib/cppkafka is missing. to fix try run: \n git submodule update --init")
|
message (WARNING "submodule contrib/cppkafka is missing. to fix try run: \n git submodule update --init")
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal cppkafka")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal cppkafka")
|
||||||
@ -18,7 +18,7 @@ if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cppkafka/CMakeLists.txt")
|
|||||||
set (MISSING_INTERNAL_CPPKAFKA_LIBRARY 1)
|
set (MISSING_INTERNAL_CPPKAFKA_LIBRARY 1)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/librdkafka/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/librdkafka/src")
|
||||||
if(USE_INTERNAL_RDKAFKA_LIBRARY OR MISSING_INTERNAL_CPPKAFKA_LIBRARY)
|
if(USE_INTERNAL_RDKAFKA_LIBRARY OR MISSING_INTERNAL_CPPKAFKA_LIBRARY)
|
||||||
message (WARNING "submodule contrib/librdkafka is missing. to fix try run: \n git submodule update --init")
|
message (WARNING "submodule contrib/librdkafka is missing. to fix try run: \n git submodule update --init")
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal rdkafka")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal rdkafka")
|
||||||
@ -40,7 +40,7 @@ if (NOT USE_INTERNAL_RDKAFKA_LIBRARY)
|
|||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system sasl2 library needed for static librdkafka")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system sasl2 library needed for static librdkafka")
|
||||||
endif()
|
endif()
|
||||||
endif ()
|
endif ()
|
||||||
set (CPPKAFKA_LIBRARY cppkafka) # TODO: try to use unbundled version.
|
set (CPPKAFKA_LIBRARY cppkafka)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (RDKAFKA_LIB AND RDKAFKA_INCLUDE_DIR)
|
if (RDKAFKA_LIB AND RDKAFKA_INCLUDE_DIR)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
option (USE_INTERNAL_RE2_LIBRARY "Set to FALSE to use system re2 library instead of bundled [slower]" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_RE2_LIBRARY "Set to FALSE to use system re2 library instead of bundled [slower]" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/re2/CMakeLists.txt")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/re2/re2")
|
||||||
if(USE_INTERNAL_RE2_LIBRARY)
|
if(USE_INTERNAL_RE2_LIBRARY)
|
||||||
message(WARNING "submodule contrib/re2 is missing. to fix try run: \n git submodule update --init")
|
message(WARNING "submodule contrib/re2 is missing. to fix try run: \n git submodule update --init")
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal re2 library")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal re2 library")
|
||||||
|
@ -11,9 +11,9 @@ if (NOT ENABLE_ROCKSDB)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(USE_INTERNAL_ROCKSDB_LIBRARY "Set to FALSE to use system ROCKSDB library instead of bundled" ${NOT_UNBUNDLED})
|
option(USE_INTERNAL_ROCKSDB_LIBRARY "Set to FALSE to use system ROCKSDB library instead of bundled" ON)
|
||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/rocksdb/CMakeLists.txt")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/rocksdb/include")
|
||||||
if (USE_INTERNAL_ROCKSDB_LIBRARY)
|
if (USE_INTERNAL_ROCKSDB_LIBRARY)
|
||||||
message (WARNING "submodule contrib is missing. to fix try run: \n git submodule update --init")
|
message (WARNING "submodule contrib is missing. to fix try run: \n git submodule update --init")
|
||||||
message(${RECONFIGURE_MESSAGE_LEVEL} "cannot find internal rocksdb")
|
message(${RECONFIGURE_MESSAGE_LEVEL} "cannot find internal rocksdb")
|
||||||
|
@ -9,7 +9,7 @@ if (NOT EXISTS "${SENTRY_INCLUDE_DIR}/sentry.h")
|
|||||||
return()
|
return()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT OS_FREEBSD AND NOT SPLIT_SHARED_LIBRARIES AND NOT_UNBUNDLED AND NOT (OS_DARWIN AND COMPILER_CLANG))
|
if (NOT OS_FREEBSD AND NOT SPLIT_SHARED_LIBRARIES AND NOT (OS_DARWIN AND COMPILER_CLANG))
|
||||||
option (USE_SENTRY "Use Sentry" ${ENABLE_LIBRARIES})
|
option (USE_SENTRY "Use Sentry" ${ENABLE_LIBRARIES})
|
||||||
set (SENTRY_TRANSPORT "curl" CACHE STRING "")
|
set (SENTRY_TRANSPORT "curl" CACHE STRING "")
|
||||||
set (SENTRY_BACKEND "none" CACHE STRING "")
|
set (SENTRY_BACKEND "none" CACHE STRING "")
|
||||||
@ -18,8 +18,6 @@ if (NOT OS_FREEBSD AND NOT SPLIT_SHARED_LIBRARIES AND NOT_UNBUNDLED AND NOT (OS_
|
|||||||
set (SENTRY_PIC OFF CACHE BOOL "")
|
set (SENTRY_PIC OFF CACHE BOOL "")
|
||||||
set (BUILD_SHARED_LIBS OFF)
|
set (BUILD_SHARED_LIBS OFF)
|
||||||
message (STATUS "Using sentry=${USE_SENTRY}: ${SENTRY_LIBRARY}")
|
message (STATUS "Using sentry=${USE_SENTRY}: ${SENTRY_LIBRARY}")
|
||||||
|
|
||||||
include_directories("${SENTRY_INCLUDE_DIR}")
|
|
||||||
elseif (USE_SENTRY)
|
elseif (USE_SENTRY)
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Sentry is not supported in current configuration")
|
message (${RECONFIGURE_MESSAGE_LEVEL} "Sentry is not supported in current configuration")
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
option(USE_SNAPPY "Enable snappy library" ${ENABLE_LIBRARIES})
|
option(USE_SNAPPY "Enable snappy library" ON)
|
||||||
|
|
||||||
if(NOT USE_SNAPPY)
|
if(NOT USE_SNAPPY)
|
||||||
if (USE_INTERNAL_SNAPPY_LIBRARY)
|
if (USE_INTERNAL_SNAPPY_LIBRARY)
|
||||||
@ -7,7 +7,7 @@ if(NOT USE_SNAPPY)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_SNAPPY_LIBRARY "Set to FALSE to use system snappy library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_SNAPPY_LIBRARY "Set to FALSE to use system snappy library instead of bundled" ON)
|
||||||
|
|
||||||
if(NOT USE_INTERNAL_SNAPPY_LIBRARY)
|
if(NOT USE_INTERNAL_SNAPPY_LIBRARY)
|
||||||
find_library(SNAPPY_LIBRARY snappy)
|
find_library(SNAPPY_LIBRARY snappy)
|
||||||
|
@ -9,7 +9,7 @@ if(NOT ENABLE_SSL)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(USE_INTERNAL_SSL_LIBRARY "Set to FALSE to use system *ssl library instead of bundled" ${NOT_UNBUNDLED})
|
option(USE_INTERNAL_SSL_LIBRARY "Set to FALSE to use system *ssl library instead of bundled" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/boringssl/README.md")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/boringssl/README.md")
|
||||||
if(USE_INTERNAL_SSL_LIBRARY)
|
if(USE_INTERNAL_SSL_LIBRARY)
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
option(ENABLE_STATS "Enable StatsLib library" ${ENABLE_LIBRARIES})
|
|
||||||
|
|
||||||
if (ENABLE_STATS)
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/stats")
|
|
||||||
message (WARNING "submodule contrib/stats is missing. to fix try run: \n git submodule update --init")
|
|
||||||
set (ENABLE_STATS 0)
|
|
||||||
set (USE_STATS 0)
|
|
||||||
elseif (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/gcem")
|
|
||||||
message (WARNING "submodule contrib/gcem is missing. to fix try run: \n git submodule update --init")
|
|
||||||
set (ENABLE_STATS 0)
|
|
||||||
set (USE_STATS 0)
|
|
||||||
else()
|
|
||||||
set(STATS_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/stats/include)
|
|
||||||
set(GCEM_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/gcem/include)
|
|
||||||
set (USE_STATS 1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT USE_STATS)
|
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't enable stats library")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message (STATUS "Using stats=${USE_STATS} : ${STATS_INCLUDE_DIR}")
|
|
||||||
message (STATUS "Using gcem=${USE_STATS}: ${GCEM_INCLUDE_DIR}")
|
|
@ -1,4 +1,4 @@
|
|||||||
option (USE_INTERNAL_XZ_LIBRARY "Set to OFF to use system xz (lzma) library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_XZ_LIBRARY "Set to OFF to use system xz (lzma) library instead of bundled" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/xz/src/liblzma/api/lzma.h")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/xz/src/liblzma/api/lzma.h")
|
||||||
if(USE_INTERNAL_XZ_LIBRARY)
|
if(USE_INTERNAL_XZ_LIBRARY)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
option (USE_INTERNAL_ZLIB_LIBRARY "Set to FALSE to use system zlib library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_ZLIB_LIBRARY "Set to FALSE to use system zlib library instead of bundled" ON)
|
||||||
|
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
set (INTERNAL_ZLIB_NAME "zlib-ng" CACHE INTERNAL "")
|
set (INTERNAL_ZLIB_NAME "zlib-ng" CACHE INTERNAL "")
|
||||||
@ -29,9 +29,6 @@ if (NOT USE_INTERNAL_ZLIB_LIBRARY)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT ZLIB_FOUND AND NOT MISSING_INTERNAL_ZLIB_LIBRARY)
|
if (NOT ZLIB_FOUND AND NOT MISSING_INTERNAL_ZLIB_LIBRARY)
|
||||||
# https://github.com/zlib-ng/zlib-ng/pull/733
|
|
||||||
# This is disabed by default
|
|
||||||
add_compile_definitions(Z_TLS=__thread)
|
|
||||||
set (USE_INTERNAL_ZLIB_LIBRARY 1)
|
set (USE_INTERNAL_ZLIB_LIBRARY 1)
|
||||||
set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}" "${ClickHouse_BINARY_DIR}/contrib/${INTERNAL_ZLIB_NAME}" CACHE INTERNAL "") # generated zconf.h
|
set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}" "${ClickHouse_BINARY_DIR}/contrib/${INTERNAL_ZLIB_NAME}" CACHE INTERNAL "") # generated zconf.h
|
||||||
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco
|
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
option (USE_INTERNAL_ZSTD_LIBRARY "Set to FALSE to use system zstd library instead of bundled" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_ZSTD_LIBRARY "Set to FALSE to use system zstd library instead of bundled" ON)
|
||||||
|
|
||||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/zstd/lib/zstd.h")
|
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/zstd/lib/zstd.h")
|
||||||
if(USE_INTERNAL_ZSTD_LIBRARY)
|
if(USE_INTERNAL_ZSTD_LIBRARY)
|
||||||
|
@ -3,17 +3,13 @@ set (CMAKE_SYSTEM_PROCESSOR "aarch64")
|
|||||||
set (CMAKE_C_COMPILER_TARGET "aarch64-unknown-freebsd12")
|
set (CMAKE_C_COMPILER_TARGET "aarch64-unknown-freebsd12")
|
||||||
set (CMAKE_CXX_COMPILER_TARGET "aarch64-unknown-freebsd12")
|
set (CMAKE_CXX_COMPILER_TARGET "aarch64-unknown-freebsd12")
|
||||||
set (CMAKE_ASM_COMPILER_TARGET "aarch64-unknown-freebsd12")
|
set (CMAKE_ASM_COMPILER_TARGET "aarch64-unknown-freebsd12")
|
||||||
set (CMAKE_SYSROOT "${CMAKE_CURRENT_LIST_DIR}/../toolchain/freebsd-aarch64")
|
set (CMAKE_SYSROOT "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/freebsd-aarch64")
|
||||||
|
|
||||||
set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # disable linkage check - it doesn't work in CMake
|
set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # disable linkage check - it doesn't work in CMake
|
||||||
|
|
||||||
set (CMAKE_AR "/usr/bin/ar" CACHE FILEPATH "" FORCE)
|
# Will be changed later, but somehow needed to be set here.
|
||||||
set (CMAKE_RANLIB "/usr/bin/ranlib" CACHE FILEPATH "" FORCE)
|
set (CMAKE_AR "ar")
|
||||||
|
set (CMAKE_RANLIB "ranlib")
|
||||||
set (LINKER_NAME "ld.lld" CACHE STRING "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
|
|
||||||
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)
|
||||||
|
@ -3,17 +3,13 @@ set (CMAKE_SYSTEM_PROCESSOR "x86_64")
|
|||||||
set (CMAKE_C_COMPILER_TARGET "x86_64-pc-freebsd11")
|
set (CMAKE_C_COMPILER_TARGET "x86_64-pc-freebsd11")
|
||||||
set (CMAKE_CXX_COMPILER_TARGET "x86_64-pc-freebsd11")
|
set (CMAKE_CXX_COMPILER_TARGET "x86_64-pc-freebsd11")
|
||||||
set (CMAKE_ASM_COMPILER_TARGET "x86_64-pc-freebsd11")
|
set (CMAKE_ASM_COMPILER_TARGET "x86_64-pc-freebsd11")
|
||||||
set (CMAKE_SYSROOT "${CMAKE_CURRENT_LIST_DIR}/../toolchain/freebsd-x86_64")
|
set (CMAKE_SYSROOT "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/freebsd-x86_64")
|
||||||
|
|
||||||
set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # disable linkage check - it doesn't work in CMake
|
set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # disable linkage check - it doesn't work in CMake
|
||||||
|
|
||||||
set (CMAKE_AR "/usr/bin/ar" CACHE FILEPATH "" FORCE)
|
# Will be changed later, but somehow needed to be set here.
|
||||||
set (CMAKE_RANLIB "/usr/bin/ranlib" CACHE FILEPATH "" FORCE)
|
set (CMAKE_AR "ar")
|
||||||
|
set (CMAKE_RANLIB "ranlib")
|
||||||
set (LINKER_NAME "ld.lld" CACHE STRING "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
|
|
||||||
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)
|
||||||
|
@ -5,8 +5,12 @@ set (DEFAULT_LIBS "-nodefaultlibs")
|
|||||||
|
|
||||||
# We need builtins from Clang's RT even without libcxx - for ubsan+int128.
|
# We need builtins from Clang's RT even without libcxx - for ubsan+int128.
|
||||||
# See https://bugs.llvm.org/show_bug.cgi?id=16404
|
# See https://bugs.llvm.org/show_bug.cgi?id=16404
|
||||||
if (COMPILER_CLANG AND NOT CMAKE_CROSSCOMPILING)
|
if (COMPILER_CLANG)
|
||||||
execute_process (COMMAND ${CMAKE_CXX_COMPILER} --print-libgcc-file-name --rtlib=compiler-rt OUTPUT_VARIABLE BUILTINS_LIBRARY OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process (COMMAND ${CMAKE_CXX_COMPILER} --target=${CMAKE_CXX_COMPILER_TARGET} --print-libgcc-file-name --rtlib=compiler-rt OUTPUT_VARIABLE BUILTINS_LIBRARY OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
|
if (NOT EXISTS "${BUILTINS_LIBRARY}")
|
||||||
|
set (BUILTINS_LIBRARY "-lgcc")
|
||||||
|
endif ()
|
||||||
else ()
|
else ()
|
||||||
set (BUILTINS_LIBRARY "-lgcc")
|
set (BUILTINS_LIBRARY "-lgcc")
|
||||||
endif ()
|
endif ()
|
||||||
@ -28,7 +32,7 @@ set(CMAKE_C_STANDARD_LIBRARIES ${DEFAULT_LIBS})
|
|||||||
# glibc-compatibility library relies to constant version of libc headers
|
# glibc-compatibility library relies to constant version of libc headers
|
||||||
# (because minor changes in function attributes between different glibc versions will introduce incompatibilities)
|
# (because minor changes in function attributes between different glibc versions will introduce incompatibilities)
|
||||||
# This is for x86_64. For other architectures we have separate toolchains.
|
# This is for x86_64. For other architectures we have separate toolchains.
|
||||||
if (ARCH_AMD64 AND NOT_UNBUNDLED AND NOT CMAKE_CROSSCOMPILING)
|
if (ARCH_AMD64 AND NOT CMAKE_CROSSCOMPILING)
|
||||||
set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES ${ClickHouse_SOURCE_DIR}/contrib/libc-headers/x86_64-linux-gnu ${ClickHouse_SOURCE_DIR}/contrib/libc-headers)
|
set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES ${ClickHouse_SOURCE_DIR}/contrib/libc-headers/x86_64-linux-gnu ${ClickHouse_SOURCE_DIR}/contrib/libc-headers)
|
||||||
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${ClickHouse_SOURCE_DIR}/contrib/libc-headers/x86_64-linux-gnu ${ClickHouse_SOURCE_DIR}/contrib/libc-headers)
|
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${ClickHouse_SOURCE_DIR}/contrib/libc-headers/x86_64-linux-gnu ${ClickHouse_SOURCE_DIR}/contrib/libc-headers)
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -6,25 +6,18 @@ set (CMAKE_C_COMPILER_TARGET "aarch64-linux-gnu")
|
|||||||
set (CMAKE_CXX_COMPILER_TARGET "aarch64-linux-gnu")
|
set (CMAKE_CXX_COMPILER_TARGET "aarch64-linux-gnu")
|
||||||
set (CMAKE_ASM_COMPILER_TARGET "aarch64-linux-gnu")
|
set (CMAKE_ASM_COMPILER_TARGET "aarch64-linux-gnu")
|
||||||
|
|
||||||
|
# Will be changed later, but somehow needed to be set here.
|
||||||
|
set (CMAKE_AR "ar")
|
||||||
|
set (CMAKE_RANLIB "ranlib")
|
||||||
|
|
||||||
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-aarch64")
|
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-aarch64")
|
||||||
|
|
||||||
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}/aarch64-linux-gnu/libc")
|
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}/aarch64-linux-gnu/libc")
|
||||||
|
|
||||||
find_program (LLVM_AR_PATH NAMES "llvm-ar" "llvm-ar-13" "llvm-ar-12" "llvm-ar-11" "llvm-ar-10" "llvm-ar-9" "llvm-ar-8")
|
|
||||||
find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib" "llvm-ranlib-13" "llvm-ranlib-12" "llvm-ranlib-11" "llvm-ranlib-10" "llvm-ranlib-9")
|
|
||||||
|
|
||||||
set (CMAKE_AR "${LLVM_AR_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
set (CMAKE_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
|
|
||||||
set (LINKER_NAME "ld.lld" CACHE STRING "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
@ -6,25 +6,18 @@ set (CMAKE_C_COMPILER_TARGET "ppc64le-linux-gnu")
|
|||||||
set (CMAKE_CXX_COMPILER_TARGET "ppc64le-linux-gnu")
|
set (CMAKE_CXX_COMPILER_TARGET "ppc64le-linux-gnu")
|
||||||
set (CMAKE_ASM_COMPILER_TARGET "ppc64le-linux-gnu")
|
set (CMAKE_ASM_COMPILER_TARGET "ppc64le-linux-gnu")
|
||||||
|
|
||||||
|
# Will be changed later, but somehow needed to be set here.
|
||||||
|
set (CMAKE_AR "ar")
|
||||||
|
set (CMAKE_RANLIB "ranlib")
|
||||||
|
|
||||||
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-powerpc64le")
|
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-powerpc64le")
|
||||||
|
|
||||||
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}/powerpc64le-linux-gnu/libc")
|
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}/powerpc64le-linux-gnu/libc")
|
||||||
|
|
||||||
find_program (LLVM_AR_PATH NAMES "llvm-ar" "llvm-ar-13" "llvm-ar-12" "llvm-ar-11" "llvm-ar-10" "llvm-ar-9" "llvm-ar-8")
|
|
||||||
find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib" "llvm-ranlib-13" "llvm-ranlib-12" "llvm-ranlib-11" "llvm-ranlib-10" "llvm-ranlib-9")
|
|
||||||
|
|
||||||
set (CMAKE_AR "${LLVM_AR_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
set (CMAKE_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
|
|
||||||
set (LINKER_NAME "ld.lld" CACHE STRING "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
@ -6,24 +6,20 @@ set (CMAKE_C_COMPILER_TARGET "riscv64-linux-gnu")
|
|||||||
set (CMAKE_CXX_COMPILER_TARGET "riscv64-linux-gnu")
|
set (CMAKE_CXX_COMPILER_TARGET "riscv64-linux-gnu")
|
||||||
set (CMAKE_ASM_COMPILER_TARGET "riscv64-linux-gnu")
|
set (CMAKE_ASM_COMPILER_TARGET "riscv64-linux-gnu")
|
||||||
|
|
||||||
|
# Will be changed later, but somehow needed to be set here.
|
||||||
|
set (CMAKE_AR "ar")
|
||||||
|
set (CMAKE_RANLIB "ranlib")
|
||||||
|
|
||||||
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-riscv64")
|
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-riscv64")
|
||||||
|
|
||||||
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}")
|
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}")
|
||||||
|
|
||||||
find_program (LLVM_AR_PATH NAMES "llvm-ar" "llvm-ar-13" "llvm-ar-12" "llvm-ar-11" "llvm-ar-10" "llvm-ar-9" "llvm-ar-8")
|
|
||||||
find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib" "llvm-ranlib-13" "llvm-ranlib-12" "llvm-ranlib-11" "llvm-ranlib-10" "llvm-ranlib-9")
|
|
||||||
|
|
||||||
set (CMAKE_AR "${LLVM_AR_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
set (CMAKE_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
|
|
||||||
set (LINKER_NAME "ld.lld" CACHE STRING "" FORCE)
|
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=bfd")
|
||||||
|
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=bfd")
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
|
|
||||||
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)
|
||||||
|
@ -6,25 +6,18 @@ set (CMAKE_C_COMPILER_TARGET "x86_64-linux-musl")
|
|||||||
set (CMAKE_CXX_COMPILER_TARGET "x86_64-linux-musl")
|
set (CMAKE_CXX_COMPILER_TARGET "x86_64-linux-musl")
|
||||||
set (CMAKE_ASM_COMPILER_TARGET "x86_64-linux-musl")
|
set (CMAKE_ASM_COMPILER_TARGET "x86_64-linux-musl")
|
||||||
|
|
||||||
|
# Will be changed later, but somehow needed to be set here.
|
||||||
|
set (CMAKE_AR "ar")
|
||||||
|
set (CMAKE_RANLIB "ranlib")
|
||||||
|
|
||||||
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-x86_64-musl")
|
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-x86_64-musl")
|
||||||
|
|
||||||
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}")
|
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}")
|
||||||
|
|
||||||
find_program (LLVM_AR_PATH NAMES "llvm-ar" "llvm-ar-13" "llvm-ar-12" "llvm-ar-11" "llvm-ar-10" "llvm-ar-9" "llvm-ar-8")
|
|
||||||
find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib" "llvm-ranlib-13" "llvm-ranlib-12" "llvm-ranlib-11" "llvm-ranlib-10" "llvm-ranlib-9")
|
|
||||||
|
|
||||||
set (CMAKE_AR "${LLVM_AR_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
set (CMAKE_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
|
|
||||||
set (LINKER_NAME "ld.lld" CACHE STRING "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
@ -6,25 +6,18 @@ set (CMAKE_C_COMPILER_TARGET "x86_64-linux-gnu")
|
|||||||
set (CMAKE_CXX_COMPILER_TARGET "x86_64-linux-gnu")
|
set (CMAKE_CXX_COMPILER_TARGET "x86_64-linux-gnu")
|
||||||
set (CMAKE_ASM_COMPILER_TARGET "x86_64-linux-gnu")
|
set (CMAKE_ASM_COMPILER_TARGET "x86_64-linux-gnu")
|
||||||
|
|
||||||
|
# Will be changed later, but somehow needed to be set here.
|
||||||
|
set (CMAKE_AR "ar")
|
||||||
|
set (CMAKE_RANLIB "ranlib")
|
||||||
|
|
||||||
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-x86_64")
|
set (TOOLCHAIN_PATH "${CMAKE_CURRENT_LIST_DIR}/../../contrib/sysroot/linux-x86_64")
|
||||||
|
|
||||||
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}/x86_64-linux-gnu/libc")
|
set (CMAKE_SYSROOT "${TOOLCHAIN_PATH}/x86_64-linux-gnu/libc")
|
||||||
|
|
||||||
find_program (LLVM_AR_PATH NAMES "llvm-ar" "llvm-ar-13" "llvm-ar-12" "llvm-ar-11" "llvm-ar-10" "llvm-ar-9" "llvm-ar-8")
|
|
||||||
find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib" "llvm-ranlib-13" "llvm-ranlib-12" "llvm-ranlib-11" "llvm-ranlib-10" "llvm-ranlib-9")
|
|
||||||
|
|
||||||
set (CMAKE_AR "${LLVM_AR_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
set (CMAKE_RANLIB "${LLVM_RANLIB_PATH}" CACHE FILEPATH "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${TOOLCHAIN_PATH}")
|
||||||
|
|
||||||
set (LINKER_NAME "ld.lld" CACHE STRING "" FORCE)
|
|
||||||
|
|
||||||
set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
set (FULL_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
set (FULL_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
||||||
set (FULL_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
set (FULL_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
||||||
set (FULL_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
set (FULL_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
|
||||||
|
|
||||||
message (STATUS "compiler C = ${CMAKE_C_COMPILER} ${FULL_C_FLAGS}")
|
message (STATUS "compiler C = ${CMAKE_C_COMPILER} ${FULL_C_FLAGS}")
|
||||||
message (STATUS "compiler CXX = ${CMAKE_CXX_COMPILER} ${FULL_CXX_FLAGS}")
|
message (STATUS "compiler CXX = ${CMAKE_CXX_COMPILER} ${FULL_CXX_FLAGS}")
|
||||||
message (STATUS "LINKER_FLAGS = ${FULL_EXE_LINKER_FLAGS}")
|
message (STATUS "LINKER_FLAGS = ${FULL_EXE_LINKER_FLAGS}")
|
||||||
|
|
||||||
|
# Reproducible builds
|
||||||
|
string (REPLACE "${CMAKE_SOURCE_DIR}" "." FULL_C_FLAGS_NORMALIZED "${FULL_C_FLAGS}")
|
||||||
|
string (REPLACE "${CMAKE_SOURCE_DIR}" "." FULL_CXX_FLAGS_NORMALIZED "${FULL_CXX_FLAGS}")
|
||||||
|
string (REPLACE "${CMAKE_SOURCE_DIR}" "." FULL_EXE_LINKER_FLAGS_NORMALIZED "${FULL_EXE_LINKER_FLAGS}")
|
||||||
|
@ -78,6 +78,15 @@ if (SANITIZE)
|
|||||||
|
|
||||||
elseif (SANITIZE STREQUAL "undefined")
|
elseif (SANITIZE STREQUAL "undefined")
|
||||||
set (UBSAN_FLAGS "-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=float-divide-by-zero")
|
set (UBSAN_FLAGS "-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=float-divide-by-zero")
|
||||||
|
if (ENABLE_FUZZING)
|
||||||
|
# Unsigned integer overflow is well defined behaviour from a perspective of C++ standard,
|
||||||
|
# compilers or CPU. We use in hash functions like SipHash and many other places in our codebase.
|
||||||
|
# This flag is needed only because fuzzers are run inside oss-fuzz infrastructure
|
||||||
|
# and they have a bunch of flags not halt the program if UIO happend and even to silence that warnings.
|
||||||
|
# But for unknown reason that flags don't work with ClickHouse or we don't understand how to properly use them,
|
||||||
|
# that's why we often receive reports about UIO. The simplest way to avoid this is just set this flag here.
|
||||||
|
set(UBSAN_FLAGS "${SAN_FLAGS} -fno-sanitize=unsigned-integer-overflow")
|
||||||
|
endif()
|
||||||
if (COMPILER_CLANG)
|
if (COMPILER_CLANG)
|
||||||
set (UBSAN_FLAGS "${UBSAN_FLAGS} -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/ubsan_suppressions.txt")
|
set (UBSAN_FLAGS "${UBSAN_FLAGS} -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/tests/ubsan_suppressions.txt")
|
||||||
else()
|
else()
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
# Compiler
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
set (COMPILER_GCC 1)
|
set (COMPILER_GCC 1)
|
||||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
|
||||||
@ -6,6 +8,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||||||
set (COMPILER_CLANG 1)
|
set (COMPILER_CLANG 1)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version)
|
||||||
|
|
||||||
if (COMPILER_GCC)
|
if (COMPILER_GCC)
|
||||||
# Require minimum version of gcc
|
# Require minimum version of gcc
|
||||||
set (GCC_MINIMUM_VERSION 11)
|
set (GCC_MINIMUM_VERSION 11)
|
||||||
@ -44,8 +48,10 @@ else ()
|
|||||||
message (WARNING "You are using an unsupported compiler. Compilation has only been tested with Clang and GCC.")
|
message (WARNING "You are using an unsupported compiler. Compilation has only been tested with Clang and GCC.")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
STRING(REGEX MATCHALL "[0-9]+" COMPILER_VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
|
string (REGEX MATCHALL "[0-9]+" COMPILER_VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
|
||||||
LIST(GET COMPILER_VERSION_LIST 0 COMPILER_VERSION_MAJOR)
|
list (GET COMPILER_VERSION_LIST 0 COMPILER_VERSION_MAJOR)
|
||||||
|
|
||||||
|
# Linker
|
||||||
|
|
||||||
# Example values: `lld-10`, `gold`.
|
# Example values: `lld-10`, `gold`.
|
||||||
option (LINKER_NAME "Linker name or full path")
|
option (LINKER_NAME "Linker name or full path")
|
||||||
@ -93,3 +99,69 @@ if (LINKER_NAME)
|
|||||||
|
|
||||||
message(STATUS "Using custom linker by name: ${LINKER_NAME}")
|
message(STATUS "Using custom linker by name: ${LINKER_NAME}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# Archiver
|
||||||
|
|
||||||
|
if (COMPILER_GCC)
|
||||||
|
find_program (LLVM_AR_PATH NAMES "llvm-ar" "llvm-ar-13" "llvm-ar-12" "llvm-ar-11")
|
||||||
|
else ()
|
||||||
|
find_program (LLVM_AR_PATH NAMES "llvm-ar-${COMPILER_VERSION_MAJOR}" "llvm-ar")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (LLVM_AR_PATH)
|
||||||
|
set (CMAKE_AR "${LLVM_AR_PATH}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Ranlib
|
||||||
|
|
||||||
|
if (COMPILER_GCC)
|
||||||
|
find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib" "llvm-ranlib-13" "llvm-ranlib-12" "llvm-ranlib-11")
|
||||||
|
else ()
|
||||||
|
find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib-${COMPILER_VERSION_MAJOR}" "llvm-ranlib")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (LLVM_RANLIB_PATH)
|
||||||
|
set (CMAKE_RANLIB "${LLVM_RANLIB_PATH}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Install Name Tool
|
||||||
|
|
||||||
|
if (COMPILER_GCC)
|
||||||
|
find_program (LLVM_INSTALL_NAME_TOOL_PATH NAMES "llvm-install-name-tool" "llvm-install-name-tool-13" "llvm-install-name-tool-12" "llvm-install-name-tool-11")
|
||||||
|
else ()
|
||||||
|
find_program (LLVM_INSTALL_NAME_TOOL_PATH NAMES "llvm-install-name-tool-${COMPILER_VERSION_MAJOR}" "llvm-install-name-tool")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (LLVM_INSTALL_NAME_TOOL_PATH)
|
||||||
|
set (CMAKE_INSTALL_NAME_TOOL "${LLVM_INSTALL_NAME_TOOL_PATH}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Objcopy
|
||||||
|
|
||||||
|
if (COMPILER_GCC)
|
||||||
|
find_program (OBJCOPY_PATH NAMES "llvm-objcopy" "llvm-objcopy-13" "llvm-objcopy-12" "llvm-objcopy-11" "objcopy")
|
||||||
|
else ()
|
||||||
|
find_program (OBJCOPY_PATH NAMES "llvm-objcopy-${COMPILER_VERSION_MAJOR}" "llvm-objcopy" "objcopy")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (NOT OBJCOPY_PATH AND OS_DARWIN)
|
||||||
|
find_program (BREW_PATH NAMES "brew")
|
||||||
|
if (BREW_PATH)
|
||||||
|
execute_process (COMMAND ${BREW_PATH} --prefix llvm ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE LLVM_PREFIX)
|
||||||
|
if (LLVM_PREFIX)
|
||||||
|
find_program (OBJCOPY_PATH NAMES "llvm-objcopy" PATHS "${LLVM_PREFIX}/bin" NO_DEFAULT_PATH)
|
||||||
|
endif ()
|
||||||
|
if (NOT OBJCOPY_PATH)
|
||||||
|
execute_process (COMMAND ${BREW_PATH} --prefix binutils ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE BINUTILS_PREFIX)
|
||||||
|
if (BINUTILS_PREFIX)
|
||||||
|
find_program (OBJCOPY_PATH NAMES "objcopy" PATHS "${BINUTILS_PREFIX}/bin" NO_DEFAULT_PATH)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (OBJCOPY_PATH)
|
||||||
|
message (STATUS "Using objcopy: ${OBJCOPY_PATH}")
|
||||||
|
else ()
|
||||||
|
message (FATAL_ERROR "Cannot find objcopy.")
|
||||||
|
endif ()
|
||||||
|
@ -7,9 +7,7 @@
|
|||||||
# - sometimes warnings from 3rd party libraries may come from macro substitutions in our code
|
# - sometimes warnings from 3rd party libraries may come from macro substitutions in our code
|
||||||
# and we have to wrap them with #pragma GCC/clang diagnostic ignored
|
# and we have to wrap them with #pragma GCC/clang diagnostic ignored
|
||||||
|
|
||||||
if (NOT MSVC)
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# Add some warnings that are not available even with -Wall -Wextra -Wpedantic.
|
# Add some warnings that are not available even with -Wall -Wextra -Wpedantic.
|
||||||
# Intended for exploration of new compiler warnings that may be found useful.
|
# Intended for exploration of new compiler warnings that may be found useful.
|
||||||
@ -28,46 +26,6 @@ if (COMPILER_CLANG)
|
|||||||
no_warning(zero-length-array)
|
no_warning(zero-length-array)
|
||||||
no_warning(c11-extensions)
|
no_warning(c11-extensions)
|
||||||
|
|
||||||
add_warning(comma)
|
|
||||||
add_warning(conditional-uninitialized)
|
|
||||||
add_warning(covered-switch-default)
|
|
||||||
add_warning(deprecated)
|
|
||||||
add_warning(embedded-directive)
|
|
||||||
add_warning(empty-init-stmt) # linux-only
|
|
||||||
add_warning(extra-semi-stmt) # linux-only
|
|
||||||
add_warning(extra-semi)
|
|
||||||
add_warning(gnu-case-range)
|
|
||||||
add_warning(inconsistent-missing-destructor-override)
|
|
||||||
add_warning(newline-eof)
|
|
||||||
add_warning(old-style-cast)
|
|
||||||
add_warning(range-loop-analysis)
|
|
||||||
add_warning(redundant-parens)
|
|
||||||
add_warning(reserved-id-macro)
|
|
||||||
add_warning(shadow-field)
|
|
||||||
add_warning(shadow-uncaptured-local)
|
|
||||||
add_warning(shadow)
|
|
||||||
add_warning(string-plus-int)
|
|
||||||
add_warning(undef)
|
|
||||||
add_warning(unreachable-code-return)
|
|
||||||
add_warning(unreachable-code)
|
|
||||||
add_warning(unused-exception-parameter)
|
|
||||||
add_warning(unused-macros)
|
|
||||||
add_warning(unused-member-function)
|
|
||||||
add_warning(unneeded-internal-declaration)
|
|
||||||
add_warning(implicit-int-float-conversion)
|
|
||||||
add_warning(no-delete-null-pointer-checks)
|
|
||||||
add_warning(anon-enum-enum-conversion)
|
|
||||||
add_warning(assign-enum)
|
|
||||||
add_warning(bitwise-op-parentheses)
|
|
||||||
add_warning(int-in-bool-context)
|
|
||||||
add_warning(sometimes-uninitialized)
|
|
||||||
add_warning(tautological-bitwise-compare)
|
|
||||||
|
|
||||||
# XXX: libstdc++ has some of these for 3way compare
|
|
||||||
if (USE_LIBCXX)
|
|
||||||
add_warning(zero-as-null-pointer-constant)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WEVERYTHING)
|
if (WEVERYTHING)
|
||||||
add_warning(everything)
|
add_warning(everything)
|
||||||
no_warning(c++98-compat-pedantic)
|
no_warning(c++98-compat-pedantic)
|
||||||
@ -103,6 +61,47 @@ if (COMPILER_CLANG)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# TODO Enable conversion, sign-conversion, double-promotion warnings.
|
# TODO Enable conversion, sign-conversion, double-promotion warnings.
|
||||||
|
else ()
|
||||||
|
add_warning(comma)
|
||||||
|
add_warning(conditional-uninitialized)
|
||||||
|
add_warning(covered-switch-default)
|
||||||
|
add_warning(deprecated)
|
||||||
|
add_warning(embedded-directive)
|
||||||
|
add_warning(empty-init-stmt) # linux-only
|
||||||
|
add_warning(extra-semi-stmt) # linux-only
|
||||||
|
add_warning(extra-semi)
|
||||||
|
add_warning(gnu-case-range)
|
||||||
|
add_warning(inconsistent-missing-destructor-override)
|
||||||
|
add_warning(newline-eof)
|
||||||
|
add_warning(old-style-cast)
|
||||||
|
add_warning(range-loop-analysis)
|
||||||
|
add_warning(redundant-parens)
|
||||||
|
add_warning(reserved-id-macro)
|
||||||
|
add_warning(shadow-field)
|
||||||
|
add_warning(shadow-uncaptured-local)
|
||||||
|
add_warning(shadow)
|
||||||
|
add_warning(string-plus-int)
|
||||||
|
add_warning(undef)
|
||||||
|
add_warning(unreachable-code-return)
|
||||||
|
add_warning(unreachable-code)
|
||||||
|
add_warning(unused-exception-parameter)
|
||||||
|
add_warning(unused-macros)
|
||||||
|
add_warning(unused-member-function)
|
||||||
|
add_warning(unneeded-internal-declaration)
|
||||||
|
add_warning(implicit-int-float-conversion)
|
||||||
|
add_warning(no-delete-null-pointer-checks)
|
||||||
|
add_warning(anon-enum-enum-conversion)
|
||||||
|
add_warning(assign-enum)
|
||||||
|
add_warning(bitwise-op-parentheses)
|
||||||
|
add_warning(int-in-bool-context)
|
||||||
|
add_warning(sometimes-uninitialized)
|
||||||
|
add_warning(tautological-bitwise-compare)
|
||||||
|
|
||||||
|
# XXX: libstdc++ has some of these for 3way compare
|
||||||
|
if (USE_LIBCXX)
|
||||||
|
add_warning(zero-as-null-pointer-constant)
|
||||||
|
endif()
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
elseif (COMPILER_GCC)
|
elseif (COMPILER_GCC)
|
||||||
# Add compiler options only to c++ compiler
|
# Add compiler options only to c++ compiler
|
||||||
|
77
contrib/CMakeLists.txt
vendored
77
contrib/CMakeLists.txt
vendored
@ -51,7 +51,7 @@ if (USE_YAML_CPP)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (USE_INTERNAL_XZ_LIBRARY)
|
if (USE_INTERNAL_XZ_LIBRARY)
|
||||||
add_subdirectory (xz)
|
add_subdirectory (xz-cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory (poco-cmake)
|
add_subdirectory (poco-cmake)
|
||||||
@ -64,9 +64,7 @@ if (USE_INTERNAL_ZSTD_LIBRARY)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_INTERNAL_RE2_LIBRARY)
|
if (USE_INTERNAL_RE2_LIBRARY)
|
||||||
set(RE2_BUILD_TESTING 0 CACHE INTERNAL "")
|
add_subdirectory (re2-cmake)
|
||||||
add_subdirectory (re2)
|
|
||||||
add_subdirectory (re2_st)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_INTERNAL_DOUBLE_CONVERSION_LIBRARY)
|
if (USE_INTERNAL_DOUBLE_CONVERSION_LIBRARY)
|
||||||
@ -82,23 +80,10 @@ if (USE_INTERNAL_FARMHASH_LIBRARY)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_INTERNAL_ZLIB_LIBRARY)
|
if (USE_INTERNAL_ZLIB_LIBRARY)
|
||||||
set (ZLIB_ENABLE_TESTS 0 CACHE INTERNAL "")
|
if (INTERNAL_ZLIB_NAME STREQUAL "zlib-ng")
|
||||||
set (SKIP_INSTALL_ALL 1 CACHE INTERNAL "")
|
add_subdirectory (zlib-ng-cmake)
|
||||||
set (ZLIB_COMPAT 1 CACHE INTERNAL "") # also enables WITH_GZFILEOP
|
else ()
|
||||||
set (WITH_NATIVE_INSTRUCTIONS ${ARCH_NATIVE} CACHE INTERNAL "")
|
add_subdirectory (${INTERNAL_ZLIB_NAME})
|
||||||
if (OS_FREEBSD OR ARCH_I386)
|
|
||||||
set (WITH_OPTIM 0 CACHE INTERNAL "") # Bug in assembler
|
|
||||||
endif ()
|
|
||||||
if (ARCH_AARCH64)
|
|
||||||
set(WITH_NEON 1 CACHE INTERNAL "")
|
|
||||||
set(WITH_ACLE 1 CACHE INTERNAL "")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_subdirectory (${INTERNAL_ZLIB_NAME})
|
|
||||||
# We should use same defines when including zlib.h as used when zlib compiled
|
|
||||||
target_compile_definitions (zlib PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
|
|
||||||
if (ARCH_AMD64 OR ARCH_AARCH64)
|
|
||||||
target_compile_definitions (zlib PUBLIC X86_64 UNALIGNED_OK)
|
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@ -117,28 +102,8 @@ if (USE_INTERNAL_LDAP_LIBRARY)
|
|||||||
add_subdirectory (openldap-cmake)
|
add_subdirectory (openldap-cmake)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
function(mysql_support)
|
if (USE_INTERNAL_MYSQL_LIBRARY)
|
||||||
set(CLIENT_PLUGIN_CACHING_SHA2_PASSWORD STATIC)
|
add_subdirectory (mariadb-connector-c-cmake)
|
||||||
set(CLIENT_PLUGIN_SHA256_PASSWORD STATIC)
|
|
||||||
set(CLIENT_PLUGIN_REMOTE_IO OFF)
|
|
||||||
set(CLIENT_PLUGIN_DIALOG OFF)
|
|
||||||
set(CLIENT_PLUGIN_AUTH_GSSAPI_CLIENT OFF)
|
|
||||||
set(CLIENT_PLUGIN_CLIENT_ED25519 OFF)
|
|
||||||
set(CLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD OFF)
|
|
||||||
set(SKIP_TESTS 1)
|
|
||||||
if (GLIBC_COMPATIBILITY)
|
|
||||||
set(LIBM glibc-compatibility)
|
|
||||||
endif()
|
|
||||||
if (USE_INTERNAL_ZLIB_LIBRARY)
|
|
||||||
set(ZLIB_FOUND ON)
|
|
||||||
set(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
|
|
||||||
set(WITH_EXTERNAL_ZLIB ON)
|
|
||||||
endif()
|
|
||||||
set(WITH_CURL OFF)
|
|
||||||
add_subdirectory (mariadb-connector-c)
|
|
||||||
endfunction()
|
|
||||||
if (ENABLE_MYSQL AND USE_INTERNAL_MYSQL_LIBRARY)
|
|
||||||
mysql_support()
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_INTERNAL_RDKAFKA_LIBRARY)
|
if (USE_INTERNAL_RDKAFKA_LIBRARY)
|
||||||
@ -194,11 +159,7 @@ if (USE_INTERNAL_AVRO_LIBRARY)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(USE_INTERNAL_GTEST_LIBRARY)
|
if(USE_INTERNAL_GTEST_LIBRARY)
|
||||||
set(GOOGLETEST_VERSION 1.10.0) # master
|
add_subdirectory(googletest-cmake)
|
||||||
# Google Test from sources
|
|
||||||
add_subdirectory(${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest ${CMAKE_CURRENT_BINARY_DIR}/googletest)
|
|
||||||
# avoid problems with <regexp.h>
|
|
||||||
target_compile_definitions (gtest INTERFACE GTEST_HAS_POSIX_RE=0)
|
|
||||||
elseif(GTEST_SRC_DIR)
|
elseif(GTEST_SRC_DIR)
|
||||||
add_subdirectory(${GTEST_SRC_DIR}/googletest ${CMAKE_CURRENT_BINARY_DIR}/googletest)
|
add_subdirectory(${GTEST_SRC_DIR}/googletest ${CMAKE_CURRENT_BINARY_DIR}/googletest)
|
||||||
target_compile_definitions(gtest INTERFACE GTEST_HAS_POSIX_RE=0)
|
target_compile_definitions(gtest INTERFACE GTEST_HAS_POSIX_RE=0)
|
||||||
@ -229,7 +190,7 @@ if (USE_EMBEDDED_COMPILER)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_INTERNAL_LIBGSASL_LIBRARY)
|
if (USE_INTERNAL_LIBGSASL_LIBRARY)
|
||||||
add_subdirectory(libgsasl)
|
add_subdirectory(libgsasl-cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (USE_INTERNAL_LIBXML2_LIBRARY)
|
if (USE_INTERNAL_LIBXML2_LIBRARY)
|
||||||
@ -281,14 +242,7 @@ if (USE_AMQPCPP)
|
|||||||
add_subdirectory (amqpcpp-cmake)
|
add_subdirectory (amqpcpp-cmake)
|
||||||
endif()
|
endif()
|
||||||
if (USE_CASSANDRA)
|
if (USE_CASSANDRA)
|
||||||
# Need to use C++17 since the compilation is not possible with C++20 currently.
|
add_subdirectory (cassandra-cmake)
|
||||||
set (CMAKE_CXX_STANDARD_bak ${CMAKE_CXX_STANDARD})
|
|
||||||
set (CMAKE_CXX_STANDARD 17)
|
|
||||||
|
|
||||||
add_subdirectory (cassandra)
|
|
||||||
|
|
||||||
set (CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD_bak})
|
|
||||||
unset (CMAKE_CXX_STANDARD_bak)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Should go before:
|
# Should go before:
|
||||||
@ -296,16 +250,11 @@ endif()
|
|||||||
add_subdirectory (curl-cmake)
|
add_subdirectory (curl-cmake)
|
||||||
|
|
||||||
if (USE_SENTRY)
|
if (USE_SENTRY)
|
||||||
add_subdirectory (sentry-native)
|
add_subdirectory (sentry-native-cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory (fmtlib-cmake)
|
add_subdirectory (fmtlib-cmake)
|
||||||
|
|
||||||
if (USE_STATS)
|
|
||||||
add_subdirectory (stats-cmake)
|
|
||||||
add_subdirectory (gcem)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (USE_KRB5)
|
if (USE_KRB5)
|
||||||
add_subdirectory (krb5-cmake)
|
add_subdirectory (krb5-cmake)
|
||||||
if (USE_CYRUS_SASL)
|
if (USE_CYRUS_SASL)
|
||||||
@ -326,7 +275,7 @@ if (USE_NURAFT)
|
|||||||
add_subdirectory(nuraft-cmake)
|
add_subdirectory(nuraft-cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(fast_float)
|
add_subdirectory(fast_float-cmake)
|
||||||
|
|
||||||
if (USE_NLP)
|
if (USE_NLP)
|
||||||
add_subdirectory(libstemmer-c-cmake)
|
add_subdirectory(libstemmer-c-cmake)
|
||||||
|
@ -417,7 +417,49 @@ set(PARQUET_SRCS
|
|||||||
#list(TRANSFORM PARQUET_SRCS PREPEND "${LIBRARY_DIR}/") # cmake 3.12
|
#list(TRANSFORM PARQUET_SRCS PREPEND "${LIBRARY_DIR}/") # cmake 3.12
|
||||||
add_library(${PARQUET_LIBRARY} ${PARQUET_SRCS})
|
add_library(${PARQUET_LIBRARY} ${PARQUET_SRCS})
|
||||||
target_include_directories(${PARQUET_LIBRARY} SYSTEM PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/arrow/cpp/src" "${CMAKE_CURRENT_SOURCE_DIR}/cpp/src" PRIVATE ${OPENSSL_INCLUDE_DIR})
|
target_include_directories(${PARQUET_LIBRARY} SYSTEM PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/arrow/cpp/src" "${CMAKE_CURRENT_SOURCE_DIR}/cpp/src" PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||||
include("${ClickHouse_SOURCE_DIR}/contrib/thrift/build/cmake/ConfigureChecks.cmake") # makes config.h
|
|
||||||
|
set (HAVE_ARPA_INET_H 1)
|
||||||
|
set (HAVE_FCNTL_H 1)
|
||||||
|
set (HAVE_GETOPT_H 1)
|
||||||
|
set (HAVE_INTTYPES_H 1)
|
||||||
|
set (HAVE_NETDB_H 1)
|
||||||
|
set (HAVE_NETINET_IN_H 1)
|
||||||
|
set (HAVE_SIGNAL_H 1)
|
||||||
|
set (HAVE_STDINT_H 1)
|
||||||
|
set (HAVE_UNISTD_H 1)
|
||||||
|
set (HAVE_PTHREAD_H 1)
|
||||||
|
set (HAVE_SYS_IOCTL_H 1)
|
||||||
|
set (HAVE_SYS_PARAM_H 1)
|
||||||
|
set (HAVE_SYS_RESOURCE_H 1)
|
||||||
|
set (HAVE_SYS_SOCKET_H 1)
|
||||||
|
set (HAVE_SYS_STAT_H 1)
|
||||||
|
set (HAVE_SYS_TIME_H 1)
|
||||||
|
set (HAVE_SYS_UN_H 1)
|
||||||
|
set (HAVE_POLL_H 1)
|
||||||
|
set (HAVE_SYS_POLL_H 1)
|
||||||
|
set (HAVE_SYS_SELECT_H 1)
|
||||||
|
set (HAVE_SCHED_H 1)
|
||||||
|
set (HAVE_STRING_H 1)
|
||||||
|
set (HAVE_STRINGS_H 1)
|
||||||
|
set (HAVE_GETHOSTBYNAME 1)
|
||||||
|
set (HAVE_STRERROR_R 1)
|
||||||
|
set (HAVE_SCHED_GET_PRIORITY_MAX 1)
|
||||||
|
set (HAVE_SCHED_GET_PRIORITY_MIN 1)
|
||||||
|
|
||||||
|
if (OS_LINUX)
|
||||||
|
set (STRERROR_R_CHAR_P 1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
#set(PACKAGE ${PACKAGE_NAME})
|
||||||
|
#set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||||
|
#set(VERSION ${thrift_VERSION})
|
||||||
|
|
||||||
|
# generate a config.h file
|
||||||
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/thrift/config.h")
|
||||||
|
|
||||||
|
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
|
|
||||||
target_link_libraries(${PARQUET_LIBRARY} PUBLIC ${ARROW_LIBRARY} PRIVATE ${THRIFT_LIBRARY} boost::headers_only boost::regex ${OPENSSL_LIBRARIES})
|
target_link_libraries(${PARQUET_LIBRARY} PUBLIC ${ARROW_LIBRARY} PRIVATE ${THRIFT_LIBRARY} boost::headers_only boost::regex ${OPENSSL_LIBRARIES})
|
||||||
|
|
||||||
if (SANITIZE STREQUAL "undefined")
|
if (SANITIZE STREQUAL "undefined")
|
||||||
|
2
contrib/base64
vendored
2
contrib/base64
vendored
@ -1 +1 @@
|
|||||||
Subproject commit af9b331f2b4f30b41c70f3a571ff904a8251c1d3
|
Subproject commit 9499e0c4945589973b9ea1bc927377cfbc84aa46
|
2
contrib/boost
vendored
2
contrib/boost
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 79358a3106aab6af464430ed67c7efafebf5cd6f
|
Subproject commit fcb058e1459ac273ecfe7cdf72791cb1479115af
|
@ -1,4 +1,4 @@
|
|||||||
option (USE_INTERNAL_BOOST_LIBRARY "Use internal Boost library" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_BOOST_LIBRARY "Use internal Boost library" ON)
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_BOOST_LIBRARY)
|
if (NOT USE_INTERNAL_BOOST_LIBRARY)
|
||||||
# 1.70 like in contrib/boost
|
# 1.70 like in contrib/boost
|
||||||
@ -196,6 +196,12 @@ if (NOT EXTERNAL_BOOST_FOUND)
|
|||||||
"${LIBRARY_DIR}/libs/context/src/asm/make_ppc64_sysv_elf_gas.S"
|
"${LIBRARY_DIR}/libs/context/src/asm/make_ppc64_sysv_elf_gas.S"
|
||||||
"${LIBRARY_DIR}/libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S"
|
"${LIBRARY_DIR}/libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S"
|
||||||
)
|
)
|
||||||
|
elseif (ARCH_RISCV64)
|
||||||
|
set (SRCS_CONTEXT ${SRCS_CONTEXT}
|
||||||
|
"${LIBRARY_DIR}/libs/context/src/asm/jump_riscv64_sysv_elf_gas.S"
|
||||||
|
"${LIBRARY_DIR}/libs/context/src/asm/make_riscv64_sysv_elf_gas.S"
|
||||||
|
"${LIBRARY_DIR}/libs/context/src/asm/ontop_riscv64_sysv_elf_gas.S"
|
||||||
|
)
|
||||||
elseif(OS_DARWIN)
|
elseif(OS_DARWIN)
|
||||||
set (SRCS_CONTEXT ${SRCS_CONTEXT}
|
set (SRCS_CONTEXT ${SRCS_CONTEXT}
|
||||||
"${LIBRARY_DIR}/libs/context/src/asm/jump_x86_64_sysv_macho_gas.S"
|
"${LIBRARY_DIR}/libs/context/src/asm/jump_x86_64_sysv_macho_gas.S"
|
||||||
|
127
contrib/cassandra-cmake/CMakeLists.txt
Normal file
127
contrib/cassandra-cmake/CMakeLists.txt
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
# Need to use C++17 since the compilation is not possible with C++20 currently.
|
||||||
|
set (CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
set(CASS_ROOT_DIR ${CMAKE_SOURCE_DIR}/contrib/cassandra)
|
||||||
|
set(CASS_SRC_DIR "${CASS_ROOT_DIR}/src")
|
||||||
|
set(CASS_INCLUDE_DIR "${CASS_ROOT_DIR}/include")
|
||||||
|
|
||||||
|
# Ensure functions/modules are available
|
||||||
|
list(APPEND CMAKE_MODULE_PATH ${CASS_ROOT_DIR}/cmake)
|
||||||
|
|
||||||
|
set(CASS_BUILD_SHARED 1)
|
||||||
|
set(CASS_BUILD_STATIC 1)
|
||||||
|
set(CASS_USE_KERBEROS 0)
|
||||||
|
set(CASS_USE_LIBSSH2 0)
|
||||||
|
set(CASS_USE_OPENSSL 1)
|
||||||
|
set(CASS_USE_STD_ATOMIC 1)
|
||||||
|
set(CASS_USE_ZLIB 1)
|
||||||
|
|
||||||
|
|
||||||
|
file(GLOB SOURCES ${CASS_SRC_DIR}/*.cpp)
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
list(REMOVE_ITEM SOURCES ${CASS_SRC_DIR}/get_time-unix.cpp ${CASS_SRC_DIR}/get_time-win.cpp)
|
||||||
|
elseif(UNIX)
|
||||||
|
list(REMOVE_ITEM SOURCES ${CASS_SRC_DIR}/get_time-mac.cpp ${CASS_SRC_DIR}/get_time-win.cpp)
|
||||||
|
elseif(WIN32)
|
||||||
|
list(REMOVE_ITEM SOURCES ${CASS_SRC_DIR}/get_time-mac.cpp ${CASS_SRC_DIR}/get_time-unix.cpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CASS_USE_OPENSSL)
|
||||||
|
list(APPEND INCLUDE_DIRS ${CASS_SRC_DIR}/ssl)
|
||||||
|
list(APPEND SOURCES ${CASS_SRC_DIR}/ssl/ssl_openssl_impl.cpp ${CASS_SRC_DIR}/ssl/ring_buffer_bio.cpp)
|
||||||
|
else()
|
||||||
|
list(APPEND SOURCES ${CASS_SRC_DIR}/ssl/ssl_no_impl.cpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CASS_USE_KERBEROS)
|
||||||
|
list(APPEND INCLUDE_DIRS ${CASS_SRC_DIR}/gssapi)
|
||||||
|
list(APPEND SOURCES ${CASS_SRC_DIR}/gssapi/dse_auth_gssapi.cpp ${CASS_SRC_DIR}/gssapi/dse_auth_gssapi.hpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
list(APPEND SOURCES ${CASS_SRC_DIR}/atomic/atomic_std.hpp)
|
||||||
|
|
||||||
|
|
||||||
|
add_library(curl_hostcheck OBJECT ${CASS_SRC_DIR}/third_party/curl/hostcheck.cpp)
|
||||||
|
add_library(hdr_histogram OBJECT ${CASS_SRC_DIR}/third_party/hdr_histogram/hdr_histogram.cpp)
|
||||||
|
add_library(http-parser OBJECT ${CASS_SRC_DIR}/third_party/http-parser/http_parser.c)
|
||||||
|
add_library(minizip OBJECT
|
||||||
|
${CASS_SRC_DIR}/third_party/minizip/ioapi.c
|
||||||
|
${CASS_SRC_DIR}/third_party/minizip/zip.c
|
||||||
|
${CASS_SRC_DIR}/third_party/minizip/unzip.c)
|
||||||
|
|
||||||
|
target_link_libraries(minizip zlib)
|
||||||
|
target_compile_definitions(minizip PRIVATE "-Dz_crc_t=unsigned long")
|
||||||
|
|
||||||
|
list(APPEND INCLUDE_DIRS
|
||||||
|
${CASS_SRC_DIR}/third_party/curl
|
||||||
|
${CASS_SRC_DIR}/third_party/hdr_histogram
|
||||||
|
${CASS_SRC_DIR}/third_party/http-parser
|
||||||
|
${CASS_SRC_DIR}/third_party/minizip
|
||||||
|
${CASS_SRC_DIR}/third_party/mt19937_64
|
||||||
|
${CASS_SRC_DIR}/third_party/rapidjson/rapidjson
|
||||||
|
${CASS_SRC_DIR}/third_party/sparsehash/src)
|
||||||
|
|
||||||
|
list(APPEND INCLUDE_DIRS ${CASS_INCLUDE_DIR} ${CASS_SRC_DIR})
|
||||||
|
|
||||||
|
set(HASH_FUN_H "functional")
|
||||||
|
set(HASH_NAME hash)
|
||||||
|
set(HASH_NAMESPACE "std")
|
||||||
|
set(HAVE_INTTYPES_H 1)
|
||||||
|
set(HAVE_STDINT_H 1)
|
||||||
|
set(HAVE_SYS_TYPES_H 1)
|
||||||
|
set(HAVE_MEMCPY 1)
|
||||||
|
set(HAVE_LONG_LONG 1)
|
||||||
|
set(HAVE_UINT16_T 1)
|
||||||
|
|
||||||
|
configure_file("${CASS_SRC_DIR}/third_party/sparsehash/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/sparsehash/internal/sparseconfig.h")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Determine random availability
|
||||||
|
if (OS_LINUX)
|
||||||
|
#set (HAVE_GETRANDOM 1) - not on every Linux kernel
|
||||||
|
elseif (OS_FREEBSD OR OS_DARWIN)
|
||||||
|
set (HAVE_ARC4RANDOM 1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# Determine if sigpipe is available
|
||||||
|
if (OS_LINUX)
|
||||||
|
set (HAVE_SIGTIMEDWAIT 1)
|
||||||
|
else (OS_FREEBSD OR OS_DARWIN)
|
||||||
|
set (HAVE_NOSIGPIPE 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set (HAVE_BUILTIN_BSWAP32 1)
|
||||||
|
set (HAVE_BUILTIN_BSWAP64 1)
|
||||||
|
|
||||||
|
set(HAVE_BOOST_ATOMIC 0)
|
||||||
|
set(HAVE_STD_ATOMIC 1)
|
||||||
|
|
||||||
|
set(HAVE_KERBEROS ${CASS_USE_KERBEROS})
|
||||||
|
set(HAVE_OPENSSL ${CASS_USE_OPENSSL})
|
||||||
|
set(HAVE_ZLIB ${CASS_USE_ZLIB})
|
||||||
|
|
||||||
|
# Generate the driver_config.hpp file
|
||||||
|
configure_file(
|
||||||
|
${CASS_ROOT_DIR}/driver_config.hpp.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/driver_config.hpp)
|
||||||
|
|
||||||
|
|
||||||
|
add_library(cassandra
|
||||||
|
${SOURCES}
|
||||||
|
$<TARGET_OBJECTS:curl_hostcheck>
|
||||||
|
$<TARGET_OBJECTS:hdr_histogram>
|
||||||
|
$<TARGET_OBJECTS:http-parser>
|
||||||
|
$<TARGET_OBJECTS:minizip>)
|
||||||
|
|
||||||
|
target_link_libraries(cassandra zlib)
|
||||||
|
add_library(cassandra_static ALIAS cassandra)
|
||||||
|
target_include_directories(cassandra PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${INCLUDE_DIRS})
|
||||||
|
target_compile_definitions(cassandra PRIVATE CASS_BUILDING)
|
||||||
|
|
||||||
|
target_link_libraries(cassandra uv)
|
||||||
|
|
||||||
|
if(CASS_USE_OPENSSL)
|
||||||
|
target_link_libraries(cassandra ssl)
|
||||||
|
endif()
|
@ -1,4 +1,4 @@
|
|||||||
option (USE_INTERNAL_CCTZ_LIBRARY "Use internal cctz library" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_CCTZ_LIBRARY "Use internal cctz library" ON)
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_CCTZ_LIBRARY)
|
if (NOT USE_INTERNAL_CCTZ_LIBRARY)
|
||||||
find_library (LIBRARY_CCTZ cctz)
|
find_library (LIBRARY_CCTZ cctz)
|
||||||
@ -82,7 +82,7 @@ if (NOT EXTERNAL_CCTZ_LIBRARY_FOUND OR NOT EXTERNAL_CCTZ_LIBRARY_WORKS)
|
|||||||
|
|
||||||
# each file in that dir (except of tab and localtime) store the info about timezone
|
# each file in that dir (except of tab and localtime) store the info about timezone
|
||||||
execute_process(COMMAND
|
execute_process(COMMAND
|
||||||
bash -c "cd ${TZDIR} && find * -type f -and ! -name '*.tab' -and ! -name 'localtime' | sort | paste -sd ';' -"
|
bash -c "cd ${TZDIR} && find * -type f -and ! -name '*.tab' -and ! -name 'localtime' | LC_ALL=C sort | paste -sd ';' -"
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
OUTPUT_VARIABLE TIMEZONES)
|
OUTPUT_VARIABLE TIMEZONES)
|
||||||
|
|
||||||
|
2
contrib/fast_float-cmake/CMakeLists.txt
Normal file
2
contrib/fast_float-cmake/CMakeLists.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
add_library(fast_float INTERFACE)
|
||||||
|
target_include_directories(fast_float INTERFACE "${ClickHouse_SOURCE_DIR}/contrib/fast_float/include/")
|
1
contrib/gcem
vendored
1
contrib/gcem
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 8d4f1b5d76ea8f6ff12f3f4f34cda45424556b00
|
|
11
contrib/googletest-cmake/CMakeLists.txt
Normal file
11
contrib/googletest-cmake/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
set (SRC_DIR "${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest")
|
||||||
|
|
||||||
|
add_library(gtest "${SRC_DIR}/src/gtest-all.cc")
|
||||||
|
set_target_properties(gtest PROPERTIES VERSION "1.0.0")
|
||||||
|
target_compile_definitions (gtest INTERFACE GTEST_HAS_POSIX_RE=0)
|
||||||
|
target_include_directories(gtest SYSTEM PUBLIC "${SRC_DIR}/include")
|
||||||
|
target_include_directories(gtest PRIVATE "${SRC_DIR}")
|
||||||
|
|
||||||
|
add_library(gtest_main "${SRC_DIR}/src/gtest_main.cc")
|
||||||
|
set_target_properties(gtest_main PROPERTIES VERSION "1.0.0")
|
||||||
|
target_link_libraries(gtest_main PUBLIC gtest)
|
@ -17,7 +17,7 @@ if (NOT ENABLE_HYPERSCAN)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option (USE_INTERNAL_HYPERSCAN_LIBRARY "Use internal hyperscan library" ${NOT_UNBUNDLED})
|
option (USE_INTERNAL_HYPERSCAN_LIBRARY "Use internal hyperscan library" ON)
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_HYPERSCAN_LIBRARY)
|
if (NOT USE_INTERNAL_HYPERSCAN_LIBRARY)
|
||||||
find_library (LIBRARY_HYPERSCAN hs)
|
find_library (LIBRARY_HYPERSCAN hs)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
if (SANITIZE OR NOT (
|
if (SANITIZE OR NOT (
|
||||||
((OS_LINUX OR OS_FREEBSD) AND (ARCH_AMD64 OR ARCH_ARM OR ARCH_PPC64LE)) OR
|
((OS_LINUX OR OS_FREEBSD) AND (ARCH_AMD64 OR ARCH_ARM OR ARCH_PPC64LE OR ARCH_RISCV64)) OR
|
||||||
(OS_DARWIN AND (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR CMAKE_BUILD_TYPE STREQUAL "Debug"))
|
(OS_DARWIN AND (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR CMAKE_BUILD_TYPE STREQUAL "Debug"))
|
||||||
))
|
))
|
||||||
if (ENABLE_JEMALLOC)
|
if (ENABLE_JEMALLOC)
|
||||||
@ -112,6 +112,8 @@ elseif (ARCH_ARM)
|
|||||||
set(JEMALLOC_INCLUDE_PREFIX "${JEMALLOC_INCLUDE_PREFIX}_aarch64")
|
set(JEMALLOC_INCLUDE_PREFIX "${JEMALLOC_INCLUDE_PREFIX}_aarch64")
|
||||||
elseif (ARCH_PPC64LE)
|
elseif (ARCH_PPC64LE)
|
||||||
set(JEMALLOC_INCLUDE_PREFIX "${JEMALLOC_INCLUDE_PREFIX}_ppc64le")
|
set(JEMALLOC_INCLUDE_PREFIX "${JEMALLOC_INCLUDE_PREFIX}_ppc64le")
|
||||||
|
elseif (ARCH_RISCV64)
|
||||||
|
set(JEMALLOC_INCLUDE_PREFIX "${JEMALLOC_INCLUDE_PREFIX}_riscv64")
|
||||||
else ()
|
else ()
|
||||||
message (FATAL_ERROR "internal jemalloc: This arch is not supported")
|
message (FATAL_ERROR "internal jemalloc: This arch is not supported")
|
||||||
endif ()
|
endif ()
|
||||||
|
8
contrib/jemalloc-cmake/include_linux_riscv64/README
Normal file
8
contrib/jemalloc-cmake/include_linux_riscv64/README
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Here are pre-generated files from jemalloc on Linux risc-v.
|
||||||
|
You can obtain these files by running ./autogen.sh inside jemalloc source directory.
|
||||||
|
|
||||||
|
Added #define GNU_SOURCE
|
||||||
|
Added JEMALLOC_OVERRIDE___POSIX_MEMALIGN because why not.
|
||||||
|
Removed JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF because it's non standard.
|
||||||
|
Removed JEMALLOC_PURGE_MADVISE_FREE because it's available only from Linux 4.5.
|
||||||
|
Added JEMALLOC_CONFIG_MALLOC_CONF substitution
|
@ -0,0 +1,367 @@
|
|||||||
|
/* include/jemalloc/internal/jemalloc_internal_defs.h. Generated from jemalloc_internal_defs.h.in by configure. */
|
||||||
|
#ifndef JEMALLOC_INTERNAL_DEFS_H_
|
||||||
|
#define JEMALLOC_INTERNAL_DEFS_H_
|
||||||
|
/*
|
||||||
|
* If JEMALLOC_PREFIX is defined via --with-jemalloc-prefix, it will cause all
|
||||||
|
* public APIs to be prefixed. This makes it possible, with some care, to use
|
||||||
|
* multiple allocators simultaneously.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_PREFIX */
|
||||||
|
/* #undef JEMALLOC_CPREFIX */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define overrides for non-standard allocator-related functions if they are
|
||||||
|
* present on the system.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_OVERRIDE___LIBC_CALLOC
|
||||||
|
#define JEMALLOC_OVERRIDE___LIBC_FREE
|
||||||
|
#define JEMALLOC_OVERRIDE___LIBC_MALLOC
|
||||||
|
#define JEMALLOC_OVERRIDE___LIBC_MEMALIGN
|
||||||
|
#define JEMALLOC_OVERRIDE___LIBC_REALLOC
|
||||||
|
#define JEMALLOC_OVERRIDE___LIBC_VALLOC
|
||||||
|
/* #undef JEMALLOC_OVERRIDE___POSIX_MEMALIGN */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* JEMALLOC_PRIVATE_NAMESPACE is used as a prefix for all library-private APIs.
|
||||||
|
* For shared libraries, symbol visibility mechanisms prevent these symbols
|
||||||
|
* from being exported, but for static libraries, naming collisions are a real
|
||||||
|
* possibility.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_PRIVATE_NAMESPACE je_
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hyper-threaded CPUs may need a special instruction inside spin loops in
|
||||||
|
* order to yield to another virtual CPU.
|
||||||
|
*/
|
||||||
|
#define CPU_SPINWAIT
|
||||||
|
/* 1 if CPU_SPINWAIT is defined, 0 otherwise. */
|
||||||
|
#define HAVE_CPU_SPINWAIT 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Number of significant bits in virtual addresses. This may be less than the
|
||||||
|
* total number of bits in a pointer, e.g. on x64, for which the uppermost 16
|
||||||
|
* bits are the same as bit 47.
|
||||||
|
*/
|
||||||
|
#define LG_VADDR 48
|
||||||
|
|
||||||
|
/* Defined if C11 atomics are available. */
|
||||||
|
#define JEMALLOC_C11_ATOMICS 1
|
||||||
|
|
||||||
|
/* Defined if GCC __atomic atomics are available. */
|
||||||
|
#define JEMALLOC_GCC_ATOMIC_ATOMICS 1
|
||||||
|
/* and the 8-bit variant support. */
|
||||||
|
#define JEMALLOC_GCC_U8_ATOMIC_ATOMICS 1
|
||||||
|
|
||||||
|
/* Defined if GCC __sync atomics are available. */
|
||||||
|
#define JEMALLOC_GCC_SYNC_ATOMICS 1
|
||||||
|
/* and the 8-bit variant support. */
|
||||||
|
#define JEMALLOC_GCC_U8_SYNC_ATOMICS 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if __builtin_clz() and __builtin_clzl() are available.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_HAVE_BUILTIN_CLZ
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if os_unfair_lock_*() functions are available, as provided by Darwin.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_OS_UNFAIR_LOCK */
|
||||||
|
|
||||||
|
/* Defined if syscall(2) is usable. */
|
||||||
|
#define JEMALLOC_USE_SYSCALL
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if secure_getenv(3) is available.
|
||||||
|
*/
|
||||||
|
// #define JEMALLOC_HAVE_SECURE_GETENV
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if issetugid(2) is available.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_HAVE_ISSETUGID */
|
||||||
|
|
||||||
|
/* Defined if pthread_atfork(3) is available. */
|
||||||
|
#define JEMALLOC_HAVE_PTHREAD_ATFORK
|
||||||
|
|
||||||
|
/* Defined if pthread_setname_np(3) is available. */
|
||||||
|
#define JEMALLOC_HAVE_PTHREAD_SETNAME_NP
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if clock_gettime(CLOCK_MONOTONIC_COARSE, ...) is available.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_HAVE_CLOCK_MONOTONIC_COARSE 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if clock_gettime(CLOCK_MONOTONIC, ...) is available.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_HAVE_CLOCK_MONOTONIC 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if mach_absolute_time() is available.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_HAVE_MACH_ABSOLUTE_TIME */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if _malloc_thread_cleanup() exists. At least in the case of
|
||||||
|
* FreeBSD, pthread_key_create() allocates, which if used during malloc
|
||||||
|
* bootstrapping will cause recursion into the pthreads library. Therefore, if
|
||||||
|
* _malloc_thread_cleanup() exists, use it as the basis for thread cleanup in
|
||||||
|
* malloc_tsd.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_MALLOC_THREAD_CLEANUP */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if threaded initialization is known to be safe on this platform.
|
||||||
|
* Among other things, it must be possible to initialize a mutex without
|
||||||
|
* triggering allocation in order for threaded allocation to be safe.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_THREADED_INIT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if the pthreads implementation defines
|
||||||
|
* _pthread_mutex_init_calloc_cb(), in which case the function is used in order
|
||||||
|
* to avoid recursive allocation during mutex initialization.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_MUTEX_INIT_CB */
|
||||||
|
|
||||||
|
/* Non-empty if the tls_model attribute is supported. */
|
||||||
|
#define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec")))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* JEMALLOC_DEBUG enables assertions and other sanity checks, and disables
|
||||||
|
* inline functions.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_DEBUG */
|
||||||
|
|
||||||
|
/* JEMALLOC_STATS enables statistics calculation. */
|
||||||
|
#define JEMALLOC_STATS
|
||||||
|
|
||||||
|
/* JEMALLOC_EXPERIMENTAL_SMALLOCX_API enables experimental smallocx API. */
|
||||||
|
/* #undef JEMALLOC_EXPERIMENTAL_SMALLOCX_API */
|
||||||
|
|
||||||
|
/* JEMALLOC_PROF enables allocation profiling. */
|
||||||
|
/* #undef JEMALLOC_PROF */
|
||||||
|
|
||||||
|
/* Use libunwind for profile backtracing if defined. */
|
||||||
|
/* #undef JEMALLOC_PROF_LIBUNWIND */
|
||||||
|
|
||||||
|
/* Use libgcc for profile backtracing if defined. */
|
||||||
|
/* #undef JEMALLOC_PROF_LIBGCC */
|
||||||
|
|
||||||
|
/* Use gcc intrinsics for profile backtracing if defined. */
|
||||||
|
/* #undef JEMALLOC_PROF_GCC */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* JEMALLOC_DSS enables use of sbrk(2) to allocate extents from the data storage
|
||||||
|
* segment (DSS).
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_DSS
|
||||||
|
|
||||||
|
/* Support memory filling (junk/zero). */
|
||||||
|
#define JEMALLOC_FILL
|
||||||
|
|
||||||
|
/* Support utrace(2)-based tracing. */
|
||||||
|
/* #undef JEMALLOC_UTRACE */
|
||||||
|
|
||||||
|
/* Support optional abort() on OOM. */
|
||||||
|
/* #undef JEMALLOC_XMALLOC */
|
||||||
|
|
||||||
|
/* Support lazy locking (avoid locking unless a second thread is launched). */
|
||||||
|
/* #undef JEMALLOC_LAZY_LOCK */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Minimum allocation alignment is 2^LG_QUANTUM bytes (ignoring tiny size
|
||||||
|
* classes).
|
||||||
|
*/
|
||||||
|
/* #undef LG_QUANTUM */
|
||||||
|
|
||||||
|
/* One page is 2^LG_PAGE bytes. */
|
||||||
|
#define LG_PAGE 16
|
||||||
|
|
||||||
|
/*
|
||||||
|
* One huge page is 2^LG_HUGEPAGE bytes. Note that this is defined even if the
|
||||||
|
* system does not explicitly support huge pages; system calls that require
|
||||||
|
* explicit huge page support are separately configured.
|
||||||
|
*/
|
||||||
|
#define LG_HUGEPAGE 29
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If defined, adjacent virtual memory mappings with identical attributes
|
||||||
|
* automatically coalesce, and they fragment when changes are made to subranges.
|
||||||
|
* This is the normal order of things for mmap()/munmap(), but on Windows
|
||||||
|
* VirtualAlloc()/VirtualFree() operations must be precisely matched, i.e.
|
||||||
|
* mappings do *not* coalesce/fragment.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_MAPS_COALESCE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If defined, retain memory for later reuse by default rather than using e.g.
|
||||||
|
* munmap() to unmap freed extents. This is enabled on 64-bit Linux because
|
||||||
|
* common sequences of mmap()/munmap() calls will cause virtual memory map
|
||||||
|
* holes.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_RETAIN
|
||||||
|
|
||||||
|
/* TLS is used to map arenas and magazine caches to threads. */
|
||||||
|
#define JEMALLOC_TLS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Used to mark unreachable code to quiet "end of non-void" compiler warnings.
|
||||||
|
* Don't use this directly; instead use unreachable() from util.h
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_INTERNAL_UNREACHABLE __builtin_unreachable
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ffs*() functions to use for bitmapping. Don't use these directly; instead,
|
||||||
|
* use ffs_*() from util.h.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_INTERNAL_FFSLL __builtin_ffsll
|
||||||
|
#define JEMALLOC_INTERNAL_FFSL __builtin_ffsl
|
||||||
|
#define JEMALLOC_INTERNAL_FFS __builtin_ffs
|
||||||
|
|
||||||
|
/*
|
||||||
|
* popcount*() functions to use for bitmapping.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_INTERNAL_POPCOUNTL __builtin_popcountl
|
||||||
|
#define JEMALLOC_INTERNAL_POPCOUNT __builtin_popcount
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If defined, explicitly attempt to more uniformly distribute large allocation
|
||||||
|
* pointer alignments across all cache indices.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_CACHE_OBLIVIOUS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If defined, enable logging facilities. We make this a configure option to
|
||||||
|
* avoid taking extra branches everywhere.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_LOG */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If defined, use readlinkat() (instead of readlink()) to follow
|
||||||
|
* /etc/malloc_conf.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_READLINKAT */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Darwin (OS X) uses zones to work around Mach-O symbol override shortcomings.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_ZONE */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Methods for determining whether the OS overcommits.
|
||||||
|
* JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY: Linux's
|
||||||
|
* /proc/sys/vm.overcommit_memory file.
|
||||||
|
* JEMALLOC_SYSCTL_VM_OVERCOMMIT: FreeBSD's vm.overcommit sysctl.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_SYSCTL_VM_OVERCOMMIT */
|
||||||
|
#define JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY
|
||||||
|
|
||||||
|
/* Defined if madvise(2) is available. */
|
||||||
|
#define JEMALLOC_HAVE_MADVISE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if transparent huge pages are supported via the MADV_[NO]HUGEPAGE
|
||||||
|
* arguments to madvise(2).
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_HAVE_MADVISE_HUGE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Methods for purging unused pages differ between operating systems.
|
||||||
|
*
|
||||||
|
* madvise(..., MADV_FREE) : This marks pages as being unused, such that they
|
||||||
|
* will be discarded rather than swapped out.
|
||||||
|
* madvise(..., MADV_DONTNEED) : If JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS is
|
||||||
|
* defined, this immediately discards pages,
|
||||||
|
* such that new pages will be demand-zeroed if
|
||||||
|
* the address region is later touched;
|
||||||
|
* otherwise this behaves similarly to
|
||||||
|
* MADV_FREE, though typically with higher
|
||||||
|
* system overhead.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_PURGE_MADVISE_FREE
|
||||||
|
#define JEMALLOC_PURGE_MADVISE_DONTNEED
|
||||||
|
#define JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS
|
||||||
|
|
||||||
|
/* Defined if madvise(2) is available but MADV_FREE is not (x86 Linux only). */
|
||||||
|
/* #undef JEMALLOC_DEFINE_MADVISE_FREE */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if MADV_DO[NT]DUMP is supported as an argument to madvise.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_MADVISE_DONTDUMP
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if transparent huge pages (THPs) are supported via the
|
||||||
|
* MADV_[NO]HUGEPAGE arguments to madvise(2), and THP support is enabled.
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_THP */
|
||||||
|
|
||||||
|
/* Define if operating system has alloca.h header. */
|
||||||
|
#define JEMALLOC_HAS_ALLOCA_H 1
|
||||||
|
|
||||||
|
/* C99 restrict keyword supported. */
|
||||||
|
#define JEMALLOC_HAS_RESTRICT 1
|
||||||
|
|
||||||
|
/* For use by hash code. */
|
||||||
|
/* #undef JEMALLOC_BIG_ENDIAN */
|
||||||
|
|
||||||
|
/* sizeof(int) == 2^LG_SIZEOF_INT. */
|
||||||
|
#define LG_SIZEOF_INT 2
|
||||||
|
|
||||||
|
/* sizeof(long) == 2^LG_SIZEOF_LONG. */
|
||||||
|
#define LG_SIZEOF_LONG 3
|
||||||
|
|
||||||
|
/* sizeof(long long) == 2^LG_SIZEOF_LONG_LONG. */
|
||||||
|
#define LG_SIZEOF_LONG_LONG 3
|
||||||
|
|
||||||
|
/* sizeof(intmax_t) == 2^LG_SIZEOF_INTMAX_T. */
|
||||||
|
#define LG_SIZEOF_INTMAX_T 3
|
||||||
|
|
||||||
|
/* glibc malloc hooks (__malloc_hook, __realloc_hook, __free_hook). */
|
||||||
|
#define JEMALLOC_GLIBC_MALLOC_HOOK
|
||||||
|
|
||||||
|
/* glibc memalign hook. */
|
||||||
|
#define JEMALLOC_GLIBC_MEMALIGN_HOOK
|
||||||
|
|
||||||
|
/* pthread support */
|
||||||
|
#define JEMALLOC_HAVE_PTHREAD
|
||||||
|
|
||||||
|
/* dlsym() support */
|
||||||
|
#define JEMALLOC_HAVE_DLSYM
|
||||||
|
|
||||||
|
/* Adaptive mutex support in pthreads. */
|
||||||
|
#define JEMALLOC_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP
|
||||||
|
|
||||||
|
/* GNU specific sched_getcpu support */
|
||||||
|
#define JEMALLOC_HAVE_SCHED_GETCPU
|
||||||
|
|
||||||
|
/* GNU specific sched_setaffinity support */
|
||||||
|
#define JEMALLOC_HAVE_SCHED_SETAFFINITY
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If defined, all the features necessary for background threads are present.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_BACKGROUND_THREAD 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If defined, jemalloc symbols are not exported (doesn't work when
|
||||||
|
* JEMALLOC_PREFIX is not defined).
|
||||||
|
*/
|
||||||
|
/* #undef JEMALLOC_EXPORT */
|
||||||
|
|
||||||
|
/* config.malloc_conf options string. */
|
||||||
|
#define JEMALLOC_CONFIG_MALLOC_CONF "@JEMALLOC_CONFIG_MALLOC_CONF@"
|
||||||
|
|
||||||
|
/* If defined, jemalloc takes the malloc/free/etc. symbol names. */
|
||||||
|
#define JEMALLOC_IS_MALLOC 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defined if strerror_r returns char * if _GNU_SOURCE is defined.
|
||||||
|
*/
|
||||||
|
#define JEMALLOC_STRERROR_R_RETURNS_CHAR_WITH_GNU_SOURCE
|
||||||
|
|
||||||
|
/* Performs additional safety checks when defined. */
|
||||||
|
/* #undef JEMALLOC_OPT_SAFETY_CHECKS */
|
||||||
|
|
||||||
|
#endif /* JEMALLOC_INTERNAL_DEFS_H_ */
|
@ -500,7 +500,6 @@ function(preprocess_et out_var)
|
|||||||
COMMAND perl "${KRB5_SOURCE_DIR}/util/et/compile_et" -d "${KRB5_SOURCE_DIR}/util/et" ${in_f}
|
COMMAND perl "${KRB5_SOURCE_DIR}/util/et/compile_et" -d "${KRB5_SOURCE_DIR}/util/et" ${in_f}
|
||||||
DEPENDS ${in_f} "${KRB5_SOURCE_DIR}/util/et/compile_et"
|
DEPENDS ${in_f} "${KRB5_SOURCE_DIR}/util/et/compile_et"
|
||||||
WORKING_DIRECTORY ${ET_PATH}
|
WORKING_DIRECTORY ${ET_PATH}
|
||||||
COMMENT "Creating preprocessed file ${F_C}"
|
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
list(APPEND result ${F_C})
|
list(APPEND result ${F_C})
|
||||||
@ -526,7 +525,6 @@ add_custom_command(
|
|||||||
add_custom_target(
|
add_custom_target(
|
||||||
ERROR_MAP_H
|
ERROR_MAP_H
|
||||||
DEPENDS "${KRB5_SOURCE_DIR}/lib/gssapi/krb5/error_map.h"
|
DEPENDS "${KRB5_SOURCE_DIR}/lib/gssapi/krb5/error_map.h"
|
||||||
COMMENT "generating error_map.h"
|
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -539,14 +537,12 @@ add_custom_command(
|
|||||||
add_custom_target(
|
add_custom_target(
|
||||||
ERRMAP_H
|
ERRMAP_H
|
||||||
DEPENDS "${KRB5_SOURCE_DIR}/lib/gssapi/generic/errmap.h"
|
DEPENDS "${KRB5_SOURCE_DIR}/lib/gssapi/generic/errmap.h"
|
||||||
COMMENT "generating errmap.h"
|
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
KRB_5_H
|
KRB_5_H
|
||||||
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/include/krb5/krb5.h"
|
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/include/krb5/krb5.h"
|
||||||
COMMENT "generating krb5.h"
|
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
|
|
||||||
|
107
contrib/libgsasl-cmake/CMakeLists.txt
Normal file
107
contrib/libgsasl-cmake/CMakeLists.txt
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
set (SRC_DIR "${ClickHouse_SOURCE_DIR}/contrib/libgsasl")
|
||||||
|
|
||||||
|
set(SRCS
|
||||||
|
${SRC_DIR}/gl/gc-gnulib.c
|
||||||
|
${SRC_DIR}/gl/printf-parse.c
|
||||||
|
${SRC_DIR}/gl/c-ctype.c
|
||||||
|
${SRC_DIR}/gl/float.c
|
||||||
|
${SRC_DIR}/gl/printf-args.c
|
||||||
|
${SRC_DIR}/gl/hmac-sha1.c
|
||||||
|
${SRC_DIR}/gl/itold.c
|
||||||
|
${SRC_DIR}/gl/hmac-md5.c
|
||||||
|
${SRC_DIR}/gl/gc-pbkdf2-sha1.c
|
||||||
|
${SRC_DIR}/gl/md5.c
|
||||||
|
${SRC_DIR}/gl/base64.c
|
||||||
|
${SRC_DIR}/gl/memxor.c
|
||||||
|
${SRC_DIR}/gl/sha1.c
|
||||||
|
${SRC_DIR}/openid20/client.c
|
||||||
|
${SRC_DIR}/openid20/mechinfo.c
|
||||||
|
${SRC_DIR}/openid20/server.c
|
||||||
|
${SRC_DIR}/anonymous/client.c
|
||||||
|
${SRC_DIR}/anonymous/mechinfo.c
|
||||||
|
${SRC_DIR}/anonymous/server.c
|
||||||
|
${SRC_DIR}/saml20/client.c
|
||||||
|
${SRC_DIR}/saml20/mechinfo.c
|
||||||
|
${SRC_DIR}/saml20/server.c
|
||||||
|
${SRC_DIR}/scram/parser.c
|
||||||
|
${SRC_DIR}/scram/printer.c
|
||||||
|
${SRC_DIR}/scram/tokens.c
|
||||||
|
${SRC_DIR}/scram/client.c
|
||||||
|
${SRC_DIR}/scram/mechinfo.c
|
||||||
|
${SRC_DIR}/scram/server.c
|
||||||
|
${SRC_DIR}/scram/validate.c
|
||||||
|
${SRC_DIR}/src/free.c
|
||||||
|
${SRC_DIR}/src/supportp.c
|
||||||
|
${SRC_DIR}/src/init.c
|
||||||
|
${SRC_DIR}/src/mechtools.c
|
||||||
|
${SRC_DIR}/src/error.c
|
||||||
|
${SRC_DIR}/src/property.c
|
||||||
|
${SRC_DIR}/src/done.c
|
||||||
|
${SRC_DIR}/src/callback.c
|
||||||
|
${SRC_DIR}/src/xstart.c
|
||||||
|
${SRC_DIR}/src/xfinish.c
|
||||||
|
${SRC_DIR}/src/version.c
|
||||||
|
${SRC_DIR}/src/xstep.c
|
||||||
|
${SRC_DIR}/src/mechname.c
|
||||||
|
${SRC_DIR}/src/xcode.c
|
||||||
|
${SRC_DIR}/src/crypto.c
|
||||||
|
${SRC_DIR}/src/doxygen.c
|
||||||
|
${SRC_DIR}/src/suggest.c
|
||||||
|
${SRC_DIR}/src/saslprep.c
|
||||||
|
${SRC_DIR}/src/listmech.c
|
||||||
|
${SRC_DIR}/src/register.c
|
||||||
|
${SRC_DIR}/src/base64.c
|
||||||
|
${SRC_DIR}/src/md5pwd.c
|
||||||
|
${SRC_DIR}/external/client.c
|
||||||
|
${SRC_DIR}/external/mechinfo.c
|
||||||
|
${SRC_DIR}/external/server.c
|
||||||
|
${SRC_DIR}/securid/client.c
|
||||||
|
${SRC_DIR}/securid/mechinfo.c
|
||||||
|
${SRC_DIR}/securid/server.c
|
||||||
|
${SRC_DIR}/plain/client.c
|
||||||
|
${SRC_DIR}/plain/mechinfo.c
|
||||||
|
${SRC_DIR}/plain/server.c
|
||||||
|
${SRC_DIR}/cram-md5/client.c
|
||||||
|
${SRC_DIR}/cram-md5/challenge.c
|
||||||
|
${SRC_DIR}/cram-md5/mechinfo.c
|
||||||
|
${SRC_DIR}/cram-md5/server.c
|
||||||
|
${SRC_DIR}/cram-md5/digest.c
|
||||||
|
${SRC_DIR}/digest-md5/client.c
|
||||||
|
${SRC_DIR}/digest-md5/digesthmac.c
|
||||||
|
${SRC_DIR}/digest-md5/free.c
|
||||||
|
${SRC_DIR}/digest-md5/getsubopt.c
|
||||||
|
${SRC_DIR}/digest-md5/mechinfo.c
|
||||||
|
${SRC_DIR}/digest-md5/nonascii.c
|
||||||
|
${SRC_DIR}/digest-md5/parser.c
|
||||||
|
${SRC_DIR}/digest-md5/printer.c
|
||||||
|
${SRC_DIR}/digest-md5/qop.c
|
||||||
|
${SRC_DIR}/digest-md5/server.c
|
||||||
|
${SRC_DIR}/digest-md5/session.c
|
||||||
|
${SRC_DIR}/digest-md5/test-parser.c
|
||||||
|
${SRC_DIR}/digest-md5/validate.c
|
||||||
|
${SRC_DIR}/login/client.c
|
||||||
|
${SRC_DIR}/login/mechinfo.c
|
||||||
|
${SRC_DIR}/login/server.c
|
||||||
|
)
|
||||||
|
|
||||||
|
if (USE_KRB5)
|
||||||
|
set(SRCS ${SRCS}
|
||||||
|
${SRC_DIR}/gssapi/client.c
|
||||||
|
${SRC_DIR}/gssapi/mechinfo.c
|
||||||
|
${SRC_DIR}/gssapi/server.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(gsasl ${SRCS})
|
||||||
|
|
||||||
|
target_include_directories(gsasl PUBLIC ${SRC_DIR})
|
||||||
|
target_include_directories(gsasl PUBLIC ${SRC_DIR}/gl)
|
||||||
|
target_include_directories(gsasl PUBLIC ${SRC_DIR}/src)
|
||||||
|
target_include_directories(gsasl PUBLIC ${SRC_DIR}/digest-md5)
|
||||||
|
target_include_directories(gsasl PRIVATE "${ClickHouse_SOURCE_DIR}/contrib/libgsasl-cmake/linux_x86_64/include")
|
||||||
|
|
||||||
|
target_compile_definitions (gsasl PRIVATE HAVE_CONFIG_H=1)
|
||||||
|
|
||||||
|
if (USE_KRB5)
|
||||||
|
target_link_libraries(gsasl PUBLIC ${KRB5_LIBRARY})
|
||||||
|
target_compile_definitions (gsasl PRIVATE HAVE_GSSAPI_H=1 USE_GSSAPI=1)
|
||||||
|
endif()
|
1091
contrib/libgsasl-cmake/linux_x86_64/include/config.h
Normal file
1091
contrib/libgsasl-cmake/linux_x86_64/include/config.h
Normal file
File diff suppressed because it is too large
Load Diff
2
contrib/libhdfs3
vendored
2
contrib/libhdfs3
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 082e55f17d1c58bf124290fb044fea40e985ec11
|
Subproject commit 9194af44588633c1b2dae44bf945804401ff883e
|
@ -1,23 +1,4 @@
|
|||||||
if (ENABLE_PROTOBUF AND NOT USE_INTERNAL_PROTOBUF_LIBRARY)
|
if (${ENABLE_KRB5})
|
||||||
option(PROTOBUF_OLD_ABI_COMPAT "Set to ON for compatiability with external protobuf which was compiled old C++ ABI" OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (PROTOBUF_OLD_ABI_COMPAT)
|
|
||||||
if (NOT ENABLE_PROTOBUF OR USE_INTERNAL_PROTOBUF_LIBRARY)
|
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "PROTOBUF_OLD_ABI_COMPAT option is ignored")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_PROTOBUF_LIBRARY AND PROTOBUF_OLD_ABI_COMPAT)
|
|
||||||
# compatiable with protobuf which was compiled old C++ ABI
|
|
||||||
set(CMAKE_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=0")
|
|
||||||
set(CMAKE_C_FLAGS "")
|
|
||||||
if (NOT (CMAKE_VERSION VERSION_LESS "3.8.0"))
|
|
||||||
unset(CMAKE_CXX_STANDARD)
|
|
||||||
endif ()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (${ENABLE_LIBRARIES} AND ${ENABLE_KRB5})
|
|
||||||
SET(WITH_KERBEROS 1)
|
SET(WITH_KERBEROS 1)
|
||||||
else()
|
else()
|
||||||
SET(WITH_KERBEROS 0)
|
SET(WITH_KERBEROS 0)
|
||||||
@ -46,9 +27,7 @@ set(PROTO_FILES
|
|||||||
"${HDFS3_SOURCE_DIR}/proto/datatransfer.proto"
|
"${HDFS3_SOURCE_DIR}/proto/datatransfer.proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
if(USE_PROTOBUF)
|
PROTOBUF_GENERATE_CPP(PROTO_SOURCES PROTO_HEADERS ${PROTO_FILES})
|
||||||
PROTOBUF_GENERATE_CPP(PROTO_SOURCES PROTO_HEADERS ${PROTO_FILES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
configure_file("${HDFS3_SOURCE_DIR}/platform.h.in" "${CMAKE_CURRENT_BINARY_DIR}/platform.h")
|
configure_file("${HDFS3_SOURCE_DIR}/platform.h.in" "${CMAKE_CURRENT_BINARY_DIR}/platform.h")
|
||||||
|
|
||||||
@ -108,95 +87,14 @@ set(SRCS
|
|||||||
"${HDFS3_SOURCE_DIR}/common/Hash.cpp"
|
"${HDFS3_SOURCE_DIR}/common/Hash.cpp"
|
||||||
"${HDFS3_SOURCE_DIR}/common/SWCrc32c.cpp"
|
"${HDFS3_SOURCE_DIR}/common/SWCrc32c.cpp"
|
||||||
"${HDFS3_SOURCE_DIR}/common/Thread.cpp"
|
"${HDFS3_SOURCE_DIR}/common/Thread.cpp"
|
||||||
|
${PROTO_SOURCES}
|
||||||
"${HDFS3_SOURCE_DIR}/network/TcpSocket.h"
|
)
|
||||||
"${HDFS3_SOURCE_DIR}/network/BufferedSocketReader.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/network/Socket.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/network/DomainSocket.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/network/Syscall.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/InputStreamImpl.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/FileSystem.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/ReadShortCircuitInfo.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/InputStreamInter.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/FileSystemImpl.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/PacketPool.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/Pipeline.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/OutputStreamInter.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/RemoteBlockReader.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/Token.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/KerberosName.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/DirectoryIterator.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/hdfs.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/FileSystemStats.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/FileSystemKey.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/DataTransferProtocolSender.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/Packet.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/PacketHeader.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/FileSystemInter.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/LocalBlockReader.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/TokenInternal.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/InputStream.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/PipelineAck.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/BlockReader.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/Permission.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/OutputStreamImpl.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/LeaseRenewer.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/UserInfo.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/PeerCache.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/OutputStream.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/FileStatus.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/DataTransferProtocol.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/client/BlockLocation.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcConfig.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/SaslClient.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcAuth.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcClient.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcCall.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcContentWrapper.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcProtocolInfo.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcRemoteCall.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcServerInfo.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcChannel.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/rpc/RpcChannelKey.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/BlockLocalPathInfo.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/LocatedBlocks.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/DatanodeInfo.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/RpcHelper.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/ExtendedBlock.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/NamenodeInfo.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/NamenodeImpl.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/LocatedBlock.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/NamenodeProxy.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/Datanode.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/server/Namenode.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/XmlConfig.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/Logger.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/WriteBuffer.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/HWCrc32c.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/Checksum.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/SessionConfig.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/Unordered.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/BigEndian.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/Thread.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/StackPrinter.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/Exception.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/WritableUtils.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/StringUtil.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/LruMap.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/Function.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/DateTime.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/Hash.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/SWCrc32c.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/ExceptionInternal.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/Memory.h"
|
|
||||||
"${HDFS3_SOURCE_DIR}/common/FileWrapper.h"
|
|
||||||
)
|
|
||||||
|
|
||||||
# old kernels (< 3.17) doesn't have SYS_getrandom. Always use POSIX implementation to have better compatibility
|
# old kernels (< 3.17) doesn't have SYS_getrandom. Always use POSIX implementation to have better compatibility
|
||||||
set_source_files_properties("${HDFS3_SOURCE_DIR}/rpc/RpcClient.cpp" PROPERTIES COMPILE_FLAGS "-DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX=1")
|
set_source_files_properties("${HDFS3_SOURCE_DIR}/rpc/RpcClient.cpp" PROPERTIES COMPILE_FLAGS "-DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX=1")
|
||||||
|
|
||||||
# target
|
# target
|
||||||
add_library(hdfs3 ${SRCS} ${PROTO_SOURCES} ${PROTO_HEADERS})
|
add_library(hdfs3 ${SRCS})
|
||||||
|
|
||||||
if(USE_INTERNAL_PROTOBUF_LIBRARY)
|
if(USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||||
add_dependencies(hdfs3 protoc)
|
add_dependencies(hdfs3 protoc)
|
||||||
@ -218,6 +116,7 @@ target_link_libraries(hdfs3 PRIVATE ${LIBXML2_LIBRARIES})
|
|||||||
# inherit from parent cmake
|
# inherit from parent cmake
|
||||||
target_include_directories(hdfs3 PRIVATE ${Protobuf_INCLUDE_DIR})
|
target_include_directories(hdfs3 PRIVATE ${Protobuf_INCLUDE_DIR})
|
||||||
target_link_libraries(hdfs3 PRIVATE ${Protobuf_LIBRARY} boost::headers_only)
|
target_link_libraries(hdfs3 PRIVATE ${Protobuf_LIBRARY} boost::headers_only)
|
||||||
|
|
||||||
if(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
|
if(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
|
||||||
target_include_directories(hdfs3 PRIVATE ${OPENSSL_INCLUDE_DIR})
|
target_include_directories(hdfs3 PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||||
target_link_libraries(hdfs3 PRIVATE ${OPENSSL_LIBRARIES})
|
target_link_libraries(hdfs3 PRIVATE ${OPENSSL_LIBRARIES})
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
#cmakedefine WITH_SASL_OAUTHBEARER 1
|
#cmakedefine WITH_SASL_OAUTHBEARER 1
|
||||||
#cmakedefine WITH_SASL_CYRUS 1
|
#cmakedefine WITH_SASL_CYRUS 1
|
||||||
// crc32chw
|
// crc32chw
|
||||||
#if !defined(__PPC__) && (!defined(__aarch64__) || defined(__ARM_FEATURE_CRC32)) && !(defined(__aarch64__) && defined(__APPLE__))
|
#if !defined(__PPC__) && !defined(__riscv) && !defined(__aarch64__)
|
||||||
#define WITH_CRC32C_HW 1
|
#define WITH_CRC32C_HW 1
|
||||||
#endif
|
#endif
|
||||||
// regex
|
// regex
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user