From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 8927E2BD18 for ; Sun, 5 May 2019 08:17:08 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 89QXFWvUlCWp for ; Sun, 5 May 2019 08:17:08 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 124412C096 for ; Sun, 5 May 2019 08:17:08 -0400 (EDT) From: imeevma@tarantool.org Subject: [tarantool-patches] [PATCH v1 03/12] sql: rework diag_set() in OP_Halt Date: Sun, 5 May 2019 15:17:06 +0300 Message-Id: <09e14eb65d98b8d85861f8de39766763f83d5f21.1557056617.git.imeevma@gmail.com> In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: korablev@tarantool.org Cc: tarantool-patches@freelists.org Prior to this patch, the way to set Tarantool error in OP_Halt was too universal. It was possible to set a description of the error that does not match its errcode. This change will also make it easier to work with an error in OP_Halt, since you no longer need to create a complete error message. Example of wrong error code: ... tarantool> box.execute('select 1 limit true') --- - error: Only positive integers are allowed in the LIMIT clause ... tarantool> box.error.last().code --- - 0 ... --- src/box/sql/build.c | 9 ++------- src/box/sql/select.c | 13 ++++++------- src/box/sql/trigger.c | 12 ++++-------- src/box/sql/vdbe.c | 9 +++------ test/sql-tap/e_select1.test.lua | 4 ++-- test/sql-tap/limit.test.lua | 26 +++++++++++++------------- test/sql-tap/select4.test.lua | 8 ++++---- test/sql-tap/subselect.test.lua | 6 +++--- test/sql-tap/tkt1473.test.lua | 36 ++++++++++++++++++------------------ test/sql/iproto.result | 18 ++++++++++++------ test/sql/types.result | 9 ++++++--- 11 files changed, 73 insertions(+), 77 deletions(-) diff --git a/src/box/sql/build.c b/src/box/sql/build.c index 1151425..28dcbc3 100644 --- a/src/box/sql/build.c +++ b/src/box/sql/build.c @@ -1004,12 +1004,10 @@ vdbe_emit_fk_constraint_create(struct Parse *parse_context, * Lets check that constraint with this name hasn't * been created before. */ - const char *error_msg = - tt_sprintf(tnt_errcode_desc(ER_CONSTRAINT_EXISTS), name_copy); if (vdbe_emit_halt_with_presence_test(parse_context, BOX_FK_CONSTRAINT_ID, 0, constr_tuple_reg, 2, - ER_CONSTRAINT_EXISTS, error_msg, + ER_CONSTRAINT_EXISTS, name_copy, false, OP_NoConflict) != 0) return; sqlVdbeAddOp2(vdbe, OP_Bool, fk->is_deferred, constr_tuple_reg + 3); @@ -1392,13 +1390,10 @@ vdbe_emit_fk_constraint_drop(struct Parse *parse_context, char *constraint_name, sqlVdbeAddOp4(vdbe, OP_String8, 0, key_reg, 0, constraint_name, P4_DYNAMIC); sqlVdbeAddOp2(vdbe, OP_Integer, child_id, key_reg + 1); - const char *error_msg = - tt_sprintf(tnt_errcode_desc(ER_NO_SUCH_CONSTRAINT), - constraint_name); if (vdbe_emit_halt_with_presence_test(parse_context, BOX_FK_CONSTRAINT_ID, 0, key_reg, 2, ER_NO_SUCH_CONSTRAINT, - error_msg, false, + constraint_name, false, OP_Found) != 0) { sqlDbFree(parse_context->db, constraint_name); return; diff --git a/src/box/sql/select.c b/src/box/sql/select.c index d3472a9..3f0b540 100644 --- a/src/box/sql/select.c +++ b/src/box/sql/select.c @@ -2116,6 +2116,7 @@ computeLimitRegisters(Parse * pParse, Select * p, int iBreak) 0, 0, wrong_limit_error, P4_STATIC); + sqlVdbeChangeP5(v, ER_SQL_EXECUTE); sqlVdbeResolveLabel(v, positive_limit_label); VdbeCoverage(v); @@ -2142,9 +2143,8 @@ computeLimitRegisters(Parse * pParse, Select * p, int iBreak) sqlVdbeAddOp2(v, OP_Integer, 1, r1); int no_err = sqlVdbeMakeLabel(v); sqlVdbeAddOp3(v, OP_Eq, iLimit, no_err, r1); - const char *error = - "SQL error: Expression subquery could " - "be limited only with 1"; + const char *error = "Expression subquery could " + "be limited only with 1"; sqlVdbeAddOp4(v, OP_Halt, SQL_TARANTOOL_ERROR, 0, 0, error, P4_STATIC); @@ -2178,6 +2178,7 @@ computeLimitRegisters(Parse * pParse, Select * p, int iBreak) 0, 0, wrong_offset_error, P4_STATIC); + sqlVdbeChangeP5(v, ER_SQL_EXECUTE); sqlVdbeResolveLabel(v, positive_offset_label); sqlReleaseTempReg(pParse, r1); @@ -5446,10 +5447,8 @@ vdbe_code_raise_on_multiple_rows(struct Parse *parser, int limit_reg, int end_ma int r1 = sqlGetTempReg(parser); sqlVdbeAddOp2(v, OP_Integer, 0, r1); sqlVdbeAddOp3(v, OP_Ne, r1, end_mark, limit_reg); - const char *error = - "SQL error: Expression subquery returned more than 1 row"; - sqlVdbeAddOp4(v, OP_Halt, SQL_TARANTOOL_ERROR, 0, 0, error, - P4_STATIC); + const char *error = "Expression subquery returned more than 1 row"; + sqlVdbeAddOp4(v, OP_Halt, SQL_TARANTOOL_ERROR, 0, 0, error, P4_STATIC); sqlVdbeChangeP5(v, ER_SQL_EXECUTE); sqlReleaseTempReg(parser, r1); } diff --git a/src/box/sql/trigger.c b/src/box/sql/trigger.c index 4fdbb60..3005362 100644 --- a/src/box/sql/trigger.c +++ b/src/box/sql/trigger.c @@ -100,9 +100,6 @@ sql_trigger_begin(struct Parse *parse) struct Vdbe *v = sqlGetVdbe(parse); if (v != NULL) sqlVdbeCountChanges(v); - const char *error_msg = - tt_sprintf(tnt_errcode_desc(ER_TRIGGER_EXISTS), - trigger_name); char *name_copy = sqlDbStrDup(db, trigger_name); if (name_copy == NULL) goto trigger_cleanup; @@ -113,7 +110,8 @@ sql_trigger_begin(struct Parse *parse) if (vdbe_emit_halt_with_presence_test(parse, BOX_TRIGGER_ID, 0, name_reg, 1, ER_TRIGGER_EXISTS, - error_msg, (no_err != 0), + trigger_name, + (no_err != 0), OP_NoConflict) != 0) goto trigger_cleanup; } @@ -412,9 +410,6 @@ sql_drop_trigger(struct Parse *parser) assert(name->nSrc == 1); const char *trigger_name = name->a[0].zName; - const char *error_msg = - tt_sprintf(tnt_errcode_desc(ER_NO_SUCH_TRIGGER), - trigger_name); char *name_copy = sqlDbStrDup(db, trigger_name); if (name_copy == NULL) goto drop_trigger_cleanup; @@ -422,7 +417,8 @@ sql_drop_trigger(struct Parse *parser) sqlVdbeAddOp4(v, OP_String8, 0, name_reg, 0, name_copy, P4_DYNAMIC); if (vdbe_emit_halt_with_presence_test(parser, BOX_TRIGGER_ID, 0, name_reg, 1, ER_NO_SUCH_TRIGGER, - error_msg, no_err, OP_Found) != 0) + trigger_name, + no_err, OP_Found) != 0) goto drop_trigger_cleanup; vdbe_code_drop_trigger(parser, trigger_name, true); diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c index 5222a4e..9f0d760 100644 --- a/src/box/sql/vdbe.c +++ b/src/box/sql/vdbe.c @@ -1032,12 +1032,9 @@ case OP_Halt: { p->pc = pcx; if (p->rc) { if (p->rc == SQL_TARANTOOL_ERROR) { - if (pOp->p4.z == NULL) { - assert(! diag_is_empty(diag_get())); - } else { - box_error_set(__FILE__, __LINE__, pOp->p5, - pOp->p4.z); - } + if (pOp->p4.z != NULL) + diag_set(ClientError, pOp->p5, pOp->p4.z); + assert(! diag_is_empty(diag_get())); } else if (pOp->p5 != 0) { static const char * const azType[] = { "NOT NULL", "UNIQUE", "CHECK", "FOREIGN KEY" }; diff --git a/test/sql-tap/e_select1.test.lua b/test/sql-tap/e_select1.test.lua index c4724e6..0c626c9 100755 --- a/test/sql-tap/e_select1.test.lua +++ b/test/sql-tap/e_select1.test.lua @@ -2170,7 +2170,7 @@ for _, val in ipairs({ "e_select-9.2."..tn, select, { - 1, "Only positive integers are allowed in the LIMIT clause"}) + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause"}) end -- EVIDENCE-OF: R-03014-26414 If the LIMIT expression evaluates to a @@ -2224,7 +2224,7 @@ for _, val in ipairs({ test:do_catchsql_test( "e_select-9.7."..tn, select, { - 1, "Only positive integers are allowed in the OFFSET clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the OFFSET clause" }) end diff --git a/test/sql-tap/limit.test.lua b/test/sql-tap/limit.test.lua index 9b728d8..40b787b 100755 --- a/test/sql-tap/limit.test.lua +++ b/test/sql-tap/limit.test.lua @@ -84,7 +84,7 @@ test:do_catchsql_test( SELECT x FROM t1 ORDER BY x+1 LIMIT 5 OFFSET -2 ]], { -- - 1 ,"Only positive integers are allowed in the OFFSET clause" + 1 ,"Failed to execute SQL statement: Only positive integers are allowed in the OFFSET clause" -- }) @@ -94,7 +94,7 @@ test:do_catchsql_test( SELECT x FROM t1 ORDER BY x+1 LIMIT 2, -5 ]], { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) @@ -115,7 +115,7 @@ test:do_catchsql_test( SELECT x FROM t1 ORDER BY x+1 LIMIT -2, 5 ]], { -- - 1, "Only positive integers are allowed in the OFFSET clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the OFFSET clause" -- }) @@ -135,7 +135,7 @@ test:do_catchsql_test( SELECT x FROM t1 ORDER BY x+1 LIMIT -2, -5 ]], { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) @@ -384,7 +384,7 @@ test:do_catchsql_test( SELECT * FROM t6 LIMIT -1 OFFSET -1; ]], { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) @@ -394,7 +394,7 @@ test:do_catchsql_test( SELECT * FROM t6 LIMIT 2 OFFSET -123; ]], { -- - 1, "Only positive integers are allowed in the OFFSET clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the OFFSET clause" -- }) @@ -414,7 +414,7 @@ test:do_catchsql_test( SELECT * FROM t6 LIMIT -432 OFFSET 2; ]], { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) @@ -434,7 +434,7 @@ test:do_catchsql_test( SELECT * FROM t6 LIMIT -1 ]], { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) @@ -454,7 +454,7 @@ test:do_catchsql_test( SELECT * FROM t6 LIMIT -1 OFFSET 1 ]], { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) @@ -734,7 +734,7 @@ test:do_test( return test:catchsql("SELECT x FROM t1 WHERE x<10 LIMIT "..limit) end, { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) @@ -745,7 +745,7 @@ test:do_test( return test:catchsql("SELECT x FROM t1 WHERE x<10 LIMIT "..limit) end, { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) @@ -1320,7 +1320,7 @@ test:do_catchsql_test( SELECT 123 LIMIT -1 OFFSET 0 ]], { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) @@ -1340,7 +1340,7 @@ test:do_catchsql_test( SELECT 123 LIMIT -1 OFFSET 1 ]], { -- - 1, "Only positive integers are allowed in the LIMIT clause" + 1, "Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) diff --git a/test/sql-tap/select4.test.lua b/test/sql-tap/select4.test.lua index b78091b..1c0804b 100755 --- a/test/sql-tap/select4.test.lua +++ b/test/sql-tap/select4.test.lua @@ -990,7 +990,7 @@ test:do_catchsql_test( SELECT DISTINCT log FROM t1 ORDER BY log LIMIT -1 ]], { -- - 1,"Only positive integers are allowed in the LIMIT clause" + 1,"Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) test:do_execsql_test( @@ -1009,7 +1009,7 @@ test:do_catchsql_test( SELECT DISTINCT log FROM t1 ORDER BY log LIMIT -1 OFFSET 2 ]], { -- - 1,"Only positive integers are allowed in the LIMIT clause" + 1,"Failed to execute SQL statement: Only positive integers are allowed in the LIMIT clause" -- }) test:do_execsql_test( @@ -1402,7 +1402,7 @@ test:do_catchsql_test( SELECT (VALUES(1),(2),(3),(4)) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -1412,7 +1412,7 @@ test:do_catchsql_test( SELECT (SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) diff --git a/test/sql-tap/subselect.test.lua b/test/sql-tap/subselect.test.lua index 5b71390..ebfdf43 100755 --- a/test/sql-tap/subselect.test.lua +++ b/test/sql-tap/subselect.test.lua @@ -350,7 +350,7 @@ test:do_catchsql_test( SELECT (SELECT a FROM t5); ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -360,7 +360,7 @@ test:do_catchsql_test( SELECT b FROM t5 WHERE a = (SELECT a FROM t5 WHERE b=6); ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -380,7 +380,7 @@ test:do_catchsql_test( SELECT b FROM t1 WHERE a = (SELECT a FROM t1 WHERE b=6 LIMIT (SELECT b FROM t1 WHERE a =1)); ]], { -- - 1, "SQL error: Expression subquery could be limited only with 1" + 1, "Failed to execute SQL statement: Expression subquery could be limited only with 1" -- }) diff --git a/test/sql-tap/tkt1473.test.lua b/test/sql-tap/tkt1473.test.lua index 3e93203..ada18d0 100755 --- a/test/sql-tap/tkt1473.test.lua +++ b/test/sql-tap/tkt1473.test.lua @@ -125,7 +125,7 @@ test:do_catchsql_test( SELECT (SELECT 1 FROM t1 WHERE a=1 UNION ALL SELECT 2 FROM t1 WHERE b=0) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -145,7 +145,7 @@ test:do_catchsql_test( SELECT (SELECT 1 FROM t1 WHERE a=1 UNION ALL SELECT 2 FROM t1 WHERE b=4) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -155,7 +155,7 @@ test:do_catchsql_test( SELECT (SELECT 1 FROM t1 WHERE a=1 UNION SELECT 2 FROM t1 WHERE b=4) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -165,7 +165,7 @@ test:do_catchsql_test( SELECT (SELECT 1 FROM t1 WHERE a=0 UNION ALL SELECT 2 FROM t1 WHERE b=4) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -206,7 +206,7 @@ test:do_catchsql_test( (SELECT 1 FROM t1 WHERE a=1 UNION ALL SELECT 2 FROM t1 WHERE b=0) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -228,7 +228,7 @@ test:do_catchsql_test( (SELECT 1 FROM t1 WHERE a=1 UNION ALL SELECT 2 FROM t1 WHERE b=4) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -239,7 +239,7 @@ test:do_catchsql_test( (SELECT 1 FROM t1 WHERE a=1 UNION SELECT 2 FROM t1 WHERE b=4) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -250,7 +250,7 @@ test:do_catchsql_test( (SELECT 1 FROM t1 WHERE a=0 UNION ALL SELECT 2 FROM t1 WHERE b=4) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -359,7 +359,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -389,7 +389,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -419,7 +419,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -449,7 +449,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -509,7 +509,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -539,7 +539,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -569,7 +569,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -599,7 +599,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -659,7 +659,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) @@ -689,7 +689,7 @@ test:do_catchsql_test( ) ]], { -- - 1, "SQL error: Expression subquery returned more than 1 row" + 1, "Failed to execute SQL statement: Expression subquery returned more than 1 row" -- }) diff --git a/test/sql/iproto.result b/test/sql/iproto.result index 73497b4..9639ba7 100644 --- a/test/sql/iproto.result +++ b/test/sql/iproto.result @@ -164,15 +164,18 @@ cn:execute('select * from test limit ?', {2}) ... cn:execute('select * from test limit ?', {-2}) --- -- error: Only positive integers are allowed in the LIMIT clause +- error: 'Failed to execute SQL statement: Only positive integers are allowed in the + LIMIT clause' ... cn:execute('select * from test limit ?', {2.7}) --- -- error: Only positive integers are allowed in the LIMIT clause +- error: 'Failed to execute SQL statement: Only positive integers are allowed in the + LIMIT clause' ... cn:execute('select * from test limit ?', {'Hello'}) --- -- error: Only positive integers are allowed in the LIMIT clause +- error: 'Failed to execute SQL statement: Only positive integers are allowed in the + LIMIT clause' ... cn:execute('select * from test limit 1 offset ?', {2}) --- @@ -188,15 +191,18 @@ cn:execute('select * from test limit 1 offset ?', {2}) ... cn:execute('select * from test limit 1 offset ?', {-2}) --- -- error: Only positive integers are allowed in the OFFSET clause +- error: 'Failed to execute SQL statement: Only positive integers are allowed in the + OFFSET clause' ... cn:execute('select * from test limit 1 offset ?', {2.7}) --- -- error: Only positive integers are allowed in the OFFSET clause +- error: 'Failed to execute SQL statement: Only positive integers are allowed in the + OFFSET clause' ... cn:execute('select * from test limit 1 offset ?', {'Hello'}) --- -- error: Only positive integers are allowed in the OFFSET clause +- error: 'Failed to execute SQL statement: Only positive integers are allowed in the + OFFSET clause' ... -- gh-2608 SQL iproto DDL cn:execute('create table test2(id int primary key, a int, b int, c int)') diff --git a/test/sql/types.result b/test/sql/types.result index bc4518c..f05b856 100644 --- a/test/sql/types.result +++ b/test/sql/types.result @@ -351,11 +351,13 @@ box.execute("SELECT true IN (1, 'abc', false)") ... box.execute("SELECT 1 LIMIT true;") --- -- error: Only positive integers are allowed in the LIMIT clause +- error: 'Failed to execute SQL statement: Only positive integers are allowed in the + LIMIT clause' ... box.execute("SELECT 1 LIMIT 1 OFFSET true;") --- -- error: Only positive integers are allowed in the OFFSET clause +- error: 'Failed to execute SQL statement: Only positive integers are allowed in the + OFFSET clause' ... box.execute("SELECT 'abc' || true;") --- @@ -519,7 +521,8 @@ box.execute("SELECT b FROM t GROUP BY b LIMIT 1;") ... box.execute("SELECT b FROM t LIMIT true;") --- -- error: Only positive integers are allowed in the LIMIT clause +- error: 'Failed to execute SQL statement: Only positive integers are allowed in the + LIMIT clause' ... -- Most of aggregates don't accept boolean arguments. -- -- 2.7.4