[tarantool-patches] Re: [PATCH v1 2/3] sql: rework diag_set() in OP_Halt

n.pettik korablev at tarantool.org
Wed Apr 24 15:19:30 MSK 2019



> On 22 Apr 2019, at 11:24, Imeev Mergen <imeevma at tarantool.org> wrote:
> 
> 
> On 4/15/19 6:21 PM, n.pettik wrote:
>> 
>>> On 12 Apr 2019, at 15:34, imeevma at tarantool.org wrote:
>>> 
>>> Before this patch it was possible to have an error code with wrong
>>> error description. This patch fixes it.
>> Could you please supply this statement with an example(s)?
> 
> Here it is:
> 
> tarantool> box.execute("CREATE TABLE t(a INT PRIMARY KEY, b INT);")
> ---
> - row_count: 1
> ...
> 
> tarantool> box.execute("INSERT INTO t VALUES (1,2), (3,4);")
> ---
> - row_count: 2
> ...
> 
> tarantool> box.execute("SELECT b FROM t WHERE a = (SELECT a FROM t);")
> ---
> - error: 'SQL error: Expression subquery returned more than 1 row'
> ...
> 
> tarantool> box.error.last().code
> ---
> - 159
> ...
> 
> 
> From the error message, we can say that this is an ER_SQL(160)
> error. But this is wrong, as this is an ER_SQL_EXECUTE(159) error.

I mean add this explanation to the commit message. Also, what is the
difference between ER_SQL and ER_SQL_EXECUTE? Their descriptions
look almost identical.





More information about the Tarantool-patches mailing list