Tarantool development patches archive
 help / color / mirror / Atom feed
From: Mergen Imeev via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v2 4/4] sql: make type mismatch error more informative
Date: Mon, 12 Jul 2021 11:58:10 +0300
Message-ID: <20210712085810.GC127980@tarantool.org> (raw)
In-Reply-To: <bbb2098f-7979-7b3b-2421-12802a849f27@tarantool.org>

Thank you for the review! My answer, diff and new patch below.

On Thu, Jul 08, 2021 at 12:10:11AM +0200, Vladislav Shpilevoy wrote:
> Thanks for the patch!
> 
> Why didn't you update diags with ER_INCONSISTENT_TYPES?
> They also use mem_type_to_str().
Agree, fixed.


Diff:


diff --git a/changelogs/unreleased/gh-6176-type-mistmatch-description.md b/changelogs/unreleased/gh-6176-type-mistmatch-description.md
new file mode 100644
index 000000000..0e00c4175
--- /dev/null
+++ b/changelogs/unreleased/gh-6176-type-mistmatch-description.md
@@ -0,0 +1,4 @@
+## feature/sql
+
+* Descriptions of type mismatch error and inconsistent type error become more
+  informative (gh-6176).
diff --git a/changelogs/unreleased/type-mistmatch-error-description.md b/changelogs/unreleased/type-mistmatch-error-description.md
deleted file mode 100644
index d2e51a840..000000000
--- a/changelogs/unreleased/type-mistmatch-error-description.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## feature/sql
-
-* Description of type mismatch error become more informative (gh-6176).
diff --git a/src/box/sql/func.c b/src/box/sql/func.c
index e4832f46d..84768f17c 100644
--- a/src/box/sql/func.c
+++ b/src/box/sql/func.c
@@ -273,7 +273,7 @@ absFunc(sql_context * context, int argc, sql_value ** argv)
 	case MP_ARRAY:
 	case MP_MAP: {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES, "number",
-			 mem_type_to_str(argv[0]));
+			 mem_str(argv[0]));
 		context->is_aborted = true;
 		return;
 	}
@@ -324,8 +324,7 @@ position_func(struct sql_context *context, int argc, struct Mem **argv)
 		inconsistent_type_arg = haystack;
 	if (inconsistent_type_arg != NULL) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 "string or varbinary",
-			 mem_type_to_str(inconsistent_type_arg));
+			 "string or varbinary", mem_str(inconsistent_type_arg));
 		context->is_aborted = true;
 		return;
 	}
@@ -335,7 +334,7 @@ position_func(struct sql_context *context, int argc, struct Mem **argv)
 	 */
 	if (haystack_type != needle_type) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 mem_type_to_str(needle), mem_type_to_str(haystack));
+			 mem_type_to_str(needle), mem_str(haystack));
 		context->is_aborted = true;
 		return;
 	}
@@ -651,7 +650,7 @@ case_type##ICUFunc(sql_context *context, int argc, sql_value **argv)   \
 	if (mem_is_bin(argv[0]) || mem_is_map(argv[0]) ||                      \
 	    mem_is_array(argv[0])) {                                           \
 		diag_set(ClientError, ER_INCONSISTENT_TYPES, "string",         \
-			 "varbinary");                                         \
+			 mem_str(argv[0]));                                    \
 		context->is_aborted = true;                                    \
 		return;                                                        \
 	}                                                                      \
@@ -984,11 +983,9 @@ likeFunc(sql_context *context, int argc, sql_value **argv)
 	if (lhs_type != MP_STR || rhs_type != MP_STR) {
 		if (lhs_type == MP_NIL || rhs_type == MP_NIL)
 			return;
-		char *inconsistent_type = rhs_type != MP_STR ?
-					  mem_type_to_str(argv[0]) :
-					  mem_type_to_str(argv[1]);
-		diag_set(ClientError, ER_INCONSISTENT_TYPES, "string",
-			 inconsistent_type);
+		const char *str = rhs_type != MP_STR ?
+				  mem_str(argv[0]) : mem_str(argv[1]);
+		diag_set(ClientError, ER_INCONSISTENT_TYPES, "string", str);
 		context->is_aborted = true;
 		return;
 	}
diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c
index 37f0c1b94..cdb55f858 100644
--- a/src/box/sql/mem.c
+++ b/src/box/sql/mem.c
@@ -1454,19 +1454,19 @@ mem_concat(struct Mem *a, struct Mem *b, struct Mem *result)
 	/* Concatenation operation can be applied only to strings and blobs. */
 	if (((b->type & (MEM_TYPE_STR | MEM_TYPE_BIN)) == 0)) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 "string or varbinary", mem_type_to_str(b));
+			 "string or varbinary", mem_str(b));
 		return -1;
 	}
 	if (((a->type & (MEM_TYPE_STR | MEM_TYPE_BIN)) == 0)) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 "string or varbinary", mem_type_to_str(a));
+			 "string or varbinary", mem_str(a));
 		return -1;
 	}
 
 	/* Moreover, both operands must be of the same type. */
 	if (b->type != a->type) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 mem_type_to_str(a), mem_type_to_str(b));
+			 mem_type_to_str(a), mem_str(b));
 		return -1;
 	}
 
diff --git a/test/sql-tap/position.test.lua b/test/sql-tap/position.test.lua
index dd4fa62d0..6877d08fa 100755
--- a/test/sql-tap/position.test.lua
+++ b/test/sql-tap/position.test.lua
@@ -228,7 +228,7 @@ test:do_test(
         return test:catchsql "SELECT position(34, 12345);"
     end, {
         -- <position-1.23>
-        1, "Inconsistent types: expected string or varbinary got unsigned"
+        1, "Inconsistent types: expected string or varbinary got integer(12345)"
         -- </position-1.23>
     })
 
@@ -238,7 +238,7 @@ test:do_test(
         return test:catchsql "SELECT position(34, 123456.78);"
     end, {
         -- <position-1.24>
-        1, "Inconsistent types: expected string or varbinary got double"
+        1, "Inconsistent types: expected string or varbinary got double(123456.78)"
         -- </position-1.24>
     })
 
@@ -248,7 +248,7 @@ test:do_test(
         return test:catchsql "SELECT position(x'3334', 123456.78);"
     end, {
         -- <position-1.25>
-        1, "Inconsistent types: expected string or varbinary got double"
+        1, "Inconsistent types: expected string or varbinary got double(123456.78)"
         -- </position-1.25>
     })
 
@@ -554,7 +554,7 @@ test:do_test(
         return test:catchsql("SELECT position('x', x'78c3a4e282ac79');")
     end, {
         -- <position-1.54>
-        1, "Inconsistent types: expected string got varbinary"
+        1, "Inconsistent types: expected string got varbinary(x'78C3A4E282AC79')"
         -- </position-1.54>
     })
 
@@ -564,7 +564,7 @@ test:do_test(
         return test:catchsql "SELECT position('y', x'78c3a4e282ac79');"
     end, {
         -- <position-1.55>
-        1, "Inconsistent types: expected string got varbinary"
+        1, "Inconsistent types: expected string got varbinary(x'78C3A4E282AC79')"
         -- </position-1.55>
     })
 
@@ -614,7 +614,7 @@ test:do_test(
         return test:catchsql "SELECT position(x'79', 'xä€y');"
     end, {
         -- <position-1.57.1>
-        1, "Inconsistent types: expected varbinary got string"
+        1, "Inconsistent types: expected varbinary got string('xä€y')"
         -- </position-1.57.1>
     })
 
@@ -624,7 +624,7 @@ test:do_test(
         return test:catchsql "SELECT position(x'a4', 'xä€y');"
     end, {
         -- <position-1.57.2>
-        1, "Inconsistent types: expected varbinary got string"
+        1, "Inconsistent types: expected varbinary got string('xä€y')"
         -- </position-1.57.2>
     })
 
@@ -634,7 +634,7 @@ test:do_test(
         return test:catchsql "SELECT position('y', x'78c3a4e282ac79');"
     end, {
         -- <position-1.57.3>
-        1, "Inconsistent types: expected string got varbinary"
+        1, "Inconsistent types: expected string got varbinary(x'78C3A4E282AC79')"
         -- </position-1.57.3>
     })
 
diff --git a/test/sql-tap/sql-errors.test.lua b/test/sql-tap/sql-errors.test.lua
index f9bd781d2..17fe4b5b2 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(80)
+test:plan(81)
 
 test:execsql([[
 	CREATE TABLE t0 (i INT PRIMARY KEY, a INT);
@@ -864,4 +864,12 @@ test:do_catchsql_test(
 		"262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F40...) to unsigned"
 	})
 
+test:do_catchsql_test(
+	"sql-errors-3.9",
+	[[
+		SELECT POSITION('abc', 2);
+	]], {
+		1, "Inconsistent types: expected string or varbinary got integer(2)"
+	})
+
 test:finish_test()
diff --git a/test/sql-tap/uuid.test.lua b/test/sql-tap/uuid.test.lua
index 664e9c44e..70683a4fd 100755
--- a/test/sql-tap/uuid.test.lua
+++ b/test/sql-tap/uuid.test.lua
@@ -229,7 +229,7 @@ test:do_catchsql_test(
     [[
         SELECT ABS(u) from t2;
     ]], {
-        1, "Inconsistent types: expected number got uuid"
+        1, "Inconsistent types: expected number got uuid('11111111-1111-1111-1111-111111111111')"
     })
 
 test:do_catchsql_test(
@@ -337,7 +337,7 @@ test:do_catchsql_test(
     [[
         SELECT u LIKE 'a' from t2;
     ]], {
-        1, "Inconsistent types: expected string got uuid"
+        1, "Inconsistent types: expected string got uuid('11111111-1111-1111-1111-111111111111')"
     })
 
 test:do_execsql_test(
@@ -395,7 +395,7 @@ test:do_catchsql_test(
     [[
         SELECT POSITION(u, '1') from t2;
     ]], {
-        1, "Inconsistent types: expected string or varbinary got uuid"
+        1, "Inconsistent types: expected string or varbinary got uuid('11111111-1111-1111-1111-111111111111')"
     })
 
 test:do_execsql_test(
@@ -505,7 +505,7 @@ test:do_catchsql_test(
     [[
         SELECT u || u from t2;
     ]], {
-        1, "Inconsistent types: expected string or varbinary got uuid"
+        1, "Inconsistent types: expected string or varbinary got uuid('11111111-1111-1111-1111-111111111111')"
     })
 
 local func = {language = 'Lua', body = 'function(x) return type(x) end',
diff --git a/test/sql/boolean.result b/test/sql/boolean.result
index 0c70a88b0..5594d92cb 100644
--- a/test/sql/boolean.result
+++ b/test/sql/boolean.result
@@ -276,7 +276,7 @@ SELECT is_boolean('true');
 SELECT abs(a) FROM t0;
  | ---
  | - null
- | - 'Inconsistent types: expected number got boolean'
+ | - 'Inconsistent types: expected number got boolean(FALSE)'
  | ...
 SELECT lower(a) FROM t0;
  | ---
@@ -1560,64 +1560,64 @@ SELECT a, a1, a >> a1 FROM t, t6;
 SELECT true || true;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT true || false;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT false || true;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT false || false;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 
 SELECT a, true || a FROM t;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT a, false || a FROM t;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT a, a || true FROM t;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT a, a || false FROM t;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 
 SELECT a1, a1 || a1 FROM t6;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT a2, a2 || a2 FROM t6;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT a1, a2, a1 || a1 FROM t6;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT a1, a2, a2 || a2 FROM t6;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 
 -- Check comparisons.
@@ -5395,64 +5395,64 @@ SELECT a2, d, d < a2 FROM t6, t9;
 SELECT true || 'abc';
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT false || 'abc';
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT 'abc' || false;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT 'abc' || true;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 
 SELECT d, true || d FROM t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT d, false || d FROM t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT d, d || false FROM t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT d, d || true FROM t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 
 SELECT d, a1 || d FROM t6, t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT d, a2 || d FROM t6, t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT d, d || a1 FROM t6, t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT d, d || a2 FROM t6, t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 
 --
diff --git a/test/sql/types.result b/test/sql/types.result
index e1cbabcbe..a0b8668be 100644
--- a/test/sql/types.result
+++ b/test/sql/types.result
@@ -158,39 +158,39 @@ sp:drop()
 box.execute("SELECT 'abc' || 1;")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got unsigned'
+- 'Inconsistent types: expected string or varbinary got integer(1)'
 ...
 box.execute("SELECT 'abc' || 1.123;")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got double'
+- 'Inconsistent types: expected string or varbinary got double(1.123)'
 ...
 box.execute("SELECT 1 || 'abc';")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got unsigned'
+- 'Inconsistent types: expected string or varbinary got integer(1)'
 ...
 box.execute("SELECT 1.123 || 'abc';")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got double'
+- 'Inconsistent types: expected string or varbinary got double(1.123)'
 ...
 box.execute("SELECt 'a' || 'b' || 1;")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got unsigned'
+- 'Inconsistent types: expected string or varbinary got integer(1)'
 ...
 -- What is more, they must be of the same type.
 --
 box.execute("SELECT 'abc' || randomblob(5);")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''819192E578'')'
 ...
 box.execute("SELECT randomblob(5) || 'x';")
 ---
 - null
-- 'Inconsistent types: expected varbinary got string'
+- 'Inconsistent types: expected varbinary got string(''x'')'
 ...
 -- Result of BLOBs concatenation must be BLOB.
 --
@@ -215,17 +215,17 @@ box.execute("INSERT INTO t1 VALUES (randomblob(5));")
 box.execute("SELECT * FROM t1 WHERE s LIKE 'blob';")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''91A0FEE366'')'
 ...
 box.execute("SELECT * FROM t1 WHERE 'blob' LIKE s;")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''91A0FEE366'')'
 ...
 box.execute("SELECT * FROM t1 WHERE 'blob' LIKE x'0000';")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''0000'')'
 ...
 box.execute("SELECT s LIKE NULL FROM t1;")
 ---
@@ -246,12 +246,12 @@ box.execute("INSERT INTO t1 VALUES (1);")
 box.execute("SELECT * FROM t1 WHERE s LIKE 'int';")
 ---
 - null
-- 'Inconsistent types: expected string got unsigned'
+- 'Inconsistent types: expected string got integer(1)'
 ...
 box.execute("SELECT * FROM t1 WHERE 'int' LIKE 4;")
 ---
 - null
-- 'Inconsistent types: expected string got unsigned'
+- 'Inconsistent types: expected string got integer(4)'
 ...
 box.execute("SELECT NULL LIKE s FROM t1;")
 ---
@@ -1312,17 +1312,17 @@ box.execute("SELECT group_concat(v) FROM t;")
 box.execute("SELECT lower(v) FROM t;")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''616263'')'
 ...
 box.execute("SELECT upper(v) FROM t;")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''616263'')'
 ...
 box.execute("SELECT abs(v) FROM t;")
 ---
 - null
-- 'Inconsistent types: expected number got varbinary'
+- 'Inconsistent types: expected number got varbinary(x''616263'')'
 ...
 box.execute("SELECT typeof(v) FROM t;")
 ---



New patch:

commit fd8db88dd24d3017a1b82370dfbdd8e7ca76c11b
Author: Mergen Imeev <imeevma@gmail.com>
Date:   Sun Jul 4 22:30:56 2021 +0300

    sql: make type mismatch errors more informative
    
    Prior to this patch, in some cases the type mismatch error description
    showed the value, and in some cases the type of the value. After this
    patch, both the type and value will be shown. Also, inconsistent type
    error description also become more informative. Previously it contained
    only type of value, now it contains value and its type.
    
    Close #6176

diff --git a/changelogs/unreleased/gh-6176-type-mistmatch-description.md b/changelogs/unreleased/gh-6176-type-mistmatch-description.md
new file mode 100644
index 000000000..0e00c4175
--- /dev/null
+++ b/changelogs/unreleased/gh-6176-type-mistmatch-description.md
@@ -0,0 +1,4 @@
+## feature/sql
+
+* Descriptions of type mismatch error and inconsistent type error become more
+  informative (gh-6176).
diff --git a/src/box/sql/func.c b/src/box/sql/func.c
index e4832f46d..84768f17c 100644
--- a/src/box/sql/func.c
+++ b/src/box/sql/func.c
@@ -273,7 +273,7 @@ absFunc(sql_context * context, int argc, sql_value ** argv)
 	case MP_ARRAY:
 	case MP_MAP: {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES, "number",
-			 mem_type_to_str(argv[0]));
+			 mem_str(argv[0]));
 		context->is_aborted = true;
 		return;
 	}
@@ -324,8 +324,7 @@ position_func(struct sql_context *context, int argc, struct Mem **argv)
 		inconsistent_type_arg = haystack;
 	if (inconsistent_type_arg != NULL) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 "string or varbinary",
-			 mem_type_to_str(inconsistent_type_arg));
+			 "string or varbinary", mem_str(inconsistent_type_arg));
 		context->is_aborted = true;
 		return;
 	}
@@ -335,7 +334,7 @@ position_func(struct sql_context *context, int argc, struct Mem **argv)
 	 */
 	if (haystack_type != needle_type) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 mem_type_to_str(needle), mem_type_to_str(haystack));
+			 mem_type_to_str(needle), mem_str(haystack));
 		context->is_aborted = true;
 		return;
 	}
@@ -651,7 +650,7 @@ case_type##ICUFunc(sql_context *context, int argc, sql_value **argv)   \
 	if (mem_is_bin(argv[0]) || mem_is_map(argv[0]) ||                      \
 	    mem_is_array(argv[0])) {                                           \
 		diag_set(ClientError, ER_INCONSISTENT_TYPES, "string",         \
-			 "varbinary");                                         \
+			 mem_str(argv[0]));                                    \
 		context->is_aborted = true;                                    \
 		return;                                                        \
 	}                                                                      \
@@ -984,11 +983,9 @@ likeFunc(sql_context *context, int argc, sql_value **argv)
 	if (lhs_type != MP_STR || rhs_type != MP_STR) {
 		if (lhs_type == MP_NIL || rhs_type == MP_NIL)
 			return;
-		char *inconsistent_type = rhs_type != MP_STR ?
-					  mem_type_to_str(argv[0]) :
-					  mem_type_to_str(argv[1]);
-		diag_set(ClientError, ER_INCONSISTENT_TYPES, "string",
-			 inconsistent_type);
+		const char *str = rhs_type != MP_STR ?
+				  mem_str(argv[0]) : mem_str(argv[1]);
+		diag_set(ClientError, ER_INCONSISTENT_TYPES, "string", str);
 		context->is_aborted = true;
 		return;
 	}
diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c
index c4375e1ea..cdb55f858 100644
--- a/src/box/sql/mem.c
+++ b/src/box/sql/mem.c
@@ -78,16 +78,17 @@ mem_str(const struct Mem *mem)
 	case MEM_TYPE_NULL:
 		return "NULL";
 	case MEM_TYPE_STR:
-		if (mem->n > STR_VALUE_MAX_LEN)
-			return tt_sprintf("'%.*s...", STR_VALUE_MAX_LEN, mem->z);
-		return tt_sprintf("'%.*s'", mem->n, mem->z);
+		if (mem->n <= STR_VALUE_MAX_LEN)
+			return tt_sprintf("string('%.*s')", mem->n, mem->z);
+		return tt_sprintf("string('%.*s...)", STR_VALUE_MAX_LEN,
+				  mem->z);
 	case MEM_TYPE_INT:
-		return tt_sprintf("%lld", mem->u.i);
+		return tt_sprintf("integer(%lld)", mem->u.i);
 	case MEM_TYPE_UINT:
-		return tt_sprintf("%llu", mem->u.u);
+		return tt_sprintf("integer(%llu)", mem->u.u);
 	case MEM_TYPE_DOUBLE:
 		sql_snprintf(STR_VALUE_MAX_LEN, buf, "%!.15g", mem->u.r);
-		return tt_sprintf("%s", buf);
+		return tt_sprintf("double(%s)", buf);
 	case MEM_TYPE_BIN: {
 		int len = MIN(mem->n, STR_VALUE_MAX_LEN / 2);
 		for (int i = 0; i < len; ++i) {
@@ -97,22 +98,25 @@ mem_str(const struct Mem *mem)
 			buf[2 * i + 1] = n < 10 ? ('0' + n) : ('A' + n - 10);
 		}
 		if (mem->n > len)
-			return tt_sprintf("x'%.*s...", len * 2, buf);
-		return tt_sprintf("x'%.*s'", len * 2, buf);
+			return tt_sprintf("varbinary(x'%.*s...)", len * 2, buf);
+		return tt_sprintf("varbinary(x'%.*s')", len * 2, buf);
 	}
 	case MEM_TYPE_MAP:
 	case MEM_TYPE_ARRAY: {
 		const char *str = mp_str(mem->z);
-		if (strlen(str) <= STR_VALUE_MAX_LEN)
-			return str;
-		memcpy(buf, str, STR_VALUE_MAX_LEN);
-		return tt_sprintf("%.*s...", STR_VALUE_MAX_LEN, buf);
+		const char *type = mem_type_to_str(mem);
+		uint32_t len = strlen(str);
+		uint32_t minlen = MIN(STR_VALUE_MAX_LEN, len);
+		memcpy(buf, str, minlen);
+		if (len <= STR_VALUE_MAX_LEN)
+			return tt_sprintf("%s(%.*s)", type, minlen, buf);
+		return tt_sprintf("%s(%.*s...)", type, minlen, buf);
 	}
 	case MEM_TYPE_UUID:
 		tt_uuid_to_string(&mem->u.uuid, buf);
-		return tt_sprintf("'%s'", buf);
+		return tt_sprintf("uuid('%s')", buf);
 	case MEM_TYPE_BOOL:
-		return mem->u.b ? "TRUE" : "FALSE";
+		return mem->u.b ? "boolean(TRUE)" : "boolean(FALSE)";
 	default:
 		return "unknown";
 	}
@@ -1450,19 +1454,19 @@ mem_concat(struct Mem *a, struct Mem *b, struct Mem *result)
 	/* Concatenation operation can be applied only to strings and blobs. */
 	if (((b->type & (MEM_TYPE_STR | MEM_TYPE_BIN)) == 0)) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 "string or varbinary", mem_type_to_str(b));
+			 "string or varbinary", mem_str(b));
 		return -1;
 	}
 	if (((a->type & (MEM_TYPE_STR | MEM_TYPE_BIN)) == 0)) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 "string or varbinary", mem_type_to_str(a));
+			 "string or varbinary", mem_str(a));
 		return -1;
 	}
 
 	/* Moreover, both operands must be of the same type. */
 	if (b->type != a->type) {
 		diag_set(ClientError, ER_INCONSISTENT_TYPES,
-			 mem_type_to_str(a), mem_type_to_str(b));
+			 mem_type_to_str(a), mem_str(b));
 		return -1;
 	}
 
diff --git a/src/box/sql/mem.h b/src/box/sql/mem.h
index 0bbc63e68..97aba9ab4 100644
--- a/src/box/sql/mem.h
+++ b/src/box/sql/mem.h
@@ -263,9 +263,10 @@ bool
 mem_is_field_compatible(const struct Mem *mem, enum field_type type);
 
 /**
- * Return a string that represent content of MEM. String is either allocated
- * using static_alloc() of just a static variable. This function should only be
- * used for debugging or displaying MEM values in errors.
+ * Return a string that contains description of type and value of MEM. String is
+ * either allocated using static_alloc() of just a static variable. This
+ * function should only be used for debugging or displaying MEM values in
+ * description of errors.
  */
 const char *
 mem_str(const struct Mem *mem);
diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c
index 03f420bca..cc698b715 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;
@@ -1655,7 +1652,7 @@ case OP_Ge: {             /* same as TK_GE, jump, in1, in3 */
 	} else if (mem_is_map(pIn3) || mem_is_map(pIn1) || mem_is_array(pIn3) ||
 		   mem_is_array(pIn1)) {
 		diag_set(ClientError, ER_SQL_TYPE_MISMATCH,
-			 mem_type_to_str(pIn3), mem_type_to_str(pIn1));
+			 mem_str(pIn3), mem_type_to_str(pIn1));
 		goto abort_due_to_error;
 	} else if (type == FIELD_TYPE_STRING) {
 		if (mem_cmp_str(pIn3, pIn1, &res, pOp->p4.pColl) != 0) {
diff --git a/test/sql-tap/autoinc.test.lua b/test/sql-tap/autoinc.test.lua
index 83d983fe1..21e80356a 100755
--- a/test/sql-tap/autoinc.test.lua
+++ b/test/sql-tap/autoinc.test.lua
@@ -616,7 +616,7 @@ test:do_catchsql_test(
             INSERT INTO t2 VALUES('asd');
     ]], {
         -- <autoinc-10.2>
-        1, "Type mismatch: can not convert 'asd' to integer"
+        1, "Type mismatch: can not convert string('asd') to integer"
         -- </autoinc-10.2>
     })
 
@@ -809,7 +809,7 @@ test:do_catchsql_test(
         INSERT INTO t1 SELECT s2, s2 FROM t1;
     ]], {
         -- <autoinc-gh-3670>
-        1, "Type mismatch: can not convert 'a' to integer"
+        1, "Type mismatch: can not convert string('a') to integer"
         -- </autoinc-gh-3670>
     })
 
diff --git a/test/sql-tap/cast.test.lua b/test/sql-tap/cast.test.lua
index e2a227127..8e7b6640e 100755
--- a/test/sql-tap/cast.test.lua
+++ b/test/sql-tap/cast.test.lua
@@ -70,7 +70,7 @@ test:do_catchsql_test(
         SELECT CAST(x'616263' AS NUMBER)
     ]], {
         -- <cast-1.5>
-        1, "Type mismatch: can not convert x'616263' to number"
+        1, "Type mismatch: can not convert varbinary(x'616263') to number"
         -- </cast-1.5>
     })
 
@@ -100,7 +100,7 @@ test:do_catchsql_test(
         SELECT CAST(x'616263' AS integer)
     ]], {
         -- <cast-1.9>
-        1, "Type mismatch: can not convert x'616263' to integer"
+        1, "Type mismatch: can not convert varbinary(x'616263') to integer"
         -- </cast-1.9>
     })
 
@@ -450,7 +450,7 @@ test:do_catchsql_test(
         SELECT CAST('123abc' AS NUMBER)
     ]], {
         -- <cast-1.45>
-        1, "Type mismatch: can not convert '123abc' to number"
+        1, "Type mismatch: can not convert string('123abc') to number"
         -- </cast-1.45>
     })
 
@@ -470,7 +470,7 @@ test:do_catchsql_test(
         SELECT CAST('123abc' AS integer)
     ]], {
         -- <cast-1.49>
-        1, "Type mismatch: can not convert '123abc' to integer"
+        1, "Type mismatch: can not convert string('123abc') to integer"
         -- </cast-1.49>
     })
 
@@ -480,7 +480,7 @@ test:do_catchsql_test(
         SELECT CAST('123.5abc' AS NUMBER)
     ]], {
         -- <cast-1.51>
-        1, "Type mismatch: can not convert '123.5abc' to number"
+        1, "Type mismatch: can not convert string('123.5abc') to number"
         -- </cast-1.51>
     })
 
@@ -490,7 +490,7 @@ test:do_catchsql_test(
         SELECT CAST('123.5abc' AS integer)
     ]], {
         -- <cast-1.53>
-        1, "Type mismatch: can not convert '123.5abc' to integer"
+        1, "Type mismatch: can not convert string('123.5abc') to integer"
         -- </cast-1.53>
     })
 
@@ -561,7 +561,7 @@ test:do_catchsql_test(
         SELECT CAST('abc' AS NUMBER)
     ]], {
         -- <case-1.66>
-        1, "Type mismatch: can not convert 'abc' to number"
+        1, "Type mismatch: can not convert string('abc') to number"
         -- </case-1.66>
     })
 
@@ -835,7 +835,7 @@ test:do_test(
         ]]
     end, {
         -- <cast-4.1>
-        1, "Type mismatch: can not convert 'abc' to integer"
+        1, "Type mismatch: can not convert string('abc') to integer"
         -- </cast-4.1>
     })
 
@@ -847,7 +847,7 @@ test:do_test(
         ]]
     end, {
         -- <cast-4.2>
-        1, "Type mismatch: can not convert 'abc' to integer"
+        1, "Type mismatch: can not convert string('abc') to integer"
         -- </cast-4.2>
     })
 
@@ -859,7 +859,7 @@ test:do_test(
         ]]
     end, {
         -- <cast-4.4>
-        1, "Type mismatch: can not convert 'abc' to number"
+        1, "Type mismatch: can not convert string('abc') to number"
         -- </cast-4.4>
     })
 
diff --git a/test/sql-tap/func.test.lua b/test/sql-tap/func.test.lua
index 66e525871..df55ff9cf 100755
--- a/test/sql-tap/func.test.lua
+++ b/test/sql-tap/func.test.lua
@@ -2931,7 +2931,7 @@ test:do_catchsql_test(
         SELECT ROUND(X'FF')
     ]], {
         -- <func-76.1>
-        1, "Type mismatch: can not convert x'FF' to number"
+        1, "Type mismatch: can not convert varbinary(x'FF') to number"
         -- </func-76.1>
     })
 
@@ -2941,7 +2941,7 @@ test:do_catchsql_test(
         SELECT RANDOMBLOB(X'FF')
     ]], {
         -- <func-76.2>
-        1, "Type mismatch: can not convert x'FF' to number"
+        1, "Type mismatch: can not convert varbinary(x'FF') to number"
         -- </func-76.2>
     })
 
@@ -2951,7 +2951,7 @@ test:do_catchsql_test(
         SELECT SOUNDEX(X'FF')
     ]], {
         -- <func-76.3>
-        1, "Type mismatch: can not convert x'FF' to string"
+        1, "Type mismatch: can not convert varbinary(x'FF') to string"
         -- </func-76.3>
     })
 
@@ -2961,7 +2961,7 @@ test:do_catchsql_test(
         SELECT SUM(X'FF')
     ]], {
         -- <func-76.4>
-        1, "Type mismatch: can not convert x'FF' to number"
+        1, "Type mismatch: can not convert varbinary(x'FF') to number"
         -- </func-76.4>
     })
 
diff --git a/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua b/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua
index b595f99b0..a8cc0e770 100755
--- a/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua
+++ b/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua
@@ -32,9 +32,9 @@ test:do_execsql_test(
 test:do_catchsql_test(
     "gh-4766-3",
     "SELECT CAST('" .. long_str .. "1234'" .. " AS INTEGER);", {
-        1, "Type mismatch: can not convert '00000000000000000000000000000000" ..
+        1, "Type mismatch: can not convert string('0000000000000000000000000" ..
         "0000000000000000000000000000000000000000000000000000000000000000000" ..
-        "00000000000000000000000000000... to integer"
+        "000000000000000000000000000000000000...) to integer"
     })
 
 test:finish_test()
diff --git a/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua b/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua
index 59a76000a..8847fede4 100755
--- a/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua
+++ b/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua
@@ -40,7 +40,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO t1 SELECT i, NULL, d FROM t;
     ]], {
-        1, "Type mismatch: can not convert x'C70501030111111C' to decimal"
+        1, "Type mismatch: can not convert varbinary(x'C70501030111111C') to decimal"
     })
 
 --
@@ -77,7 +77,7 @@ test:do_catchsql_test(
     [[
         UPDATE td SET d = d;
     ]], {
-        1, "Type mismatch: can not convert x'C70501030111111C' to decimal"
+        1, "Type mismatch: can not convert varbinary(x'C70501030111111C') to decimal"
     })
 
 test:finish_test()
diff --git a/test/sql-tap/index1.test.lua b/test/sql-tap/index1.test.lua
index 9e57639cc..6a7450bb7 100755
--- a/test/sql-tap/index1.test.lua
+++ b/test/sql-tap/index1.test.lua
@@ -778,7 +778,7 @@ test:do_catchsql_test(
         SELECT c FROM t6 WHERE a>123;
     ]], {
         -- <index-14.6>
-        1, "Type mismatch: can not convert '' to number"
+        1, "Type mismatch: can not convert string('') to number"
         -- </index-14.6>
     })
 
@@ -788,7 +788,7 @@ test:do_catchsql_test(
         SELECT c FROM t6 WHERE a>=123;
     ]], {
         -- <index-14.7>
-        1, "Type mismatch: can not convert '' to number"
+        1, "Type mismatch: can not convert string('') to number"
         -- </index-14.7>
     })
 
diff --git a/test/sql-tap/numcast.test.lua b/test/sql-tap/numcast.test.lua
index 6ca1316d5..b3aa64e76 100755
--- a/test/sql-tap/numcast.test.lua
+++ b/test/sql-tap/numcast.test.lua
@@ -105,7 +105,7 @@ test:do_catchsql_test(
     [[
         SELECT CAST((20000000000000000000.) AS UNSIGNED);
     ]], {
-        1,"Type mismatch: can not convert 2.0e+19 to unsigned"
+        1,"Type mismatch: can not convert double(2.0e+19) to unsigned"
     })
 
 test:do_execsql_test(
@@ -133,7 +133,7 @@ test:do_catchsql_test(
         INSERT INTO t VALUES(20000000000000000000.01);
         SELECT * FROM t;
     ]], {
-        1,"Type mismatch: can not convert 2.0e+19 to integer"
+        1,"Type mismatch: can not convert double(2.0e+19) to integer"
     })
 
 test:do_execsql_test(
diff --git a/test/sql-tap/position.test.lua b/test/sql-tap/position.test.lua
index dd4fa62d0..6877d08fa 100755
--- a/test/sql-tap/position.test.lua
+++ b/test/sql-tap/position.test.lua
@@ -228,7 +228,7 @@ test:do_test(
         return test:catchsql "SELECT position(34, 12345);"
     end, {
         -- <position-1.23>
-        1, "Inconsistent types: expected string or varbinary got unsigned"
+        1, "Inconsistent types: expected string or varbinary got integer(12345)"
         -- </position-1.23>
     })
 
@@ -238,7 +238,7 @@ test:do_test(
         return test:catchsql "SELECT position(34, 123456.78);"
     end, {
         -- <position-1.24>
-        1, "Inconsistent types: expected string or varbinary got double"
+        1, "Inconsistent types: expected string or varbinary got double(123456.78)"
         -- </position-1.24>
     })
 
@@ -248,7 +248,7 @@ test:do_test(
         return test:catchsql "SELECT position(x'3334', 123456.78);"
     end, {
         -- <position-1.25>
-        1, "Inconsistent types: expected string or varbinary got double"
+        1, "Inconsistent types: expected string or varbinary got double(123456.78)"
         -- </position-1.25>
     })
 
@@ -554,7 +554,7 @@ test:do_test(
         return test:catchsql("SELECT position('x', x'78c3a4e282ac79');")
     end, {
         -- <position-1.54>
-        1, "Inconsistent types: expected string got varbinary"
+        1, "Inconsistent types: expected string got varbinary(x'78C3A4E282AC79')"
         -- </position-1.54>
     })
 
@@ -564,7 +564,7 @@ test:do_test(
         return test:catchsql "SELECT position('y', x'78c3a4e282ac79');"
     end, {
         -- <position-1.55>
-        1, "Inconsistent types: expected string got varbinary"
+        1, "Inconsistent types: expected string got varbinary(x'78C3A4E282AC79')"
         -- </position-1.55>
     })
 
@@ -614,7 +614,7 @@ test:do_test(
         return test:catchsql "SELECT position(x'79', 'xä€y');"
     end, {
         -- <position-1.57.1>
-        1, "Inconsistent types: expected varbinary got string"
+        1, "Inconsistent types: expected varbinary got string('xä€y')"
         -- </position-1.57.1>
     })
 
@@ -624,7 +624,7 @@ test:do_test(
         return test:catchsql "SELECT position(x'a4', 'xä€y');"
     end, {
         -- <position-1.57.2>
-        1, "Inconsistent types: expected varbinary got string"
+        1, "Inconsistent types: expected varbinary got string('xä€y')"
         -- </position-1.57.2>
     })
 
@@ -634,7 +634,7 @@ test:do_test(
         return test:catchsql "SELECT position('y', x'78c3a4e282ac79');"
     end, {
         -- <position-1.57.3>
-        1, "Inconsistent types: expected string got varbinary"
+        1, "Inconsistent types: expected string got varbinary(x'78C3A4E282AC79')"
         -- </position-1.57.3>
     })
 
diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua
index 57c5c2cb3..06641a60e 100755
--- a/test/sql-tap/select1.test.lua
+++ b/test/sql-tap/select1.test.lua
@@ -320,7 +320,7 @@ test:do_catchsql_test(
         SELECT count(*),count(a),count(b) FROM t4 WHERE b=5
     ]], {
         -- <select1-2.5.3>
-        1, "Type mismatch: can not convert 'This is a string that is too big to fit inside a NBFS buffer' to number"
+        1, "Type mismatch: can not convert string('This is a string that is too big to fit inside a NBFS buffer') to number"
         -- </select1-2.5.3>
     })
 
@@ -515,7 +515,7 @@ test:do_catchsql_test(
         SELECT sum(a) FROM t3
     ]], {
         -- <select1-2.17.1>
-        1, "Type mismatch: can not convert 'abc' to number"
+        1, "Type mismatch: can not convert string('abc') to number"
         -- </select1-2.17.1>
     })
 
@@ -1484,7 +1484,7 @@ test:do_catchsql_test(
         SELECT f1 FROM test1 WHERE 4.3+2.4 OR 1 ORDER BY f1
     ]], {
         -- <select1-8.1>
-        1, 'Type mismatch: can not convert 6.7 to boolean'
+        1, 'Type mismatch: can not convert double(6.7) to boolean'
         -- </select1-8.1>
     })
 
diff --git a/test/sql-tap/select5.test.lua b/test/sql-tap/select5.test.lua
index bb9951025..b04c9af09 100755
--- a/test/sql-tap/select5.test.lua
+++ b/test/sql-tap/select5.test.lua
@@ -558,7 +558,7 @@ test:do_catchsql_test(
             SELECT 1 FROM jj HAVING avg(s2) = 1 AND avg(s2) = 0;
     ]], {
     -- <select5-9.13.2>
-    1, "Type mismatch: can not convert 'A' to number"
+    1, "Type mismatch: can not convert string('A') to number"
     -- </select5-9.13.2>
 })
 
diff --git a/test/sql-tap/sql-errors.test.lua b/test/sql-tap/sql-errors.test.lua
index 66dc77fa1..17fe4b5b2 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(80)
+test:plan(81)
 
 test:execsql([[
 	CREATE TABLE t0 (i INT PRIMARY KEY, a INT);
@@ -696,7 +696,7 @@ test:do_catchsql_test(
 		SELECT X'ff' + 1;
 	]], {
 		-- <sql-errors-2.1>
-		1, "Type mismatch: can not convert x'FF' to number"
+		1, "Type mismatch: can not convert varbinary(x'FF') to number"
 		-- </sql-errors-2.1>
 	})
 
@@ -706,7 +706,7 @@ test:do_catchsql_test(
 		SELECT X'ff' - 1;
 	]], {
 		-- <sql-errors-2.2>
-		1, "Type mismatch: can not convert x'FF' to number"
+		1, "Type mismatch: can not convert varbinary(x'FF') to number"
 		-- </sql-errors-2.2>
 	})
 
@@ -716,7 +716,7 @@ test:do_catchsql_test(
 		SELECT X'ff' * 1;
 	]], {
 		-- <sql-errors-2.3>
-		1, "Type mismatch: can not convert x'FF' to number"
+		1, "Type mismatch: can not convert varbinary(x'FF') to number"
 		-- </sql-errors-2.3>
 	})
 
@@ -726,7 +726,7 @@ test:do_catchsql_test(
 		SELECT X'ff' / 1;
 	]], {
 		-- <sql-errors-2.4>
-		1, "Type mismatch: can not convert x'FF' to number"
+		1, "Type mismatch: can not convert varbinary(x'FF') to number"
 		-- </sql-errors-2.4>
 	})
 
@@ -736,7 +736,7 @@ test:do_catchsql_test(
 		SELECT X'ff' AND true;
 	]], {
 		-- <sql-errors-2.5>
-		1, "Type mismatch: can not convert x'FF' to boolean"
+		1, "Type mismatch: can not convert varbinary(x'FF') to boolean"
 		-- </sql-errors-2.5>
 	})
 
@@ -746,7 +746,7 @@ test:do_catchsql_test(
 		SELECT X'ff' OR false;
 	]], {
 		-- <sql-errors-2.6>
-		1, "Type mismatch: can not convert x'FF' to boolean"
+		1, "Type mismatch: can not convert varbinary(x'FF') to boolean"
 		-- </sql-errors-2.6>
 	})
 
@@ -756,7 +756,7 @@ test:do_catchsql_test(
 		SELECT false OR X'ff';
 	]], {
 		-- <sql-errors-2.7>
-		1, "Type mismatch: can not convert x'FF' to boolean"
+		1, "Type mismatch: can not convert varbinary(x'FF') to boolean"
 		-- </sql-errors-2.7>
 	})
 
@@ -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 varbinary(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 varbinary(x'FF') to boolean"
 		-- </sql-errors-2.9>
 	})
 
@@ -790,16 +790,16 @@ local str2 = string.rep('ы', 200)
 test:do_catchsql_test(
 	"sql-errors-3.1",
 	"SELECT CAST('"..str1.."'AS UNSIGNED);", {
-		1, "Type mismatch: can not convert 'aaaaaaaaaaaaaaaaaaaaaaaaa"..
+		1, "Type mismatch: can not convert string('aaaaaaaaaaaaaaaaaa"..
 		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"..
-		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... to unsigned"
+		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...) to unsigned"
 	})
 
 test:do_catchsql_test(
 	"sql-errors-3.2",
 	"SELECT CAST('"..str2.."'AS UNSIGNED);", {
-		1, "Type mismatch: can not convert 'ыыыыыыыыыыыыыыыыыыыыыыыыы"..
-		"ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы... to unsigned"
+		1, "Type mismatch: can not convert string('ыыыыыыыыыыыыыыыыыы"..
+		"ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы...) to unsigned"
 	})
 
 local format = {{'I', 'integer'}, {'A', 'array'}, {'M', 'map'}}
@@ -810,17 +810,17 @@ s:insert({1, {str1}, {a = 1, b = str1}})
 test:do_catchsql_test(
 	"sql-errors-3.3",
 	"SELECT CAST(a AS UNSIGNED) from test;", {
-		1, 'Type mismatch: can not convert ["aaaaaaaaaaaaaaaaaaaaaaaa'..
+		1, 'Type mismatch: can not convert array(["aaaaaaaaaaaaaaaaaa'..
 		'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'..
-		'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... to unsigned'
+		'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...) to unsigned'
 	})
 
 test:do_catchsql_test(
 	"sql-errors-3.4",
 	"SELECT CAST(m AS UNSIGNED) from test;", {
-		1, 'Type mismatch: can not convert {"a": 1, "b": "aaaaaaaaaaa'..
+		1, 'Type mismatch: can not convert map({"a": 1, "b": "aaaaaaa'..
 		'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'..
-		'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... to unsigned'
+		'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...) to unsigned'
 	})
 
 test:execsql('DROP TABLE test;')
@@ -834,7 +834,7 @@ test:do_catchsql_test(
 	[[
 		SELECT CAST(x'F1' AS UNSIGNED);
 	]], {
-		1, "Type mismatch: can not convert x'F1' to unsigned"
+		1, "Type mismatch: can not convert varbinary(x'F1') to unsigned"
 	})
 
 test:do_catchsql_test(
@@ -842,7 +842,7 @@ test:do_catchsql_test(
 	[[
 		SELECT CAST('F1' AS UNSIGNED);
 	]], {
-		1, "Type mismatch: can not convert 'F1' to unsigned"
+		1, "Type mismatch: can not convert string('F1') to unsigned"
 	})
 
 test:do_catchsql_test(
@@ -850,7 +850,7 @@ test:do_catchsql_test(
 	[[
 		SELECT CAST(CAST('11111111-1111-1111-1111-111111111111' AS UUID) AS UNSIGNED);
 	]], {
-		1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to unsigned"
+		1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to unsigned"
 	})
 
 local bin = ''
@@ -859,9 +859,17 @@ for i = 1,99 do bin = bin .. string.format("%02x", i) end
 test:do_catchsql_test(
 	"sql-errors-3.8",
 	"SELECT CAST(x'"..bin.."'AS UNSIGNED);", {
-		1, "Type mismatch: can not convert x'0102030405060708090A0B0C"..
-		"0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A"..
-		"2B2C2D2E2F303132333435363738393A3B3C3D3E3F40... to unsigned"
+		1, "Type mismatch: can not convert varbinary(x'01020304050607"..
+		"08090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425"..
+		"262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F40...) to unsigned"
+	})
+
+test:do_catchsql_test(
+	"sql-errors-3.9",
+	[[
+		SELECT POSITION('abc', 2);
+	]], {
+		1, "Inconsistent types: expected string or varbinary got integer(2)"
 	})
 
 test:finish_test()
diff --git a/test/sql-tap/tkt-80e031a00f.test.lua b/test/sql-tap/tkt-80e031a00f.test.lua
index b5bdf038f..fb3bbf2bf 100755
--- a/test/sql-tap/tkt-80e031a00f.test.lua
+++ b/test/sql-tap/tkt-80e031a00f.test.lua
@@ -346,7 +346,7 @@ test:do_catchsql_test(
         SELECT 'hello' IN t1
     ]], {
         -- <tkt-80e031a00f.27>
-        1, "Type mismatch: can not convert 'hello' to integer"
+        1, "Type mismatch: can not convert string('hello') to integer"
         -- </tkt-80e031a00f.27>
     })
 
@@ -356,7 +356,7 @@ test:do_catchsql_test(
         SELECT 'hello' NOT IN t1
     ]], {
         -- <tkt-80e031a00f.28>
-        1, "Type mismatch: can not convert 'hello' to integer"
+        1, "Type mismatch: can not convert string('hello') to integer"
         -- </tkt-80e031a00f.28>
     })
 
@@ -386,7 +386,7 @@ test:do_catchsql_test(
         SELECT x'303132' IN t1
     ]], {
         -- <tkt-80e031a00f.31>
-        1, "Type mismatch: can not convert x'303132' to integer"
+        1, "Type mismatch: can not convert varbinary(x'303132') to integer"
         -- </tkt-80e031a00f.31>
     })
 
@@ -396,7 +396,7 @@ test:do_catchsql_test(
         SELECT x'303132' NOT IN t1
     ]], {
         -- <tkt-80e031a00f.32>
-        1, "Type mismatch: can not convert x'303132' to integer"
+        1, "Type mismatch: can not convert varbinary(x'303132') to integer"
         -- </tkt-80e031a00f.32>
     })
 
diff --git a/test/sql-tap/tkt-9a8b09f8e6.test.lua b/test/sql-tap/tkt-9a8b09f8e6.test.lua
index 53dfafebf..bee4fdf6c 100755
--- a/test/sql-tap/tkt-9a8b09f8e6.test.lua
+++ b/test/sql-tap/tkt-9a8b09f8e6.test.lua
@@ -245,7 +245,7 @@ test:do_catchsql_test(
         SELECT x FROM t3 WHERE x IN ('1');
     ]], {
         -- <4.3>
-        1, "Type mismatch: can not convert '1' to number"
+        1, "Type mismatch: can not convert string('1') to number"
         -- </4.3>
     })
 
@@ -255,7 +255,7 @@ test:do_catchsql_test(
         SELECT x FROM t3 WHERE x IN ('1.0');
     ]], {
         -- <4.4>
-        1, "Type mismatch: can not convert '1.0' to number"
+        1, "Type mismatch: can not convert string('1.0') to number"
         -- </4.4>
     })
 
@@ -285,7 +285,7 @@ test:do_catchsql_test(
         SELECT x FROM t3 WHERE '1' IN (x);
     ]], {
         -- <4.7>
-        1, "Type mismatch: can not convert '1' to number"
+        1, "Type mismatch: can not convert string('1') to number"
         -- </4.7>
     })
 
@@ -295,7 +295,7 @@ test:do_catchsql_test(
         SELECT x FROM t3 WHERE '1.0' IN (x);
     ]], {
         -- <4.8>
-        1, "Type mismatch: can not convert '1.0' to number"
+        1, "Type mismatch: can not convert string('1.0') to number"
         -- </4.8>
     })
 
@@ -325,7 +325,7 @@ test:do_catchsql_test(
         SELECT x FROM t4 WHERE x IN ('1');
     ]], {
         -- <5.3>
-        1, "Type mismatch: can not convert '1' to number"
+        1, "Type mismatch: can not convert string('1') to number"
         -- </5.3>
     })
 
@@ -335,7 +335,7 @@ test:do_catchsql_test(
         SELECT x FROM t4 WHERE x IN ('1.0');
     ]], {
         -- <5.4>
-        1, "Type mismatch: can not convert '1.0' to number"
+        1, "Type mismatch: can not convert string('1.0') to number"
         -- </5.4>
     })
 
@@ -355,7 +355,7 @@ test:do_catchsql_test(
         SELECT x FROM t4 WHERE x IN ('1.11');
     ]], {
         -- <5.6>
-        1, "Type mismatch: can not convert '1.11' to number"
+        1, "Type mismatch: can not convert string('1.11') to number"
         -- </5.6>
     })
 
@@ -385,7 +385,7 @@ test:do_catchsql_test(
         SELECT x FROM t4 WHERE '1' IN (x);
     ]], {
         -- <5.9>
-        1, "Type mismatch: can not convert '1' to number"
+        1, "Type mismatch: can not convert string('1') to number"
         -- </5.9>
     })
 
@@ -395,7 +395,7 @@ test:do_catchsql_test(
         SELECT x FROM t4 WHERE '1.0' IN (x);
     ]], {
         -- <5.10>
-        1, "Type mismatch: can not convert '1.0' to number"
+        1, "Type mismatch: can not convert string('1.0') to number"
         -- </5.10>
     })
 
@@ -415,7 +415,7 @@ test:do_catchsql_test(
         SELECT x FROM t4 WHERE '1.11' IN (x);
     ]], {
         -- <5.12>
-        1, "Type mismatch: can not convert '1.11' to number"
+        1, "Type mismatch: can not convert string('1.11') to number"
         -- </5.12>
     })
 
diff --git a/test/sql-tap/uuid.test.lua b/test/sql-tap/uuid.test.lua
index c9e1b4fcc..70683a4fd 100755
--- a/test/sql-tap/uuid.test.lua
+++ b/test/sql-tap/uuid.test.lua
@@ -229,7 +229,7 @@ test:do_catchsql_test(
     [[
         SELECT ABS(u) from t2;
     ]], {
-        1, "Inconsistent types: expected number got uuid"
+        1, "Inconsistent types: expected number got uuid('11111111-1111-1111-1111-111111111111')"
     })
 
 test:do_catchsql_test(
@@ -237,7 +237,7 @@ test:do_catchsql_test(
     [[
         SELECT AVG(u) from t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_execsql_test(
@@ -337,7 +337,7 @@ test:do_catchsql_test(
     [[
         SELECT u LIKE 'a' from t2;
     ]], {
-        1, "Inconsistent types: expected string got uuid"
+        1, "Inconsistent types: expected string got uuid('11111111-1111-1111-1111-111111111111')"
     })
 
 test:do_execsql_test(
@@ -395,7 +395,7 @@ test:do_catchsql_test(
     [[
         SELECT POSITION(u, '1') from t2;
     ]], {
-        1, "Inconsistent types: expected string or varbinary got uuid"
+        1, "Inconsistent types: expected string or varbinary got uuid('11111111-1111-1111-1111-111111111111')"
     })
 
 test:do_execsql_test(
@@ -421,7 +421,7 @@ test:do_catchsql_test(
     [[
         SELECT ROUND(u) from t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_execsql_test(
@@ -445,7 +445,7 @@ test:do_catchsql_test(
     [[
         SELECT SUM(u) from t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_catchsql_test(
@@ -453,7 +453,7 @@ test:do_catchsql_test(
     [[
         SELECT TOTAL(u) from t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_execsql_test(
@@ -505,7 +505,7 @@ test:do_catchsql_test(
     [[
         SELECT u || u from t2;
     ]], {
-        1, "Inconsistent types: expected string or varbinary got uuid"
+        1, "Inconsistent types: expected string or varbinary got uuid('11111111-1111-1111-1111-111111111111')"
     })
 
 local func = {language = 'Lua', body = 'function(x) return type(x) end',
@@ -564,7 +564,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(u AS UNSIGNED) FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to unsigned"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to unsigned"
     })
 
 test:do_execsql_test(
@@ -582,7 +582,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(u AS NUMBER) FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_catchsql_test(
@@ -590,7 +590,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(u AS DOUBLE) FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to double"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to double"
     })
 
 test:do_catchsql_test(
@@ -598,7 +598,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(u AS INTEGER) FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer"
     })
 
 test:do_catchsql_test(
@@ -606,7 +606,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(u AS BOOLEAN) FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to boolean"
     })
 
 test:do_execsql_test(
@@ -641,7 +641,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(1 AS UUID);
     ]], {
-        1, "Type mismatch: can not convert 1 to uuid"
+        1, "Type mismatch: can not convert integer(1) to uuid"
     })
 
 test:do_execsql_test(
@@ -657,7 +657,7 @@ test:do_catchsql_test(
     [[
         SELECT cast('1' AS UUID);
     ]], {
-        1, "Type mismatch: can not convert '1' to uuid"
+        1, "Type mismatch: can not convert string('1') to uuid"
     })
 
 test:do_catchsql_test(
@@ -665,7 +665,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(1.5 AS UUID);
     ]], {
-        1, "Type mismatch: can not convert 1.5 to uuid"
+        1, "Type mismatch: can not convert double(1.5) to uuid"
     })
 
 test:do_catchsql_test(
@@ -673,7 +673,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(-1 AS UUID);
     ]], {
-        1, "Type mismatch: can not convert -1 to uuid"
+        1, "Type mismatch: can not convert integer(-1) to uuid"
     })
 
 test:do_catchsql_test(
@@ -681,7 +681,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(true AS UUID);
     ]], {
-        1, "Type mismatch: can not convert TRUE to uuid"
+        1, "Type mismatch: can not convert boolean(TRUE) to uuid"
     })
 
 test:do_execsql_test(
@@ -697,7 +697,7 @@ test:do_catchsql_test(
     [[
         SELECT cast(x'1234567890abcdef' as UUID) FROM t2 LIMIT 1;
     ]], {
-        1, "Type mismatch: can not convert x'1234567890ABCDEF' to uuid"
+        1, "Type mismatch: can not convert varbinary(x'1234567890ABCDEF') to uuid"
     })
 
 test:execsql([[
@@ -719,7 +719,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO tu(u) SELECT u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to unsigned"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to unsigned"
     })
 
 test:do_execsql_test(
@@ -738,7 +738,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO tn(n) SELECT u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_catchsql_test(
@@ -746,7 +746,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO td(d) SELECT u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to double"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to double"
     })
 
 test:do_catchsql_test(
@@ -754,7 +754,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO ti(i) SELECT u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer"
     })
 
 test:do_catchsql_test(
@@ -762,7 +762,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO tb(b) SELECT u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to boolean"
     })
 
 test:do_execsql_test(
@@ -800,7 +800,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO tsu VALUES ('1_unsigned', 1);
     ]], {
-        1, "Type mismatch: can not convert 1 to uuid"
+        1, "Type mismatch: can not convert integer(1) to uuid"
     })
 
 test:do_execsql_test(
@@ -817,7 +817,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO tsu VALUES ('3_string_wrong', '1');
     ]], {
-        1, "Type mismatch: can not convert '1' to uuid"
+        1, "Type mismatch: can not convert string('1') to uuid"
     })
 
 test:do_catchsql_test(
@@ -825,7 +825,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO tsu VALUES ('4_double', 1.5);
     ]], {
-        1, "Type mismatch: can not convert 1.5 to uuid"
+        1, "Type mismatch: can not convert double(1.5) to uuid"
     })
 
 test:do_catchsql_test(
@@ -833,7 +833,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO tsu VALUES ('5_integer', -1);
     ]], {
-        1, "Type mismatch: can not convert -1 to uuid"
+        1, "Type mismatch: can not convert integer(-1) to uuid"
     })
 
 test:do_catchsql_test(
@@ -841,7 +841,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO tsu VALUES ('6_boolean', true);
     ]], {
-        1, "Type mismatch: can not convert TRUE to uuid"
+        1, "Type mismatch: can not convert boolean(TRUE) to uuid"
     })
 
 test:do_execsql_test(
@@ -858,7 +858,7 @@ test:do_catchsql_test(
     [[
         INSERT INTO tsu VALUES ('8_varbinary', x'1234567890abcdef');
     ]], {
-        1, "Type mismatch: can not convert x'1234567890ABCDEF' to uuid"
+        1, "Type mismatch: can not convert varbinary(x'1234567890ABCDEF') to uuid"
     })
 
 test:execsql([[
@@ -971,7 +971,7 @@ test:do_catchsql_test(
     [[
         SELECT -u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_catchsql_test(
@@ -979,7 +979,7 @@ test:do_catchsql_test(
     [[
         SELECT u + 1 FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_catchsql_test(
@@ -987,7 +987,7 @@ test:do_catchsql_test(
     [[
         SELECT u - 1 FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_catchsql_test(
@@ -995,7 +995,7 @@ test:do_catchsql_test(
     [[
         SELECT u * 1 FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_catchsql_test(
@@ -1003,7 +1003,7 @@ test:do_catchsql_test(
     [[
         SELECT u / 1 FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 test:do_catchsql_test(
@@ -1011,7 +1011,7 @@ test:do_catchsql_test(
     [[
         SELECT u % 1 FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to number"
     })
 
 -- Check that bitwise operations work with UUIDs as intended.
@@ -1020,7 +1020,7 @@ test:do_catchsql_test(
     [[
         SELECT ~u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer"
     })
 
 test:do_catchsql_test(
@@ -1028,7 +1028,7 @@ test:do_catchsql_test(
     [[
         SELECT u >> 1 FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer"
     })
 
 test:do_catchsql_test(
@@ -1036,7 +1036,7 @@ test:do_catchsql_test(
     [[
         SELECT u << 1 FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer"
     })
 
 test:do_catchsql_test(
@@ -1044,7 +1044,7 @@ test:do_catchsql_test(
     [[
         SELECT u | 1 FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer"
     })
 
 test:do_catchsql_test(
@@ -1052,7 +1052,7 @@ test:do_catchsql_test(
     [[
         SELECT u & 1 FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to integer"
     })
 
 -- Check that logical operations work with UUIDs as intended.
@@ -1061,7 +1061,7 @@ test:do_catchsql_test(
     [[
         SELECT NOT u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to boolean"
     })
 
 test:do_catchsql_test(
@@ -1069,7 +1069,7 @@ test:do_catchsql_test(
     [[
         SELECT u AND true FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to boolean"
     })
 
 test:do_catchsql_test(
@@ -1077,7 +1077,7 @@ test:do_catchsql_test(
     [[
         SELECT u OR true FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to boolean"
     })
 
 test:do_catchsql_test(
@@ -1085,7 +1085,7 @@ test:do_catchsql_test(
     [[
         SELECT true AND u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to boolean"
     })
 
 test:do_catchsql_test(
@@ -1093,7 +1093,7 @@ test:do_catchsql_test(
     [[
         SELECT true OR u FROM t2;
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
+        1, "Type mismatch: can not convert uuid('11111111-1111-1111-1111-111111111111') to boolean"
     })
 
 -- Check that comparison with UUID works as intended.
@@ -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 integer(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 string to uuid"
+        1, "Type mismatch: can not convert string('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 double to uuid"
+        1, "Type mismatch: can not convert double(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 integer(-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 uuid('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 varbinary(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 integer(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 string to uuid"
+        1, "Type mismatch: can not convert string('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 double to uuid"
+        1, "Type mismatch: can not convert double(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 integer(-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 uuid('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 varbinary(x'31') to uuid"
     })
 
 test:execsql([[
@@ -1296,7 +1296,7 @@ test:do_catchsql_test(
     [[
         SELECT uuid('asd');
     ]], {
-        1, "Type mismatch: can not convert 'asd' to integer"
+        1, "Type mismatch: can not convert string('asd') to integer"
     })
 
 test:do_catchsql_test(
@@ -1322,7 +1322,7 @@ test:do_catchsql_test(
     [[
         SELECT CAST('11111111-1111-1111-1111-111111111111111222222222' AS UUID);
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111111222222222' to uuid"
+        1, "Type mismatch: can not convert string('11111111-1111-1111-1111-111111111111111222222222') to uuid"
     })
 
 test:do_catchsql_test(
@@ -1330,7 +1330,7 @@ test:do_catchsql_test(
     [[
         SELECT CAST('11111111-1111-1111-1111-11111' AS UUID);
     ]], {
-        1, "Type mismatch: can not convert '11111111-1111-1111-1111-11111' to uuid"
+        1, "Type mismatch: can not convert string('11111111-1111-1111-1111-11111') to uuid"
     })
 
 test:execsql([[
diff --git a/test/sql/boolean.result b/test/sql/boolean.result
index 320525d36..5594d92cb 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 string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT s FROM ts WHERE s < true;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT s FROM ts WHERE s IN (true, 1, 'abcd');
  | ---
@@ -161,7 +161,7 @@ SELECT s FROM ts WHERE s IN (true, 1, 'abcd');
 INSERT INTO ts VALUES (true, 12345);
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 
 -- Check that we can create index on field of type BOOLEAN.
@@ -276,7 +276,7 @@ SELECT is_boolean('true');
 SELECT abs(a) FROM t0;
  | ---
  | - null
- | - 'Inconsistent types: expected number got boolean'
+ | - 'Inconsistent types: expected number got boolean(FALSE)'
  | ...
 SELECT lower(a) FROM t0;
  | ---
@@ -339,7 +339,7 @@ SELECT typeof(a) FROM t0;
 SELECT AVG(a) FROM t0;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT MIN(a) FROM t0;
  | ---
@@ -360,7 +360,7 @@ SELECT MAX(a) FROM t0;
 SELECT SUM(a) FROM t0;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT COUNT(a) FROM t0;
  | ---
@@ -373,7 +373,7 @@ SELECT COUNT(a) FROM t0;
 SELECT TOTAL(a) FROM t0;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT GROUP_CONCAT(a, ' +++ ') FROM t0;
  | ---
@@ -1122,502 +1122,502 @@ SELECT a, a1, a OR a1 FROM t, t6;
 SELECT -true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT -false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT -a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 
 SELECT true + true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT true + false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT false + true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false + false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true - true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT true - false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT false - true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false - false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true * true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT true * false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT false * true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false * false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true / true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT true / false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT false / true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false / false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true % true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT true % false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT false % true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false % false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 
 SELECT a, true + a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, false + a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, true - a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, false - a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, true * a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, false * a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, true / a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, false / a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, true % a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, false % a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, a + true FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a, a + false FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, a - true FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a, a - false FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, a * true FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a, a * false FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, a / true FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a, a / false FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, a % true FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a, a % false FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 
 SELECT a, a1, a + a1 FROM t, t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, a1, a - a1 FROM t, t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, a1, a * a1 FROM t, t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, a1, a / a1 FROM t, t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a, a1, a % a1 FROM t, t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 
 SELECT ~true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT ~false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT true & true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT true & false;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT false & true;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT false & false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT true | true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT true | false;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT false | true;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT false | false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT true << true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT true << false;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT false << true;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT false << false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT true >> true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT true >> false;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT false >> true;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT false >> false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 
 SELECT a, true & a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a, false & a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, true | a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a, false | a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, true << a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a, false << a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, true >> a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a, false >> a FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a & true FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a & false FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a | true FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a | false FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a << true FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a << false FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a >> true FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a >> false FROM t;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 
 SELECT a, a1, a & a1 FROM t, t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a1, a | a1 FROM t, t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a1, a << a1 FROM t, t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a, a1, a >> a1 FROM t, t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 
 -- Check concatenate.
 SELECT true || true;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT true || false;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT false || true;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT false || false;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 
 SELECT a, true || a FROM t;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT a, false || a FROM t;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT a, a || true FROM t;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT a, a || false FROM t;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 
 SELECT a1, a1 || a1 FROM t6;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT a2, a2 || a2 FROM t6;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT a1, a2, a1 || a1 FROM t6;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT a1, a2, a2 || a2 FROM t6;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 
 -- Check comparisons.
@@ -2463,7 +2463,7 @@ INSERT INTO t7 VALUES (123);
 SELECT true AND 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT false AND 2;
  | ---
@@ -2476,17 +2476,17 @@ SELECT false AND 2;
 SELECT true OR 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT false OR 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 AND true;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 AND false;
  | ---
@@ -2499,59 +2499,59 @@ SELECT 2 AND false;
 SELECT 2 OR true;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 OR false;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 
 SELECT a1, a1 AND 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, a1 OR 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, 2 AND a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, 2 OR a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, a2 AND 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, a2 OR 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, 2 AND a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, 2 OR a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2 to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 
 SELECT b, true AND b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, false AND b FROM t7;
  | ---
@@ -2566,17 +2566,17 @@ SELECT b, false AND b FROM t7;
 SELECT b, true OR b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, false OR b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b AND true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b AND false FROM t7;
  | ---
@@ -2591,1273 +2591,1273 @@ SELECT b, b AND false FROM t7;
 SELECT b, b OR true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b OR false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 
 SELECT a1, b, a1 AND b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT a1, b, a1 OR b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT a1, b, b AND a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT a1, b, b OR a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT a2, b, a2 AND b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT a2, b, a2 OR b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT a2, b, b AND a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT a2, b, b OR a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert 123 to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 
 SELECT true + 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false + 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true - 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false - 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true * 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false * 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true / 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false / 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true % 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false % 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2 + true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2 + false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2 - true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2 - false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2 * true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2 * false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2 / true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2 / false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2 % true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2 % false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 
 SELECT a1, a1 + 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, a1 - 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, a1 * 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, a1 / 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, a1 % 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2 + a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2 - a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2 * a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2 / a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2 % a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a2, a2 + 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, a2 - 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, a2 * 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, a2 / 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, a2 % 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2 + a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2 - a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2 * a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2 / a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2 % a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 
 SELECT b, true + b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, false + b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT b, true - b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, false - b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT b, true * b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, false * b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT b, true / b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, false / b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT b, true % b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, false % b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT b, b + true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, b + false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT b, b - true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, b - false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT b, b * true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, b * false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT b, b / true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, b / false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT b, b % true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT b, b % false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 
 SELECT a1, b, a1 + b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, b, a1 - b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, b, a1 * b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, b, a1 / b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, b, a1 % b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, b, b + a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, b, b - a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, b, b * a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, b, b / a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, b, b % a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a2, b, a2 + b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, b, a2 - b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, b, a2 * b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, b, a2 / b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, b, a2 % b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, b, b + a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, b, b - a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, b, b * a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, b, b / a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, b, b % a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 
 SELECT true & 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT false & 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT true | 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT false | 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT true << 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT false << 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT true >> 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT false >> 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT 2 & true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT 2 & false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT 2 | true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT 2 | false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT 2 << true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT 2 << false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT 2 >> true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT 2 >> false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 
 SELECT a1, a1 & 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, a1 | 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, a1 << 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, a1 >> 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, 2 & a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, 2 | a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, 2 << a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, 2 >> a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a2, a2 & 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, a2 | 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, a2 << 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, a2 >> 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, 2 & a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, 2 | a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, 2 << a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, 2 >> a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 
 SELECT b, true & b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT b, false & b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT b, true | b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT b, false | b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT b, true << b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT b, false << b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT b, true >> b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT b, false >> b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT b, b & true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT b, b & false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT b, b | true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT b, b | false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT b, b << true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT b, b << false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT b, b >> true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT b, b >> false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 
 SELECT a1, b, a1 & b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, b, a1 | b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, b, a1 << b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, b, a1 >> b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, b, b & a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, b, b | a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, b, b << a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, b, b >> a1 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a2, b, a2 & b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, b, a2 | b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, b, a2 << b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, b, a2 >> b FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, b, b & a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, b, b | a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, b, b << a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT a2, b, b >> a2 FROM t6, t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 
 SELECT true > 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT false > 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT true < 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT false < 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 > true;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 > false;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 < true;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 < false;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 
 SELECT a1, a1 > 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, a1 < 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, 2 > a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, 2 < a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, a2 > 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, a2 < 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, 2 > a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, 2 < a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 
 SELECT b, true > b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, false > b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, true < b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, false < b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b > true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b > false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b < true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b < false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(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 integer(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 integer(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 integer(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 integer(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 integer(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 integer(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 integer(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 integer(123) to boolean'
  | ...
 
 SELECT true >= 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT false >= 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT true <= 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT false <= 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 >= true;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 >= false;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 <= true;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 <= false;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 
 SELECT a1, a1 >= 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, a1 <= 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, 2 >= a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, 2 <= a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, a2 >= 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, a2 <= 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, 2 >= a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, 2 <= a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 
 SELECT b, true >= b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, false >= b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, true <= b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, false <= b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b >= true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b >= false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b <= true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b <= false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(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 integer(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 integer(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 integer(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 integer(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 integer(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 integer(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 integer(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 integer(123) to boolean'
  | ...
 
 SELECT true == 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT false == 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT true != 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT false != 2;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 == true;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 == false;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 != true;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT 2 != false;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 
 SELECT a1, a1 == 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, a1 != 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, 2 == a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a1, 2 != a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, a2 == 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, a2 != 2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, 2 == a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 SELECT a2, 2 != a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(2) to boolean'
  | ...
 
 SELECT b, true == b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, false == b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, true != b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, false != b FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b == true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b == false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b != true FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(123) to boolean'
  | ...
 SELECT b, b != false FROM t7;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(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 integer(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 integer(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 integer(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 integer(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 integer(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 integer(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 integer(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 integer(123) to boolean'
  | ...
 
 SELECT true IN (0, 1, 2, 3);
@@ -3879,12 +3879,12 @@ SELECT false IN (0, 1, 2, 3);
 SELECT true IN (SELECT b FROM t7);
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to integer'
+ | - 'Type mismatch: can not convert boolean(TRUE) to integer'
  | ...
 SELECT false IN (SELECT b FROM t7);
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to integer'
+ | - 'Type mismatch: can not convert boolean(FALSE) to integer'
  | ...
 SELECT a1, a1 IN (0, 1, 2, 3) FROM t6
  | ---
@@ -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 integer(0) to boolean'
  | ...
 SELECT false BETWEEN 0 and 10;
  | ---
  | - null
- | - 'Type mismatch: can not convert unsigned to boolean'
+ | - 'Type mismatch: can not convert integer(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 integer(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 integer(0) to boolean'
  | ...
 
 -- Check interaction of BOOLEAN and NUMBER.
@@ -3932,7 +3932,7 @@ INSERT INTO t8 VALUES (4.56);
 SELECT true AND 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT false AND 2.3;
  | ---
@@ -3945,17 +3945,17 @@ SELECT false AND 2.3;
 SELECT true OR 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT false OR 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 AND true;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 AND false;
  | ---
@@ -3968,59 +3968,59 @@ SELECT 2.3 AND false;
 SELECT 2.3 OR true;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 OR false;
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 
 SELECT a1, a1 AND 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, a1 OR 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, 2.3 AND a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, 2.3 OR a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, a2 AND 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, a2 OR 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, 2.3 AND a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, 2.3 OR a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert 2.3 to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 
 SELECT c, true AND c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, false AND c FROM t8;
  | ---
@@ -4035,17 +4035,17 @@ SELECT c, false AND c FROM t8;
 SELECT c, true OR c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, false OR c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c AND true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c AND false FROM t8;
  | ---
@@ -4060,949 +4060,949 @@ SELECT c, c AND false FROM t8;
 SELECT c, c OR true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c OR false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 
 SELECT a1, c, a1 AND c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, a1 OR c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, c AND a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, c OR a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, a2 AND c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, a2 OR c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, c AND a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, c OR a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert 4.56 to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 
 SELECT true + 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false + 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true - 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false - 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true * 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false * 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true / 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false / 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT true % 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false % 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2.3 + true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2.3 + false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2.3 - true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2.3 - false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2.3 * true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2.3 * false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2.3 / true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2.3 / false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT 2.3 % true;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT 2.3 % false;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 
 SELECT a1, a1 + 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, a1 - 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, a1 * 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, a1 / 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, a1 % 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2.3 + a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2.3 - a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2.3 * a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2.3 / a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, 2.3 % a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a2, a2 + 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, a2 - 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, a2 * 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, a2 / 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, a2 % 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2.3 + a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2.3 - a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2.3 * a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2.3 / a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, 2.3 % a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 
 SELECT c, true + c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, false + c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT c, true - c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, false - c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT c, true * c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, false * c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT c, true / c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, false / c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT c, true % c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, false % c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT c, c + true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, c + false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT c, c - true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, c - false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT c, c * true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, c * false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT c, c / true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, c / false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT c, c % true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT c, c % false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 
 SELECT a1, c, a1 + c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, c, a1 - c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, c, a1 * c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, c, a1 / c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, c, a1 % c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, c, c + a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, c, c - a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, c, c * a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, c, c / a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1, c, c % a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a2, c, a2 + c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, c, a2 - c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, c, a2 * c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, c, a2 / c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, c, a2 % c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, c, c + a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, c, c - a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, c, c * a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, c, c / a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT a2, c, c % a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 
 SELECT true > 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT false > 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT true < 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT false < 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 > true;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 > false;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 < true;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 < false;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 
 SELECT a1, a1 > 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, a1 < 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, 2.3 > a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, 2.3 < a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, a2 > 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, a2 < 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, 2.3 > a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, 2.3 < a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 
 SELECT c, true > c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, false > c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, true < c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, false < c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c > true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c > false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c < true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c < false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 
 SELECT a1, c, a1 > c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, a1 < c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, c > a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, c < a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, a2 > c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, a2 < c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, c > a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, c < a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 
 SELECT true >= 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT false >= 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT true <= 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT false <= 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 >= true;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 >= false;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 <= true;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 <= false;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 
 SELECT a1, a1 >= 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, a1 <= 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, 2.3 >= a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, 2.3 <= a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, a2 >= 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, a2 <= 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, 2.3 >= a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, 2.3 <= a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 
 SELECT c, true >= c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, false >= c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, true <= c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, false <= c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c >= true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c >= false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c <= true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c <= false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 
 SELECT a1, c, a1 >= c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, a1 <= c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, c >= a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, c <= a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, a2 >= c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, a2 <= c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, c >= a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, c <= a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 
 SELECT true == 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT false == 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT true != 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT false != 2.3;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 == true;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 == false;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 != true;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT 2.3 != false;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 
 SELECT a1, a1 == 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, a1 != 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, 2.3 == a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a1, 2.3 != a1 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, a2 == 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, a2 != 2.3 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, 2.3 == a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 SELECT a2, 2.3 != a2 FROM t6
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(2.3) to boolean'
  | ...
 
 SELECT c, true == c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, false == c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, true != c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, false != c FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c == true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c == false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c != true FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT c, c != false FROM t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 
 SELECT a1, c, a1 == c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, a1 != c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, c == a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a1, c, c != a1 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, a2 == c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, a2 != c FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, c == a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 SELECT a2, c, c != a2 FROM t6, t8;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(4.56) to boolean'
  | ...
 
 SELECT true IN (0.1, 1.2, 2.3, 3.4);
@@ -5040,43 +5040,43 @@ SELECT a2 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1;
 SELECT true IN (SELECT c FROM t8);
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 SELECT false IN (SELECT c FROM t8);
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a1 IN (SELECT c FROM t8) FROM t6 LIMIT 1;
  | ---
  | - null
- | - 'Type mismatch: can not convert FALSE to number'
+ | - 'Type mismatch: can not convert boolean(FALSE) to number'
  | ...
 SELECT a2 IN (SELECT c FROM t8) FROM t6 LIMIT 1;
  | ---
  | - null
- | - 'Type mismatch: can not convert TRUE to number'
+ | - 'Type mismatch: can not convert boolean(TRUE) to number'
  | ...
 
 SELECT true BETWEEN 0.1 and 9.9;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(0.1) to boolean'
  | ...
 SELECT false BETWEEN 0.1 and 9.9;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(0.1) to boolean'
  | ...
 SELECT a1, a1 BETWEEN 0.1 and 9.9 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(0.1) to boolean'
  | ...
 SELECT a2, a2 BETWEEN 0.1 and 9.9 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert double to boolean'
+ | - 'Type mismatch: can not convert double(0.1) to boolean'
  | ...
 
 -- Check interaction of BOOLEAN and TEXT.
@@ -5092,7 +5092,7 @@ INSERT INTO t9 VALUES ('AsdF');
 SELECT true AND 'abc';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT false AND 'abc';
  | ---
@@ -5105,17 +5105,17 @@ SELECT false AND 'abc';
 SELECT true OR 'abc';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT false OR 'abc';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT 'abc' AND true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT 'abc' AND false;
  | ---
@@ -5128,59 +5128,59 @@ SELECT 'abc' AND false;
 SELECT 'abc' OR true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT 'abc' OR false;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 
 SELECT a1, a1 AND 'abc' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT a1, a1 OR 'abc' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT a1, 'abc' AND a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT a1, 'abc' OR a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT a2, a2 AND 'abc' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT a2, a2 OR 'abc' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT a2, 'abc' AND a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT a2, 'abc' OR a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''abc'' to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 
 SELECT d, true AND d FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, false AND d FROM t9;
  | ---
@@ -5195,17 +5195,17 @@ SELECT d, false AND d FROM t9;
 SELECT d, true OR d FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, false OR d FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, d AND true FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, d AND false FROM t9;
  | ---
@@ -5220,239 +5220,239 @@ SELECT d, d AND false FROM t9;
 SELECT d, d OR true FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, d OR false FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 
 SELECT a1, d, a1 AND d FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a1, d, a1 OR d FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a1, d, d AND a1 FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a1, d, d OR a1 FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a2, d, a2 AND d FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a2, d, a2 OR d FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a2, d, d AND a2 FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a2, d, d OR a2 FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''AsdF'' to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 
 SELECT true > 'abc';
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT false > 'abc';
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT true < 'abc';
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT false < 'abc';
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT 'abc' > true;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT 'abc' > false;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT 'abc' < true;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 SELECT 'abc' < false;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''abc'') to boolean'
  | ...
 
 SELECT d, true > d FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, false > d FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, true < d FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, false < d FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, d > true FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, d > false FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, d < true FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT d, d < false FROM t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 
 SELECT a1, d, a1 > d FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a1, d, a1 < d FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a1, d, d > a1 FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a1, d, d < a1 FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a2, d, a2 > d FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a2, d, a2 < d FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a2, d, d > a2 FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 SELECT a2, d, d < a2 FROM t6, t9;
  | ---
  | - null
- | - 'Type mismatch: can not convert string to boolean'
+ | - 'Type mismatch: can not convert string(''AsdF'') to boolean'
  | ...
 
 SELECT true || 'abc';
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT false || 'abc';
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT 'abc' || false;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT 'abc' || true;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 
 SELECT d, true || d FROM t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT d, false || d FROM t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT d, d || false FROM t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT d, d || true FROM t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 
 SELECT d, a1 || d FROM t6, t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT d, a2 || d FROM t6, t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 SELECT d, d || a1 FROM t6, t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(FALSE)'
  | ...
 SELECT d, d || a2 FROM t6, t9;
  | ---
  | - null
- | - 'Inconsistent types: expected string or varbinary got boolean'
+ | - 'Inconsistent types: expected string or varbinary got boolean(TRUE)'
  | ...
 
 --
@@ -5467,7 +5467,7 @@ INSERT INTO t9 VALUES ('TRUE'), ('true'), ('FALSE'), ('false');
 SELECT true AND 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT false AND 'TRUE';
  | ---
@@ -5480,17 +5480,17 @@ SELECT false AND 'TRUE';
 SELECT true OR 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT false OR 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT 'TRUE' AND true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT 'TRUE' AND false;
  | ---
@@ -5503,59 +5503,59 @@ SELECT 'TRUE' AND false;
 SELECT 'TRUE' OR true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT 'TRUE' OR false;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 
 SELECT a1, a1 AND 'TRUE' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a1, a1 OR 'TRUE' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a1, 'TRUE' AND a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a1, 'TRUE' OR a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a2, a2 AND 'TRUE' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a2, a2 OR 'TRUE' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a2, 'TRUE' AND a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a2, 'TRUE' OR a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 
 SELECT d, true AND d FROM t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
  | ---
@@ -5570,17 +5570,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
 SELECT d, true OR d FROM t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT d, false OR d FROM t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT d, d AND true FROM t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
  | ---
@@ -5595,59 +5595,59 @@ SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
 SELECT d, d OR true FROM t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT d, d OR false FROM t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 
 SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'TRUE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''TRUE'' to boolean'
+ | - 'Type mismatch: can not convert string(''TRUE'') to boolean'
  | ...
 
 SELECT true AND 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT false AND 'true';
  | ---
@@ -5660,17 +5660,17 @@ SELECT false AND 'true';
 SELECT true OR 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT false OR 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT 'true' AND true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT 'true' AND false;
  | ---
@@ -5683,59 +5683,59 @@ SELECT 'true' AND false;
 SELECT 'true' OR true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT 'true' OR false;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 
 SELECT a1, a1 AND 'true' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a1, a1 OR 'true' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a1, 'true' AND a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a1, 'true' OR a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a2, a2 AND 'true' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a2, a2 OR 'true' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a2, 'true' AND a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a2, 'true' OR a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 
 SELECT d, true AND d FROM t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT d, false AND d FROM t9 WHERE d = 'true';
  | ---
@@ -5750,17 +5750,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'true';
 SELECT d, true OR d FROM t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT d, false OR d FROM t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT d, d AND true FROM t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT d, d AND false FROM t9 WHERE d = 'true';
  | ---
@@ -5775,59 +5775,59 @@ SELECT d, d AND false FROM t9 WHERE d = 'true';
 SELECT d, d OR true FROM t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT d, d OR false FROM t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 
 SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'true';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''true'' to boolean'
+ | - 'Type mismatch: can not convert string(''true'') to boolean'
  | ...
 
 SELECT true AND 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT false AND 'FALSE';
  | ---
@@ -5840,17 +5840,17 @@ SELECT false AND 'FALSE';
 SELECT true OR 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT false OR 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT 'FALSE' AND true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT 'FALSE' AND false;
  | ---
@@ -5863,59 +5863,59 @@ SELECT 'FALSE' AND false;
 SELECT 'FALSE' OR true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT 'FALSE' OR false;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 
 SELECT a1, a1 AND 'FALSE' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a1, a1 OR 'FALSE' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a1, 'FALSE' AND a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a1, 'FALSE' OR a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a2, a2 AND 'FALSE' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a2, a2 OR 'FALSE' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a2, 'FALSE' AND a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a2, 'FALSE' OR a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 
 SELECT d, true AND d FROM t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
  | ---
@@ -5930,17 +5930,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
 SELECT d, true OR d FROM t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT d, false OR d FROM t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT d, d AND true FROM t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
  | ---
@@ -5955,59 +5955,59 @@ SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
 SELECT d, d OR true FROM t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT d, d OR false FROM t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 
 SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'FALSE';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''FALSE'' to boolean'
+ | - 'Type mismatch: can not convert string(''FALSE'') to boolean'
  | ...
 
 SELECT true AND 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT false AND 'false';
  | ---
@@ -6020,17 +6020,17 @@ SELECT false AND 'false';
 SELECT true OR 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT false OR 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT 'false' AND true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT 'false' AND false;
  | ---
@@ -6043,59 +6043,59 @@ SELECT 'false' AND false;
 SELECT 'false' OR true;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT 'false' OR false;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 
 SELECT a1, a1 AND 'false' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a1, a1 OR 'false' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a1, 'false' AND a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a1, 'false' OR a1 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a2, a2 AND 'false' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a2, a2 OR 'false' FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a2, 'false' AND a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a2, 'false' OR a2 FROM t6;
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 
 SELECT d, true AND d FROM t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT d, false AND d FROM t9 WHERE d = 'false';
  | ---
@@ -6110,17 +6110,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'false';
 SELECT d, true OR d FROM t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT d, false OR d FROM t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT d, d AND true FROM t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT d, d AND false FROM t9 WHERE d = 'false';
  | ---
@@ -6135,53 +6135,53 @@ SELECT d, d AND false FROM t9 WHERE d = 'false';
 SELECT d, d OR true FROM t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT d, d OR false FROM t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 
 SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'false';
  | ---
  | - null
- | - 'Type mismatch: can not convert ''false'' to boolean'
+ | - 'Type mismatch: can not convert string(''false'') to boolean'
  | ...
 
 -- Cleaning.
diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result
index c5de00fd5..8cad30ef3 100644
--- a/test/sql/integer-overflow.result
+++ b/test/sql/integer-overflow.result
@@ -106,7 +106,7 @@ box.execute('SELECT CAST(\'9223372036854775808\' AS INTEGER);')
 box.execute('SELECT CAST(\'18446744073709551616\' AS INTEGER);')
 ---
 - null
-- 'Type mismatch: can not convert ''18446744073709551616'' to integer'
+- 'Type mismatch: can not convert string(''18446744073709551616'') to integer'
 ...
 -- Due to inexact represantation of large integers in terms of
 -- floating point numbers, numerics with value < UINT64_MAX
@@ -117,7 +117,7 @@ box.execute('SELECT CAST(\'18446744073709551616\' AS INTEGER);')
 box.execute('SELECT CAST(18446744073709551600. AS INTEGER);')
 ---
 - null
-- 'Type mismatch: can not convert 1.84467440737096e+19 to integer'
+- 'Type mismatch: can not convert double(1.84467440737096e+19) to integer'
 ...
 -- gh-3810: make sure that if space contains integers in range
 -- [INT64_MAX, UINT64_MAX], they are handled inside SQL in a
diff --git a/test/sql/persistency.result b/test/sql/persistency.result
index fab94301d..bfd00e764 100644
--- a/test/sql/persistency.result
+++ b/test/sql/persistency.result
@@ -371,7 +371,7 @@ box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
 box.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
 ---
 - null
-- 'Type mismatch: can not convert ''foobar trigger test'' to integer'
+- 'Type mismatch: can not convert string(''foobar trigger test'') to integer'
 ...
 box.execute("SELECT * FROM barfoo WHERE foo = 9999");
 ---
diff --git a/test/sql/types.result b/test/sql/types.result
index a9a5fd536..a0b8668be 100644
--- a/test/sql/types.result
+++ b/test/sql/types.result
@@ -158,39 +158,39 @@ sp:drop()
 box.execute("SELECT 'abc' || 1;")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got unsigned'
+- 'Inconsistent types: expected string or varbinary got integer(1)'
 ...
 box.execute("SELECT 'abc' || 1.123;")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got double'
+- 'Inconsistent types: expected string or varbinary got double(1.123)'
 ...
 box.execute("SELECT 1 || 'abc';")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got unsigned'
+- 'Inconsistent types: expected string or varbinary got integer(1)'
 ...
 box.execute("SELECT 1.123 || 'abc';")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got double'
+- 'Inconsistent types: expected string or varbinary got double(1.123)'
 ...
 box.execute("SELECt 'a' || 'b' || 1;")
 ---
 - null
-- 'Inconsistent types: expected string or varbinary got unsigned'
+- 'Inconsistent types: expected string or varbinary got integer(1)'
 ...
 -- What is more, they must be of the same type.
 --
 box.execute("SELECT 'abc' || randomblob(5);")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''819192E578'')'
 ...
 box.execute("SELECT randomblob(5) || 'x';")
 ---
 - null
-- 'Inconsistent types: expected varbinary got string'
+- 'Inconsistent types: expected varbinary got string(''x'')'
 ...
 -- Result of BLOBs concatenation must be BLOB.
 --
@@ -215,17 +215,17 @@ box.execute("INSERT INTO t1 VALUES (randomblob(5));")
 box.execute("SELECT * FROM t1 WHERE s LIKE 'blob';")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''91A0FEE366'')'
 ...
 box.execute("SELECT * FROM t1 WHERE 'blob' LIKE s;")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''91A0FEE366'')'
 ...
 box.execute("SELECT * FROM t1 WHERE 'blob' LIKE x'0000';")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''0000'')'
 ...
 box.execute("SELECT s LIKE NULL FROM t1;")
 ---
@@ -246,12 +246,12 @@ box.execute("INSERT INTO t1 VALUES (1);")
 box.execute("SELECT * FROM t1 WHERE s LIKE 'int';")
 ---
 - null
-- 'Inconsistent types: expected string got unsigned'
+- 'Inconsistent types: expected string got integer(1)'
 ...
 box.execute("SELECT * FROM t1 WHERE 'int' LIKE 4;")
 ---
 - null
-- 'Inconsistent types: expected string got unsigned'
+- 'Inconsistent types: expected string got integer(4)'
 ...
 box.execute("SELECT NULL LIKE s FROM t1;")
 ---
@@ -270,7 +270,7 @@ box.space.T1:drop()
 box.execute("SELECT CAST('1.123' AS INTEGER);")
 ---
 - null
-- 'Type mismatch: can not convert ''1.123'' to integer'
+- 'Type mismatch: can not convert string(''1.123'') to integer'
 ...
 box.execute("CREATE TABLE t1 (f TEXT PRIMARY KEY);")
 ---
@@ -283,7 +283,7 @@ box.execute("INSERT INTO t1 VALUES('0.0'), ('1.5'), ('3.9312453');")
 box.execute("SELECT CAST(f AS INTEGER) FROM t1;")
 ---
 - null
-- 'Type mismatch: can not convert ''0.0'' to integer'
+- 'Type mismatch: can not convert string(''0.0'') to integer'
 ...
 box.space.T1:drop()
 ---
@@ -339,22 +339,22 @@ box.execute("INSERT INTO tboolean VALUES (TRUE);")
 box.execute("SELECT * FROM tboolean WHERE s1 = x'44';")
 ---
 - null
-- 'Type mismatch: can not convert x''44'' to boolean'
+- 'Type mismatch: can not convert varbinary(x''44'') to boolean'
 ...
 box.execute("SELECT * FROM tboolean WHERE s1 = 'abc';")
 ---
 - null
-- 'Type mismatch: can not convert ''abc'' to boolean'
+- 'Type mismatch: can not convert string(''abc'') to boolean'
 ...
 box.execute("SELECT * FROM tboolean WHERE s1 = 1;")
 ---
 - null
-- 'Type mismatch: can not convert unsigned to boolean'
+- 'Type mismatch: can not convert integer(1) to boolean'
 ...
 box.execute("SELECT * FROM tboolean WHERE s1 = 1.123;")
 ---
 - null
-- 'Type mismatch: can not convert double to boolean'
+- 'Type mismatch: can not convert double(1.123) to boolean'
 ...
 box.space.TBOOLEAN:drop()
 ---
@@ -632,7 +632,7 @@ box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;")
 box.execute("SELECT CAST('18446744073' || '709551616' AS INTEGER);")
 ---
 - null
-- 'Type mismatch: can not convert ''18446744073709551616'' to integer'
+- 'Type mismatch: can not convert string(''18446744073709551616'') to integer'
 ...
 box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
 ---
@@ -1062,7 +1062,7 @@ box.execute("INSERT INTO t1 VALUES (0), (1), (2);")
 box.execute("INSERT INTO t1 VALUES (-3);")
 ---
 - null
-- 'Type mismatch: can not convert -3 to unsigned'
+- 'Type mismatch: can not convert integer(-3) to unsigned'
 ...
 box.execute("SELECT id FROM t1;")
 ---
@@ -1085,7 +1085,7 @@ box.execute("SELECT CAST(123 AS UNSIGNED);")
 box.execute("SELECT CAST(-123 AS UNSIGNED);")
 ---
 - null
-- 'Type mismatch: can not convert -123 to unsigned'
+- 'Type mismatch: can not convert integer(-123) to unsigned'
 ...
 box.execute("SELECT CAST(1.5 AS UNSIGNED);")
 ---
@@ -1122,7 +1122,7 @@ box.execute("SELECT CAST('123' AS UNSIGNED);")
 box.execute("SELECT CAST('-123' AS UNSIGNED);")
 ---
 - null
-- 'Type mismatch: can not convert ''-123'' to unsigned'
+- 'Type mismatch: can not convert string(''-123'') to unsigned'
 ...
 box.space.T1:drop()
 ---
@@ -1216,22 +1216,22 @@ box.execute("CREATE TABLE t (id INT PRIMARY KEY, v VARBINARY);")
 box.execute("INSERT INTO t VALUES(1, 1);")
 ---
 - null
-- 'Type mismatch: can not convert 1 to varbinary'
+- 'Type mismatch: can not convert integer(1) to varbinary'
 ...
 box.execute("INSERT INTO t VALUES(1, 1.123);")
 ---
 - null
-- 'Type mismatch: can not convert 1.123 to varbinary'
+- 'Type mismatch: can not convert double(1.123) to varbinary'
 ...
 box.execute("INSERT INTO t VALUES(1, true);")
 ---
 - null
-- 'Type mismatch: can not convert TRUE to varbinary'
+- 'Type mismatch: can not convert boolean(TRUE) to varbinary'
 ...
 box.execute("INSERT INTO t VALUES(1, 'asd');")
 ---
 - null
-- 'Type mismatch: can not convert ''asd'' to varbinary'
+- 'Type mismatch: can not convert string(''asd'') to varbinary'
 ...
 box.execute("INSERT INTO t VALUES(1, x'616263');")
 ---
@@ -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 integer(1) to varbinary'
 ...
 box.execute("SELECT * FROM t WHERE v = 1.123")
 ---
 - null
-- 'Type mismatch: can not convert double to varbinary'
+- 'Type mismatch: can not convert double(1.123) to varbinary'
 ...
 box.execute("SELECT * FROM t WHERE v = 'str'")
 ---
 - null
-- 'Type mismatch: can not convert string to varbinary'
+- 'Type mismatch: can not convert string(''str'') to varbinary'
 ...
 box.execute("SELECT * FROM t WHERE v = x'616263'")
 ---
@@ -1265,17 +1265,17 @@ box.execute("SELECT * FROM t WHERE v = x'616263'")
 box.execute("SELECT sum(v) FROM t;")
 ---
 - null
-- 'Type mismatch: can not convert x''616263'' to number'
+- 'Type mismatch: can not convert varbinary(x''616263'') to number'
 ...
 box.execute("SELECT avg(v) FROM t;")
 ---
 - null
-- 'Type mismatch: can not convert x''616263'' to number'
+- 'Type mismatch: can not convert varbinary(x''616263'') to number'
 ...
 box.execute("SELECT total(v) FROM t;")
 ---
 - null
-- 'Type mismatch: can not convert x''616263'' to number'
+- 'Type mismatch: can not convert varbinary(x''616263'') to number'
 ...
 box.execute("SELECT min(v) FROM t;")
 ---
@@ -1312,17 +1312,17 @@ box.execute("SELECT group_concat(v) FROM t;")
 box.execute("SELECT lower(v) FROM t;")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''616263'')'
 ...
 box.execute("SELECT upper(v) FROM t;")
 ---
 - null
-- 'Inconsistent types: expected string got varbinary'
+- 'Inconsistent types: expected string got varbinary(x''616263'')'
 ...
 box.execute("SELECT abs(v) FROM t;")
 ---
 - null
-- 'Inconsistent types: expected number got varbinary'
+- 'Inconsistent types: expected number got varbinary(x''616263'')'
 ...
 box.execute("SELECT typeof(v) FROM t;")
 ---
@@ -1448,17 +1448,17 @@ box.space.T1:drop()
 box.execute("SELECT CAST(1 AS VARBINARY);")
 ---
 - null
-- 'Type mismatch: can not convert 1 to varbinary'
+- 'Type mismatch: can not convert integer(1) to varbinary'
 ...
 box.execute("SELECT CAST(1.123 AS VARBINARY);")
 ---
 - null
-- 'Type mismatch: can not convert 1.123 to varbinary'
+- 'Type mismatch: can not convert double(1.123) to varbinary'
 ...
 box.execute("SELECT CAST(true AS VARBINARY);")
 ---
 - null
-- 'Type mismatch: can not convert TRUE to varbinary'
+- 'Type mismatch: can not convert boolean(TRUE) to varbinary'
 ...
 box.execute("SELECT CAST('asd' AS VARBINARY);")
 ---
@@ -1613,7 +1613,7 @@ s:insert({1, {1,2,3}})
 box.execute('INSERT INTO t1(a) SELECT a FROM t2;')
 ---
 - null
-- 'Type mismatch: can not convert [1, 2, 3] to scalar'
+- 'Type mismatch: can not convert array([1, 2, 3]) to scalar'
 ...
 s:replace({1, {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30}})
 ---
@@ -1623,8 +1623,8 @@ s:replace({1, {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
 box.execute('INSERT INTO t1(a) SELECT a FROM t2;')
 ---
 - null
-- 'Type mismatch: can not convert [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-  15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30] to scalar'
+- 'Type mismatch: can not convert array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+  14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) to scalar'
 ...
 --
 -- Make sure that the error will be displayed correctly even if
@@ -1649,9 +1649,9 @@ s:replace({1, long_array})
 box.execute('INSERT INTO t1(a) SELECT a FROM t2;')
 ---
 - null
-- 'Type mismatch: can not convert [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-  15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
-  ... to scalar'
+- 'Type mismatch: can not convert array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+  14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
+  34, ...) to scalar'
 ...
 s:drop()
 ---
@@ -1672,7 +1672,7 @@ s:insert({1, {b = 1}})
 box.execute('INSERT INTO t1(a) SELECT a FROM t2;')
 ---
 - null
-- 'Type mismatch: can not convert {"b": 1} to scalar'
+- 'Type mismatch: can not convert map({"b": 1}) to scalar'
 ...
 s:drop()
 ---
@@ -1717,12 +1717,12 @@ box.execute("SELECT CAST(1.123 AS DOUBLE);")
 box.execute("SELECT CAST(true AS DOUBLE);")
 ---
 - null
-- 'Type mismatch: can not convert TRUE to double'
+- 'Type mismatch: can not convert boolean(TRUE) to double'
 ...
 box.execute("SELECT CAST('asd' AS DOUBLE);")
 ---
 - null
-- 'Type mismatch: can not convert ''asd'' to double'
+- 'Type mismatch: can not convert string(''asd'') to double'
 ...
 box.execute("SELECT CAST('1' AS DOUBLE);")
 ---
@@ -1743,12 +1743,12 @@ box.execute("SELECT CAST('1.123' AS DOUBLE);")
 box.execute("SELECT CAST(x'' AS DOUBLE);")
 ---
 - null
-- 'Type mismatch: can not convert x'''' to double'
+- 'Type mismatch: can not convert varbinary(x'''') to double'
 ...
 box.execute("SELECT CAST(x'35' AS DOUBLE);")
 ---
 - null
-- 'Type mismatch: can not convert x''35'' to double'
+- 'Type mismatch: can not convert varbinary(x''35'') to double'
 ...
 box.execute("SELECT CAST(CAST(x'35' AS STRING) AS DOUBLE);")
 ---
@@ -2193,7 +2193,7 @@ box.execute([[INSERT INTO ti(i) VALUES (11);]])
 box.execute([[INSERT INTO ti(i) VALUES (100000000000000000000000000000000.1);]])
 ---
 - null
-- 'Type mismatch: can not convert 1.0e+32 to integer'
+- 'Type mismatch: can not convert double(1.0e+32) to integer'
 ...
 box.execute([[INSERT INTO ti(i) VALUES (33.0);]])
 ---
@@ -2204,17 +2204,17 @@ box.execute([[INSERT INTO ti(i) VALUES (33.0);]])
 box.execute([[INSERT INTO ti(i) VALUES (true);]])
 ---
 - null
-- 'Type mismatch: can not convert TRUE to integer'
+- 'Type mismatch: can not convert boolean(TRUE) to integer'
 ...
 box.execute([[INSERT INTO ti(i) VALUES ('33');]])
 ---
 - null
-- 'Type mismatch: can not convert ''33'' to integer'
+- 'Type mismatch: can not convert string(''33'') to integer'
 ...
 box.execute([[INSERT INTO ti(i) VALUES (X'3434');]])
 ---
 - null
-- 'Type mismatch: can not convert x''3434'' to integer'
+- 'Type mismatch: can not convert varbinary(x''3434'') to integer'
 ...
 box.execute([[SELECT * FROM ti;]])
 ---
@@ -2254,17 +2254,17 @@ box.execute([[INSERT INTO td(d) VALUES (22.2);]])
 box.execute([[INSERT INTO td(d) VALUES (true);]])
 ---
 - null
-- 'Type mismatch: can not convert TRUE to double'
+- 'Type mismatch: can not convert boolean(TRUE) to double'
 ...
 box.execute([[INSERT INTO td(d) VALUES ('33');]])
 ---
 - null
-- 'Type mismatch: can not convert ''33'' to double'
+- 'Type mismatch: can not convert string(''33'') to double'
 ...
 box.execute([[INSERT INTO td(d) VALUES (X'3434');]])
 ---
 - null
-- 'Type mismatch: can not convert x''3434'' to double'
+- 'Type mismatch: can not convert varbinary(x''3434'') to double'
 ...
 box.execute([[SELECT * FROM td;]])
 ---
@@ -2287,12 +2287,12 @@ box.execute([[INSERT INTO tb(b) VALUES (NULL);]])
 box.execute([[INSERT INTO tb(b) VALUES (11);]])
 ---
 - null
-- 'Type mismatch: can not convert 11 to boolean'
+- 'Type mismatch: can not convert integer(11) to boolean'
 ...
 box.execute([[INSERT INTO tb(b) VALUES (22.2);]])
 ---
 - null
-- 'Type mismatch: can not convert 22.2 to boolean'
+- 'Type mismatch: can not convert double(22.2) to boolean'
 ...
 box.execute([[INSERT INTO tb(b) VALUES (true);]])
 ---
@@ -2303,12 +2303,12 @@ box.execute([[INSERT INTO tb(b) VALUES (true);]])
 box.execute([[INSERT INTO tb(b) VALUES ('33');]])
 ---
 - null
-- 'Type mismatch: can not convert ''33'' to boolean'
+- 'Type mismatch: can not convert string(''33'') to boolean'
 ...
 box.execute([[INSERT INTO tb(b) VALUES (X'3434');]])
 ---
 - null
-- 'Type mismatch: can not convert x''3434'' to boolean'
+- 'Type mismatch: can not convert varbinary(x''3434'') to boolean'
 ...
 box.execute([[SELECT * FROM tb;]])
 ---
@@ -2330,17 +2330,17 @@ box.execute([[INSERT INTO tt(t) VALUES (NULL);]])
 box.execute([[INSERT INTO tt(t) VALUES (11);]])
 ---
 - null
-- 'Type mismatch: can not convert 11 to string'
+- 'Type mismatch: can not convert integer(11) to string'
 ...
 box.execute([[INSERT INTO tt(t) VALUES (22.2);]])
 ---
 - null
-- 'Type mismatch: can not convert 22.2 to string'
+- 'Type mismatch: can not convert double(22.2) to string'
 ...
 box.execute([[INSERT INTO tt(t) VALUES (true);]])
 ---
 - null
-- 'Type mismatch: can not convert TRUE to string'
+- 'Type mismatch: can not convert boolean(TRUE) to string'
 ...
 box.execute([[INSERT INTO tt(t) VALUES ('33');]])
 ---
@@ -2351,7 +2351,7 @@ box.execute([[INSERT INTO tt(t) VALUES ('33');]])
 box.execute([[INSERT INTO tt(t) VALUES (X'3434');]])
 ---
 - null
-- 'Type mismatch: can not convert x''3434'' to string'
+- 'Type mismatch: can not convert varbinary(x''3434'') to string'
 ...
 box.execute([[SELECT * FROM tt;]])
 ---
@@ -2373,22 +2373,22 @@ box.execute([[INSERT INTO tv(v) VALUES (NULL);]])
 box.execute([[INSERT INTO tv(v) VALUES (11);]])
 ---
 - null
-- 'Type mismatch: can not convert 11 to varbinary'
+- 'Type mismatch: can not convert integer(11) to varbinary'
 ...
 box.execute([[INSERT INTO tv(v) VALUES (22.2);]])
 ---
 - null
-- 'Type mismatch: can not convert 22.2 to varbinary'
+- 'Type mismatch: can not convert double(22.2) to varbinary'
 ...
 box.execute([[INSERT INTO tv(v) VALUES (true);]])
 ---
 - null
-- 'Type mismatch: can not convert TRUE to varbinary'
+- 'Type mismatch: can not convert boolean(TRUE) to varbinary'
 ...
 box.execute([[INSERT INTO tv(v) VALUES ('33');]])
 ---
 - null
-- 'Type mismatch: can not convert ''33'' to varbinary'
+- 'Type mismatch: can not convert string(''33'') to varbinary'
 ...
 box.execute([[INSERT INTO tv(v) VALUES (X'3434');]])
 ---
@@ -2548,7 +2548,7 @@ box.execute([[UPDATE ti SET i = 11 WHERE a = 1;]])
 box.execute([[UPDATE ti SET i = 100000000000000000000000000000000.1 WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert 1.0e+32 to integer'
+- 'Type mismatch: can not convert double(1.0e+32) to integer'
 ...
 box.execute([[UPDATE ti SET i = 33.0 WHERE a = 1;]])
 ---
@@ -2557,17 +2557,17 @@ box.execute([[UPDATE ti SET i = 33.0 WHERE a = 1;]])
 box.execute([[UPDATE ti SET i = true WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert TRUE to integer'
+- 'Type mismatch: can not convert boolean(TRUE) to integer'
 ...
 box.execute([[UPDATE ti SET i = '33' WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert ''33'' to integer'
+- 'Type mismatch: can not convert string(''33'') to integer'
 ...
 box.execute([[UPDATE ti SET i = X'3434' WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert x''3434'' to integer'
+- 'Type mismatch: can not convert varbinary(x''3434'') to integer'
 ...
 box.execute([[SELECT * FROM ti;]])
 ---
@@ -2598,17 +2598,17 @@ box.execute([[UPDATE td SET d = 22.2 WHERE a = 1;]])
 box.execute([[UPDATE td SET d = true WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert TRUE to double'
+- 'Type mismatch: can not convert boolean(TRUE) to double'
 ...
 box.execute([[UPDATE td SET d = '33' WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert ''33'' to double'
+- 'Type mismatch: can not convert string(''33'') to double'
 ...
 box.execute([[UPDATE td SET d = X'3434' WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert x''3434'' to double'
+- 'Type mismatch: can not convert varbinary(x''3434'') to double'
 ...
 box.execute([[SELECT * FROM td;]])
 ---
@@ -2627,12 +2627,12 @@ box.execute([[UPDATE tb SET b = NULL WHERE a = 1;]])
 box.execute([[UPDATE tb SET b = 11 WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert 11 to boolean'
+- 'Type mismatch: can not convert integer(11) to boolean'
 ...
 box.execute([[UPDATE tb SET b = 22.2 WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert 22.2 to boolean'
+- 'Type mismatch: can not convert double(22.2) to boolean'
 ...
 box.execute([[UPDATE tb SET b = true WHERE a = 1;]])
 ---
@@ -2641,12 +2641,12 @@ box.execute([[UPDATE tb SET b = true WHERE a = 1;]])
 box.execute([[UPDATE tb SET b = '33' WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert ''33'' to boolean'
+- 'Type mismatch: can not convert string(''33'') to boolean'
 ...
 box.execute([[UPDATE tb SET b = X'3434' WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert x''3434'' to boolean'
+- 'Type mismatch: can not convert varbinary(x''3434'') to boolean'
 ...
 box.execute([[SELECT * FROM tb;]])
 ---
@@ -2665,17 +2665,17 @@ box.execute([[UPDATE tt SET t = NULL WHERE a = 1;]])
 box.execute([[UPDATE tt SET t = 11 WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert 11 to string'
+- 'Type mismatch: can not convert integer(11) to string'
 ...
 box.execute([[UPDATE tt SET t = 22.2 WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert 22.2 to string'
+- 'Type mismatch: can not convert double(22.2) to string'
 ...
 box.execute([[UPDATE tt SET t = true WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert TRUE to string'
+- 'Type mismatch: can not convert boolean(TRUE) to string'
 ...
 box.execute([[UPDATE tt SET t = '33' WHERE a = 1;]])
 ---
@@ -2684,7 +2684,7 @@ box.execute([[UPDATE tt SET t = '33' WHERE a = 1;]])
 box.execute([[UPDATE tt SET t = X'3434' WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert x''3434'' to string'
+- 'Type mismatch: can not convert varbinary(x''3434'') to string'
 ...
 box.execute([[SELECT * FROM tt;]])
 ---
@@ -2703,22 +2703,22 @@ box.execute([[UPDATE tv SET v = NULL WHERE a = 1;]])
 box.execute([[UPDATE tv SET v = 11 WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert 11 to varbinary'
+- 'Type mismatch: can not convert integer(11) to varbinary'
 ...
 box.execute([[UPDATE tv SET v = 22.2 WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert 22.2 to varbinary'
+- 'Type mismatch: can not convert double(22.2) to varbinary'
 ...
 box.execute([[UPDATE tv SET v = true WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert TRUE to varbinary'
+- 'Type mismatch: can not convert boolean(TRUE) to varbinary'
 ...
 box.execute([[UPDATE tv SET v = '33' WHERE a = 1;]])
 ---
 - null
-- 'Type mismatch: can not convert ''33'' to varbinary'
+- 'Type mismatch: can not convert string(''33'') to varbinary'
 ...
 box.execute([[UPDATE tv SET v = X'3434' WHERE a = 1;]])
 ---

  reply	other threads:[~2021-07-12  8:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 15:27 [Tarantool-patches] [PATCH v2 0/4] sql: fix description of type mismatch error Mergen Imeev via Tarantool-patches
2021-07-05 15:27 ` [Tarantool-patches] [PATCH v2 1/4] sql: truncate values in " Mergen Imeev via Tarantool-patches
2021-07-07 22:09   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-12  8:50     ` Mergen Imeev via Tarantool-patches
2021-07-05 15:27 ` [Tarantool-patches] [PATCH v2 2/4] sql: properly show " Mergen Imeev via Tarantool-patches
2021-07-07 22:09   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-12  8:56     ` Mergen Imeev via Tarantool-patches
2021-07-05 15:27 ` [Tarantool-patches] [PATCH v2 3/4] sql: use proper type names in error descriptions Mergen Imeev via Tarantool-patches
2021-07-05 15:27 ` [Tarantool-patches] [PATCH v2 4/4] sql: make type mismatch error more informative Mergen Imeev via Tarantool-patches
2021-07-07 22:10   ` Vladislav Shpilevoy via Tarantool-patches
2021-07-12  8:58     ` Mergen Imeev via Tarantool-patches [this message]
2021-07-12 21:38 ` [Tarantool-patches] [PATCH v2 0/4] sql: fix description of type mismatch error Vladislav Shpilevoy 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=20210712085810.GC127980@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    /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

Tarantool development patches archive

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lists.tarantool.org/tarantool-patches/0 tarantool-patches/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 tarantool-patches tarantool-patches/ https://lists.tarantool.org/tarantool-patches \
		tarantool-patches@dev.tarantool.org.
	public-inbox-index tarantool-patches

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git