Commit Graph

107 Commits

Author SHA1 Message Date
Alexander Kuzmenkov
5e19eaf2f0 Merge remote-tracking branch 'origin/master' into tmp 2020-12-18 03:49:59 +03:00
Alexander Kuzmenkov
157fe3e8b4 some tests + ability to echo the queries 2020-12-18 03:49:18 +03:00
nikitamikhaylov
5521abba1e fix boost 2020-12-16 15:57:42 +03:00
Maksim Kita
963ee5211b Added queries-file parameter. Fixed code review issues 2020-12-07 19:29:17 +03:00
Maksim Kita
f5d1a9e59a Clickhouse client and local added queries-file parameter 2020-12-07 19:29:17 +03:00
Alexander Kuzmenkov
1570320e20 fixes for context hierarchy 2020-11-18 20:43:18 +03:00
alexey-milovidov
8dd81410de
Merge pull request #16843 from azat/clickhouse-client-stage
Add --stage option for clickhouse-client
2020-11-12 13:09:40 +03:00
Azat Khuzhin
ab8f13b885 Add --stage option for clickhouse-client
It is sometimes useful to process queries not up to the Complete stage
but intermediate some (i.e. for Distributed queries debugging and
similar).
2020-11-11 00:54:51 +03:00
Alexander Tokmakov
b94cc5c4e5 remove more stringstreams 2020-11-10 21:22:26 +03:00
Alexander Tokmakov
5cdfcfb307 remove other stringstreams 2020-11-09 22:12:44 +03:00
Alexander Tokmakov
62ff00ee8b use WriteBuffer in formatAST(...) 2020-11-09 19:05:40 +03:00
Alexander Kuzmenkov
24e57c659a
Merge pull request #15960 from kitaisreal/clickhouse-client-added-history-file-parameter
Clickhouse client added history file parameter
2020-11-09 08:19:00 +03:00
Maksim Kita
05ba70c91f Clickhouse client added history file parameter 2020-11-06 17:05:59 +03:00
Alexey Milovidov
5cfd84249b Merge branch 'master' into register-formats 2020-11-04 12:41:59 +03:00
Ivan
281bf351d2
Remove ANALYZE and AST queries (#16536) 2020-11-02 15:47:12 +03:00
Alexey Milovidov
2e0a979e3a Fix inconsistency in FormatFactory 2020-10-29 06:39:43 +03:00
Alexey Milovidov
c703c052b4 Merge branch 'master' into suggest-destruction-order 2020-10-28 04:21:43 +03:00
Alexander Kuzmenkov
5a70e26c70 Merge remote-tracking branch 'origin/master' into HEAD 2020-10-26 19:21:13 +03:00
Alexey Milovidov
4bf32cb15b Fix destruction order of Suggest #16035 2020-10-25 05:07:52 +03:00
Ivan
1d170f5745
ASTTableIdentifier Part #1: improve internal representation of ASTIdentifier name (#16149)
* Use only |name_parts| as primary name source

* Restore legacy logic for table restoration

* Fix build

* Fix tests

* Add pytest server config

* Fix tests

* Fixes due to review
2020-10-24 21:46:10 +03:00
Alexander Kuzmenkov
84908df6d8 fix setting parent from HTTP traceparent 2020-10-20 14:35:13 +03:00
Alexander Kuzmenkov
036cdd33c5 reset error code in ast fuzzer 2020-10-16 17:27:47 +03:00
Alexander Kuzmenkov
9116a00a12 reset error code in ast fuzzer 2020-10-16 17:26:59 +03:00
Alexander Kuzmenkov
6200433e12 Merge origin/master into tmp (using imerge) 2020-10-12 21:15:31 +03:00
Amos Bird
e2643d881e
Prettify 2020-10-12 00:12:36 +08:00
alexey-milovidov
1aafa19146
Update Client.cpp 2020-10-11 13:27:09 +03:00
Amos Bird
ff665c362f
Add print query id support to client 2020-10-11 10:09:08 +08:00
alesapin
17b86dec96 Recursive defaults 2020-10-02 15:38:50 +03:00
Alexander Kuzmenkov
7b64ca33b1 Merge remote-tracking branch 'origin/master' into tmp 2020-09-22 14:02:20 +03:00
Alexander Kuzmenkov
bfc3be9e43 Merge remote-tracking branch 'origin/aku/tcp-versio' into tmp 2020-09-22 14:02:15 +03:00
Alexander Kuzmenkov
e97c9b16a7 more diagnostics in fuzzer 2020-09-22 13:35:28 +03:00
alexey-milovidov
cf5db5e4dc
Merge pull request #14888 from azat/client-imporove-INSERT-error-message
Improve error message for INSERT via clickhouse-client
2020-09-18 01:13:22 +03:00
Vitaly Baranov
3356d75b23
Merge pull request #13156 from azat/cluster-secure
Secure inter-cluster query execution (with initial_user as current query user) [v3]
2020-09-17 17:11:00 +03:00
Alexander Kuzmenkov
6217dd77b5 Merge remote-tracking branch 'origin/master' into tmp 2020-09-17 12:35:10 +03:00
Azat Khuzhin
7d046b24e6 Improve error message for INSERT via clickhouse-client
With '\n...' after the query [1] clickhouse-client prefer data from the
INSERT over from stdin, and produce very tricky message:

    Code: 27. DB::Exception: Cannot parse input: expected '\n' before: ' ': (at row 1)

Well for TSV it is ok, but for RowBinary:

    Code: 33. DB::Exception: Cannot read all data. Bytes read: 1. Bytes expected: 4.

So improve error message by adding the source of data for INSERT.

  [1]: clickhouse-client -q "INSERT INTO data FORMAT TSV\n " <<<2
2020-09-17 00:16:51 +03:00
Azat Khuzhin
0159c74f21 Secure inter-cluster query execution (with initial_user as current query user) [v3]
Add inter-server cluster secret, it is used for Distributed queries
inside cluster, you can configure in the configuration file:

  <remote_servers>
      <logs>
          <shard>
              <secret>foobar</secret> <!-- empty -- works as before -->
              ...
          </shard>
      </logs>
  </remote_servers>

And this will allow clickhouse to make sure that the query was not
faked, and was issued from the node that knows the secret. And since
trust appeared it can use initial_user for query execution, this will
apply correct *_for_user (since with inter-server secret enabled, the
query will be executed from the same user on the shards as on initator,
unlike "default" user w/o it).

v2: Change user to the initial_user for Distributed queries if secret match
v3: Add Protocol::Cluster package
v4: Drop Protocol::Cluster and use plain Protocol::Hello + user marker
v5: Do not use user from Hello for cluster-secure (superfluous)
2020-09-15 01:36:28 +03:00
Alexander Tokmakov
da6beb1a91 Merge branch 'master' into enable_some_tests_with_database_atomic 2020-09-14 23:00:14 +03:00
Alexander Kuzmenkov
d227f1f706
Merge pull request #13192 from ClickHouse/aku/semicolon-simple
Simpler version of semicolon-terminated VALUES #12999 w/o `pos` changes
2020-09-11 11:51:52 +03:00
Alexander Kuzmenkov
83ec93dec8 Fuzzer: reset default database before reconnect 2020-09-09 16:46:59 +03:00
Alexander Tokmakov
b68782d285 enable more tests with Atomic database 2020-09-09 16:32:50 +03:00
Alexander Kuzmenkov
c62bf555d2 Merge origin/master into tmp (using imerge) 2020-09-08 16:26:38 +03:00
Alexander Kuzmenkov
9cf2a38eb8 fixup 2020-09-01 03:22:06 +03:00
Alexander Kuzmenkov
33c5815eb3 Add a HTML report for AST Fuzzer 2020-09-01 02:33:42 +03:00
Alexander Kuzmenkov
fa8eebed78 more tests + clickhouse-client options 2020-08-29 02:25:30 +03:00
Alexey Milovidov
c5984ca1c5 Merge branch 'master' into client-progress-clobber-data 2020-08-24 23:44:43 +03:00
Azat Khuzhin
13f6af3834 Improve error message on unknown packet in client 2020-08-17 21:38:34 +03:00
Alexey Milovidov
f5b8f508f0 Better 2020-08-14 05:42:23 +03:00
Alexey Milovidov
2359759b0e Better 2020-08-14 05:35:42 +03:00
Alexey Milovidov
cd095b7671 Fix data visible data clobbering with progress bar in client in interactive mode 2020-08-14 05:19:25 +03:00
alexey-milovidov
4ef51d685a
Merge pull request #13423 from ClickHouse/aku/fuzz-create
Do not fuzz CREATE queries
2020-08-09 01:40:06 +03:00