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 83A1925366 for ; Wed, 24 Jul 2019 12:55:16 -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 9_UdZ9gK7Tdv for ; Wed, 24 Jul 2019 12:55:16 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 36E6625364 for ; Wed, 24 Jul 2019 12:55:16 -0400 (EDT) From: Nikita Pettik Subject: [tarantool-patches] [PATCH] sql: fix type in meta for unsigned binding Date: Wed, 24 Jul 2019 19:55:08 +0300 Message-Id: <20190724165508.81356-1-korablev@tarantool.org> 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: tarantool-patches@freelists.org Cc: kostja@tarantool.org, Nikita Pettik It was decided that for all integer literals we would return "INTEGER" type, not "UNSIGNED". Accidentally, after substitution of unsigned binding value type was set to "UNSIGNED". Let's fix that and set "INTEGER" type. --- Branch: https://github.com/tarantool/tarantool/tree/np/fix-meta-uint-binding src/box/sql/vdbeapi.c | 2 +- test/sql/iproto.result | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c index ecf1b3601..f5885230b 100644 --- a/src/box/sql/vdbeapi.c +++ b/src/box/sql/vdbeapi.c @@ -1005,7 +1005,7 @@ sql_bind_uint64(struct sql_stmt *stmt, int i, uint64_t value) struct Vdbe *p = (struct Vdbe *) stmt; if (vdbeUnbind(p, i) != 0) return -1; - int rc = sql_bind_type(p, i, "UNSIGNED"); + int rc = sql_bind_type(p, i, "INTEGER"); mem_set_u64(&p->aVar[i - 1], value); return rc; } diff --git a/test/sql/iproto.result b/test/sql/iproto.result index 26d12a51a..9639ba7a6 100644 --- a/test/sql/iproto.result +++ b/test/sql/iproto.result @@ -374,11 +374,11 @@ cn:execute('select $2, $1, $3', parameters) --- - metadata: - name: $2 - type: UNSIGNED + type: INTEGER - name: $1 - type: UNSIGNED + type: INTEGER - name: $3 - type: UNSIGNED + type: INTEGER rows: - [22, 11, 33] ... -- 2.15.1