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 1A9902A00A for ; Tue, 23 Apr 2019 15:58:17 -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 WKDnTYF5lEsd for ; Tue, 23 Apr 2019 15:58:17 -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 BD67829284 for ; Tue, 23 Apr 2019 15:58:16 -0400 (EDT) From: "n.pettik" Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_023D3264-9310-4827-9577-298896B69C99" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: [tarantool-patches] Re: [PATCH 3/9] sql: use msgpack types instead of custom ones Date: Tue, 23 Apr 2019 22:58:14 +0300 In-Reply-To: References: <7d55169718d4bc193a41710da12cfd6a7d4edebc.1555252410.git.korablev@tarantool.org> <374916ec-2e49-643f-eccb-42f9d66e340e@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: Vladislav Shpilevoy --Apple-Mail=_023D3264-9310-4827-9577-298896B69C99 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 >> diff --git a/src/box/sql/date.c b/src/box/sql/date.c >> index 5f5272ea3..1c7a5ad2d 100644 >> --- a/src/box/sql/date.c >> +++ b/src/box/sql/date.c >> @@ -932,12 +932,12 @@ isDate(sql_context * context, int argc, = sql_value ** argv, DateTime * p) >> { >> int i, n; >> const unsigned char *z; >> - int eType; >> + enum mp_type eType; >> memset(p, 0, sizeof(*p)); >> if (argc =3D=3D 0) { >> return setDateTimeToCurrent(context, p); >> } >> - if ((eType =3D sql_value_type(argv[0])) =3D=3D SQL_FLOAT >> + if ((eType =3D sql_value_type(argv[0])) =3D=3D MP_DOUBLE >> || eType =3D=3D SQL_INTEGER) { >=20 > SQL_INTEGER is removed already. Please, replace with MP_INT. Ok, removed. This was dead code, so compiler didn=E2=80=99t show any warnings/compile errors. --Apple-Mail=_023D3264-9310-4827-9577-298896B69C99 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
diff = --git a/src/box/sql/date.c b/src/box/sql/date.c
index = 5f5272ea3..1c7a5ad2d 100644
--- a/src/box/sql/date.c
+++ b/src/box/sql/date.c
@@ -932,12 +932,12 @@ = isDate(sql_context * context, int argc, sql_value ** argv, DateTime * = p)
{
int i, n;
const = unsigned char *z;
- int eType;
+ enum = mp_type eType;
memset(p, 0, sizeof(*p));
= if (argc =3D=3D 0) {
return = setDateTimeToCurrent(context, p);
}
- = if ((eType =3D sql_value_type(argv[0])) =3D=3D SQL_FLOAT
+ = if ((eType =3D sql_value_type(argv[0])) =3D=3D MP_DOUBLE
=     || eType = =3D=3D SQL_INTEGER) {

SQL_INTEGER is removed already. Please, replace with = MP_INT.

Ok, removed. = This was dead code, so compiler didn=E2=80=99t
show any = warnings/compile errors.

= --Apple-Mail=_023D3264-9310-4827-9577-298896B69C99--