From: Mergen Imeev via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: v.shpilevoy@tarantool.org Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH v1 2/2] sql: always show value in type mismatch error Date: Thu, 24 Jun 2021 13:30:35 +0300 [thread overview] Message-ID: <d6dd430c3aa55ceca47aa78de721fb0c0ed24884.1624530339.git.imeevma@gmail.com> (raw) In-Reply-To: <cover.1624530339.git.imeevma@gmail.com> 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; ]], { -- <sql-errors-2.8> - 1, "Type mismatch: can not convert varbinary to boolean" + 1, "Type mismatch: can not convert x'FF' to boolean" -- </sql-errors-2.8> }) @@ -776,7 +776,7 @@ test:do_catchsql_test( SELECT X'ff' <= false; ]], { -- <sql-errors-2.9> - 1, "Type mismatch: can not convert varbinary to boolean" + 1, "Type mismatch: can not convert x'FF' to boolean" -- </sql-errors-2.9> }) @@ -802,6 +802,29 @@ test:do_catchsql_test( -- </sql-errors-2.1> }) +test:execsql('INSERT INTO test VALUES(1);') + +test:do_catchsql_test( + "sql-errors-2.13", + [[ + SELECT i > false FROM test; + ]], { + -- <sql-errors-2.1> + 1, "Type mismatch: can not convert 1 to boolean" + -- </sql-errors-2.1> + }) + test:execsql('DROP TABLE test;') + +test:do_catchsql_test( + "sql-errors-2.14", + [[ + SELECT 1.5 > x'1234'; + ]], { + -- <sql-errors-2.1> + 1, "Type mismatch: can not convert 1.5 to varbinary" + -- </sql-errors-2.1> + }) + 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
next prev parent reply other threads:[~2021-06-24 10:31 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-24 10:30 [Tarantool-patches] [PATCH v1 0/2] sql: fix description of " Mergen Imeev via Tarantool-patches 2021-06-24 10:30 ` [Tarantool-patches] [PATCH v1 1/2] sql: show varbinary in " Mergen Imeev via Tarantool-patches 2021-06-24 20:24 ` Vladislav Shpilevoy via Tarantool-patches 2021-06-24 10:30 ` Mergen Imeev via Tarantool-patches [this message] 2021-06-25 7:27 ` [Tarantool-patches] [PATCH v1 2/2] sql: always show value " Kirill Yukhin via Tarantool-patches [not found] ` <114901d769ab$431961e0$c94c25a0$@tarantool.org> 2021-06-25 10:46 ` Mergen Imeev via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=d6dd430c3aa55ceca47aa78de721fb0c0ed24884.1624530339.git.imeevma@gmail.com \ --to=tarantool-patches@dev.tarantool.org \ --cc=imeevma@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v1 2/2] sql: always show value in type mismatch error' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox