Fix parsing query INSERT INTO ... VALUES SETTINGS ... (...), ...

This commit is contained in:
avogar 2022-01-19 14:22:32 +03:00
parent 3501b56587
commit c4cd8c6da4
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;