<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><br class=""><blockquote type="cite" class=""><div class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">diff --git a/test/sql-tap/check.test.lua b/test/sql-tap/check.test.lua<br class="">index bab6493..0d8bf15 100755<br class="">--- a/test/sql-tap/check.test.lua<br class="">+++ b/test/sql-tap/check.test.lua<br class="">@@ -516,7 +516,7 @@ test:do_catchsql_test(<br class="">      );<br class="">  ]], {<br class="">      -- <check-5.1><br class="">-        1, "Wrong space options (field 5): invalid expression specified (SQL error: bindings are not allowed in DDL)"<br class="">+        1, "Wrong space options (field 5): invalid expression specified (bindings are not allowed in DDL)"<br class="">      -- </check-5.1><br class="">  })<br class=""></blockquote><br class="">Why test results have changed if you provided<br class="">non-functional refactoring?<br class=""></blockquote>It become this way because now the error in diag instead of being<br class="">only in zErrMsg of struct Parse.<br class=""></blockquote><br class="">So, then it should be related to the previous patch, I guess.<br class="">Otherwise, still don’t understand. Or fix commit message,<br class="">since now it implies that only refactoring was provided.<br class="">Or, what is better - move functional changes to separate patch.<br class=""><br class=""></blockquote><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">I divided this ptch into two:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">"sql: remove argument pzErrMsg from sqlRunParser()"</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">"sql: replace rc with is_aborted status in struct Parse”</span></div></blockquote><div><br class=""></div>Both patches are OK.</div><div><br class=""><blockquote type="cite" class=""><div class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" class="">index a2937a0..c2e5d6b 100644<br class="">--- a/src/box/sql.c<br class="">+++ b/src/box/sql.c<br class="">@@ -1363,12 +1363,8 @@ sql_checks_resolve_space_def_reference(ExprList *expr_list,<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">      </span>sql_resolve_self_reference(&parser, def, NC_IsCheck, NULL, expr_list);<br class=""><span class="Apple-tab-span" style="white-space: pre;">   </span>int rc = 0;<br class="">-<span class="Apple-tab-span" style="white-space: pre;"> </span>if (parser.rc != SQL_OK) {<br class="">-<span class="Apple-tab-span" style="white-space: pre;">  </span><span class="Apple-tab-span" style="white-space: pre;">  </span>/* Tarantool error may be already set with diag. */<br class="">-<span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;">  </span>if (parser.rc != SQL_TARANTOOL_ERROR)<br class="">-<span class="Apple-tab-span" style="white-space: pre;">       </span><span class="Apple-tab-span" style="white-space: pre;">  </span><span class="Apple-tab-span" style="white-space: pre;">  </span>diag_set(ClientError, ER_SQL, parser.zErrMsg);<br class="">+<span class="Apple-tab-span" style="white-space: pre;">      </span>if (parser.is_aborted)<br class=""><span class="Apple-tab-span" style="white-space: pre;">       </span><span class="Apple-tab-span" style="white-space: pre;">  </span>rc = -1;<br class="">-<span class="Apple-tab-span" style="white-space: pre;">    </span>}<br class=""><span class="Apple-tab-span" style="white-space: pre;">    </span>sql_parser_destroy(&parser);<br class=""><span class="Apple-tab-span" style="white-space: pre;">     </span>return rc;<br class=""></blockquote><br class="">diff --git a/src/box/sql.c b/src/box/sql.c<br class="">index c2e5d6bd1..ea71dd101 100644<br class="">--- a/src/box/sql.c<br class="">+++ b/src/box/sql.c<br class="">@@ -1362,9 +1362,6 @@ sql_checks_resolve_space_def_reference(ExprList *expr_list,<br class="">       parser.parse_only = true;<br class=""><br class="">       sql_resolve_self_reference(&parser, def, NC_IsCheck, NULL, expr_list);<br class="">-       int rc = 0;<br class="">-       if (parser.is_aborted)<br class="">-               rc = -1;<br class="">       sql_parser_destroy(&parser);<br class="">-       return rc;<br class="">+       return parser.is_aborted ? -1 : 0;<br class="">}<br class=""><br class=""></blockquote><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">I am not sure that this should be applied. I think it isn't right</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">to look at field is_aborted of parser after parser destruction.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote><div><br class=""></div><div>sql_parser_destroy() doesn’t affect is_abort field. On the other</div><div>hand, mb you are right, and using object after destructor is called</div><div>may seem strange. Anyway, replace pls ‘if' with ternary operator:</div><div>3 lines of code fit into one.</div><div><br class=""></div></div></body></html>