1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-3924 Use the first parse error found

Often, after an error is found, it cascades into a bunch of errors, and each overwrites the previous. This sometimes obfuscates the true problem.
This commit is contained in:
David Hall
2020-04-09 15:30:44 -05:00
parent cfa8234ae9
commit e7bc7e9313

View File

@ -6883,7 +6883,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
return -1; return -1;
} }
} }
else else if ( !gwi.fatalParseError )
{ {
Message::Args args; Message::Args args;
args.add(ifp->func_name()); args.add(ifp->func_name());
@ -7478,14 +7478,15 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex,
if (nonSupportItem) if (nonSupportItem)
{ {
Message::Args args; if (gwi.parseErrorText.length() == 0)
{
if (nonSupportItem->name.length) Message::Args args;
args.add("'" + string(nonSupportItem->name.str) + "'"); if (nonSupportItem->name.length)
else args.add("'" + string(nonSupportItem->name.str) + "'");
args.add(""); else
args.add("");
gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_GROUP_BY, args); gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_GROUP_BY, args);
}
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi); setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
return ER_CHECK_NOT_IMPLEMENTED; return ER_CHECK_NOT_IMPLEMENTED;
} }