[Tarantool-patches] [PATCH v2 2/4] sql: properly show values in type mismatch error
imeevma at tarantool.org
imeevma at tarantool.org
Mon Jul 5 18:27:53 MSK 2021
Hi! Thank you for the review! My answer and new patch below.
>
>> diff --git a/test/sql-tap/uuid.test.lua b/test/sql-tap/uuid.test.lua
>> index 77ba06c2d..f19eb4a9c 100755
>> --- a/test/sql-tap/uuid.test.lua
>> +++ b/test/sql-tap/uuid.test.lua
>> @@ -697,7 +697,7 @@ test:do_catchsql_test(
>> [[
>> SELECT cast(randomblob(10) as UUID) FROM t2 LIMIT 1;
>> ]], {
>> - 1, "Type mismatch: can not convert varbinary to uuid"
>> + 1, "Type mismatch: can not convert x'819192E578DE3FA24AF3' to uuid"
>
> randomblob() can return different results from time to time. I
> would not check for the exact error message.
>
> Now it somewhy returns the same values, but I suppose that might
> change. The same below.
Thanks, fixed.
New patch:
commit 73484ddc21ae698409d326804b105e748e3bbe12
Author: Mergen Imeev <imeevma at gmail.com>
Date: Mon Jun 21 21:19:51 2021 +0300
sql: properly show values in type mismatch error
Currently, some values are displayed improperly in the type mismatch
error description. For VARBINARY, the word "varbinary" is printed
instead of the value. STRING values are printed without quotes, which
can be confusing in some cases, such as when it consists of spaces.
This patch introduces the following changes:
1) VARBINARY value will be printed as x'<value in hexadecimal format>'.
2) STRING value will be printed in single quotes.
3) UUID value will be printed in single quotes.
UUID value does not need to be enclosed in single quotes, since there
are no literals for UUIDs, but it looks more convenient.
Part of #6176
diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c
index 630f1a135..728d3c9a7 100644
--- a/src/box/sql/mem.c
+++ b/src/box/sql/mem.c
@@ -80,9 +80,11 @@ mem_str(const struct Mem *mem)
if (mem->n > STR_VALUE_MAX_LEN) {
memcpy(buf, mem->z, STR_VALUE_MAX_LEN);
buf[STR_VALUE_MAX_LEN] = '\0';
- return tt_sprintf("%s...", buf);
+ return tt_sprintf("'%s...", buf);
}
- return tt_cstr(mem->z, mem->n);
+ memcpy(buf, mem->z, mem->n);
+ buf[mem->n] = '\0';
+ return tt_sprintf("'%s'", buf);
case MEM_TYPE_INT:
return tt_sprintf("%lld", mem->u.i);
case MEM_TYPE_UINT:
@@ -90,8 +92,19 @@ mem_str(const struct Mem *mem)
case MEM_TYPE_DOUBLE:
sql_snprintf(STR_VALUE_MAX_LEN + 1, buf, "%!.15g", mem->u.r);
return tt_sprintf("%s", buf);
- case MEM_TYPE_BIN:
- return "varbinary";
+ case MEM_TYPE_BIN: {
+ int len = MIN(mem->n, STR_VALUE_MAX_LEN / 2);
+ for (int i = 0; i < len; ++i) {
+ int n = (mem->z[i] & 0xF0) >> 4;
+ buf[2 * i] = n < 10 ? ('0' + n) : ('A' + n - 10);
+ n = (mem->z[i] & 0x0F);
+ buf[2 * i + 1] = n < 10 ? ('0' + n) : ('A' + n - 10);
+ }
+ buf[2 * len] = '\0';
+ if (mem->n > len)
+ return tt_sprintf("x'%s...", buf);
+ return tt_sprintf("x'%s'", buf);
+ }
case MEM_TYPE_MAP:
case MEM_TYPE_ARRAY: {
const char *str = mp_str(mem->z);
@@ -102,7 +115,8 @@ mem_str(const struct Mem *mem)
return tt_sprintf("%s...", buf);
}
case MEM_TYPE_UUID:
- return tt_uuid_str(&mem->u.uuid);
+ tt_uuid_to_string(&mem->u.uuid, buf);
+ return tt_sprintf("'%s'", buf);
case MEM_TYPE_BOOL:
return mem->u.b ? "TRUE" : "FALSE";
default:
diff --git a/test/sql-tap/autoinc.test.lua b/test/sql-tap/autoinc.test.lua
index aa457b502..83d983fe1 100755
--- a/test/sql-tap/autoinc.test.lua
+++ b/test/sql-tap/autoinc.test.lua
@@ -616,7 +616,7 @@ test:do_catchsql_test(
INSERT INTO t2 VALUES('asd');
]], {
-- <autoinc-10.2>
- 1, "Type mismatch: can not convert asd to integer"
+ 1, "Type mismatch: can not convert '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 'a' to integer"
-- </autoinc-gh-3670>
})
diff --git a/test/sql-tap/cast.test.lua b/test/sql-tap/cast.test.lua
index 7de4b79df..e2a227127 100755
--- a/test/sql-tap/cast.test.lua
+++ b/test/sql-tap/cast.test.lua
@@ -70,7 +70,7 @@ test:do_catchsql_test(
SELECT CAST(x'616263' AS NUMBER)
]], {
-- <cast-1.5>
- 1, 'Type mismatch: can not convert varbinary to number'
+ 1, "Type mismatch: can not convert 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 varbinary to integer'
+ 1, "Type mismatch: can not convert 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 '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 '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 '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 '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 '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 '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 '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 'abc' to number"
-- </cast-4.4>
})
diff --git a/test/sql-tap/func.test.lua b/test/sql-tap/func.test.lua
index 5e259f7ef..ae6bc9ddd 100755
--- a/test/sql-tap/func.test.lua
+++ b/test/sql-tap/func.test.lua
@@ -2931,7 +2931,7 @@ test:do_catchsql_test(
SELECT ROUND(X'FF')
]], {
-- <func-76.1>
- 1, "Type mismatch: can not convert varbinary to numeric"
+ 1, "Type mismatch: can not convert x'FF' to numeric"
-- </func-76.1>
})
@@ -2941,7 +2941,7 @@ test:do_catchsql_test(
SELECT RANDOMBLOB(X'FF')
]], {
-- <func-76.2>
- 1, "Type mismatch: can not convert varbinary to numeric"
+ 1, "Type mismatch: can not convert x'FF' to numeric"
-- </func-76.2>
})
@@ -2951,7 +2951,7 @@ test:do_catchsql_test(
SELECT SOUNDEX(X'FF')
]], {
-- <func-76.3>
- 1, "Type mismatch: can not convert varbinary to text"
+ 1, "Type mismatch: can not convert x'FF' to text"
-- </func-76.3>
})
@@ -2961,7 +2961,7 @@ test:do_catchsql_test(
SELECT SUM(X'FF')
]], {
-- <func-76.4>
- 1, "Type mismatch: can not convert varbinary to number"
+ 1, "Type mismatch: can not convert 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 28cf50184..b595f99b0 100755
--- a/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua
+++ b/test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua
@@ -32,9 +32,9 @@ test:do_execsql_test(
test:do_catchsql_test(
"gh-4766-3",
"SELECT CAST('" .. long_str .. "1234'" .. " AS INTEGER);", {
- 1, "Type mismatch: can not convert 000000000000000000000000000000000" ..
+ 1, "Type mismatch: can not convert '00000000000000000000000000000000" ..
"0000000000000000000000000000000000000000000000000000000000000000000" ..
- "0000000000000000000000000000... to integer"
+ "00000000000000000000000000000... to integer"
})
test:finish_test()
diff --git a/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua b/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua
index 7dcebe5d3..59a76000a 100755
--- a/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua
+++ b/test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua
@@ -40,7 +40,7 @@ test:do_catchsql_test(
[[
INSERT INTO t1 SELECT i, NULL, d FROM t;
]], {
- 1, "Type mismatch: can not convert varbinary to decimal"
+ 1, "Type mismatch: can not convert x'C70501030111111C' to decimal"
})
--
@@ -77,7 +77,7 @@ test:do_catchsql_test(
[[
UPDATE td SET d = d;
]], {
- 1, "Type mismatch: can not convert varbinary to decimal"
+ 1, "Type mismatch: can not convert x'C70501030111111C' to decimal"
})
test:finish_test()
diff --git a/test/sql-tap/index1.test.lua b/test/sql-tap/index1.test.lua
index a4d33152b..e03e284aa 100755
--- a/test/sql-tap/index1.test.lua
+++ b/test/sql-tap/index1.test.lua
@@ -778,7 +778,7 @@ test:do_catchsql_test(
SELECT c FROM t6 WHERE a>123;
]], {
-- <index-14.6>
- 1, "Type mismatch: can not convert to numeric"
+ 1, "Type mismatch: can not convert '' to numeric"
-- </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 numeric"
+ 1, "Type mismatch: can not convert '' to numeric"
-- </index-14.7>
})
diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua
index 36206ca2a..1a7a4ee82 100755
--- a/test/sql-tap/select1.test.lua
+++ b/test/sql-tap/select1.test.lua
@@ -320,7 +320,7 @@ test:do_catchsql_test(
SELECT count(*),count(a),count(b) FROM t4 WHERE b=5
]], {
-- <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 numeric"
+ 1, "Type mismatch: can not convert 'This is a string that is too big to fit inside a NBFS buffer' to numeric"
-- </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 'abc' to number"
-- </select1-2.17.1>
})
diff --git a/test/sql-tap/select5.test.lua b/test/sql-tap/select5.test.lua
index 5882102c9..bb9951025 100755
--- a/test/sql-tap/select5.test.lua
+++ b/test/sql-tap/select5.test.lua
@@ -558,7 +558,7 @@ test:do_catchsql_test(
SELECT 1 FROM jj HAVING avg(s2) = 1 AND avg(s2) = 0;
]], {
-- <select5-9.13.2>
- 1, "Type mismatch: can not convert A to number"
+ 1, "Type mismatch: can not convert '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 96ee683eb..52276c27b 100755
--- a/test/sql-tap/sql-errors.test.lua
+++ b/test/sql-tap/sql-errors.test.lua
@@ -1,6 +1,6 @@
#!/usr/bin/env tarantool
local test = require("sqltester")
-test:plan(76)
+test:plan(80)
test:execsql([[
CREATE TABLE t0 (i INT PRIMARY KEY, a INT);
@@ -687,7 +687,7 @@ test:do_catchsql_test(
-- </sql-errors-1.63>
})
--- gh-4356: Make sure that 'varbinary' is printed instead of the
+-- gh-4356: Make sure that varbinary is printed in hex instead of the
-- binary data itself (since binary data can contain unprintable symbols).
--
test:do_catchsql_test(
@@ -696,7 +696,7 @@ test:do_catchsql_test(
SELECT X'ff' + 1;
]], {
-- <sql-errors-2.1>
- 1, "Type mismatch: can not convert varbinary to numeric"
+ 1, "Type mismatch: can not convert x'FF' to numeric"
-- </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 varbinary to numeric"
+ 1, "Type mismatch: can not convert x'FF' to numeric"
-- </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 varbinary to numeric"
+ 1, "Type mismatch: can not convert x'FF' to numeric"
-- </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 varbinary to numeric"
+ 1, "Type mismatch: can not convert x'FF' to numeric"
-- </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 varbinary to boolean"
+ 1, "Type mismatch: can not convert 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 varbinary to boolean"
+ 1, "Type mismatch: can not convert 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 varbinary to boolean"
+ 1, "Type mismatch: can not convert x'FF' to boolean"
-- </sql-errors-2.7>
})
@@ -790,16 +790,16 @@ local str2 = string.rep('ы', 200)
test:do_catchsql_test(
"sql-errors-3.1",
"SELECT CAST('"..str1.."'AS UNSIGNED);", {
- 1, "Type mismatch: can not convert aaaaaaaaaaaaaaaaaaaaaaaaaa"..
+ 1, "Type mismatch: can not convert 'aaaaaaaaaaaaaaaaaaaaaaaaa"..
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"..
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... to unsigned"
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... to unsigned"
})
test:do_catchsql_test(
"sql-errors-3.2",
"SELECT CAST('"..str2.."'AS UNSIGNED);", {
- 1, "Type mismatch: can not convert ыыыыыыыыыыыыыыыыыыыыыыыыыы"..
- "ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы... to unsigned"
+ 1, "Type mismatch: can not convert 'ыыыыыыыыыыыыыыыыыыыыыыыыы"..
+ "ыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыыы... to unsigned"
})
local format = {{'I', 'integer'}, {'A', 'array'}, {'M', 'map'}}
@@ -825,4 +825,43 @@ test:do_catchsql_test(
test:execsql('DROP TABLE test;')
+--
+-- gh-6176: Make sure that STRING, VARBINARY and UUID values properly printed
+-- in type mismatch error description.
+--
+test:do_catchsql_test(
+ "sql-errors-3.5",
+ [[
+ SELECT CAST(x'F1' AS UNSIGNED);
+ ]], {
+ 1, "Type mismatch: can not convert x'F1' to unsigned"
+ })
+
+test:do_catchsql_test(
+ "sql-errors-3.6",
+ [[
+ SELECT CAST('F1' AS UNSIGNED);
+ ]], {
+ 1, "Type mismatch: can not convert 'F1' to unsigned"
+ })
+
+test:do_catchsql_test(
+ "sql-errors-3.7",
+ [[
+ SELECT CAST(CAST('11111111-1111-1111-1111-111111111111' AS UUID) AS UNSIGNED);
+ ]], {
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to unsigned"
+ })
+
+local bin = ''
+for i = 1,99 do bin = bin .. string.format("%02x", i) end
+
+test:do_catchsql_test(
+ "sql-errors-3.8",
+ "SELECT CAST(x'"..bin.."'AS UNSIGNED);", {
+ 1, "Type mismatch: can not convert x'0102030405060708090A0B0C"..
+ "0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A"..
+ "2B2C2D2E2F303132333435363738393A3B3C3D3E3F40... to unsigned"
+ })
+
test:finish_test()
diff --git a/test/sql-tap/tkt-80e031a00f.test.lua b/test/sql-tap/tkt-80e031a00f.test.lua
index 82769587b..b5bdf038f 100755
--- a/test/sql-tap/tkt-80e031a00f.test.lua
+++ b/test/sql-tap/tkt-80e031a00f.test.lua
@@ -346,7 +346,7 @@ test:do_catchsql_test(
SELECT 'hello' IN t1
]], {
-- <tkt-80e031a00f.27>
- 1, 'Type mismatch: can not convert hello to integer'
+ 1, "Type mismatch: can not convert '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 '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 varbinary to integer'
+ 1, "Type mismatch: can not convert 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 varbinary to integer'
+ 1, "Type mismatch: can not convert 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 67d6a1ccd..53dfafebf 100755
--- a/test/sql-tap/tkt-9a8b09f8e6.test.lua
+++ b/test/sql-tap/tkt-9a8b09f8e6.test.lua
@@ -245,7 +245,7 @@ test:do_catchsql_test(
SELECT x FROM t3 WHERE x IN ('1');
]], {
-- <4.3>
- 1, "Type mismatch: can not convert 1 to number"
+ 1, "Type mismatch: can not convert '1' to number"
-- </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 '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 '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 '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 '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 '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 '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 '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 '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 '1.11' to number"
-- </5.12>
})
diff --git a/test/sql-tap/uuid.test.lua b/test/sql-tap/uuid.test.lua
index 77ba06c2d..1fc99916a 100755
--- a/test/sql-tap/uuid.test.lua
+++ b/test/sql-tap/uuid.test.lua
@@ -237,7 +237,7 @@ test:do_catchsql_test(
[[
SELECT AVG(u) from t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
})
test:do_execsql_test(
@@ -421,7 +421,7 @@ test:do_catchsql_test(
[[
SELECT ROUND(u) from t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric"
})
test:do_execsql_test(
@@ -445,7 +445,7 @@ test:do_catchsql_test(
[[
SELECT SUM(u) from t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
})
test:do_catchsql_test(
@@ -453,7 +453,7 @@ test:do_catchsql_test(
[[
SELECT TOTAL(u) from t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
})
test:do_execsql_test(
@@ -564,7 +564,7 @@ test:do_catchsql_test(
[[
SELECT cast(u AS UNSIGNED) FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to unsigned"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to unsigned"
})
test:do_execsql_test(
@@ -582,7 +582,7 @@ test:do_catchsql_test(
[[
SELECT cast(u AS NUMBER) FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
})
test:do_catchsql_test(
@@ -590,7 +590,7 @@ test:do_catchsql_test(
[[
SELECT cast(u AS DOUBLE) FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to double"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to double"
})
test:do_catchsql_test(
@@ -598,7 +598,7 @@ test:do_catchsql_test(
[[
SELECT cast(u AS INTEGER) FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
})
test:do_catchsql_test(
@@ -606,7 +606,7 @@ test:do_catchsql_test(
[[
SELECT cast(u AS BOOLEAN) FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
})
test:do_execsql_test(
@@ -657,7 +657,7 @@ test:do_catchsql_test(
[[
SELECT cast('1' AS UUID);
]], {
- 1, "Type mismatch: can not convert 1 to uuid"
+ 1, "Type mismatch: can not convert '1' to uuid"
})
test:do_catchsql_test(
@@ -695,9 +695,9 @@ test:do_execsql_test(
test:do_catchsql_test(
"uuid-7.2.8",
[[
- SELECT cast(randomblob(10) as UUID) FROM t2 LIMIT 1;
+ SELECT cast(x'1234567890abcdef' as UUID) FROM t2 LIMIT 1;
]], {
- 1, "Type mismatch: can not convert varbinary to uuid"
+ 1, "Type mismatch: can not convert x'1234567890ABCDEF' to uuid"
})
test:execsql([[
@@ -719,7 +719,7 @@ test:do_catchsql_test(
[[
INSERT INTO tu(u) SELECT u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to unsigned"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to unsigned"
})
test:do_execsql_test(
@@ -738,7 +738,7 @@ test:do_catchsql_test(
[[
INSERT INTO tn(n) SELECT u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to number"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to number"
})
test:do_catchsql_test(
@@ -746,7 +746,7 @@ test:do_catchsql_test(
[[
INSERT INTO td(d) SELECT u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to double"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to double"
})
test:do_catchsql_test(
@@ -754,7 +754,7 @@ test:do_catchsql_test(
[[
INSERT INTO ti(i) SELECT u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
})
test:do_catchsql_test(
@@ -762,7 +762,7 @@ test:do_catchsql_test(
[[
INSERT INTO tb(b) SELECT u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
})
test:do_execsql_test(
@@ -817,7 +817,7 @@ test:do_catchsql_test(
[[
INSERT INTO tsu VALUES ('3_string_wrong', '1');
]], {
- 1, "Type mismatch: can not convert 1 to uuid"
+ 1, "Type mismatch: can not convert '1' to uuid"
})
test:do_catchsql_test(
@@ -856,9 +856,9 @@ test:do_execsql_test(
test:do_catchsql_test(
"uuid-8.2.8",
[[
- INSERT INTO tsu VALUES ('8_varbinary', randomblob(10));
+ INSERT INTO tsu VALUES ('8_varbinary', x'1234567890abcdef');
]], {
- 1, "Type mismatch: can not convert varbinary to uuid"
+ 1, "Type mismatch: can not convert x'1234567890ABCDEF' to uuid"
})
test:execsql([[
@@ -971,7 +971,7 @@ test:do_catchsql_test(
[[
SELECT -u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric"
})
test:do_catchsql_test(
@@ -979,7 +979,7 @@ test:do_catchsql_test(
[[
SELECT u + 1 FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric"
})
test:do_catchsql_test(
@@ -987,7 +987,7 @@ test:do_catchsql_test(
[[
SELECT u - 1 FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric"
})
test:do_catchsql_test(
@@ -995,7 +995,7 @@ test:do_catchsql_test(
[[
SELECT u * 1 FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric"
})
test:do_catchsql_test(
@@ -1003,7 +1003,7 @@ test:do_catchsql_test(
[[
SELECT u / 1 FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric"
})
test:do_catchsql_test(
@@ -1011,7 +1011,7 @@ test:do_catchsql_test(
[[
SELECT u % 1 FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to numeric"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to numeric"
})
-- Check that bitwise operations work with UUIDs as intended.
@@ -1020,7 +1020,7 @@ test:do_catchsql_test(
[[
SELECT ~u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
})
test:do_catchsql_test(
@@ -1028,7 +1028,7 @@ test:do_catchsql_test(
[[
SELECT u >> 1 FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
})
test:do_catchsql_test(
@@ -1036,7 +1036,7 @@ test:do_catchsql_test(
[[
SELECT u << 1 FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
})
test:do_catchsql_test(
@@ -1044,7 +1044,7 @@ test:do_catchsql_test(
[[
SELECT u | 1 FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
})
test:do_catchsql_test(
@@ -1052,7 +1052,7 @@ test:do_catchsql_test(
[[
SELECT u & 1 FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to integer"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to integer"
})
-- Check that logical operations work with UUIDs as intended.
@@ -1061,7 +1061,7 @@ test:do_catchsql_test(
[[
SELECT NOT u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
})
test:do_catchsql_test(
@@ -1069,7 +1069,7 @@ test:do_catchsql_test(
[[
SELECT u AND true FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
})
test:do_catchsql_test(
@@ -1077,7 +1077,7 @@ test:do_catchsql_test(
[[
SELECT u OR true FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
})
test:do_catchsql_test(
@@ -1085,7 +1085,7 @@ test:do_catchsql_test(
[[
SELECT true AND u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
})
test:do_catchsql_test(
@@ -1093,7 +1093,7 @@ test:do_catchsql_test(
[[
SELECT true OR u FROM t2;
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111 to boolean"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111' to boolean"
})
-- Check that comparison with UUID works as intended.
@@ -1296,7 +1296,7 @@ test:do_catchsql_test(
[[
SELECT uuid('asd');
]], {
- 1, "Type mismatch: can not convert asd to integer"
+ 1, "Type mismatch: can not convert 'asd' to integer"
})
test:do_catchsql_test(
@@ -1322,7 +1322,7 @@ test:do_catchsql_test(
[[
SELECT CAST('11111111-1111-1111-1111-111111111111111222222222' AS UUID);
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-111111111111111222222222 to uuid"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-111111111111111222222222' to uuid"
})
test:do_catchsql_test(
@@ -1330,7 +1330,7 @@ test:do_catchsql_test(
[[
SELECT CAST('11111111-1111-1111-1111-11111' AS UUID);
]], {
- 1, "Type mismatch: can not convert 11111111-1111-1111-1111-11111 to uuid"
+ 1, "Type mismatch: can not convert '11111111-1111-1111-1111-11111' to uuid"
})
test:execsql([[
diff --git a/test/sql/boolean.result b/test/sql/boolean.result
index 177a39fb9..dbd31fbb5 100644
--- a/test/sql/boolean.result
+++ b/test/sql/boolean.result
@@ -5092,7 +5092,7 @@ INSERT INTO t9 VALUES ('AsdF');
SELECT true AND 'abc';
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT false AND 'abc';
| ---
@@ -5105,17 +5105,17 @@ SELECT false AND 'abc';
SELECT true OR 'abc';
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT false OR 'abc';
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT 'abc' AND true;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT 'abc' AND false;
| ---
@@ -5128,59 +5128,59 @@ SELECT 'abc' AND false;
SELECT 'abc' OR true;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT 'abc' OR false;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT a1, a1 AND 'abc' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT a1, a1 OR 'abc' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT a1, 'abc' AND a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT a1, 'abc' OR a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT a2, a2 AND 'abc' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT a2, a2 OR 'abc' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT a2, 'abc' AND a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT a2, 'abc' OR a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert abc to boolean'
+ | - 'Type mismatch: can not convert ''abc'' to boolean'
| ...
SELECT d, true AND d FROM t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT d, false AND d FROM t9;
| ---
@@ -5195,17 +5195,17 @@ SELECT d, false AND d FROM t9;
SELECT d, true OR d FROM t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT d, false OR d FROM t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT d, d AND true FROM t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT d, d AND false FROM t9;
| ---
@@ -5220,53 +5220,53 @@ SELECT d, d AND false FROM t9;
SELECT d, d OR true FROM t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT d, d OR false FROM t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT a1, d, a1 AND d FROM t6, t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT a1, d, a1 OR d FROM t6, t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT a1, d, d AND a1 FROM t6, t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT a1, d, d OR a1 FROM t6, t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT a2, d, a2 AND d FROM t6, t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT a2, d, a2 OR d FROM t6, t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT a2, d, d AND a2 FROM t6, t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT a2, d, d OR a2 FROM t6, t9;
| ---
| - null
- | - 'Type mismatch: can not convert AsdF to boolean'
+ | - 'Type mismatch: can not convert ''AsdF'' to boolean'
| ...
SELECT true > 'abc';
@@ -5467,7 +5467,7 @@ INSERT INTO t9 VALUES ('TRUE'), ('true'), ('FALSE'), ('false');
SELECT true AND 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT false AND 'TRUE';
| ---
@@ -5480,17 +5480,17 @@ SELECT false AND 'TRUE';
SELECT true OR 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT false OR 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT 'TRUE' AND true;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT 'TRUE' AND false;
| ---
@@ -5503,59 +5503,59 @@ SELECT 'TRUE' AND false;
SELECT 'TRUE' OR true;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT 'TRUE' OR false;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a1, a1 AND 'TRUE' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a1, a1 OR 'TRUE' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a1, 'TRUE' AND a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a1, 'TRUE' OR a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a2, a2 AND 'TRUE' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a2, a2 OR 'TRUE' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a2, 'TRUE' AND a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a2, 'TRUE' OR a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT d, true AND d FROM t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
| ---
@@ -5570,17 +5570,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
SELECT d, true OR d FROM t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT d, false OR d FROM t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT d, d AND true FROM t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
| ---
@@ -5595,59 +5595,59 @@ SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
SELECT d, d OR true FROM t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT d, d OR false FROM t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'TRUE';
| ---
| - null
- | - 'Type mismatch: can not convert TRUE to boolean'
+ | - 'Type mismatch: can not convert ''TRUE'' to boolean'
| ...
SELECT true AND 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT false AND 'true';
| ---
@@ -5660,17 +5660,17 @@ SELECT false AND 'true';
SELECT true OR 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT false OR 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT 'true' AND true;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT 'true' AND false;
| ---
@@ -5683,59 +5683,59 @@ SELECT 'true' AND false;
SELECT 'true' OR true;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT 'true' OR false;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a1, a1 AND 'true' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a1, a1 OR 'true' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a1, 'true' AND a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a1, 'true' OR a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a2, a2 AND 'true' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a2, a2 OR 'true' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a2, 'true' AND a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a2, 'true' OR a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT d, true AND d FROM t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT d, false AND d FROM t9 WHERE d = 'true';
| ---
@@ -5750,17 +5750,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'true';
SELECT d, true OR d FROM t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT d, false OR d FROM t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT d, d AND true FROM t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT d, d AND false FROM t9 WHERE d = 'true';
| ---
@@ -5775,59 +5775,59 @@ SELECT d, d AND false FROM t9 WHERE d = 'true';
SELECT d, d OR true FROM t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT d, d OR false FROM t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'true';
| ---
| - null
- | - 'Type mismatch: can not convert true to boolean'
+ | - 'Type mismatch: can not convert ''true'' to boolean'
| ...
SELECT true AND 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT false AND 'FALSE';
| ---
@@ -5840,17 +5840,17 @@ SELECT false AND 'FALSE';
SELECT true OR 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT false OR 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT 'FALSE' AND true;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT 'FALSE' AND false;
| ---
@@ -5863,59 +5863,59 @@ SELECT 'FALSE' AND false;
SELECT 'FALSE' OR true;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT 'FALSE' OR false;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a1, a1 AND 'FALSE' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a1, a1 OR 'FALSE' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a1, 'FALSE' AND a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a1, 'FALSE' OR a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a2, a2 AND 'FALSE' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a2, a2 OR 'FALSE' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a2, 'FALSE' AND a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a2, 'FALSE' OR a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT d, true AND d FROM t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
| ---
@@ -5930,17 +5930,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
SELECT d, true OR d FROM t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT d, false OR d FROM t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT d, d AND true FROM t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
| ---
@@ -5955,59 +5955,59 @@ SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
SELECT d, d OR true FROM t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT d, d OR false FROM t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'FALSE';
| ---
| - null
- | - 'Type mismatch: can not convert FALSE to boolean'
+ | - 'Type mismatch: can not convert ''FALSE'' to boolean'
| ...
SELECT true AND 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT false AND 'false';
| ---
@@ -6020,17 +6020,17 @@ SELECT false AND 'false';
SELECT true OR 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT false OR 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT 'false' AND true;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT 'false' AND false;
| ---
@@ -6043,59 +6043,59 @@ SELECT 'false' AND false;
SELECT 'false' OR true;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT 'false' OR false;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a1, a1 AND 'false' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a1, a1 OR 'false' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a1, 'false' AND a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a1, 'false' OR a1 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a2, a2 AND 'false' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a2, a2 OR 'false' FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a2, 'false' AND a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a2, 'false' OR a2 FROM t6;
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT d, true AND d FROM t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT d, false AND d FROM t9 WHERE d = 'false';
| ---
@@ -6110,17 +6110,17 @@ SELECT d, false AND d FROM t9 WHERE d = 'false';
SELECT d, true OR d FROM t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT d, false OR d FROM t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT d, d AND true FROM t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT d, d AND false FROM t9 WHERE d = 'false';
| ---
@@ -6135,53 +6135,53 @@ SELECT d, d AND false FROM t9 WHERE d = 'false';
SELECT d, d OR true FROM t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT d, d OR false FROM t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a1, d, a1 AND d FROM t6, t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a1, d, a1 OR d FROM t6, t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a1, d, d AND a1 FROM t6, t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a1, d, d OR a1 FROM t6, t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a2, d, a2 AND d FROM t6, t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a2, d, a2 OR d FROM t6, t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a2, d, d AND a2 FROM t6, t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
SELECT a2, d, d OR a2 FROM t6, t9 WHERE d = 'false';
| ---
| - null
- | - 'Type mismatch: can not convert false to boolean'
+ | - 'Type mismatch: can not convert ''false'' to boolean'
| ...
-- Cleaning.
diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result
index a56fb2412..c5de00fd5 100644
--- a/test/sql/integer-overflow.result
+++ b/test/sql/integer-overflow.result
@@ -106,7 +106,7 @@ box.execute('SELECT CAST(\'9223372036854775808\' AS INTEGER);')
box.execute('SELECT CAST(\'18446744073709551616\' AS INTEGER);')
---
- null
-- 'Type mismatch: can not convert 18446744073709551616 to integer'
+- 'Type mismatch: can not convert ''18446744073709551616'' to integer'
...
-- Due to inexact represantation of large integers in terms of
-- floating point numbers, numerics with value < UINT64_MAX
diff --git a/test/sql/persistency.result b/test/sql/persistency.result
index 0e259edef..fab94301d 100644
--- a/test/sql/persistency.result
+++ b/test/sql/persistency.result
@@ -371,7 +371,7 @@ box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
box.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
---
- null
-- 'Type mismatch: can not convert foobar trigger test to integer'
+- 'Type mismatch: can not convert ''foobar trigger test'' to integer'
...
box.execute("SELECT * FROM barfoo WHERE foo = 9999");
---
diff --git a/test/sql/types.result b/test/sql/types.result
index a46967158..219559619 100644
--- a/test/sql/types.result
+++ b/test/sql/types.result
@@ -270,7 +270,7 @@ box.space.T1:drop()
box.execute("SELECT CAST('1.123' AS INTEGER);")
---
- null
-- 'Type mismatch: can not convert 1.123 to integer'
+- 'Type mismatch: can not convert ''1.123'' to integer'
...
box.execute("CREATE TABLE t1 (f TEXT PRIMARY KEY);")
---
@@ -283,7 +283,7 @@ box.execute("INSERT INTO t1 VALUES('0.0'), ('1.5'), ('3.9312453');")
box.execute("SELECT CAST(f AS INTEGER) FROM t1;")
---
- null
-- 'Type mismatch: can not convert 0.0 to integer'
+- 'Type mismatch: can not convert ''0.0'' to integer'
...
box.space.T1:drop()
---
@@ -339,12 +339,12 @@ box.execute("INSERT INTO tboolean VALUES (TRUE);")
box.execute("SELECT * FROM tboolean WHERE s1 = x'44';")
---
- null
-- 'Type mismatch: can not convert varbinary to boolean'
+- 'Type mismatch: can not convert x''44'' to boolean'
...
box.execute("SELECT * FROM tboolean WHERE s1 = 'abc';")
---
- null
-- 'Type mismatch: can not convert abc to boolean'
+- 'Type mismatch: can not convert ''abc'' to boolean'
...
box.execute("SELECT * FROM tboolean WHERE s1 = 1;")
---
@@ -632,7 +632,7 @@ box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;")
box.execute("SELECT CAST('18446744073' || '709551616' AS INTEGER);")
---
- null
-- 'Type mismatch: can not convert 18446744073709551616 to integer'
+- 'Type mismatch: can not convert ''18446744073709551616'' to integer'
...
box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);")
---
@@ -1122,7 +1122,7 @@ box.execute("SELECT CAST('123' AS UNSIGNED);")
box.execute("SELECT CAST('-123' AS UNSIGNED);")
---
- null
-- 'Type mismatch: can not convert -123 to unsigned'
+- 'Type mismatch: can not convert ''-123'' to unsigned'
...
box.space.T1:drop()
---
@@ -1231,7 +1231,7 @@ box.execute("INSERT INTO t VALUES(1, true);")
box.execute("INSERT INTO t VALUES(1, 'asd');")
---
- null
-- 'Type mismatch: can not convert asd to varbinary'
+- 'Type mismatch: can not convert ''asd'' to varbinary'
...
box.execute("INSERT INTO t VALUES(1, x'616263');")
---
@@ -1265,17 +1265,17 @@ box.execute("SELECT * FROM t WHERE v = x'616263'")
box.execute("SELECT sum(v) FROM t;")
---
- null
-- 'Type mismatch: can not convert varbinary to number'
+- 'Type mismatch: can not convert x''616263'' to number'
...
box.execute("SELECT avg(v) FROM t;")
---
- null
-- 'Type mismatch: can not convert varbinary to number'
+- 'Type mismatch: can not convert x''616263'' to number'
...
box.execute("SELECT total(v) FROM t;")
---
- null
-- 'Type mismatch: can not convert varbinary to number'
+- 'Type mismatch: can not convert x''616263'' to number'
...
box.execute("SELECT min(v) FROM t;")
---
@@ -1722,7 +1722,7 @@ box.execute("SELECT CAST(true AS DOUBLE);")
box.execute("SELECT CAST('asd' AS DOUBLE);")
---
- null
-- 'Type mismatch: can not convert asd to double'
+- 'Type mismatch: can not convert ''asd'' to double'
...
box.execute("SELECT CAST('1' AS DOUBLE);")
---
@@ -1743,12 +1743,12 @@ box.execute("SELECT CAST('1.123' AS DOUBLE);")
box.execute("SELECT CAST(x'' AS DOUBLE);")
---
- null
-- 'Type mismatch: can not convert varbinary to double'
+- 'Type mismatch: can not convert x'''' to double'
...
box.execute("SELECT CAST(x'35' AS DOUBLE);")
---
- null
-- 'Type mismatch: can not convert varbinary to double'
+- 'Type mismatch: can not convert x''35'' to double'
...
box.execute("SELECT CAST(CAST(x'35' AS STRING) AS DOUBLE);")
---
@@ -2209,12 +2209,12 @@ box.execute([[INSERT INTO ti(i) VALUES (true);]])
box.execute([[INSERT INTO ti(i) VALUES ('33');]])
---
- null
-- 'Type mismatch: can not convert 33 to integer'
+- 'Type mismatch: can not convert ''33'' to integer'
...
box.execute([[INSERT INTO ti(i) VALUES (X'3434');]])
---
- null
-- 'Type mismatch: can not convert varbinary to integer'
+- 'Type mismatch: can not convert x''3434'' to integer'
...
box.execute([[SELECT * FROM ti;]])
---
@@ -2259,12 +2259,12 @@ box.execute([[INSERT INTO td(d) VALUES (true);]])
box.execute([[INSERT INTO td(d) VALUES ('33');]])
---
- null
-- 'Type mismatch: can not convert 33 to double'
+- 'Type mismatch: can not convert ''33'' to double'
...
box.execute([[INSERT INTO td(d) VALUES (X'3434');]])
---
- null
-- 'Type mismatch: can not convert varbinary to double'
+- 'Type mismatch: can not convert x''3434'' to double'
...
box.execute([[SELECT * FROM td;]])
---
@@ -2303,12 +2303,12 @@ box.execute([[INSERT INTO tb(b) VALUES (true);]])
box.execute([[INSERT INTO tb(b) VALUES ('33');]])
---
- null
-- 'Type mismatch: can not convert 33 to boolean'
+- 'Type mismatch: can not convert ''33'' to boolean'
...
box.execute([[INSERT INTO tb(b) VALUES (X'3434');]])
---
- null
-- 'Type mismatch: can not convert varbinary to boolean'
+- 'Type mismatch: can not convert x''3434'' to boolean'
...
box.execute([[SELECT * FROM tb;]])
---
@@ -2351,7 +2351,7 @@ box.execute([[INSERT INTO tt(t) VALUES ('33');]])
box.execute([[INSERT INTO tt(t) VALUES (X'3434');]])
---
- null
-- 'Type mismatch: can not convert varbinary to string'
+- 'Type mismatch: can not convert x''3434'' to string'
...
box.execute([[SELECT * FROM tt;]])
---
@@ -2388,7 +2388,7 @@ box.execute([[INSERT INTO tv(v) VALUES (true);]])
box.execute([[INSERT INTO tv(v) VALUES ('33');]])
---
- null
-- 'Type mismatch: can not convert 33 to varbinary'
+- 'Type mismatch: can not convert ''33'' to varbinary'
...
box.execute([[INSERT INTO tv(v) VALUES (X'3434');]])
---
@@ -2562,12 +2562,12 @@ box.execute([[UPDATE ti SET i = true WHERE a = 1;]])
box.execute([[UPDATE ti SET i = '33' WHERE a = 1;]])
---
- null
-- 'Type mismatch: can not convert 33 to integer'
+- 'Type mismatch: can not convert ''33'' to integer'
...
box.execute([[UPDATE ti SET i = X'3434' WHERE a = 1;]])
---
- null
-- 'Type mismatch: can not convert varbinary to integer'
+- 'Type mismatch: can not convert x''3434'' to integer'
...
box.execute([[SELECT * FROM ti;]])
---
@@ -2603,12 +2603,12 @@ box.execute([[UPDATE td SET d = true WHERE a = 1;]])
box.execute([[UPDATE td SET d = '33' WHERE a = 1;]])
---
- null
-- 'Type mismatch: can not convert 33 to double'
+- 'Type mismatch: can not convert ''33'' to double'
...
box.execute([[UPDATE td SET d = X'3434' WHERE a = 1;]])
---
- null
-- 'Type mismatch: can not convert varbinary to double'
+- 'Type mismatch: can not convert x''3434'' to double'
...
box.execute([[SELECT * FROM td;]])
---
@@ -2641,12 +2641,12 @@ box.execute([[UPDATE tb SET b = true WHERE a = 1;]])
box.execute([[UPDATE tb SET b = '33' WHERE a = 1;]])
---
- null
-- 'Type mismatch: can not convert 33 to boolean'
+- 'Type mismatch: can not convert ''33'' to boolean'
...
box.execute([[UPDATE tb SET b = X'3434' WHERE a = 1;]])
---
- null
-- 'Type mismatch: can not convert varbinary to boolean'
+- 'Type mismatch: can not convert x''3434'' to boolean'
...
box.execute([[SELECT * FROM tb;]])
---
@@ -2684,7 +2684,7 @@ box.execute([[UPDATE tt SET t = '33' WHERE a = 1;]])
box.execute([[UPDATE tt SET t = X'3434' WHERE a = 1;]])
---
- null
-- 'Type mismatch: can not convert varbinary to string'
+- 'Type mismatch: can not convert x''3434'' to string'
...
box.execute([[SELECT * FROM tt;]])
---
@@ -2718,7 +2718,7 @@ box.execute([[UPDATE tv SET v = true WHERE a = 1;]])
box.execute([[UPDATE tv SET v = '33' WHERE a = 1;]])
---
- null
-- 'Type mismatch: can not convert 33 to varbinary'
+- 'Type mismatch: can not convert ''33'' to varbinary'
...
box.execute([[UPDATE tv SET v = X'3434' WHERE a = 1;]])
---
More information about the Tarantool-patches
mailing list