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 781F5254DB for ; Sat, 25 May 2019 12:11:04 -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 8kcC6PgiKLqX for ; Sat, 25 May 2019 12:11:04 -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 B883C2521A for ; Sat, 25 May 2019 12:11:03 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: [tarantool-patches] Re: [PATCH v1 12/21] sql: remove SQL_TOOBIG errcode From: "n.pettik" In-Reply-To: <8947c9a4984d9490a7557bd08fa629be158eccc9.1558780708.git.imeevma@gmail.com> Date: Sat, 25 May 2019 19:11:00 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <8947c9a4984d9490a7557bd08fa629be158eccc9.1558780708.git.imeevma@gmail.com> 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: Imeev Mergen > diff --git a/src/box/bind.c b/src/box/bind.c > index 90d56d6..754f6c7 100644 > --- a/src/box/bind.c > +++ b/src/box/bind.c > @@ -207,16 +207,7 @@ sql_bind_column(struct sql_stmt *stmt, const = struct sql_bind *p, > } > if (rc =3D=3D 0) > return 0; > - > - switch (rc) { > - case SQL_NOMEM: > - diag_set(OutOfMemory, p->bytes, "vdbe", "bind value"); > - break; > - case SQL_TOOBIG: > - default: > - diag_set(ClientError, ER_SQL_BIND_VALUE, = sql_bind_name(p), > - mp_type_strs[p->type]); > - break; > - } > + diag_set(ClientError, ER_SQL_BIND_VALUE, sql_bind_name(p), > + mp_type_strs[p->type]); I guess this refactoring is incorrect a bit. Here you always set ER_SQL_BIND_VALUE. However, sqlVdbeMemSetStr() and sql_bind_zeroblob64() already set ER_SQL_EXECUTE error in case =E2=80=9Cstring or blob is too big=E2=80=9D. Probably, this case = is not covered by tests. Please, come up with test case on this condition.