Merge pull request #33776 from Avogar/fix-insert-values

Fix parsing query INSERT INTO ... VALUES SETTINGS ... (...), ...
This commit is contained in:
Kruglov Pavel 2022-01-20 14:09:27 +03:00 committed by GitHub
commit f644602ec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -184,6 +184,10 @@ bool ParserInsertQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
ParserSetQuery parser_settings(true);
if (!parser_settings.parse(pos, settings_ast, expected))
return false;
/// In case of INSERT INTO ... VALUES SETTINGS ... (...), (...), ...
/// we should move data pointer after all settings.
if (data != nullptr)
data = pos->begin;
}
if (select)

View File

@ -0,0 +1,4 @@
drop table if exists t;
create table t (x Bool) engine=Memory();
insert into t values settings bool_true_representation='да' ('да');
drop table t;