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 8A8966EC58; Thu, 24 Jun 2021 13:31:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8A8966EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1624530695; bh=/sRibWB4ZRMlvQO+sboMHEkzcb6lpaUWpkpoVjHFuLM=; 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=dPqD9HYgRL38YVVKyReCts+1RQzl/Th9e+hwHD6kpAmKrpI4MTTzQwGCwEvFhM8lc ozKX+opzNC9Di/XYWQhRKRAlsL54AB0GwAtUVltlHvpVd3SDyQRF4zxwJA4r9RMZDS gc3iEiqVG34Qh1a1YHbHiiCpm4+YB+LK9hTAEbHg= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (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 430B66EC61 for ; Thu, 24 Jun 2021 13:30:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 430B66EC61 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lwMd1-0006hM-Em; Thu, 24 Jun 2021 13:30:36 +0300 To: v.shpilevoy@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Thu, 24 Jun 2021 13:30:35 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD954DFF1DC42D673FBE6C6848F3EB6EB89AE0756428E32ECE9182A05F538085040289DF9AD501843C1D51FF5D4C5EF5AF337C9238A79BACB9D999C58068A672C67 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE78524CA6C6209E9ADEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E1095770799AEDE38638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D80E3646D0DDE4A6E454A7B7F914013410117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAA867293B0326636D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8BAA867293B0326636D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B66F6A3E018CF4DC80089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CDFD85F345618D5682557EA21018B619BB5006A626627CF939C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EFF532FBFD8162E58C699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34D1AE09A115117C965DDED515DAFD4E5853B110903BFD52288A123400F265FCF434830A0249256DEF1D7E09C32AA3244C4A1D9A4039F3773B72BFB5FBE39030863E8609A02908F271729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXiESzVYL70n5Q3a2iExq5f7 X-Mailru-Sender: 689FA8AB762F73936BC43F508A06382254BC8C18063A776B524769113EE44E9B83D72C36FC87018B9F80AB2734326CD2FB559BB5D741EB96352A0ABBE4FDA4210A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH v1 2/2] sql: always show value 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, in most cases of type mismatch errors, a value that cannot be cast is printed in the description. An exception is the description of the type mismatch error in the comparison. There, instead of the value, the type of the value is printed. This patch removes this exception, so now the value will always be printed in the type mismatch error description. Follow up #4356 --- src/box/sql/vdbe.c | 15 +- test/sql-tap/sql-errors.test.lua | 29 +- test/sql-tap/uuid.test.lua | 24 +- test/sql/boolean.result | 452 +++++++++++++++---------------- test/sql/types.result | 10 +- 5 files changed, 275 insertions(+), 255 deletions(-) diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c index 32d02d96e..2baa35895 100644 --- a/src/box/sql/vdbe.c +++ b/src/box/sql/vdbe.c @@ -1627,27 +1627,24 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ } } else if (mem_is_bool(pIn3) || mem_is_bool(pIn1)) { if (mem_cmp_bool(pIn3, pIn1, &res) != 0) { - char *str = !mem_is_bool(pIn3) ? - mem_type_to_str(pIn3) : - mem_type_to_str(pIn1); + const char *str = !mem_is_bool(pIn3) ? + mem_str(pIn3) : mem_str(pIn1); diag_set(ClientError, ER_SQL_TYPE_MISMATCH, str, "boolean"); goto abort_due_to_error; } } else if (((pIn3->type | pIn1->type) & MEM_TYPE_UUID) != 0) { if (mem_cmp_uuid(pIn3, pIn1, &res) != 0) { - char *str = pIn3->type != MEM_TYPE_UUID ? - mem_type_to_str(pIn3) : - mem_type_to_str(pIn1); + const char *str = pIn3->type != MEM_TYPE_UUID ? + mem_str(pIn3) : mem_str(pIn1); diag_set(ClientError, ER_SQL_TYPE_MISMATCH, str, "uuid"); goto abort_due_to_error; } } else if (mem_is_bin(pIn3) || mem_is_bin(pIn1)) { if (mem_cmp_bin(pIn3, pIn1, &res) != 0) { - char *str = !mem_is_bin(pIn3) ? - mem_type_to_str(pIn3) : - mem_type_to_str(pIn1); + const char *str = !mem_is_bin(pIn3) ? + mem_str(pIn3) : mem_str(pIn1); diag_set(ClientError, ER_SQL_TYPE_MISMATCH, str, "varbinary"); goto abort_due_to_error; diff --git a/test/sql-tap/sql-errors.test.lua b/test/sql-tap/sql-errors.test.lua index 25e14fb93..b48506c0a 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(74) +test:plan(76) test:execsql([[ CREATE TABLE t0 (i INT PRIMARY KEY, a INT); @@ -766,7 +766,7 @@ test:do_catchsql_test( SELECT X'ff' >= false; ]], { -- - 1, "Type mismatch: can not convert varbinary to boolean" + 1, "Type mismatch: can not convert x'FF' to boolean" -- }) @@ -776,7 +776,7 @@ test:do_catchsql_test( SELECT X'ff' <= false; ]], { -- - 1, "Type mismatch: can not convert varbinary to boolean" + 1, "Type mismatch: can not convert x'FF' to boolean" -- }) @@ -802,6 +802,29 @@ test:do_catchsql_test( -- }) +test:execsql('INSERT INTO test VALUES(1);') + +test:do_catchsql_test( + "sql-errors-2.13", + [[ + SELECT i > false FROM test; + ]], { + -- + 1, "Type mismatch: can not convert 1 to boolean" + -- + }) + test:execsql('DROP TABLE test;') + +test:do_catchsql_test( + "sql-errors-2.14", + [[ + SELECT 1.5 > x'1234'; + ]], { + -- + 1, "Type mismatch: can not convert 1.5 to varbinary" + -- + }) + test:finish_test() diff --git a/test/sql-tap/uuid.test.lua b/test/sql-tap/uuid.test.lua index f19eb4a9c..0026eafca 100755 --- a/test/sql-tap/uuid.test.lua +++ b/test/sql-tap/uuid.test.lua @@ -1102,7 +1102,7 @@ test:do_catchsql_test( [[ SELECT u > 1 FROM t2; ]], { - 1, "Type mismatch: can not convert unsigned to uuid" + 1, "Type mismatch: can not convert 1 to uuid" }) test:do_execsql_test( @@ -1118,7 +1118,7 @@ test:do_catchsql_test( [[ SELECT u > '1' FROM t2; ]], { - 1, "Type mismatch: can not convert text to uuid" + 1, "Type mismatch: can not convert 1 to uuid" }) test:do_catchsql_test( @@ -1126,7 +1126,7 @@ test:do_catchsql_test( [[ SELECT u > 1.5 FROM t2; ]], { - 1, "Type mismatch: can not convert real to uuid" + 1, "Type mismatch: can not convert 1.5 to uuid" }) test:do_catchsql_test( @@ -1134,7 +1134,7 @@ test:do_catchsql_test( [[ SELECT u > -1 FROM t2; ]], { - 1, "Type mismatch: can not convert integer to uuid" + 1, "Type mismatch: can not convert -1 to uuid" }) test:do_catchsql_test( @@ -1142,7 +1142,7 @@ test:do_catchsql_test( [[ SELECT u > true FROM t2; ]], { - 1, "Type mismatch: can not convert uuid to boolean" + 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean" }) test:do_execsql_test( @@ -1158,7 +1158,7 @@ test:do_catchsql_test( [[ SELECT u > x'31' FROM t2; ]], { - 1, "Type mismatch: can not convert varbinary to uuid" + 1, "Type mismatch: can not convert x'31' to uuid" }) test:do_catchsql_test( @@ -1166,7 +1166,7 @@ test:do_catchsql_test( [[ SELECT u = 1 FROM t2; ]], { - 1, "Type mismatch: can not convert unsigned to uuid" + 1, "Type mismatch: can not convert 1 to uuid" }) test:do_execsql_test( @@ -1182,7 +1182,7 @@ test:do_catchsql_test( [[ SELECT u = '1' FROM t2; ]], { - 1, "Type mismatch: can not convert text to uuid" + 1, "Type mismatch: can not convert 1 to uuid" }) test:do_catchsql_test( @@ -1190,7 +1190,7 @@ test:do_catchsql_test( [[ SELECT u = 1.5 FROM t2; ]], { - 1, "Type mismatch: can not convert real to uuid" + 1, "Type mismatch: can not convert 1.5 to uuid" }) test:do_catchsql_test( @@ -1198,7 +1198,7 @@ test:do_catchsql_test( [[ SELECT u = -1 FROM t2; ]], { - 1, "Type mismatch: can not convert integer to uuid" + 1, "Type mismatch: can not convert -1 to uuid" }) test:do_catchsql_test( @@ -1206,7 +1206,7 @@ test:do_catchsql_test( [[ SELECT u = true FROM t2; ]], { - 1, "Type mismatch: can not convert uuid to boolean" + 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean" }) test:do_execsql_test( @@ -1222,7 +1222,7 @@ test:do_catchsql_test( [[ SELECT u = x'31' FROM t2; ]], { - 1, "Type mismatch: can not convert varbinary to uuid" + 1, "Type mismatch: can not convert x'31' to uuid" }) test:execsql([[ diff --git a/test/sql/boolean.result b/test/sql/boolean.result index 177a39fb9..9ba0fcdf8 100644 --- a/test/sql/boolean.result +++ b/test/sql/boolean.result @@ -138,12 +138,12 @@ INSERT INTO ts(s) VALUES ('abc'), (12.5); SELECT s FROM ts WHERE s = true; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT s FROM ts WHERE s < true; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT s FROM ts WHERE s IN (true, 1, 'abcd'); | --- @@ -3371,493 +3371,493 @@ SELECT a2, b, b >> a2 FROM t6, t7; SELECT true > 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT false > 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT true < 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT false < 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 > true; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 > false; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 < true; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 < false; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, a1 > 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, a1 < 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, 2 > a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, 2 < a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, a2 > 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, a2 < 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, 2 > a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, 2 < a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT b, true > b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, false > b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, true < b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, false < b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b > true FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b > false FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b < true FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b < false FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, a1 > b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, a1 < b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, b > a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, b < a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, a2 > b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, a2 < b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, b > a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, b < a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT true >= 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT false >= 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT true <= 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT false <= 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 >= true; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 >= false; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 <= true; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 <= false; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, a1 >= 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, a1 <= 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, 2 >= a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, 2 <= a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, a2 >= 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, a2 <= 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, 2 >= a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, 2 <= a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT b, true >= b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, false >= b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, true <= b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, false <= b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b >= true FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b >= false FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b <= true FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b <= false FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, a1 >= b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, a1 <= b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, b >= a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, b <= a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, a2 >= b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, a2 <= b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, b >= a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, b <= a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT true == 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT false == 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT true != 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT false != 2; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 == true; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 == false; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 != true; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT 2 != false; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, a1 == 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, a1 != 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, 2 == a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a1, 2 != a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, a2 == 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, a2 != 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, 2 == a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT a2, 2 != a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 2 to boolean' | ... SELECT b, true == b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, false == b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, true != b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, false != b FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b == true FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b == false FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b != true FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT b, b != false FROM t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, a1 == b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, a1 != b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, b == a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a1, b, b != a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, a2 == b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, a2 != b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, b == a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT a2, b, b != a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 123 to boolean' | ... SELECT true IN (0, 1, 2, 3); @@ -3901,22 +3901,22 @@ SELECT a1, a1 IN (0, 1, 2, 3) FROM t6 SELECT true BETWEEN 0 and 10; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 0 to boolean' | ... SELECT false BETWEEN 0 and 10; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 0 to boolean' | ... SELECT a1, a1 BETWEEN 0 and 10 FROM t6; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 0 to boolean' | ... SELECT a2, a2 BETWEEN 0 and 10 FROM t6; | --- | - null - | - 'Type mismatch: can not convert unsigned to boolean' + | - 'Type mismatch: can not convert 0 to boolean' | ... -- Check interaction of BOOLEAN and NUMBER. @@ -4516,493 +4516,493 @@ SELECT a2, c, c % a2 FROM t6, t8; SELECT true > 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT false > 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT true < 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT false < 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 > true; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 > false; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 < true; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 < false; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, a1 > 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, a1 < 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, 2.3 > a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, 2.3 < a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, a2 > 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, a2 < 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, 2.3 > a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, 2.3 < a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT c, true > c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, false > c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, true < c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, false < c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c > true FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c > false FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c < true FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c < false FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, a1 > c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, a1 < c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, c > a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, c < a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, a2 > c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, a2 < c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, c > a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, c < a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT true >= 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT false >= 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT true <= 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT false <= 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 >= true; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 >= false; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 <= true; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 <= false; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, a1 >= 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, a1 <= 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, 2.3 >= a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, 2.3 <= a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, a2 >= 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, a2 <= 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, 2.3 >= a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, 2.3 <= a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT c, true >= c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, false >= c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, true <= c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, false <= c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c >= true FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c >= false FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c <= true FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c <= false FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, a1 >= c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, a1 <= c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, c >= a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, c <= a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, a2 >= c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, a2 <= c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, c >= a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, c <= a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT true == 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT false == 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT true != 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT false != 2.3; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 == true; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 == false; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 != true; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT 2.3 != false; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, a1 == 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, a1 != 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, 2.3 == a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a1, 2.3 != a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, a2 == 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, a2 != 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, 2.3 == a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT a2, 2.3 != a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 2.3 to boolean' | ... SELECT c, true == c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, false == c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, true != c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, false != c FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c == true FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c == false FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c != true FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT c, c != false FROM t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, a1 == c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, a1 != c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, c == a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a1, c, c != a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, a2 == c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, a2 != c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, c == a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT a2, c, c != a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 4.56 to boolean' | ... SELECT true IN (0.1, 1.2, 2.3, 3.4); @@ -5061,22 +5061,22 @@ SELECT a2 IN (SELECT c FROM t8) FROM t6 LIMIT 1; SELECT true BETWEEN 0.1 and 9.9; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 0.1 to boolean' | ... SELECT false BETWEEN 0.1 and 9.9; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 0.1 to boolean' | ... SELECT a1, a1 BETWEEN 0.1 and 9.9 FROM t6; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 0.1 to boolean' | ... SELECT a2, a2 BETWEEN 0.1 and 9.9 FROM t6; | --- | - null - | - 'Type mismatch: can not convert real to boolean' + | - 'Type mismatch: can not convert 0.1 to boolean' | ... -- Check interaction of BOOLEAN and TEXT. @@ -5272,124 +5272,124 @@ SELECT a2, d, d OR a2 FROM t6, t9; SELECT true > 'abc'; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT false > 'abc'; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT true < 'abc'; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT false < 'abc'; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT 'abc' > true; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT 'abc' > false; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT 'abc' < true; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT 'abc' < false; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert abc to boolean' | ... SELECT d, true > d FROM t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT d, false > d FROM t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT d, true < d FROM t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT d, false < d FROM t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT d, d > true FROM t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT d, d > false FROM t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT d, d < true FROM t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT d, d < false FROM t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT a1, d, a1 > d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT a1, d, a1 < d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT a1, d, d > a1 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT a1, d, d < a1 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT a2, d, a2 > d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT a2, d, a2 < d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT a2, d, d > a2 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT a2, d, d < a2 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert text to boolean' + | - 'Type mismatch: can not convert AsdF to boolean' | ... SELECT true || 'abc'; diff --git a/test/sql/types.result b/test/sql/types.result index f9fc606a7..627fcf10f 100644 --- a/test/sql/types.result +++ b/test/sql/types.result @@ -349,12 +349,12 @@ box.execute("SELECT * FROM tboolean WHERE s1 = 'abc';") box.execute("SELECT * FROM tboolean WHERE s1 = 1;") --- - null -- 'Type mismatch: can not convert unsigned to boolean' +- 'Type mismatch: can not convert 1 to boolean' ... box.execute("SELECT * FROM tboolean WHERE s1 = 1.123;") --- - null -- 'Type mismatch: can not convert real to boolean' +- 'Type mismatch: can not convert 1.123 to boolean' ... box.space.TBOOLEAN:drop() --- @@ -1240,17 +1240,17 @@ box.execute("INSERT INTO t VALUES(1, x'616263');") box.execute("SELECT * FROM t WHERE v = 1") --- - null -- 'Type mismatch: can not convert unsigned to varbinary' +- 'Type mismatch: can not convert 1 to varbinary' ... box.execute("SELECT * FROM t WHERE v = 1.123") --- - null -- 'Type mismatch: can not convert real to varbinary' +- 'Type mismatch: can not convert 1.123 to varbinary' ... box.execute("SELECT * FROM t WHERE v = 'str'") --- - null -- 'Type mismatch: can not convert text to varbinary' +- 'Type mismatch: can not convert str to varbinary' ... box.execute("SELECT * FROM t WHERE v = x'616263'") --- -- 2.25.1