Commit Graph
104 Commits
Author SHA1 Message Date
Azat Khuzhin a595877d02 Fix handling INSERTs after async_insert handling from server for fuzzer
Rewrite API one more time, since in case of fuzzer that assertion could
not be satisfied, due to it fuzz the query, but leave the insert->data,
and if we will parse query from formatted we will loose insert->data

And also cleanup interface, remove report_error that is unused, and move
echo_query out.

CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=77578&sha=296cda664bb7288f786ef98e2af9ea1e0e5094fd&name_0=PR&name_1=AST%20fuzzer%20%28amd_debug%29
2025-04-11 14:46:11 +02:00
Azat Khuzhin 296cda664b Re-introduce query_to_execute for processParsedSingleQuery()
The problem is that without this distinction we have a query with
trailing comments (due to applied adjustQueryEnd())
2025-04-11 10:43:49 +02:00
Azat Khuzhin c6f93e16bb Pass query for execution as string_view
The data that ASTPtr may refer to (in case of INSERT) should point to
the same memory region, since in case of async_insert, we need to
calcualte the end of the query, and we cannot do this without this.
2025-04-10 17:52:28 +02:00
Azat Khuzhin bafa45a7b1 Fix applying async_insert from server (via apply_settings_from_server)
The problem is that async_insert is checked during parsing, to know what
to send to the server, even before server settings available. And this
leads to "Unknown packet 11 from server" errors.

So, first approach will be to simply ignore async_insert for
apply_settings_from_server, but this setting is interesting to apply
from the server (since this may have performance impact).

Another is to detect what part of the query we should after server
settings had been received, this patch follows this approach.
2025-04-10 16:37:26 +02:00
Pedro Ferreira 58ae24324e More const 2025-04-08 14:32:34 +00:00
Pedro Ferreira 5c6208ae1d More settings and fix tidy compilation 2025-03-27 12:50:41 +00:00
Pedro Ferreira cf82890c3e Fix and better answer 2025-03-26 17:39:15 +00:00
Pedro Ferreira d17e2d887d Sometimes use other settings when reading the data when not validating content 2025-03-26 17:18:09 +00:00
Pedro Ferreira 570f73386f Increase probability and keep lists sorted 2025-03-26 16:15:23 +00:00
Pedro Ferreira 98fa5a4757 Cleanup and rename setting 2025-03-26 15:47:41 +00:00
Pedro Ferreira 68a32ca839 Attempt to dump and read into another table to test formats with bad inputs 2025-03-26 15:08:00 +00:00
Raúl Marín fa763588c1 Fix buzzhouse build 2025-03-20 19:34:30 +01:00
Nikita Mikhailov f6694387bc Fix build 2025-03-14 20:15:47 +01:00
Nikita Mikhailov 450c8ba2a8 Remove formatAST completely 2025-03-14 20:04:45 +01:00
Nikita Mikhailov b600314abb Rename method and add another one 2025-03-14 19:57:10 +01:00
Nikita Mikhailov 050135d5c9 Remove queryToString 2025-03-14 19:57:10 +01:00
Pedro Ferreira a7a764f642 Merge remote-tracking branch 'origin/master' into ast-update 2025-03-13 11:59:57 +00:00
Pedro Ferreira fee5e405c7 Use avaialble Parquet readers when possible 2025-03-10 15:37:46 +00:00
Pedro Ferreira c789154767 Settings are now propagated from the server to the client 2025-03-10 13:29:54 +00:00
Pedro FerreiraandGitHub 3432fbccbb Merge branch 'master' into ast-update 2025-03-10 08:56:33 +01:00
Pedro Ferreira b719f75b65 Fix peer check 2025-03-05 16:28:53 +00:00
Pedro Ferreira 9953bad215 More features added in v25.2 2025-03-03 12:09:02 +00:00
Pedro Ferreira bd47f63996 Removing duplicated code 2025-03-03 10:40:59 +00:00
Pablo Marcos cb988ef115 Remove unnecessary include
If no destructor is added, an implicit destructor is automatically
generated in the header file for every translation unit including
the header. Since it's the destructor the one that needs to know
the size of what std::unique_ptr points to in order to know how
to destroy it, the best thing we can do is to define a default
destructor in the .cpp to prevent any automatic destructors
being generated via header include.
2025-02-27 08:55:06 +00:00
Pedro Ferreira 77764c1a14 More review comments 2025-02-26 16:29:46 +00:00
Pedro Ferreira 57b1e3f459 Addressing review comments 2025-02-26 16:05:59 +00:00
Pedro Ferreira feec401376 Remove include 2025-02-25 13:10:13 +00:00
Pedro Ferreira af808e629a Remove this branch, is not working properly 2025-02-24 15:17:23 +00:00
Pedro Ferreira 7c28b6a4f6 Don't AST fuzz added INSERT INTO /dev/null for performance testing 2025-02-14 11:30:53 +00:00
Pedro Ferreira 1c58b9ef5f This step has to be done later 2025-02-14 10:55:59 +00:00
Pedro Ferreira eb198d8ee9 Dump results to /dev/null with INSERT INTO FUNCTION 2025-02-14 09:28:04 +00:00
Pedro Ferreira 5f43361cf7 Fixes 2025-02-14 07:49:33 +00:00
Pedro Ferreira 840bbac6ea Dump fuzzed AST 2025-02-14 07:37:15 +00:00
Pedro Ferreira 7ff51b7d8b Compare query success and revert change 2025-02-14 07:23:05 +00:00
Pedro Ferreira 1375820369 Fix possible AST fuzzer bug 2025-02-13 17:37:14 +00:00
Pedro Ferreira b467b070f8 Fixes 2025-02-13 17:13:58 +00:00
Pedro Ferreira 67205cf230 Fix 2025-02-13 16:52:03 +00:00
Pedro Ferreira 78bc77895f Make sure settings are printed 2025-02-13 16:15:45 +00:00
Pedro Ferreira 19b0202910 Fixes 2025-02-13 15:54:44 +00:00
Pedro Ferreira 42d327aeeb Fixes 2025-02-13 15:38:54 +00:00
Pedro Ferreira 9de824684a Fix 2025-02-13 15:20:06 +00:00
Pedro Ferreira 39c3f356f0 Don't keep new settings 2025-02-13 15:13:42 +00:00
Pedro Ferreira 37e8a56e13 Code cleanup 2025-02-13 14:57:27 +00:00
Pedro Ferreira 3af4840d88 Fix 2025-02-13 14:38:06 +00:00
Pedro Ferreira e58173d016 Dump result into /dev/null 2025-02-13 13:00:33 +00:00
Pedro Ferreira 49eddeac43 Set settings per query 2025-02-12 12:54:23 +00:00
Pedro Ferreira 15dbebee25 Print set query 2025-02-12 12:11:02 +00:00
Pedro Ferreira 8d24227a28 Set random settings while measuring performance 2025-02-11 17:28:15 +00:00
Pedro Ferreira 89c286be63 Fixes 2025-02-10 15:26:22 +00:00
Pedro Ferreira 437e63b6e7 Attempting multiple fixes 2025-02-10 14:24:31 +00:00