Commit Graph
1411 Commits
Author SHA1 Message Date
Pedro Ferreira 8620e242b3 Fix AST fuzzer INSERT dumps 2026-03-20 09:23:00 +00:00
Pedro FerreiraandGitHub db93500753 Merge branch 'master' into fuzz-policy 2026-03-17 12:08:19 +01:00
Pedro Ferreira 26567229db Use role 2026-03-16 16:23:27 +00:00
Pedro Ferreira 98005f46f7 Disable row policy oracle 2026-03-16 13:51:12 +00:00
Pedro Ferreira ec79c844b1 Add row policy oracle 2026-03-16 13:10:07 +00:00
Raúl MarínandClaude Opus 4.6 6aa187da03 Reduce CurrentThread.h include fan-out to cut compilation cascade
- Remove `CurrentThread.h` from high-fan-out headers: `ProcessList.h`,
  `IQueryPlanStep.h`, `DDLWorker.h`, `TCPHandler.h`, `AggregatingTransform.h`,
  `ParallelParsingInputFormat.h`, `StorageTableFunction.h`, `parseSyslogLevel.h`,
  `EmbeddedRocksDBBulkSink.h`, `BlockIO.h`, `LocalConnection.h`,
  `StorageMaterializedView.h`, `HTTPHandler.h`
- Extract `QueryScope` from `CurrentThread` into standalone `Common/QueryScope.h`
  with its own `.cpp`, replacing the nested `CurrentThread::QueryScope` class
- Extract `getCurrentThreadGroup` free function into `Common/ThreadGroupSwitcher.h`,
  replacing `CurrentThread::getGroup()` in template headers:
  `threadPoolCallbackRunner.h`, `ParallelFormattingOutputFormat.h`,
  `HashedDictionaryParallelLoader.h`, `UniqExactSet.h`, `HashedDictionary.h`,
  `StatusRequestsPool.h`
- De-inline `MemoryTrackerSwitcher` ctor/dtor into `MemoryTrackerSwitcher.cpp`
- De-inline `ResourceGuard::Request::wait` into `ResourceGuard.cpp`
- De-inline `ManyAggregatedData` destructor into `AggregatingTransform.cpp`
- De-inline `QueryStatus::updateProgressIn/Out` into `ProcessList.cpp`
- Add explicit `CurrentThread.h` includes to `.cpp` files that relied on
  transitive includes through the trimmed headers

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-12 14:54:34 +01:00
Pedro Ferreira 1cb65272c3 Add new count distinct oracle 2026-03-09 13:23:34 +00:00
Pedro FerreiraandGitHub 313362a008 Merge pull request #98914 from ClickHouse/more-pimp
AI pimp again
2026-03-07 08:28:27 +00:00
Pedro Ferreira 6457f3fba3 Fix 2026-03-06 15:51:34 +00:00
Pedro Ferreira 0d4e94a215 Fixes 2026-03-06 11:54:27 +00:00
Pedro Ferreira c89a12b81e New roundtrip oracle and parsing tests 2026-03-05 12:52:41 +00:00
Alexey MilovidovandGitHub be5df3810b Merge master into style-check-empty-catch-all 2026-03-04 00:35:29 +01:00
Alexey MilovidovandClaude Opus 4.6 6897b4e8a4 Add NOLINT(bugprone-empty-catch) to empty catch blocks with specific types
clang-tidy `bugprone-empty-catch` fires on catch blocks with empty
bodies regardless of the exception type.  Re-add the NOLINT annotation
on the catch lines that were previously suppressed with `catch (...)`
and now use specific exception types.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-02 04:40:52 +00:00
Alexey MilovidovandClaude Opus 4.6 6415834976 Narrow catch (...) to specific exception types where possible
Replace blanket `catch (...)` with specific exception types based on
analysis of what each try block can actually throw:

- `const Exception &` for catch blocks where only ClickHouse operations
  are involved (Field operations, expression evaluation, parsing, etc.)
- `const std::exception &` for catch blocks involving standard library,
  Poco, or third-party code (filesystem, HTTP, thread creation, etc.)

Blocks that genuinely need `catch (...)` are left unchanged:
- try-pattern functions (`tryGetPosition`, `tryDeserializeText`, etc.)
- Exception formatting utilities in `Exception.cpp`
- Signal/terminate handlers
- FFI callbacks (DeltaLake)
- Dual-handler patterns (already have specific + catch-all)
- `noexcept` functions with user-supplied callbacks

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-02 03:55:15 +00:00
Alexey MilovidovandClaude Opus 4.6 b60662ea1c Annotate all catch (...) blocks flagged by the style check
Enhance the `catch_all` style check in two ways:

1. Recognize more legitimate exception-handling patterns as "handled":
   `getCurrentExceptionMessage`, `getCurrentExceptionCode`,
   `getCurrentExceptionMessageAndPattern`, `ExecutionStatus::fromCurrentException`,
   `onBackgroundException`, `storeException`, `STDERR_FILENO`, `writeRetry`,
   `handle_exception`, `handleException`, `finishWithException`.

2. Fix function-try-block detection for destructors like
   `Exception::~Exception() try { } catch (...) { }` — the enclosing-scope
   scan now falls through to the function-try-block scan when it hits a
   namespace/class scope (no parentheses in signature).

For the remaining 108 catch-all blocks, add `// Ok: <reason>` comments
explaining why each is intentional. Categories include:

- Try-patterns (`tryDeserializeText`, `tryGetPosition`, etc.)
- Exception handling/reporting utilities (`Exception.cpp`)
- Non-essential system probes (`Server.cpp` Linux /proc and /sys checks)
- C callbacks where exceptions cannot propagate (zip archives)
- Background thread exception saving (`onBackgroundException`)
- Fallback/retry logic (`DatabaseOverlay`, `ReadSchemaUtils`)
- Best-effort cleanup or error reporting
- Tests that expect exceptions

Replace `// NOLINT(bugprone-empty-catch)` with `// Ok:` comments on all
catch blocks that were flagged by the new check. Fix Allman-style brace
violations in `convertFieldToType.cpp` and `ClientBase.cpp`.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-02 03:06:11 +00:00
Pedro Ferreira f50b2c3fee Backport fixes from the server fuzzer 2026-02-27 14:51:41 +00:00
Alexey MilovidovandGitHub 3e0d079016 Merge pull request #98038 from ClickHouse/revert-96025-clickhouse-help
Revert "Improve help output for ClickHouse applications"
2026-02-27 00:48:53 +01:00
Pedro Ferreira 3ad1d4abc7 Update probs and fixes 2026-02-26 15:27:02 +00:00
Alexey MilovidovandGitHub e8654c51eb Revert "Improve help output for ClickHouse applications" 2026-02-26 07:51:17 +01:00
Vitaly BaranovandGitHub 14b4f8f12c Merge pull request #96841 from vitlibar/fix-client-exit-status-after-server-error
Fix exit status of clickhouse-client after server error
2026-02-16 09:49:45 +00:00
Alexey MilovidovandClaude Opus 4.6 01363ea4f4 Merge master into ssh-twice branch to resolve conflicts
Adapted the `ssh-key-file` check to the new retry loop structure:
added `!config().has("ssh-key-file")` to the `should_ask_password` condition.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-15 19:58:45 +01:00
Vitaly Baranov 52f182e5df Fix exit status of clickhouse-client after server error. 2026-02-15 19:44:33 +01:00
Alexey MilovidovandGitHub eebc7db1bb Merge pull request #96197 from AVMusorin/add-missed-client-option
Add missed `--external` argument in client help message
2026-02-07 07:58:53 +01:00
Aleksandr Musorin 9bf31f1961 Add external argument in client help message 2026-02-06 14:42:33 +01:00
Alexey MilovidovandClaude Opus 4.6 f31adb4a49 Fix CI failures: wrap long help text lines and fix git-import --help abort
- Wrap long lines in `getHelpHeader` and `getHelpFooter` for `clickhouse client`
  and `clickhouse local` to keep lines within reasonable width,
  fixing the 00910_client_window_size_detection test
- Use `createOptionsDescription` instead of raw `po::options_description` constructor
  in `git-import` and `static-files-disk-uploader` to handle zero terminal width
  properly, fixing the `git-import --help` abort in debug builds
  (03823_clickhouse_help_return_codes test)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-05 22:21:04 +01:00
Alexey MilovidovandClaude Opus 4.5 62ccfbd3aa Improve help output for ClickHouse applications
This commit improves the help output for all ClickHouse applications:

- Add `clickhouse help` command that lists all available subcommands
- Return exit code 0 for all help messages (previously some returned 1)
- Output help messages to stdout instead of stderr
- Use "clickhouse <cmd>" format instead of argv[0] in help messages
- Add dynamic `app_name` detection for `clickhouse client` and `clickhouse local`
  to show correct invocation name based on how the binary was called
- Add `--no-sudo` option for `clickhouse start` and `clickhouse restart`
  for environments without sudo (e.g., Docker containers)
- Add detailed help headers and footers for client and local with usage examples

Closes #58244

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-02-05 07:12:44 +01:00
vdimir 312fa82006 Merge branch 'master' into vdimir/totp 2026-01-29 13:29:20 +00:00
vdimir ddcf7b97cd Add client option --one-time-password 2026-01-29 10:31:46 +00:00
Isak Ellmer 89f5c1d81e Don't try to authenticate twice when using ssh 2026-01-28 12:17:31 +01:00
vdimir c735499cd4 Update password promt retry in client/Client.cpp, fix clang-tidy 2026-01-28 11:07:49 +00:00
Sema ChecherindaandGitHub 12cc3730ff Merge pull request #93356 from ClickHouse/chesema-async-insert-quorum
quorum with async inserts
2026-01-27 21:38:58 +00:00
vdimir cd54631479 Rename AUTHENTICATION_FAILED_SECOND_FACTOR -> REQUIRED_SECOND_FACTOR 2026-01-27 17:18:21 +00:00
vdimir c42eb803e6 totp as second factor 2026-01-27 16:49:38 +00:00
Pedro Ferreira 44b7ee2e14 Add log messages 2026-01-24 10:57:34 +00:00
Pedro Ferreira 5dc02592b5 Modernize time limit, and set it for CI runs 2026-01-24 10:15:39 +00:00
Sema Checherinda 7dfe727452 quorum with async inserts 2026-01-23 16:39:23 +01:00
Nikolai Kochetov 6e30e7221d Merge branch 'master' into use-intrusive-ptr-for-AST 2026-01-17 18:08:52 +01:00
Bharat Nallan Chakravarthy ae119119a6 Merge 'master' into client-warnings-xml-option 2026-01-17 11:59:26 +05:30
Nikolai Kochetov de75d7355f Merge branch 'master' into use-intrusive-ptr-for-AST 2026-01-16 16:16:36 +01:00
Pedro Ferreira 15a5c5e110 Merge remote-tracking branch 'origin/master' into random-prob 2026-01-15 14:59:21 +00:00
Krishna MannemandGitHub d43f696d10 Merge pull request #93459 from ClickHouse/fix-user-pass-in-cloud-string-rebased
do not use oauth login when username + password is in connection string
2026-01-13 14:58:34 +00:00
Pedro Ferreira a4b4179399 Let's play with random probabilities a little 2026-01-13 10:32:45 +00:00
Krishna Mannem e99c7f8e11 skip cloud endpoint autologin stuff if uri contains user/pass 2026-01-12 16:17:48 -05:00
Nikolai Kochetov f4aa968b13 Use intrusive ptr for AST 2026-01-11 13:36:32 +01:00
Pedro Ferreira cb2ff93210 Increase rows size for a few jobs, give more table creation tries, less defaults 2026-01-07 17:05:05 +00:00
Bharat Nallan Chakravarthy 0764b531ae Merge 'master' into client-warnings-xml-option 2026-01-06 06:59:30 +05:30
Krishna Mannem e0481761a5 do not use oauth login when username + password is in connection string 2026-01-05 16:55:01 -05:00
Pedro Ferreira 07be4b87ac Merge remote-tracking branch 'origin/master' into fuzz-stream 2026-01-02 08:20:56 +00:00
Cole Smith e7f9d16029 require spaces on both sides
nit
2025-12-29 20:49:07 -05:00
Cole Smith c31dec09f9 allow spaces around equal sign
add tests

nit
2025-12-29 14:04:06 -05:00