From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 563406EC40; Wed, 18 Aug 2021 19:53:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 563406EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1629305639; bh=gWiN7Rtfa0eWrTFUDJ93BqMoOmwUfsA96pA2VZU8zx0=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=R03D51/PP9uavZakcm2OTcS6Mv4NjfCanhJSEie+Ge+rbEOnIDzQ51zlS2109CuUP 4BG0OyQQbM6OhulZWv92XkYTkjcLoXXPkF7CyI0XZumeLiPkuyye7ltjDnf9uf1wk7 WqJdLWtpTm29NQ7aEPY1s0ZiInUmeHRn1ku+hZzs= Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C54FE6EC40 for ; Wed, 18 Aug 2021 19:53:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C54FE6EC40 Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1mGOox-0007Xh-Re; Wed, 18 Aug 2021 19:53:44 +0300 To: Mergen Imeev References: <20b1ddcb-2cbc-5cad-9036-5c317c9f7c71@tarantool.org> <20210818133230.GC392133@tarantool.org> Message-ID: <698fcb36-c312-f874-7c2a-4a82b57451b4@tarantool.org> Date: Wed, 18 Aug 2021 19:53:31 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210818133230.GC392133@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD906AB4890CDABF0C5CB76CEE71D3E4007182A05F5380850407F89AF3758B3087C8FF12A8750D2D07B3874A2FCF6F695A9964DC77AE6A6D1A8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE746D93DAA4671895CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063775432D36FC05FD598638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D85D7B7179C8D1EA60ED74851F99C4C74F117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE41BF15D38FB6CB3ACAA9C333723BB66AD8FC6C240DEA7642DBF02ECDB25306B2B78CF848AE20165D0A6AB1C7CE11FEE3F254576263B31EA96E0066C2D8992A16C4224003CC836476EA7A3FFF5B025636E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407959CC434672EE6371089D37D7C0E48F6C8AA50765F7900637FB177F6A8366F17BEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A511A560EBB2F36BFB8D0FB4D91F3EFE5B3F95CE52D58543C3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75C69C5C0DDE134364410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AB80C45F81B80D63F038DB50980C51881CE03E60C13E894C425FD1CDF8CD572FF82A7B339BF87A971D7E09C32AA3244C359BE180708809C575281B21EE75D1EAA995755A1445935E927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojGSxK+6r6oBFaaLI3YeaYnA== X-Mailru-Sender: 6CA451E36783D721CBEA96CEA26D325D5474D8191450123A3DF1A47923D6ED77B7CBEF92542CD7C82F97C478340294DCC77752E0C033A69E0F0C7111264B8915FF1320A92A5534336C18EFA0BB12DBB0 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 4/4] sql: introduce decimal to arithmetic X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Safin Timur via Tarantool-patches Reply-To: Safin Timur Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" LGTM On 18.08.2021 16:32, Mergen Imeev wrote: > Thank you for the review! My answer and diff below. There will be quite big > diff, but it is just change of description of one error. > > On Mon, Aug 16, 2021 at 10:48:40PM +0300, Safin Timur wrote: >> >> >> On 16.08.2021 18:57, Mergen Imeev via Tarantool-patches wrote: >>> This patch introduces arithmetic for DECIMAL in SQL. After this patch, >>> DECIMAL values can participate in arithmetic along with INTEGER, >>> UNSIGNED, DOUBLE, and other DECIMAL values. >>> >>> Part of #4415 >>> --- >>> src/box/sql/mem.c | 124 +++++++++++++++++++++++++++++- >>> test/sql-tap/decimal.test.lua | 141 +++++++++++++++++++++++++++++++++- >>> 2 files changed, 262 insertions(+), 3 deletions(-) >>> >>> diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c >>> index ff8b40d7f..a4ec98f34 100644 >>> --- a/src/box/sql/mem.c >>> +++ b/src/box/sql/mem.c >>> @@ -1733,6 +1733,18 @@ mem_get_int(const struct Mem *mem, int64_t *i, bool >>> *is_neg) >>> } >>> return -1; >>> } >>> + if (mem->type == MEM_TYPE_DEC) { >>> + if (decimal_is_neg(&mem->u.d)) { >>> + if (decimal_to_int64(&mem->u.d, i) == NULL) >>> + return -1; >>> + *is_neg = *i < 0; >>> + return 0; >>> + } >>> + if (decimal_to_uint64(&mem->u.d, (uint64_t *)i) == NULL) >>> + return -1; >>> + *is_neg = false; >>> + return 0; >>> + } >>> return -1; >>> } >>> @@ -1760,6 +1772,19 @@ mem_get_uint(const struct Mem *mem, uint64_t *u) >>> } >>> return -1; >>> } >>> + if (mem->type == MEM_TYPE_DEC) { >>> + if (decimal_is_neg(&mem->u.d)) { >>> + int64_t i; >>> + if (decimal_to_int64(&mem->u.d, &i) == NULL || i < >>> 0) >>> + return -1; >>> + assert(i == 0); >>> + *u = 0; >>> + return 0; >>> + } >>> + if (decimal_to_uint64(&mem->u.d, u) == NULL) >>> + return -1; >>> + return 0; >>> + } >>> return -1; >>> } >>> @@ -1778,6 +1803,10 @@ mem_get_double(const struct Mem *mem, double *d) >>> *d = (double)mem->u.u; >>> return 0; >>> } >>> + if (mem->type == MEM_TYPE_DEC) { >>> + *d = atof(decimal_str(&mem->u.d)); >>> + return 0; >>> + } >> >> 1st question is - was it intentionally that you call here atof, while few >> lines belowe we use sqlAtoF? >> >> 2nd complain is - it all looks that we miss decimal_to_double() function in >> src/core/decimal.c (where we do have decimal_from_double() but not the >> reverse direction). It will look more consistent if this implementation >> would be there. And, I stll believe, there is better way for converting >> decimal to double, than converting it to string, and then to double. >> >> [Though quick navigation over decNumber API didn't reveal the direct >> approach. Serge, could you please recommend the easiest way here?] >> >> > I will think about this a bit later, for now I decided to not add additional > functions to decimal.c/.h. > >>> @@ -1946,12 +2003,12 @@ mem_concat(struct Mem *a, struct Mem *b, struct >>> Mem *result) >>> static inline int >>> check_types_numeric_arithmetic(const struct Mem *a, const struct Mem *b) >>> { >>> - if (!mem_is_num(a) || mem_is_metatype(a) || a->type == >>> MEM_TYPE_DEC) { >>> + if (!mem_is_num(a) || mem_is_metatype(a)) { >> >> And now it looks better than before, and less confusing, I do not have >> complains here anymore... >> >> >>> diag_set(ClientError, ER_SQL_TYPE_MISMATCH, mem_str(a), >>> "integer, unsigned or double"); >>> return -1; >>> } >>> - if (!mem_is_num(b) || mem_is_metatype(b) || b->type == >>> MEM_TYPE_DEC) { >>> + if (!mem_is_num(b) || mem_is_metatype(b)) { >> >> And here. >> >>> diag_set(ClientError, ER_SQL_TYPE_MISMATCH, mem_str(b), >>> "integer, unsigned or double"); >>> return -1; >> >> Thanks, >> Timur > > > Diff: > > > diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c > index 077a8b51e..74febd182 100644 > --- a/src/box/sql/mem.c > +++ b/src/box/sql/mem.c > @@ -2005,12 +2005,12 @@ check_types_numeric_arithmetic(const struct Mem *a, const struct Mem *b) > { > if (!mem_is_num(a) || mem_is_metatype(a)) { > diag_set(ClientError, ER_SQL_TYPE_MISMATCH, mem_str(a), > - "integer, unsigned or double"); > + "integer, decimal or double"); > return -1; > } > if (!mem_is_num(b) || mem_is_metatype(b)) { > diag_set(ClientError, ER_SQL_TYPE_MISMATCH, mem_str(b), > - "integer, unsigned or double"); > + "integer, decimal or double"); > return -1; > } > return 0; > diff --git a/test/sql-tap/gh-5756-implicit-cast-in-arithmetic.test.lua b/test/sql-tap/gh-5756-implicit-cast-in-arithmetic.test.lua > index 3e4de6860..390a2d9b2 100755 > --- a/test/sql-tap/gh-5756-implicit-cast-in-arithmetic.test.lua > +++ b/test/sql-tap/gh-5756-implicit-cast-in-arithmetic.test.lua > @@ -35,7 +35,7 @@ test:do_catchsql_test( > [[ > SELECT 9 + '2'; > ]], { > - 1, "Type mismatch: can not convert string('2') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('2') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -43,7 +43,7 @@ test:do_catchsql_test( > [[ > SELECT 9 + x'32'; > ]], { > - 1, "Type mismatch: can not convert varbinary(x'32') to integer, unsigned or double" > + 1, "Type mismatch: can not convert varbinary(x'32') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -51,7 +51,7 @@ test:do_catchsql_test( > [[ > SELECT 9 + true; > ]], { > - 1, "Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double" > + 1, "Type mismatch: can not convert boolean(TRUE) to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -60,7 +60,7 @@ test:do_catchsql_test( > SELECT 9 + CAST('11111111-1111-1111-1111-111111111111' AS UUID); > ]], { > 1, "Type mismatch: can not convert ".. > - "uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" > + "uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" > }) > > test:do_execsql_test( > @@ -92,7 +92,7 @@ test:do_catchsql_test( > [[ > SELECT 9 - '2'; > ]], { > - 1, "Type mismatch: can not convert string('2') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('2') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -100,7 +100,7 @@ test:do_catchsql_test( > [[ > SELECT 9 - x'32'; > ]], { > - 1, "Type mismatch: can not convert varbinary(x'32') to integer, unsigned or double" > + 1, "Type mismatch: can not convert varbinary(x'32') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -108,7 +108,7 @@ test:do_catchsql_test( > [[ > SELECT 9 - true; > ]], { > - 1, "Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double" > + 1, "Type mismatch: can not convert boolean(TRUE) to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -117,7 +117,7 @@ test:do_catchsql_test( > SELECT 9 - CAST('11111111-1111-1111-1111-111111111111' AS UUID); > ]], { > 1, "Type mismatch: can not convert ".. > - "uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" > + "uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" > }) > > test:do_execsql_test( > @@ -149,7 +149,7 @@ test:do_catchsql_test( > [[ > SELECT 9 * '2'; > ]], { > - 1, "Type mismatch: can not convert string('2') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('2') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -157,7 +157,7 @@ test:do_catchsql_test( > [[ > SELECT 9 * x'32'; > ]], { > - 1, "Type mismatch: can not convert varbinary(x'32') to integer, unsigned or double" > + 1, "Type mismatch: can not convert varbinary(x'32') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -165,7 +165,7 @@ test:do_catchsql_test( > [[ > SELECT 9 * true; > ]], { > - 1, "Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double" > + 1, "Type mismatch: can not convert boolean(TRUE) to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -174,7 +174,7 @@ test:do_catchsql_test( > SELECT 9 * CAST('11111111-1111-1111-1111-111111111111' AS UUID); > ]], { > 1, "Type mismatch: can not convert ".. > - "uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" > + "uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" > }) > > test:do_execsql_test( > @@ -206,7 +206,7 @@ test:do_catchsql_test( > [[ > SELECT 9 / '2'; > ]], { > - 1, "Type mismatch: can not convert string('2') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('2') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -214,7 +214,7 @@ test:do_catchsql_test( > [[ > SELECT 9 / x'32'; > ]], { > - 1, "Type mismatch: can not convert varbinary(x'32') to integer, unsigned or double" > + 1, "Type mismatch: can not convert varbinary(x'32') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -222,7 +222,7 @@ test:do_catchsql_test( > [[ > SELECT 9 / true; > ]], { > - 1, "Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double" > + 1, "Type mismatch: can not convert boolean(TRUE) to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -231,7 +231,7 @@ test:do_catchsql_test( > SELECT 9 / CAST('11111111-1111-1111-1111-111111111111' AS UUID); > ]], { > 1, "Type mismatch: can not convert ".. > - "uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" > + "uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" > }) > > test:do_execsql_test( > diff --git a/test/sql-tap/metatypes.test.lua b/test/sql-tap/metatypes.test.lua > index 349c670ba..3e4091675 100755 > --- a/test/sql-tap/metatypes.test.lua > +++ b/test/sql-tap/metatypes.test.lua > @@ -96,7 +96,7 @@ test:do_catchsql_test( > [[ > SELECT 1 + CAST(1 AS NUMBER); > ]], { > - 1, "Type mismatch: can not convert number(1) to integer, unsigned or double" > + 1, "Type mismatch: can not convert number(1) to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -104,7 +104,7 @@ test:do_catchsql_test( > [[ > SELECT CAST(1 AS SCALAR) * 1; > ]], { > - 1, "Type mismatch: can not convert scalar(1) to integer, unsigned or double" > + 1, "Type mismatch: can not convert scalar(1) to integer, decimal or double" > }) > > -- Check that bitwise operations are prohibited for NUMBER and SCALAR values. > diff --git a/test/sql-tap/sql-errors.test.lua b/test/sql-tap/sql-errors.test.lua > index daf0ee643..ceb4ecccf 100755 > --- a/test/sql-tap/sql-errors.test.lua > +++ b/test/sql-tap/sql-errors.test.lua > @@ -696,7 +696,7 @@ test:do_catchsql_test( > SELECT X'ff' + 1; > ]], { > -- > - 1, "Type mismatch: can not convert varbinary(x'FF') to integer, unsigned or double" > + 1, "Type mismatch: can not convert varbinary(x'FF') to integer, decimal or double" > -- > }) > > @@ -706,7 +706,7 @@ test:do_catchsql_test( > SELECT X'ff' - 1; > ]], { > -- > - 1, "Type mismatch: can not convert varbinary(x'FF') to integer, unsigned or double" > + 1, "Type mismatch: can not convert varbinary(x'FF') to integer, decimal or double" > -- > }) > > @@ -716,7 +716,7 @@ test:do_catchsql_test( > SELECT X'ff' * 1; > ]], { > -- > - 1, "Type mismatch: can not convert varbinary(x'FF') to integer, unsigned or double" > + 1, "Type mismatch: can not convert varbinary(x'FF') to integer, decimal or double" > -- > }) > > @@ -726,7 +726,7 @@ test:do_catchsql_test( > SELECT X'ff' / 1; > ]], { > -- > - 1, "Type mismatch: can not convert varbinary(x'FF') to integer, unsigned or double" > + 1, "Type mismatch: can not convert varbinary(x'FF') to integer, decimal or double" > -- > }) > > diff --git a/test/sql-tap/tkt-a8a0d2996a.test.lua b/test/sql-tap/tkt-a8a0d2996a.test.lua > index 72f57ec65..a40621f41 100755 > --- a/test/sql-tap/tkt-a8a0d2996a.test.lua > +++ b/test/sql-tap/tkt-a8a0d2996a.test.lua > @@ -27,7 +27,7 @@ test:do_catchsql_test( > SELECT typeof(x), typeof(y) FROM t WHERE 1=x+0 AND y=='1'; > ]], { > -- <1.0> > - 1, "Type mismatch: can not convert string('1') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('1') to integer, decimal or double" > -- > }) > > @@ -37,7 +37,7 @@ test:do_catchsql_test( > SELECT typeof(x), typeof(y) FROM t WHERE 1=x-0 AND y=='1'; > ]], { > -- <1.1> > - 1, "Type mismatch: can not convert string('1') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('1') to integer, decimal or double" > -- > }) > > @@ -47,7 +47,7 @@ test:do_catchsql_test( > SELECT typeof(x), typeof(y) FROM t WHERE 1=x*1 AND y=='1'; > ]], { > -- <1.2> > - 1, "Type mismatch: can not convert string('1') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('1') to integer, decimal or double" > -- > }) > > @@ -57,7 +57,7 @@ test:do_catchsql_test( > SELECT typeof(x), typeof(y) FROM t WHERE 1=x/1 AND y=='1'; > ]], { > -- <1.3> > - 1, "Type mismatch: can not convert string('1') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('1') to integer, decimal or double" > -- > }) > > @@ -78,7 +78,7 @@ test:do_catchsql_test( > SELECT typeof(x), typeof(y) FROM t WHERE 1=x+0 AND y=='1'; > ]], { > -- <3.0> > - 1, "Type mismatch: can not convert string('1.0') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('1.0') to integer, decimal or double" > -- > }) > > @@ -88,7 +88,7 @@ test:do_catchsql_test( > SELECT typeof(x), typeof(y) FROM t WHERE 1=x-0 AND y=='1'; > ]], { > -- <3.1> > - 1, "Type mismatch: can not convert string('1.0') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('1.0') to integer, decimal or double" > -- > }) > > @@ -98,7 +98,7 @@ test:do_catchsql_test( > SELECT typeof(x), typeof(y) FROM t WHERE 1=x*1 AND y=='1'; > ]], { > -- <3.2> > - 1, "Type mismatch: can not convert string('1.0') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('1.0') to integer, decimal or double" > -- > }) > > @@ -108,7 +108,7 @@ test:do_catchsql_test( > SELECT typeof(x), typeof(y) FROM t WHERE 1=x/1 AND y=='1'; > ]], { > -- <3.3> > - 1, "Type mismatch: can not convert string('1.0') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('1.0') to integer, decimal or double" > -- > }) > > @@ -138,7 +138,7 @@ test:do_catchsql_test( > SELECT '1.23e64'/'1.0000e+62'; > ]], { > -- <4.1> > - 1, "Type mismatch: can not convert string('1.0000e+62') to integer, unsigned or double" > + 1, "Type mismatch: can not convert string('1.0000e+62') to integer, decimal or double" > -- > }) > > diff --git a/test/sql-tap/uuid.test.lua b/test/sql-tap/uuid.test.lua > index 57e638046..177798cfa 100755 > --- a/test/sql-tap/uuid.test.lua > +++ b/test/sql-tap/uuid.test.lua > @@ -957,7 +957,7 @@ test:do_catchsql_test( > [[ > SELECT -u FROM t2; > ]], { > - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" > + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -965,7 +965,7 @@ test:do_catchsql_test( > [[ > SELECT u + 1 FROM t2; > ]], { > - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" > + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -973,7 +973,7 @@ test:do_catchsql_test( > [[ > SELECT u - 1 FROM t2; > ]], { > - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" > + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -981,7 +981,7 @@ test:do_catchsql_test( > [[ > SELECT u * 1 FROM t2; > ]], { > - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" > + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" > }) > > test:do_catchsql_test( > @@ -989,7 +989,7 @@ test:do_catchsql_test( > [[ > SELECT u / 1 FROM t2; > ]], { > - 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, unsigned or double" > + 1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer, decimal or double" > }) > > test:do_catchsql_test( > diff --git a/test/sql/boolean.result b/test/sql/boolean.result > index a9ce37e11..000142ebe 100644 > --- a/test/sql/boolean.result > +++ b/test/sql/boolean.result > @@ -1131,98 +1131,98 @@ SELECT a, a1, a OR a1 FROM t, t6; > SELECT -true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT -false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT -a FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > > SELECT true + true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT true + false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT false + true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false + false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true - true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT true - false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT false - true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false - false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true * true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT true * false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT false * true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false * false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true / true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT true / false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT false / true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false / false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true % true; > | --- > @@ -1248,42 +1248,42 @@ SELECT false % false; > SELECT a, true + a FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, false + a FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, true - a FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, false - a FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, true * a FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, false * a FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, true / a FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, false / a FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, true % a FROM t; > | --- > @@ -1298,42 +1298,42 @@ SELECT a, false % a FROM t; > SELECT a, a + true FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a, a + false FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, a - true FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a, a - false FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, a * true FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a, a * false FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, a / true FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a, a / false FROM t; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, a % true FROM t; > | --- > @@ -1349,22 +1349,22 @@ SELECT a, a % false FROM t; > SELECT a, a1, a + a1 FROM t, t6; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, a1, a - a1 FROM t, t6; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, a1, a * a1 FROM t, t6; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, a1, a / a1 FROM t, t6; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a, a1, a % a1 FROM t, t6; > | --- > @@ -2652,42 +2652,42 @@ SELECT a2, b, b OR a2 FROM t6, t7; > SELECT true + 2; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false + 2; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true - 2; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false - 2; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true * 2; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false * 2; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true / 2; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false / 2; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true % 2; > | --- > @@ -2702,42 +2702,42 @@ SELECT false % 2; > SELECT 2 + true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT 2 + false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT 2 - true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT 2 - false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT 2 * true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT 2 * false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT 2 / true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT 2 / false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT 2 % true; > | --- > @@ -2753,22 +2753,22 @@ SELECT 2 % false; > SELECT a1, a1 + 2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, a1 - 2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, a1 * 2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, a1 / 2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, a1 % 2 FROM t6 > | --- > @@ -2778,22 +2778,22 @@ SELECT a1, a1 % 2 FROM t6 > SELECT a1, 2 + a1 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, 2 - a1 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, 2 * a1 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, 2 / a1 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, 2 % a1 FROM t6 > | --- > @@ -2803,22 +2803,22 @@ SELECT a1, 2 % a1 FROM t6 > SELECT a2, a2 + 2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, a2 - 2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, a2 * 2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, a2 / 2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, a2 % 2 FROM t6 > | --- > @@ -2828,22 +2828,22 @@ SELECT a2, a2 % 2 FROM t6 > SELECT a2, 2 + a2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, 2 - a2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, 2 * a2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, 2 / a2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, 2 % a2 FROM t6 > | --- > @@ -2854,42 +2854,42 @@ SELECT a2, 2 % a2 FROM t6 > SELECT b, true + b FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT b, false + b FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT b, true - b FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT b, false - b FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT b, true * b FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT b, false * b FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT b, true / b FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT b, false / b FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT b, true % b FROM t7; > | --- > @@ -2904,42 +2904,42 @@ SELECT b, false % b FROM t7; > SELECT b, b + true FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT b, b + false FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT b, b - true FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT b, b - false FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT b, b * true FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT b, b * false FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT b, b / true FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT b, b / false FROM t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT b, b % true FROM t7; > | --- > @@ -2955,22 +2955,22 @@ SELECT b, b % false FROM t7; > SELECT a1, b, a1 + b FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, b, a1 - b FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, b, a1 * b FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, b, a1 / b FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, b, a1 % b FROM t6, t7; > | --- > @@ -2980,22 +2980,22 @@ SELECT a1, b, a1 % b FROM t6, t7; > SELECT a1, b, b + a1 FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, b, b - a1 FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, b, b * a1 FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, b, b / a1 FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, b, b % a1 FROM t6, t7; > | --- > @@ -3005,22 +3005,22 @@ SELECT a1, b, b % a1 FROM t6, t7; > SELECT a2, b, a2 + b FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, b, a2 - b FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, b, a2 * b FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, b, a2 / b FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, b, a2 % b FROM t6, t7; > | --- > @@ -3030,22 +3030,22 @@ SELECT a2, b, a2 % b FROM t6, t7; > SELECT a2, b, b + a2 FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, b, b - a2 FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, b, b * a2 FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, b, b / a2 FROM t6, t7; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, b, b % a2 FROM t6, t7; > | --- > @@ -4121,42 +4121,42 @@ SELECT a2, c, c OR a2 FROM t6, t8; > SELECT true + 2.3; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false + 2.3; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true - 2.3; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false - 2.3; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true * 2.3; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false * 2.3; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true / 2.3; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT false / 2.3; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT true % 2.3; > | --- > @@ -4171,42 +4171,42 @@ SELECT false % 2.3; > SELECT 2.3 + true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT 2.3 + false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT 2.3 - true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT 2.3 - false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT 2.3 * true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT 2.3 * false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT 2.3 / true; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT 2.3 / false; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT 2.3 % true; > | --- > @@ -4222,22 +4222,22 @@ SELECT 2.3 % false; > SELECT a1, a1 + 2.3 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, a1 - 2.3 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, a1 * 2.3 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, a1 / 2.3 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, a1 % 2.3 FROM t6 > | --- > @@ -4247,22 +4247,22 @@ SELECT a1, a1 % 2.3 FROM t6 > SELECT a1, 2.3 + a1 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, 2.3 - a1 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, 2.3 * a1 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, 2.3 / a1 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, 2.3 % a1 FROM t6 > | --- > @@ -4272,22 +4272,22 @@ SELECT a1, 2.3 % a1 FROM t6 > SELECT a2, a2 + 2.3 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, a2 - 2.3 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, a2 * 2.3 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, a2 / 2.3 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, a2 % 2.3 FROM t6 > | --- > @@ -4297,22 +4297,22 @@ SELECT a2, a2 % 2.3 FROM t6 > SELECT a2, 2.3 + a2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, 2.3 - a2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, 2.3 * a2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, 2.3 / a2 FROM t6 > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, 2.3 % a2 FROM t6 > | --- > @@ -4323,42 +4323,42 @@ SELECT a2, 2.3 % a2 FROM t6 > SELECT c, true + c FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT c, false + c FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT c, true - c FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT c, false - c FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT c, true * c FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT c, false * c FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT c, true / c FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT c, false / c FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT c, true % c FROM t8; > | --- > @@ -4373,42 +4373,42 @@ SELECT c, false % c FROM t8; > SELECT c, c + true FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT c, c + false FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT c, c - true FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT c, c - false FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT c, c * true FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT c, c * false FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT c, c / true FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT c, c / false FROM t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT c, c % true FROM t8; > | --- > @@ -4424,22 +4424,22 @@ SELECT c, c % false FROM t8; > SELECT a1, c, a1 + c FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, c, a1 - c FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, c, a1 * c FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, c, a1 / c FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, c, a1 % c FROM t6, t8; > | --- > @@ -4449,22 +4449,22 @@ SELECT a1, c, a1 % c FROM t6, t8; > SELECT a1, c, c + a1 FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, c, c - a1 FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, c, c * a1 FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, c, c / a1 FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(FALSE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(FALSE) to integer, decimal or double' > | ... > SELECT a1, c, c % a1 FROM t6, t8; > | --- > @@ -4474,22 +4474,22 @@ SELECT a1, c, c % a1 FROM t6, t8; > SELECT a2, c, a2 + c FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, c, a2 - c FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, c, a2 * c FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, c, a2 / c FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, c, a2 % c FROM t6, t8; > | --- > @@ -4499,22 +4499,22 @@ SELECT a2, c, a2 % c FROM t6, t8; > SELECT a2, c, c + a2 FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, c, c - a2 FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, c, c * a2 FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, c, c / a2 FROM t6, t8; > | --- > | - null > - | - 'Type mismatch: can not convert boolean(TRUE) to integer, unsigned or double' > + | - 'Type mismatch: can not convert boolean(TRUE) to integer, decimal or double' > | ... > SELECT a2, c, c % a2 FROM t6, t8; > | --- > diff --git a/test/sql/types.result b/test/sql/types.result > index 68bdcd62e..4d49318c9 100644 > --- a/test/sql/types.result > +++ b/test/sql/types.result > @@ -311,7 +311,7 @@ box.execute('SELECT 1 + 1.1;') > box.execute('SELECT \'9223372036854\' + 1;') > --- > - null > -- 'Type mismatch: can not convert string(''9223372036854'') to integer, unsigned or > +- 'Type mismatch: can not convert string(''9223372036854'') to integer, decimal or > double' > ... > -- Fix BOOLEAN bindings. >