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 50FB16EC55; Tue, 13 Jul 2021 10:04:52 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 50FB16EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626159892; bh=EvAfdxHhjUbSRP6OZQbrUVBf8FQnbVSh1Xe92uxYzec=; h=To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=nu+sUWvNMVTmdfEiGqNSC4TOcwqIBsLuk9nAz5mGpGYHXGznQvxw3BLCmLsz0RN5d ONWuvV7NqA+jrFj0hpr/luUMB1+YfJYL2bLtXn1ROJLLAqQuMofSYIv0Poo+owMni4 fyJz6riWMZHbTqr2TzJqngrZH2Dup5Mmdu/icYp4= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 5369C6EC55 for ; Tue, 13 Jul 2021 10:03:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5369C6EC55 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1m3CST-00056n-K6; Tue, 13 Jul 2021 10:03:58 +0300 To: tsafin@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Tue, 13 Jul 2021 10:03:57 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD97BB0EF39AD2B33D52D9CC5C87942E9F1EA2CB6CC9AFB41C2182A05F538085040C424414AFCA5A696A18E9EB6E346B4CFDA19B7F2E3AF84921BD1B7B456467ACE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7CE015DA2C687B387EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E7848D1B69988C9C8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D818BAB3260BE76104B9E88EEB333DBC3F117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B62CFFCC7B69C47339089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CE68746B1F2AB10C6533B1D5DB6079EBC66954D9E568E42239C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF309DFB797F6729CB699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A541DB4061E9383224C5BB0C742CE76FFB4B908D3FCFDD9F9CC375EFAF8E020D04659495D4EB7C2E1D7E09C32AA3244C856860A148CE6C3E5D75DEC3E58EE681CE0B41342B755BCD729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojAZDAgpmGsvYzSxuqKEgOGA== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DD539544FC2A7F747DCE10190759B701883D72C36FC87018B9F80AB2734326CD2FB559BB5D741EB96352A0ABBE4FDA4210A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 2/4] sql: properly show values in type mismatch error 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: Mergen Imeev via Tarantool-patches Reply-To: imeevma@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Currently, some values are displayed improperly in the type mismatch error description. For VARBINARY, the word "varbinary" is printed instead of the value. STRING values are printed without quotes, which can be confusing in some cases, such as when it consists of spaces. This patch introduces the following changes: 1) VARBINARY value will be printed as x''. 2) STRING value will be printed in single quotes. 3) UUID value will be printed in single quotes. UUID value does not need to be enclosed in single quotes, since there are no literals for UUIDs, but it looks more convenient. Part of #6176 --- src/box/sql/mem.c | 21 +- test/sql-tap/autoinc.test.lua | 4 +- test/sql-tap/cast.test.lua | 20 +- test/sql-tap/func.test.lua | 8 +- ...-4766-wrong-cast-from-blob-to-int.test.lua | 4 +- .../gh-5913-segfault-on-select-uuid.test.lua | 4 +- test/sql-tap/index1.test.lua | 4 +- test/sql-tap/select1.test.lua | 4 +- test/sql-tap/select5.test.lua | 2 +- test/sql-tap/sql-errors.test.lua | 65 +++- test/sql-tap/tkt-80e031a00f.test.lua | 8 +- test/sql-tap/tkt-9a8b09f8e6.test.lua | 20 +- test/sql-tap/uuid.test.lua | 78 ++--- test/sql/boolean.result | 280 +++++++++--------- test/sql/integer-overflow.result | 2 +- test/sql/persistency.result | 2 +- test/sql/types.result | 58 ++-- 17 files changed, 317 insertions(+), 267 deletions(-) diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c index 05f053c55..3bbff9897 100644 --- a/src/box/sql/mem.c +++ b/src/box/sql/mem.c @@ -79,8 +79,8 @@ mem_str(const struct Mem *mem) return "NULL"; case MEM_TYPE_STR: if (mem->n > STR_VALUE_MAX_LEN) - return tt_sprintf("%.*s...", STR_VALUE_MAX_LEN, mem->z); - return tt_cstr(mem->z, mem->n); + return tt_sprintf("'%.*s...", STR_VALUE_MAX_LEN, mem->z); + return tt_sprintf("'%.*s'", mem->n, mem->z); case MEM_TYPE_INT: return tt_sprintf("%lld", mem->u.i); case MEM_TYPE_UINT: @@ -88,8 +88,18 @@ mem_str(const struct Mem *mem) case MEM_TYPE_DOUBLE: sql_snprintf(STR_VALUE_MAX_LEN, buf, "%!.15g", mem->u.r); return tt_sprintf("%s", buf); - case MEM_TYPE_BIN: - return "varbinary"; + case MEM_TYPE_BIN: { + int len = MIN(mem->n, STR_VALUE_MAX_LEN / 2); + for (int i = 0; i < len; ++i) { + int n = (mem->z[i] & 0xF0) >> 4; + buf[2 * i] = n < 10 ? ('0' + n) : ('A' + n - 10); + n = (mem->z[i] & 0x0F); + buf[2 * i + 1] = n < 10 ? ('0' + n) : ('A' + n - 10); + } + if (mem->n > len) + return tt_sprintf("x'%.*s...", len * 2, buf); + return tt_sprintf("x'%.*s'", len * 2, buf); + } case MEM_TYPE_MAP: case MEM_TYPE_ARRAY: { const char *str = mp_str(mem->z); @@ -99,7 +109,8 @@ mem_str(const struct Mem *mem) return tt_sprintf("%.*s...", STR_VALUE_MAX_LEN, buf); } case MEM_TYPE_UUID: - return tt_uuid_str(&mem->u.uuid); + tt_uuid_to_string(&mem->u.uuid, buf); + return tt_sprintf("'%s'", buf); case MEM_TYPE_BOOL: return mem->u.b ? "TRUE" : "FALSE"; default: diff --git a/test/sql-tap/autoinc.test.lua b/test/sql-tap/autoinc.test.lua index aa457b502..83d983fe1 100755 --- a/test/sql-tap/autoinc.test.lua +++ b/test/sql-tap/autoinc.test.lua @@ -616,7 +616,7 @@ test:do_catchsql_test( INSERT INTO t2 VALUES('asd'); ]], { -- - 1, "Type mismatch: can not convert asd to integer" + 1, "Type mismatch: can not convert 'asd' to integer" -- }) @@ -809,7 +809,7 @@ test:do_catchsql_test( INSERT INTO t1 SELECT s2, s2 FROM t1; ]], { -- - 1, "Type mismatch: can not convert a to integer" + 1, "Type mismatch: can not convert 'a' to integer" -- }) diff --git a/test/sql-tap/cast.test.lua b/test/sql-tap/cast.test.lua index 7de4b79df..e2a227127 100755 --- a/test/sql-tap/cast.test.lua +++ b/test/sql-tap/cast.test.lua @@ -70,7 +70,7 @@ test:do_catchsql_test( SELECT CAST(x'616263' AS NUMBER) ]], { -- - 1, 'Type mismatch: can not convert varbinary to number' + 1, "Type mismatch: can not convert x'616263' to number" -- }) @@ -100,7 +100,7 @@ test:do_catchsql_test( SELECT CAST(x'616263' AS integer) ]], { -- - 1, 'Type mismatch: can not convert varbinary to integer' + 1, "Type mismatch: can not convert x'616263' to integer" -- }) @@ -450,7 +450,7 @@ test:do_catchsql_test( SELECT CAST('123abc' AS NUMBER) ]], { -- - 1, 'Type mismatch: can not convert 123abc to number' + 1, "Type mismatch: can not convert '123abc' to number" -- }) @@ -470,7 +470,7 @@ test:do_catchsql_test( SELECT CAST('123abc' AS integer) ]], { -- - 1, 'Type mismatch: can not convert 123abc to integer' + 1, "Type mismatch: can not convert '123abc' to integer" -- }) @@ -480,7 +480,7 @@ test:do_catchsql_test( SELECT CAST('123.5abc' AS NUMBER) ]], { -- - 1, 'Type mismatch: can not convert 123.5abc to number' + 1, "Type mismatch: can not convert '123.5abc' to number" -- }) @@ -490,7 +490,7 @@ test:do_catchsql_test( SELECT CAST('123.5abc' AS integer) ]], { -- - 1, 'Type mismatch: can not convert 123.5abc to integer' + 1, "Type mismatch: can not convert '123.5abc' to integer" -- }) @@ -561,7 +561,7 @@ test:do_catchsql_test( SELECT CAST('abc' AS NUMBER) ]], { -- - 1, 'Type mismatch: can not convert abc to number' + 1, "Type mismatch: can not convert 'abc' to number" -- }) @@ -835,7 +835,7 @@ test:do_test( ]] end, { -- - 1, 'Type mismatch: can not convert abc to integer' + 1, "Type mismatch: can not convert 'abc' to integer" -- }) @@ -847,7 +847,7 @@ test:do_test( ]] end, { -- - 1, 'Type mismatch: can not convert abc to integer' + 1, "Type mismatch: can not convert 'abc' to integer" -- }) @@ -859,7 +859,7 @@ test:do_test( ]] end, { -- - 1, 'Type mismatch: can not convert abc to number' + 1, "Type mismatch: can not convert 'abc' to number" -- }) diff --git a/test/sql-tap/func.test.lua b/test/sql-tap/func.test.lua index 5e259f7ef..ae6bc9ddd 100755 --- a/test/sql-tap/func.test.lua +++ b/test/sql-tap/func.test.lua @@ -2931,7 +2931,7 @@ test:do_catchsql_test( SELECT ROUND(X'FF') ]], { -- - 1, "Type mismatch: can not convert varbinary to numeric" + 1, "Type mismatch: can not convert x'FF' to numeric" -- }) @@ -2941,7 +2941,7 @@ test:do_catchsql_test( SELECT RANDOMBLOB(X'FF') ]], { -- - 1, "Type mismatch: can not convert varbinary to numeric" + 1, "Type mismatch: can not convert x'FF' to numeric" -- }) @@ -2951,7 +2951,7 @@ test:do_catchsql_test( SELECT SOUNDEX(X'FF') ]], { -- - 1, "Type mismatch: can not convert varbinary to text" + 1, "Type mismatch: can not convert x'FF' to text" -- }) @@ -2961,7 +2961,7 @@ test:do_catchsql_test( SELECT SUM(X'FF') ]], { -- - 1, "Type mismatch: can not convert varbinary to number" + 1, "Type mismatch: can not convert x'FF' to number" -- }) diff --git a/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua b/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua index 28cf50184..b595f99b0 100755 --- a/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua +++ b/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua @@ -32,9 +32,9 @@ test:do_execsql_test( test:do_catchsql_test( "gh-4766-3", "SELECT CAST('" .. long_str .. "1234'" .. " AS INTEGER);", { - 1, "Type mismatch: can not convert 000000000000000000000000000000000" .. + 1, "Type mismatch: can not convert '00000000000000000000000000000000" .. "0000000000000000000000000000000000000000000000000000000000000000000" .. - "0000000000000000000000000000... to integer" + "00000000000000000000000000000... to integer" }) test:finish_test() diff --git a/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua b/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua index 7dcebe5d3..59a76000a 100755 --- a/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua +++ b/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua @@ -40,7 +40,7 @@ test:do_catchsql_test( [[ INSERT INTO t1 SELECT i, NULL, d FROM t; ]], { - 1, "Type mismatch: can not convert varbinary to decimal" + 1, "Type mismatch: can not convert x'C70501030111111C' to decimal" }) -- @@ -77,7 +77,7 @@ test:do_catchsql_test( [[ UPDATE td SET d = d; ]], { - 1, "Type mismatch: can not convert varbinary to decimal" + 1, "Type mismatch: can not convert x'C70501030111111C' to decimal" }) test:finish_test() diff --git a/test/sql-tap/index1.test.lua b/test/sql-tap/index1.test.lua index a4d33152b..e03e284aa 100755 --- a/test/sql-tap/index1.test.lua +++ b/test/sql-tap/index1.test.lua @@ -778,7 +778,7 @@ test:do_catchsql_test( SELECT c FROM t6 WHERE a>123; ]], { -- - 1, "Type mismatch: can not convert to numeric" + 1, "Type mismatch: can not convert '' to numeric" -- }) @@ -788,7 +788,7 @@ test:do_catchsql_test( SELECT c FROM t6 WHERE a>=123; ]], { -- - 1, "Type mismatch: can not convert to numeric" + 1, "Type mismatch: can not convert '' to numeric" -- }) diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua index 36206ca2a..1a7a4ee82 100755 --- a/test/sql-tap/select1.test.lua +++ b/test/sql-tap/select1.test.lua @@ -320,7 +320,7 @@ test:do_catchsql_test( SELECT count(*),count(a),count(b) FROM t4 WHERE b=5 ]], { -- - 1, "Type mismatch: can not convert This is a string that is too big to fit inside a NBFS buffer to numeric" + 1, "Type mismatch: can not convert 'This is a string that is too big to fit inside a NBFS buffer' to numeric" -- }) @@ -515,7 +515,7 @@ test:do_catchsql_test( SELECT sum(a) FROM t3 ]], { -- - 1, "Type mismatch: can not convert abc to number" + 1, "Type mismatch: can not convert 'abc' to number" -- }) diff --git a/test/sql-tap/select5.test.lua b/test/sql-tap/select5.test.lua index 5882102c9..bb9951025 100755 --- a/test/sql-tap/select5.test.lua +++ b/test/sql-tap/select5.test.lua @@ -558,7 +558,7 @@ test:do_catchsql_test( SELECT 1 FROM jj HAVING avg(s2) = 1 AND avg(s2) = 0; ]], { -- - 1, "Type mismatch: can not convert A to number" + 1, "Type mismatch: can not convert 'A' to number" -- }) diff --git a/test/sql-tap/sql-errors.test.lua b/test/sql-tap/sql-errors.test.lua index 96ee683eb..52276c27b 100755 --- a/test/sql-tap/sql-errors.test.lua +++ b/test/sql-tap/sql-errors.test.lua @@ -1,6 +1,6 @@ #!/usr/bin/env tarantool local test = require("sqltester") -test:plan(76) +test:plan(80) test:execsql([[ CREATE TABLE t0 (i INT PRIMARY KEY, a INT); @@ -687,7 +687,7 @@ test:do_catchsql_test( -- }) --- gh-4356: Make sure that 'varbinary' is printed instead of the +-- gh-4356: Make sure that varbinary is printed in hex instead of the -- binary data itself (since binary data can contain unprintable symbols). -- test:do_catchsql_test( @@ -696,7 +696,7 @@ test:do_catchsql_test( SELECT X'ff' + 1; ]], { -- - 1, "Type mismatch: can not convert varbinary to numeric" + 1, "Type mismatch: can not convert x'FF' to numeric" -- }) @@ -706,7 +706,7 @@ test:do_catchsql_test( SELECT X'ff' - 1; ]], { -- - 1, "Type mismatch: can not convert varbinary to numeric" + 1, "Type mismatch: can not convert x'FF' to numeric" -- }) @@ -716,7 +716,7 @@ test:do_catchsql_test( SELECT X'ff' * 1; ]], { -- - 1, "Type mismatch: can not convert varbinary to numeric" + 1, "Type mismatch: can not convert x'FF' to numeric" -- }) @@ -726,7 +726,7 @@ test:do_catchsql_test( SELECT X'ff' / 1; ]], { -- - 1, "Type mismatch: can not convert varbinary to numeric" + 1, "Type mismatch: can not convert x'FF' to numeric" -- }) @@ -736,7 +736,7 @@ test:do_catchsql_test( SELECT X'ff' AND true; ]], { -- - 1, "Type mismatch: can not convert varbinary to boolean" + 1, "Type mismatch: can not convert x'FF' to boolean" -- }) @@ -746,7 +746,7 @@ test:do_catchsql_test( SELECT X'ff' OR false; ]], { -- - 1, "Type mismatch: can not convert varbinary to boolean" + 1, "Type mismatch: can not convert x'FF' to boolean" -- }) @@ -756,7 +756,7 @@ test:do_catchsql_test( SELECT false OR X'ff'; ]], { -- - 1, "Type mismatch: can not convert varbinary to boolean" + 1, "Type mismatch: can not convert x'FF' to boolean" -- }) @@ -790,16 +790,16 @@ local str2 = string.rep('ы', 200) test:do_catchsql_test( "sql-errors-3.1", "SELECT CAST('"..str1.."'AS UNSIGNED);", { - 1, "Type mismatch: can not convert aaaaaaaaaaaaaaaaaaaaaaaaaa".. + 1, "Type mismatch: can not convert 'aaaaaaaaaaaaaaaaaaaaaaaaa".. "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".. - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... to unsigned" + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... to unsigned" }) test:do_catchsql_test( "sql-errors-3.2", "SELECT CAST('"..str2.."'AS UNSIGNED);", { - 1, "Type mismatch: can not convert ыыыыыыыыыыыыыыыыыыыыыыыыыы".. - "ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы... to unsigned" + 1, "Type mismatch: can not convert 'ыыыыыыыыыыыыыыыыыыыыыыыыы".. + "ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы... to unsigned" }) local format = {{'I', 'integer'}, {'A', 'array'}, {'M', 'map'}} @@ -825,4 +825,43 @@ test:do_catchsql_test( test:execsql('DROP TABLE test;') +-- +-- gh-6176: Make sure that STRING, VARBINARY and UUID values properly printed +-- in type mismatch error description. +-- +test:do_catchsql_test( + "sql-errors-3.5", + [[ + SELECT CAST(x'F1' AS UNSIGNED); + ]], { + 1, "Type mismatch: can not convert x'F1' to unsigned" + }) + +test:do_catchsql_test( + "sql-errors-3.6", + [[ + SELECT CAST('F1' AS UNSIGNED); + ]], { + 1, "Type mismatch: can not convert 'F1' to unsigned" + }) + +test:do_catchsql_test( + "sql-errors-3.7", + [[ + SELECT CAST(CAST('11111111-1111-1111-1111-111111111111' AS UUID) AS UNSIGNED); + ]], { + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to unsigned" + }) + +local bin = '' +for i = 1,99 do bin = bin .. string.format("%02x", i) end + +test:do_catchsql_test( + "sql-errors-3.8", + "SELECT CAST(x'"..bin.."'AS UNSIGNED);", { + 1, "Type mismatch: can not convert x'0102030405060708090A0B0C".. + "0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A".. + "2B2C2D2E2F303132333435363738393A3B3C3D3E3F40... to unsigned" + }) + test:finish_test() diff --git a/test/sql-tap/tkt-80e031a00f.test.lua b/test/sql-tap/tkt-80e031a00f.test.lua index 82769587b..b5bdf038f 100755 --- a/test/sql-tap/tkt-80e031a00f.test.lua +++ b/test/sql-tap/tkt-80e031a00f.test.lua @@ -346,7 +346,7 @@ test:do_catchsql_test( SELECT 'hello' IN t1 ]], { -- - 1, 'Type mismatch: can not convert hello to integer' + 1, "Type mismatch: can not convert 'hello' to integer" -- }) @@ -356,7 +356,7 @@ test:do_catchsql_test( SELECT 'hello' NOT IN t1 ]], { -- - 1, 'Type mismatch: can not convert hello to integer' + 1, "Type mismatch: can not convert 'hello' to integer" -- }) @@ -386,7 +386,7 @@ test:do_catchsql_test( SELECT x'303132' IN t1 ]], { -- - 1, 'Type mismatch: can not convert varbinary to integer' + 1, "Type mismatch: can not convert x'303132' to integer" -- }) @@ -396,7 +396,7 @@ test:do_catchsql_test( SELECT x'303132' NOT IN t1 ]], { -- - 1, 'Type mismatch: can not convert varbinary to integer' + 1, "Type mismatch: can not convert x'303132' to integer" -- }) diff --git a/test/sql-tap/tkt-9a8b09f8e6.test.lua b/test/sql-tap/tkt-9a8b09f8e6.test.lua index 67d6a1ccd..53dfafebf 100755 --- a/test/sql-tap/tkt-9a8b09f8e6.test.lua +++ b/test/sql-tap/tkt-9a8b09f8e6.test.lua @@ -245,7 +245,7 @@ test:do_catchsql_test( SELECT x FROM t3 WHERE x IN ('1'); ]], { -- <4.3> - 1, "Type mismatch: can not convert 1 to number" + 1, "Type mismatch: can not convert '1' to number" -- }) @@ -255,7 +255,7 @@ test:do_catchsql_test( SELECT x FROM t3 WHERE x IN ('1.0'); ]], { -- <4.4> - 1, "Type mismatch: can not convert 1.0 to number" + 1, "Type mismatch: can not convert '1.0' to number" -- }) @@ -285,7 +285,7 @@ test:do_catchsql_test( SELECT x FROM t3 WHERE '1' IN (x); ]], { -- <4.7> - 1, "Type mismatch: can not convert 1 to number" + 1, "Type mismatch: can not convert '1' to number" -- }) @@ -295,7 +295,7 @@ test:do_catchsql_test( SELECT x FROM t3 WHERE '1.0' IN (x); ]], { -- <4.8> - 1, "Type mismatch: can not convert 1.0 to number" + 1, "Type mismatch: can not convert '1.0' to number" -- }) @@ -325,7 +325,7 @@ test:do_catchsql_test( SELECT x FROM t4 WHERE x IN ('1'); ]], { -- <5.3> - 1, "Type mismatch: can not convert 1 to number" + 1, "Type mismatch: can not convert '1' to number" -- }) @@ -335,7 +335,7 @@ test:do_catchsql_test( SELECT x FROM t4 WHERE x IN ('1.0'); ]], { -- <5.4> - 1, "Type mismatch: can not convert 1.0 to number" + 1, "Type mismatch: can not convert '1.0' to number" -- }) @@ -355,7 +355,7 @@ test:do_catchsql_test( SELECT x FROM t4 WHERE x IN ('1.11'); ]], { -- <5.6> - 1, "Type mismatch: can not convert 1.11 to number" + 1, "Type mismatch: can not convert '1.11' to number" -- }) @@ -385,7 +385,7 @@ test:do_catchsql_test( SELECT x FROM t4 WHERE '1' IN (x); ]], { -- <5.9> - 1, "Type mismatch: can not convert 1 to number" + 1, "Type mismatch: can not convert '1' to number" -- }) @@ -395,7 +395,7 @@ test:do_catchsql_test( SELECT x FROM t4 WHERE '1.0' IN (x); ]], { -- <5.10> - 1, "Type mismatch: can not convert 1.0 to number" + 1, "Type mismatch: can not convert '1.0' to number" -- }) @@ -415,7 +415,7 @@ test:do_catchsql_test( SELECT x FROM t4 WHERE '1.11' IN (x); ]], { -- <5.12> - 1, "Type mismatch: can not convert 1.11 to number" + 1, "Type mismatch: can not convert '1.11' to number" -- }) diff --git a/test/sql-tap/uuid.test.lua b/test/sql-tap/uuid.test.lua index 77ba06c2d..1fc99916a 100755 --- a/test/sql-tap/uuid.test.lua +++ b/test/sql-tap/uuid.test.lua @@ -237,7 +237,7 @@ test:do_catchsql_test( [[ SELECT AVG(u) from t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number" }) test:do_execsql_test( @@ -421,7 +421,7 @@ test:do_catchsql_test( [[ SELECT ROUND(u) from t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric" }) test:do_execsql_test( @@ -445,7 +445,7 @@ test:do_catchsql_test( [[ SELECT SUM(u) from t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number" }) test:do_catchsql_test( @@ -453,7 +453,7 @@ test:do_catchsql_test( [[ SELECT TOTAL(u) from t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number" }) test:do_execsql_test( @@ -564,7 +564,7 @@ test:do_catchsql_test( [[ SELECT cast(u AS UNSIGNED) FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to unsigned" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to unsigned" }) test:do_execsql_test( @@ -582,7 +582,7 @@ test:do_catchsql_test( [[ SELECT cast(u AS NUMBER) FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number" }) test:do_catchsql_test( @@ -590,7 +590,7 @@ test:do_catchsql_test( [[ SELECT cast(u AS DOUBLE) FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to double" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to double" }) test:do_catchsql_test( @@ -598,7 +598,7 @@ test:do_catchsql_test( [[ SELECT cast(u AS INTEGER) FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer" }) test:do_catchsql_test( @@ -606,7 +606,7 @@ test:do_catchsql_test( [[ SELECT cast(u AS BOOLEAN) FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean" }) test:do_execsql_test( @@ -657,7 +657,7 @@ test:do_catchsql_test( [[ SELECT cast('1' AS UUID); ]], { - 1, "Type mismatch: can not convert 1 to uuid" + 1, "Type mismatch: can not convert '1' to uuid" }) test:do_catchsql_test( @@ -695,9 +695,9 @@ test:do_execsql_test( test:do_catchsql_test( "uuid-7.2.8", [[ - SELECT cast(randomblob(10) as UUID) FROM t2 LIMIT 1; + SELECT cast(x'1234567890abcdef' as UUID) FROM t2 LIMIT 1; ]], { - 1, "Type mismatch: can not convert varbinary to uuid" + 1, "Type mismatch: can not convert x'1234567890ABCDEF' to uuid" }) test:execsql([[ @@ -719,7 +719,7 @@ test:do_catchsql_test( [[ INSERT INTO tu(u) SELECT u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to unsigned" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to unsigned" }) test:do_execsql_test( @@ -738,7 +738,7 @@ test:do_catchsql_test( [[ INSERT INTO tn(n) SELECT u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number" }) test:do_catchsql_test( @@ -746,7 +746,7 @@ test:do_catchsql_test( [[ INSERT INTO td(d) SELECT u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to double" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to double" }) test:do_catchsql_test( @@ -754,7 +754,7 @@ test:do_catchsql_test( [[ INSERT INTO ti(i) SELECT u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer" }) test:do_catchsql_test( @@ -762,7 +762,7 @@ test:do_catchsql_test( [[ INSERT INTO tb(b) SELECT u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean" }) test:do_execsql_test( @@ -817,7 +817,7 @@ test:do_catchsql_test( [[ INSERT INTO tsu VALUES ('3_string_wrong', '1'); ]], { - 1, "Type mismatch: can not convert 1 to uuid" + 1, "Type mismatch: can not convert '1' to uuid" }) test:do_catchsql_test( @@ -856,9 +856,9 @@ test:do_execsql_test( test:do_catchsql_test( "uuid-8.2.8", [[ - INSERT INTO tsu VALUES ('8_varbinary', randomblob(10)); + INSERT INTO tsu VALUES ('8_varbinary', x'1234567890abcdef'); ]], { - 1, "Type mismatch: can not convert varbinary to uuid" + 1, "Type mismatch: can not convert x'1234567890ABCDEF' to uuid" }) test:execsql([[ @@ -971,7 +971,7 @@ test:do_catchsql_test( [[ SELECT -u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric" }) test:do_catchsql_test( @@ -979,7 +979,7 @@ test:do_catchsql_test( [[ SELECT u + 1 FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric" }) test:do_catchsql_test( @@ -987,7 +987,7 @@ test:do_catchsql_test( [[ SELECT u - 1 FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric" }) test:do_catchsql_test( @@ -995,7 +995,7 @@ test:do_catchsql_test( [[ SELECT u * 1 FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric" }) test:do_catchsql_test( @@ -1003,7 +1003,7 @@ test:do_catchsql_test( [[ SELECT u / 1 FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric" }) test:do_catchsql_test( @@ -1011,7 +1011,7 @@ test:do_catchsql_test( [[ SELECT u % 1 FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric" }) -- Check that bitwise operations work with UUIDs as intended. @@ -1020,7 +1020,7 @@ test:do_catchsql_test( [[ SELECT ~u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer" }) test:do_catchsql_test( @@ -1028,7 +1028,7 @@ test:do_catchsql_test( [[ SELECT u >> 1 FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer" }) test:do_catchsql_test( @@ -1036,7 +1036,7 @@ test:do_catchsql_test( [[ SELECT u << 1 FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer" }) test:do_catchsql_test( @@ -1044,7 +1044,7 @@ test:do_catchsql_test( [[ SELECT u | 1 FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer" }) test:do_catchsql_test( @@ -1052,7 +1052,7 @@ test:do_catchsql_test( [[ SELECT u & 1 FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer" }) -- Check that logical operations work with UUIDs as intended. @@ -1061,7 +1061,7 @@ test:do_catchsql_test( [[ SELECT NOT u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean" }) test:do_catchsql_test( @@ -1069,7 +1069,7 @@ test:do_catchsql_test( [[ SELECT u AND true FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean" }) test:do_catchsql_test( @@ -1077,7 +1077,7 @@ test:do_catchsql_test( [[ SELECT u OR true FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean" }) test:do_catchsql_test( @@ -1085,7 +1085,7 @@ test:do_catchsql_test( [[ SELECT true AND u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean" }) test:do_catchsql_test( @@ -1093,7 +1093,7 @@ test:do_catchsql_test( [[ SELECT true OR u FROM t2; ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean" }) -- Check that comparison with UUID works as intended. @@ -1296,7 +1296,7 @@ test:do_catchsql_test( [[ SELECT uuid('asd'); ]], { - 1, "Type mismatch: can not convert asd to integer" + 1, "Type mismatch: can not convert 'asd' to integer" }) test:do_catchsql_test( @@ -1322,7 +1322,7 @@ test:do_catchsql_test( [[ SELECT CAST('11111111-1111-1111-1111-111111111111111222222222' AS UUID); ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111111222222222 to uuid" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111111222222222' to uuid" }) test:do_catchsql_test( @@ -1330,7 +1330,7 @@ test:do_catchsql_test( [[ SELECT CAST('11111111-1111-1111-1111-11111' AS UUID); ]], { - 1, "Type mismatch: can not convert 11111111-1111-1111-1111-11111 to uuid" + 1, "Type mismatch: can not convert '11111111-1111-1111-1111-11111' to uuid" }) test:execsql([[ diff --git a/test/sql/boolean.result b/test/sql/boolean.result index 177a39fb9..dbd31fbb5 100644 --- a/test/sql/boolean.result +++ b/test/sql/boolean.result @@ -5092,7 +5092,7 @@ INSERT INTO t9 VALUES ('AsdF'); SELECT true AND 'abc'; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT false AND 'abc'; | --- @@ -5105,17 +5105,17 @@ SELECT false AND 'abc'; SELECT true OR 'abc'; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT false OR 'abc'; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT 'abc' AND true; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT 'abc' AND false; | --- @@ -5128,59 +5128,59 @@ SELECT 'abc' AND false; SELECT 'abc' OR true; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT 'abc' OR false; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT a1, a1 AND 'abc' FROM t6; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT a1, a1 OR 'abc' FROM t6; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT a1, 'abc' AND a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT a1, 'abc' OR a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT a2, a2 AND 'abc' FROM t6; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT a2, a2 OR 'abc' FROM t6; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT a2, 'abc' AND a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT a2, 'abc' OR a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert abc to boolean' + | - 'Type mismatch: can not convert ''abc'' to boolean' | ... SELECT d, true AND d FROM t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT d, false AND d FROM t9; | --- @@ -5195,17 +5195,17 @@ SELECT d, false AND d FROM t9; SELECT d, true OR d FROM t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT d, false OR d FROM t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT d, d AND true FROM t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT d, d AND false FROM t9; | --- @@ -5220,53 +5220,53 @@ SELECT d, d AND false FROM t9; SELECT d, d OR true FROM t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT d, d OR false FROM t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT a1, d, a1 AND d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT a1, d, a1 OR d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT a1, d, d AND a1 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT a1, d, d OR a1 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT a2, d, a2 AND d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT a2, d, a2 OR d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT a2, d, d AND a2 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT a2, d, d OR a2 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert AsdF to boolean' + | - 'Type mismatch: can not convert ''AsdF'' to boolean' | ... SELECT true > 'abc'; @@ -5467,7 +5467,7 @@ INSERT INTO t9 VALUES ('TRUE'), ('true'), ('FALSE'), ('false'); SELECT true AND 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT false AND 'TRUE'; | --- @@ -5480,17 +5480,17 @@ SELECT false AND 'TRUE'; SELECT true OR 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT false OR 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT 'TRUE' AND true; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT 'TRUE' AND false; | --- @@ -5503,59 +5503,59 @@ SELECT 'TRUE' AND false; SELECT 'TRUE' OR true; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT 'TRUE' OR false; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a1, a1 AND 'TRUE' FROM t6; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a1, a1 OR 'TRUE' FROM t6; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a1, 'TRUE' AND a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a1, 'TRUE' OR a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a2, a2 AND 'TRUE' FROM t6; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a2, a2 OR 'TRUE' FROM t6; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a2, 'TRUE' AND a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a2, 'TRUE' OR a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT d, true AND d FROM t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT d, false AND d FROM t9 WHERE d = 'TRUE'; | --- @@ -5570,17 +5570,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'TRUE'; SELECT d, true OR d FROM t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT d, false OR d FROM t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT d, d AND true FROM t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT d, d AND false FROM t9 WHERE d = 'TRUE'; | --- @@ -5595,59 +5595,59 @@ SELECT d, d AND false FROM t9 WHERE d = 'TRUE'; SELECT d, d OR true FROM t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT d, d OR false FROM t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'TRUE'; | --- | - null - | - 'Type mismatch: can not convert TRUE to boolean' + | - 'Type mismatch: can not convert ''TRUE'' to boolean' | ... SELECT true AND 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT false AND 'true'; | --- @@ -5660,17 +5660,17 @@ SELECT false AND 'true'; SELECT true OR 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT false OR 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT 'true' AND true; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT 'true' AND false; | --- @@ -5683,59 +5683,59 @@ SELECT 'true' AND false; SELECT 'true' OR true; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT 'true' OR false; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a1, a1 AND 'true' FROM t6; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a1, a1 OR 'true' FROM t6; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a1, 'true' AND a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a1, 'true' OR a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a2, a2 AND 'true' FROM t6; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a2, a2 OR 'true' FROM t6; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a2, 'true' AND a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a2, 'true' OR a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT d, true AND d FROM t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT d, false AND d FROM t9 WHERE d = 'true'; | --- @@ -5750,17 +5750,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'true'; SELECT d, true OR d FROM t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT d, false OR d FROM t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT d, d AND true FROM t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT d, d AND false FROM t9 WHERE d = 'true'; | --- @@ -5775,59 +5775,59 @@ SELECT d, d AND false FROM t9 WHERE d = 'true'; SELECT d, d OR true FROM t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT d, d OR false FROM t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'true'; | --- | - null - | - 'Type mismatch: can not convert true to boolean' + | - 'Type mismatch: can not convert ''true'' to boolean' | ... SELECT true AND 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT false AND 'FALSE'; | --- @@ -5840,17 +5840,17 @@ SELECT false AND 'FALSE'; SELECT true OR 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT false OR 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT 'FALSE' AND true; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT 'FALSE' AND false; | --- @@ -5863,59 +5863,59 @@ SELECT 'FALSE' AND false; SELECT 'FALSE' OR true; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT 'FALSE' OR false; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a1, a1 AND 'FALSE' FROM t6; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a1, a1 OR 'FALSE' FROM t6; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a1, 'FALSE' AND a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a1, 'FALSE' OR a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a2, a2 AND 'FALSE' FROM t6; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a2, a2 OR 'FALSE' FROM t6; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a2, 'FALSE' AND a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a2, 'FALSE' OR a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT d, true AND d FROM t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT d, false AND d FROM t9 WHERE d = 'FALSE'; | --- @@ -5930,17 +5930,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'FALSE'; SELECT d, true OR d FROM t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT d, false OR d FROM t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT d, d AND true FROM t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT d, d AND false FROM t9 WHERE d = 'FALSE'; | --- @@ -5955,59 +5955,59 @@ SELECT d, d AND false FROM t9 WHERE d = 'FALSE'; SELECT d, d OR true FROM t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT d, d OR false FROM t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'FALSE'; | --- | - null - | - 'Type mismatch: can not convert FALSE to boolean' + | - 'Type mismatch: can not convert ''FALSE'' to boolean' | ... SELECT true AND 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT false AND 'false'; | --- @@ -6020,17 +6020,17 @@ SELECT false AND 'false'; SELECT true OR 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT false OR 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT 'false' AND true; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT 'false' AND false; | --- @@ -6043,59 +6043,59 @@ SELECT 'false' AND false; SELECT 'false' OR true; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT 'false' OR false; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a1, a1 AND 'false' FROM t6; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a1, a1 OR 'false' FROM t6; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a1, 'false' AND a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a1, 'false' OR a1 FROM t6; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a2, a2 AND 'false' FROM t6; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a2, a2 OR 'false' FROM t6; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a2, 'false' AND a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a2, 'false' OR a2 FROM t6; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT d, true AND d FROM t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT d, false AND d FROM t9 WHERE d = 'false'; | --- @@ -6110,17 +6110,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'false'; SELECT d, true OR d FROM t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT d, false OR d FROM t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT d, d AND true FROM t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT d, d AND false FROM t9 WHERE d = 'false'; | --- @@ -6135,53 +6135,53 @@ SELECT d, d AND false FROM t9 WHERE d = 'false'; SELECT d, d OR true FROM t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT d, d OR false FROM t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'false'; | --- | - null - | - 'Type mismatch: can not convert false to boolean' + | - 'Type mismatch: can not convert ''false'' to boolean' | ... -- Cleaning. diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result index a56fb2412..c5de00fd5 100644 --- a/test/sql/integer-overflow.result +++ b/test/sql/integer-overflow.result @@ -106,7 +106,7 @@ box.execute('SELECT CAST(\'9223372036854775808\' AS INTEGER);') box.execute('SELECT CAST(\'18446744073709551616\' AS INTEGER);') --- - null -- 'Type mismatch: can not convert 18446744073709551616 to integer' +- 'Type mismatch: can not convert ''18446744073709551616'' to integer' ... -- Due to inexact represantation of large integers in terms of -- floating point numbers, numerics with value < UINT64_MAX diff --git a/test/sql/persistency.result b/test/sql/persistency.result index 0e259edef..fab94301d 100644 --- a/test/sql/persistency.result +++ b/test/sql/persistency.result @@ -371,7 +371,7 @@ box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\""); box.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)") --- - null -- 'Type mismatch: can not convert foobar trigger test to integer' +- 'Type mismatch: can not convert ''foobar trigger test'' to integer' ... box.execute("SELECT * FROM barfoo WHERE foo = 9999"); --- diff --git a/test/sql/types.result b/test/sql/types.result index a46967158..219559619 100644 --- a/test/sql/types.result +++ b/test/sql/types.result @@ -270,7 +270,7 @@ box.space.T1:drop() box.execute("SELECT CAST('1.123' AS INTEGER);") --- - null -- 'Type mismatch: can not convert 1.123 to integer' +- 'Type mismatch: can not convert ''1.123'' to integer' ... box.execute("CREATE TABLE t1 (f TEXT PRIMARY KEY);") --- @@ -283,7 +283,7 @@ box.execute("INSERT INTO t1 VALUES('0.0'), ('1.5'), ('3.9312453');") box.execute("SELECT CAST(f AS INTEGER) FROM t1;") --- - null -- 'Type mismatch: can not convert 0.0 to integer' +- 'Type mismatch: can not convert ''0.0'' to integer' ... box.space.T1:drop() --- @@ -339,12 +339,12 @@ box.execute("INSERT INTO tboolean VALUES (TRUE);") box.execute("SELECT * FROM tboolean WHERE s1 = x'44';") --- - null -- 'Type mismatch: can not convert varbinary to boolean' +- 'Type mismatch: can not convert x''44'' to boolean' ... box.execute("SELECT * FROM tboolean WHERE s1 = 'abc';") --- - null -- 'Type mismatch: can not convert abc to boolean' +- 'Type mismatch: can not convert ''abc'' to boolean' ... box.execute("SELECT * FROM tboolean WHERE s1 = 1;") --- @@ -632,7 +632,7 @@ box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;") box.execute("SELECT CAST('18446744073' || '709551616' AS INTEGER);") --- - null -- 'Type mismatch: can not convert 18446744073709551616 to integer' +- 'Type mismatch: can not convert ''18446744073709551616'' to integer' ... box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);") --- @@ -1122,7 +1122,7 @@ box.execute("SELECT CAST('123' AS UNSIGNED);") box.execute("SELECT CAST('-123' AS UNSIGNED);") --- - null -- 'Type mismatch: can not convert -123 to unsigned' +- 'Type mismatch: can not convert ''-123'' to unsigned' ... box.space.T1:drop() --- @@ -1231,7 +1231,7 @@ box.execute("INSERT INTO t VALUES(1, true);") box.execute("INSERT INTO t VALUES(1, 'asd');") --- - null -- 'Type mismatch: can not convert asd to varbinary' +- 'Type mismatch: can not convert ''asd'' to varbinary' ... box.execute("INSERT INTO t VALUES(1, x'616263');") --- @@ -1265,17 +1265,17 @@ box.execute("SELECT * FROM t WHERE v = x'616263'") box.execute("SELECT sum(v) FROM t;") --- - null -- 'Type mismatch: can not convert varbinary to number' +- 'Type mismatch: can not convert x''616263'' to number' ... box.execute("SELECT avg(v) FROM t;") --- - null -- 'Type mismatch: can not convert varbinary to number' +- 'Type mismatch: can not convert x''616263'' to number' ... box.execute("SELECT total(v) FROM t;") --- - null -- 'Type mismatch: can not convert varbinary to number' +- 'Type mismatch: can not convert x''616263'' to number' ... box.execute("SELECT min(v) FROM t;") --- @@ -1722,7 +1722,7 @@ box.execute("SELECT CAST(true AS DOUBLE);") box.execute("SELECT CAST('asd' AS DOUBLE);") --- - null -- 'Type mismatch: can not convert asd to double' +- 'Type mismatch: can not convert ''asd'' to double' ... box.execute("SELECT CAST('1' AS DOUBLE);") --- @@ -1743,12 +1743,12 @@ box.execute("SELECT CAST('1.123' AS DOUBLE);") box.execute("SELECT CAST(x'' AS DOUBLE);") --- - null -- 'Type mismatch: can not convert varbinary to double' +- 'Type mismatch: can not convert x'''' to double' ... box.execute("SELECT CAST(x'35' AS DOUBLE);") --- - null -- 'Type mismatch: can not convert varbinary to double' +- 'Type mismatch: can not convert x''35'' to double' ... box.execute("SELECT CAST(CAST(x'35' AS STRING) AS DOUBLE);") --- @@ -2209,12 +2209,12 @@ box.execute([[INSERT INTO ti(i) VALUES (true);]]) box.execute([[INSERT INTO ti(i) VALUES ('33');]]) --- - null -- 'Type mismatch: can not convert 33 to integer' +- 'Type mismatch: can not convert ''33'' to integer' ... box.execute([[INSERT INTO ti(i) VALUES (X'3434');]]) --- - null -- 'Type mismatch: can not convert varbinary to integer' +- 'Type mismatch: can not convert x''3434'' to integer' ... box.execute([[SELECT * FROM ti;]]) --- @@ -2259,12 +2259,12 @@ box.execute([[INSERT INTO td(d) VALUES (true);]]) box.execute([[INSERT INTO td(d) VALUES ('33');]]) --- - null -- 'Type mismatch: can not convert 33 to double' +- 'Type mismatch: can not convert ''33'' to double' ... box.execute([[INSERT INTO td(d) VALUES (X'3434');]]) --- - null -- 'Type mismatch: can not convert varbinary to double' +- 'Type mismatch: can not convert x''3434'' to double' ... box.execute([[SELECT * FROM td;]]) --- @@ -2303,12 +2303,12 @@ box.execute([[INSERT INTO tb(b) VALUES (true);]]) box.execute([[INSERT INTO tb(b) VALUES ('33');]]) --- - null -- 'Type mismatch: can not convert 33 to boolean' +- 'Type mismatch: can not convert ''33'' to boolean' ... box.execute([[INSERT INTO tb(b) VALUES (X'3434');]]) --- - null -- 'Type mismatch: can not convert varbinary to boolean' +- 'Type mismatch: can not convert x''3434'' to boolean' ... box.execute([[SELECT * FROM tb;]]) --- @@ -2351,7 +2351,7 @@ box.execute([[INSERT INTO tt(t) VALUES ('33');]]) box.execute([[INSERT INTO tt(t) VALUES (X'3434');]]) --- - null -- 'Type mismatch: can not convert varbinary to string' +- 'Type mismatch: can not convert x''3434'' to string' ... box.execute([[SELECT * FROM tt;]]) --- @@ -2388,7 +2388,7 @@ box.execute([[INSERT INTO tv(v) VALUES (true);]]) box.execute([[INSERT INTO tv(v) VALUES ('33');]]) --- - null -- 'Type mismatch: can not convert 33 to varbinary' +- 'Type mismatch: can not convert ''33'' to varbinary' ... box.execute([[INSERT INTO tv(v) VALUES (X'3434');]]) --- @@ -2562,12 +2562,12 @@ box.execute([[UPDATE ti SET i = true WHERE a = 1;]]) box.execute([[UPDATE ti SET i = '33' WHERE a = 1;]]) --- - null -- 'Type mismatch: can not convert 33 to integer' +- 'Type mismatch: can not convert ''33'' to integer' ... box.execute([[UPDATE ti SET i = X'3434' WHERE a = 1;]]) --- - null -- 'Type mismatch: can not convert varbinary to integer' +- 'Type mismatch: can not convert x''3434'' to integer' ... box.execute([[SELECT * FROM ti;]]) --- @@ -2603,12 +2603,12 @@ box.execute([[UPDATE td SET d = true WHERE a = 1;]]) box.execute([[UPDATE td SET d = '33' WHERE a = 1;]]) --- - null -- 'Type mismatch: can not convert 33 to double' +- 'Type mismatch: can not convert ''33'' to double' ... box.execute([[UPDATE td SET d = X'3434' WHERE a = 1;]]) --- - null -- 'Type mismatch: can not convert varbinary to double' +- 'Type mismatch: can not convert x''3434'' to double' ... box.execute([[SELECT * FROM td;]]) --- @@ -2641,12 +2641,12 @@ box.execute([[UPDATE tb SET b = true WHERE a = 1;]]) box.execute([[UPDATE tb SET b = '33' WHERE a = 1;]]) --- - null -- 'Type mismatch: can not convert 33 to boolean' +- 'Type mismatch: can not convert ''33'' to boolean' ... box.execute([[UPDATE tb SET b = X'3434' WHERE a = 1;]]) --- - null -- 'Type mismatch: can not convert varbinary to boolean' +- 'Type mismatch: can not convert x''3434'' to boolean' ... box.execute([[SELECT * FROM tb;]]) --- @@ -2684,7 +2684,7 @@ box.execute([[UPDATE tt SET t = '33' WHERE a = 1;]]) box.execute([[UPDATE tt SET t = X'3434' WHERE a = 1;]]) --- - null -- 'Type mismatch: can not convert varbinary to string' +- 'Type mismatch: can not convert x''3434'' to string' ... box.execute([[SELECT * FROM tt;]]) --- @@ -2718,7 +2718,7 @@ box.execute([[UPDATE tv SET v = true WHERE a = 1;]]) box.execute([[UPDATE tv SET v = '33' WHERE a = 1;]]) --- - null -- 'Type mismatch: can not convert 33 to varbinary' +- 'Type mismatch: can not convert ''33'' to varbinary' ... box.execute([[UPDATE tv SET v = X'3434' WHERE a = 1;]]) --- -- 2.25.1