Compare commits

...

4 Commits

Author SHA1 Message Date
Konstantin Bogdanov
02a8ddb026
Merge a0e2f6925e into 7fd2207626 2024-09-18 15:26:45 +02:00
Konstantin Bogdanov
a0e2f6925e
temp-commit 2024-09-05 06:19:57 +02:00
Konstantin Bogdanov
d18bd05261
temp-commit 2024-09-05 04:24:47 +02:00
Konstantin Bogdanov
0692e36bd6
temp-commit 2024-09-05 03:47:26 +02:00
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,50 @@
#!/usr/bin/env bash
# Tags: distributed
# https://github.com/ClickHouse/ClickHouse/issues/65520
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
${CLICKHOUSE_CLIENT} -q "drop database if exists ${CLICKHOUSE_DATABASE}_db on cluster test_shard_localhost"
${CLICKHOUSE_CLIENT} -q "create database ${CLICKHOUSE_DATABASE}_db on cluster test_shard_localhost"
${CLICKHOUSE_CLIENT} -q "drop table if exists ${CLICKHOUSE_DATABASE}_db.segfault_table on cluster test_shard_localhost"
${CLICKHOUSE_CLIENT} -q "drop table if exists ${CLICKHOUSE_DATABASE}_db.__segfault_table on cluster test_shard_localhost"
${CLICKHOUSE_CLIENT} -q "
create table ${CLICKHOUSE_DATABASE}_db.__segfault_table on cluster test_shard_localhost (
c_mpcnr33 Int32 primary key,
c_v8s String,
c_l Int32,
c_jismi1 String,
c_p37t64z75 Bool not null,
c_uz Bool,
c_rp Int32 primary key,
c_d56dwp13jp Bool,
c_sf__xnd4 Float64 not null,
)"
${CLICKHOUSE_CLIENT} -q "create table ${CLICKHOUSE_DATABASE}_db.segfault_table on cluster test_shard_localhost as ${CLICKHOUSE_DATABASE}_db.__segfault_table ENGINE = Distributed(test_shard_localhost, ${CLICKHOUSE_DATABASE}_db, __segfault_table, c_mpcnr33)"
${CLICKHOUSE_CLIENT} -q "
create table ${CLICKHOUSE_DATABASE}_db.__t_nh1w on cluster test_shard_localhost (
c_sfdzg Int32,
c_xf Bool,
c_u3xs92nr4c String,
c_b_m Int32 primary key,
c_lgy Int32,
)"
${CLICKHOUSE_CLIENT} -q "create table ${CLICKHOUSE_DATABASE}_db.t_nh1w on cluster test_shard_localhost as ${CLICKHOUSE_DATABASE}_db.__t_nh1w ENGINE = Distributed(test_shard_localhost, ${CLICKHOUSE_DATABASE}_db, __t_nh1w, c_b_m)"
query="insert into ${CLICKHOUSE_DATABASE}_db.segfault_table (c_mpcnr33, c_v8s, c_l, c_jismi1, c_p37t64z75, c_uz, c_rp, c_d56dwp13jp, c_sf__xnd4) values (868701807, coalesce((select c_u3xs92nr4c from ${CLICKHOUSE_DATABASE}_db.t_nh1w order by c_u3xs92nr4c limit 1 offset 6), 'llwlzwb3'), 1824351772, coalesce(MACNumToString(lcm(-3, -6)), 'f'))"
curl -d@- -sS "${CLICKHOUSE_URL}" <<< "$query"
${CLICKHOUSE_CLIENT} -q "drop table if exists ${CLICKHOUSE_DATABASE}_db.segfault_table on cluster test_shard_localhost"
${CLICKHOUSE_CLIENT} -q "drop table if exists ${CLICKHOUSE_DATABASE}_db.__segfault_table on cluster test_shard_localhost"