From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@dev.tarantool.org, korablev@tarantool.org Cc: tarantool-patches@freelists.org Subject: [Tarantool-patches] [PATCH 3/3] sql: make type string case lower everywhere Date: Sun, 27 Oct 2019 22:35:09 +0100 [thread overview] Message-ID: <da6abb8566ddc528a76640bf3cb3d0774d5233fb.1572211914.git.v.shpilevoy@tarantool.org> (raw) In-Reply-To: <cover.1572211914.git.v.shpilevoy@tarantool.org> Type was displayed in error messages, was returned in meta headers, and a type string is a result of typeof() SQL function. Typeof() always returns lower case type string; meta contained upper case type; error messages contained both. It was necessary to choose one case for everything, and the lower one was chosen. It allows not to break typeof() function which actually might be used by someone. Part of #4462 --- src/box/sql/delete.c | 2 +- src/box/sql/func.c | 11 +- src/box/sql/insert.c | 2 +- src/box/sql/pragma.c | 4 +- src/box/sql/pragma.h | 92 +++--- src/box/sql/prepare.c | 24 +- src/box/sql/update.c | 2 +- src/box/sql/vdbe.c | 16 +- src/box/sql/vdbeapi.c | 16 +- test/sql-tap/func.test.lua | 2 +- test/sql-tap/position.test.lua | 16 +- test/sql-tap/sql-errors.test.lua | 4 +- test/sql/boolean.result | 518 +++++++++++++++---------------- test/sql/iproto.result | 48 +-- test/sql/row-count.result | 10 +- test/sql/sql-debug.result | 6 +- test/sql/types.result | 42 +-- 17 files changed, 408 insertions(+), 407 deletions(-) diff --git a/src/box/sql/delete.c b/src/box/sql/delete.c index 2f73d80c9..91c2157ac 100644 --- a/src/box/sql/delete.c +++ b/src/box/sql/delete.c @@ -420,7 +420,7 @@ sql_table_delete_from(struct Parse *parse, struct SrcList *tab_list, sqlVdbeSetNumCols(v, 1); sqlVdbeSetColName(v, 0, COLNAME_NAME, "rows deleted", SQL_STATIC); - sqlVdbeSetColName(v, 0, COLNAME_DECLTYPE, "INTEGER", + sqlVdbeSetColName(v, 0, COLNAME_DECLTYPE, "integer", SQL_STATIC); } diff --git a/src/box/sql/func.c b/src/box/sql/func.c index 12a4bee04..3d2ec434b 100644 --- a/src/box/sql/func.c +++ b/src/box/sql/func.c @@ -559,7 +559,8 @@ position_func(struct sql_context *context, int argc, struct Mem **argv) if (haystack_type != MP_STR && haystack_type != MP_BIN) inconsistent_type_arg = haystack; if (inconsistent_type_arg != NULL) { - diag_set(ClientError, ER_INCONSISTENT_TYPES, "TEXT or VARBINARY", + diag_set(ClientError, ER_INCONSISTENT_TYPES, + "text or varbinary", mem_type_to_str(inconsistent_type_arg)); context->is_aborted = true; return; @@ -889,8 +890,8 @@ case_type##ICUFunc(sql_context *context, int argc, sql_value **argv) \ UNUSED_PARAMETER(argc); \ int arg_type = sql_value_type(argv[0]); \ if (arg_type == MP_BIN) { \ - diag_set(ClientError, ER_INCONSISTENT_TYPES, "TEXT", \ - "VARBINARY"); \ + diag_set(ClientError, ER_INCONSISTENT_TYPES, "text", \ + "varbinary"); \ context->is_aborted = true; \ return; \ } \ @@ -1225,7 +1226,7 @@ likeFunc(sql_context *context, int argc, sql_value **argv) 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, "TEXT", + diag_set(ClientError, ER_INCONSISTENT_TYPES, "text", inconsistent_type); context->is_aborted = true; return; @@ -1859,7 +1860,7 @@ soundexFunc(sql_context * context, int argc, sql_value ** argv) assert(argc == 1); if (sql_value_type(argv[0]) == MP_BIN) { diag_set(ClientError, ER_SQL_TYPE_MISMATCH, - sql_value_to_diag_str(argv[0]), "TEXT"); + sql_value_to_diag_str(argv[0]), "text"); context->is_aborted = true; return; } diff --git a/src/box/sql/insert.c b/src/box/sql/insert.c index 42b839166..70504c800 100644 --- a/src/box/sql/insert.c +++ b/src/box/sql/insert.c @@ -786,7 +786,7 @@ sqlInsert(Parse * pParse, /* Parser context */ else column_name = "rows inserted"; sqlVdbeSetColName(v, 0, COLNAME_NAME, column_name, SQL_STATIC); - sqlVdbeSetColName(v, 0, COLNAME_DECLTYPE, "INTEGER", + sqlVdbeSetColName(v, 0, COLNAME_DECLTYPE, "integer", SQL_STATIC); } diff --git a/src/box/sql/pragma.c b/src/box/sql/pragma.c index 5bf24ef50..92bcf4e68 100644 --- a/src/box/sql/pragma.c +++ b/src/box/sql/pragma.c @@ -169,9 +169,9 @@ vdbe_emit_pragma_status(struct Parse *parse) sqlVdbeSetNumCols(v, 2); sqlVdbeSetColName(v, 0, COLNAME_NAME, "pragma_name", SQL_STATIC); - sqlVdbeSetColName(v, 0, COLNAME_DECLTYPE, "TEXT", SQL_STATIC); + sqlVdbeSetColName(v, 0, COLNAME_DECLTYPE, "text", SQL_STATIC); sqlVdbeSetColName(v, 1, COLNAME_NAME, "pragma_value", SQL_STATIC); - sqlVdbeSetColName(v, 1, COLNAME_DECLTYPE, "INTEGER", SQL_STATIC); + sqlVdbeSetColName(v, 1, COLNAME_DECLTYPE, "integer", SQL_STATIC); parse->nMem = 2; for (int i = 0; i < ArraySize(aPragmaName); ++i) { diff --git a/src/box/sql/pragma.h b/src/box/sql/pragma.h index 02895b0ea..30a1fc41a 100644 --- a/src/box/sql/pragma.h +++ b/src/box/sql/pragma.h @@ -31,119 +31,119 @@ static const char *const pragCName[] = { /* Used by: table_info */ /* 0 */ "cid", - /* 1 */ "INTEGER", + /* 1 */ "integer", /* 2 */ "name", - /* 3 */ "TEXT", + /* 3 */ "text", /* 4 */ "type", - /* 3 */ "TEXT", + /* 3 */ "text", /* 6 */ "notnull", - /* 1 */ "INTEGER", + /* 1 */ "integer", /* 8 */ "dflt_value", - /* 9 */ "TEXT", + /* 9 */ "text", /* 10 */ "pk", - /* 11 */ "INTEGER", + /* 11 */ "integer", /* Used by: stats */ /* 12 */ "table", - /* 13 */ "TEXT", + /* 13 */ "text", /* 14 */ "index", - /* 15 */ "TEXT", + /* 15 */ "text", /* 16 */ "width", - /* 17 */ "INTEGER", + /* 17 */ "integer", /* 18 */ "height", - /* 19 */ "INTEGER", + /* 19 */ "integer", /* Used by: index_info */ /* 20 */ "seqno", - /* 21 */ "INTEGER", + /* 21 */ "integer", /* 22 */ "cid", - /* 23 */ "INTEGER", + /* 23 */ "integer", /* 24 */ "name", - /* 25 */ "TEXT", + /* 25 */ "text", /* 26 */ "desc", - /* 27 */ "INTEGER", + /* 27 */ "integer", /* 28 */ "coll", - /* 29 */ "TEXT", + /* 29 */ "text", /* 30 */ "type", - /* 31 */ "TEXT", + /* 31 */ "text", /* Used by: index_list */ /* 32 */ "seq", - /* 33 */ "INTEGER", + /* 33 */ "integer", /* 34 */ "name", - /* 35 */ "TEXT", + /* 35 */ "text", /* 36 */ "unique", - /* 37 */ "INTEGER", + /* 37 */ "integer", /* Used by: collation_list */ /* 38 */ "seq", - /* 39 */ "INTEGER", + /* 39 */ "integer", /* 40 */ "name", - /* 41 */ "TEXT", + /* 41 */ "text", /* Used by: foreign_key_list */ /* 42 */ "id", - /* 43 */ "INTEGER", + /* 43 */ "integer", /* 44 */ "seq", - /* 45 */ "INTEGER", + /* 45 */ "integer", /* 46 */ "table", - /* 47 */ "TEXT", + /* 47 */ "text", /* 48 */ "from", - /* 49 */ "TEXT", + /* 49 */ "text", /* 50 */ "to", - /* 51 */ "TEXT", + /* 51 */ "text", /* 52 */ "on_update", - /* 53 */ "TEXT", + /* 53 */ "text", /* 54 */ "on_delete", - /* 55 */ "TEXT", + /* 55 */ "text", /* 56 */ "match", - /* 57 */ "TEXT", + /* 57 */ "text", /* Used by: count_changes */ /* 58 */ "count_changes", - /* 59 */ "INTEGER", + /* 59 */ "integer", /* Used by: defer_foreign_keys */ /* 60 */ "defer_foreign_keys", - /* 61 */ "INTEGER", + /* 61 */ "integer", /* Used by: full_column_names */ /* 62 */ "full_column_names", - /* 63 */ "INTEGER", + /* 63 */ "integer", /* Used by: parser_trace */ /* 64 */ "parser_trace", - /* 65 */ "INTEGER", + /* 65 */ "integer", /* Used by: recursive_triggers */ /* 66 */ "recursive_triggers", - /* 67 */ "INTEGER", + /* 67 */ "integer", /* Used by: reverse_unordered_selects */ /* 68 */ "reverse_unordered_selects", - /* 69 */ "INTEGER", + /* 69 */ "integer", /* Used by: select_trace */ /* 70 */ "select_trace", - /* 71 */ "INTEGER", + /* 71 */ "integer", /* Used by: short_column_names */ /* 72 */ "short_column_names", - /* 73 */ "INTEGER", + /* 73 */ "integer", /* Used by: sql_compound_select_limit */ /* 74 */ "sql_compound_select_limit", - /* 75 */ "INTEGER", + /* 75 */ "integer", /* Used by: sql_default_engine */ /* 76 */ "sql_default_engine", - /* 77 */ "TEXT", + /* 77 */ "text", /* Used by: sql_trace */ /* 78 */ "sql_trace", - /* 79 */ "INTEGER", + /* 79 */ "integer", /* Used by: vdbe_addoptrace */ /* 80 */ "vdbe_addoptrace", - /* 81 */ "INTEGER", + /* 81 */ "integer", /* Used by: vdbe_debug */ /* 82 */ "vdbe_debug", - /* 83 */ "INTEGER", + /* 83 */ "integer", /* Used by: vdbe_eqp */ /* 84 */ "vdbe_eqp", - /* 85 */ "INTEGER", + /* 85 */ "integer", /* Used by: vdbe_listing */ /* 86 */ "vdbe_listing", - /* 87 */ "INTEGER", + /* 87 */ "integer", /* Used by: vdbe_trace */ /* 88 */ "vdbe_trace", - /* 89 */ "INTEGER", + /* 89 */ "integer", /* Used by: where_trace */ /* 90 */ "where_trace", - /* 91 */ "INTEGER", + /* 91 */ "integer", }; /* Definitions of all built-in pragmas */ diff --git a/src/box/sql/prepare.c b/src/box/sql/prepare.c index e077a8b5e..0ecc676e2 100644 --- a/src/box/sql/prepare.c +++ b/src/box/sql/prepare.c @@ -110,29 +110,29 @@ sqlPrepare(sql * db, /* Database handle. */ if (rc == 0 && sParse.pVdbe != NULL && sParse.explain) { static const char *const azColName[] = { /* 0 */ "addr", - /* 1 */ "INTEGER", + /* 1 */ "integer", /* 2 */ "opcode", - /* 3 */ "TEXT", + /* 3 */ "text", /* 4 */ "p1", - /* 5 */ "INTEGER", + /* 5 */ "integer", /* 6 */ "p2", - /* 7 */ "INTEGER", + /* 7 */ "integer", /* 8 */ "p3", - /* 9 */ "INTEGER", + /* 9 */ "integer", /* 10 */ "p4", - /* 11 */ "TEXT", + /* 11 */ "text", /* 12 */ "p5", - /* 13 */ "TEXT", + /* 13 */ "text", /* 14 */ "comment", - /* 15 */ "TEXT", + /* 15 */ "text", /* 16 */ "selectid", - /* 17 */ "INTEGER", + /* 17 */ "integer", /* 18 */ "order", - /* 19 */ "INTEGER", + /* 19 */ "integer", /* 20 */ "from", - /* 21 */ "INTEGER", + /* 21 */ "integer", /* 22 */ "detail", - /* 23 */ "TEXT", + /* 23 */ "text", }; int name_first, name_count; diff --git a/src/box/sql/update.c b/src/box/sql/update.c index 2d7ebf8cd..6d69b7252 100644 --- a/src/box/sql/update.c +++ b/src/box/sql/update.c @@ -500,7 +500,7 @@ sqlUpdate(Parse * pParse, /* The parser context */ sqlVdbeSetNumCols(v, 1); sqlVdbeSetColName(v, 0, COLNAME_NAME, "rows updated", SQL_STATIC); - sqlVdbeSetColName(v, 0, COLNAME_DECLTYPE, "INTEGER", + sqlVdbeSetColName(v, 0, COLNAME_DECLTYPE, "integer", SQL_STATIC); } diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c index f881a732e..15fe50b63 100644 --- a/src/box/sql/vdbe.c +++ b/src/box/sql/vdbe.c @@ -612,17 +612,17 @@ mem_type_to_str(const struct Mem *p) case MEM_Null: return "NULL"; case MEM_Str: - return "TEXT"; + return "text"; case MEM_Int: - return "INTEGER"; + return "integer"; case MEM_UInt: - return "UNSIGNED"; + return "unsigned"; case MEM_Real: - return "REAL"; + return "real"; case MEM_Blob: - return "VARBINARY"; + return "varbinary"; case MEM_Bool: - return "BOOLEAN"; + return "boolean"; default: unreachable(); } @@ -1507,8 +1507,8 @@ case OP_Concat: { /* same as TK_CONCAT, in1, in2, out3 */ char *inconsistent_type = str_type_p1 == 0 ? mem_type_to_str(pIn1) : mem_type_to_str(pIn2); - diag_set(ClientError, ER_INCONSISTENT_TYPES, "TEXT or VARBINARY", - inconsistent_type); + diag_set(ClientError, ER_INCONSISTENT_TYPES, + "text or varbinary", inconsistent_type); goto abort_due_to_error; } diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c index b91d16a9d..685212d91 100644 --- a/src/box/sql/vdbeapi.c +++ b/src/box/sql/vdbeapi.c @@ -893,7 +893,7 @@ bindText(sql_stmt * pStmt, /* The statement to bind against */ pVar = &p->aVar[i - 1]; if (sqlVdbeMemSetStr(pVar, zData, nData, 1, xDel) != 0) return -1; - return sql_bind_type(p, i, "TEXT"); + return sql_bind_type(p, i, "text"); } /* @@ -915,7 +915,7 @@ sql_bind_blob(sql_stmt * pStmt, struct Mem *var = &p->aVar[i - 1]; if (sqlVdbeMemSetStr(var, zData, nData, 0, xDel) != 0) return -1; - return sql_bind_type(p, i, "VARBINARY"); + return sql_bind_type(p, i, "varbinary"); } int @@ -939,7 +939,7 @@ sql_bind_double(sql_stmt * pStmt, int i, double rValue) Vdbe *p = (Vdbe *) pStmt; if (vdbeUnbind(p, i) != 0) return -1; - int rc = sql_bind_type(p, i, "NUMERIC"); + int rc = sql_bind_type(p, i, "numeric"); sqlVdbeMemSetDouble(&p->aVar[i - 1], rValue); return rc; } @@ -950,7 +950,7 @@ sql_bind_boolean(struct sql_stmt *stmt, int i, bool value) struct Vdbe *p = (struct Vdbe *) stmt; if (vdbeUnbind(p, i) != 0) return -1; - int rc = sql_bind_type(p, i, "BOOLEAN"); + int rc = sql_bind_type(p, i, "boolean"); mem_set_bool(&p->aVar[i - 1], value); return rc; } @@ -967,7 +967,7 @@ sql_bind_int64(sql_stmt * pStmt, int i, sql_int64 iValue) Vdbe *p = (Vdbe *) pStmt; if (vdbeUnbind(p, i) != 0) return -1; - int rc = sql_bind_type(p, i, "INTEGER"); + int rc = sql_bind_type(p, i, "integer"); assert(iValue < 0); mem_set_int(&p->aVar[i - 1], iValue, true); return rc; @@ -979,7 +979,7 @@ sql_bind_uint64(struct sql_stmt *stmt, int i, uint64_t value) struct Vdbe *p = (struct Vdbe *) stmt; if (vdbeUnbind(p, i) != 0) return -1; - int rc = sql_bind_type(p, i, "INTEGER"); + int rc = sql_bind_type(p, i, "integer"); mem_set_u64(&p->aVar[i - 1], value); return rc; } @@ -990,7 +990,7 @@ sql_bind_null(sql_stmt * pStmt, int i) Vdbe *p = (Vdbe *) pStmt; if (vdbeUnbind(p, i) != 0) return -1; - return sql_bind_type(p, i, "BOOLEAN"); + return sql_bind_type(p, i, "boolean"); } int @@ -999,7 +999,7 @@ sql_bind_ptr(struct sql_stmt *stmt, int i, void *ptr) struct Vdbe *p = (struct Vdbe *) stmt; int rc = vdbeUnbind(p, i); if (rc == 0) { - rc = sql_bind_type(p, i, "VARBINARY"); + rc = sql_bind_type(p, i, "varbinary"); mem_set_ptr(&p->aVar[i - 1], ptr); } return rc; diff --git a/test/sql-tap/func.test.lua b/test/sql-tap/func.test.lua index e65fba150..4574ddfeb 100755 --- a/test/sql-tap/func.test.lua +++ b/test/sql-tap/func.test.lua @@ -2938,7 +2938,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 varbinary to text" -- </func-76.3> }) diff --git a/test/sql-tap/position.test.lua b/test/sql-tap/position.test.lua index 9539f7bf7..e0455abc9 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 TEXT or VARBINARY got UNSIGNED" + 1, "Inconsistent types: expected text or varbinary got unsigned" -- </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 TEXT or VARBINARY got REAL" + 1, "Inconsistent types: expected text or varbinary got real" -- </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 TEXT or VARBINARY got REAL" + 1, "Inconsistent types: expected text or varbinary got real" -- </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 TEXT got VARBINARY" + 1, "Inconsistent types: expected text got varbinary" -- </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 TEXT got VARBINARY" + 1, "Inconsistent types: expected text got varbinary" -- </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 TEXT" + 1, "Inconsistent types: expected varbinary got text" -- </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 TEXT" + 1, "Inconsistent types: expected varbinary got text" -- </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 TEXT got VARBINARY" + 1, "Inconsistent types: expected text got varbinary" -- </position-1.57.3> }) diff --git a/test/sql-tap/sql-errors.test.lua b/test/sql-tap/sql-errors.test.lua index cb8952424..b16337682 100755 --- a/test/sql-tap/sql-errors.test.lua +++ b/test/sql-tap/sql-errors.test.lua @@ -765,7 +765,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 to boolean" -- </sql-errors-2.8> }) @@ -775,7 +775,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 to boolean" -- </sql-errors-2.9> }) diff --git a/test/sql/boolean.result b/test/sql/boolean.result index 191fa33f3..913cd9408 100644 --- a/test/sql/boolean.result +++ b/test/sql/boolean.result @@ -138,12 +138,12 @@ INSERT INTO ts(s) VALUES ('abc'), (12.5); SELECT s FROM ts WHERE s = true; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT s FROM ts WHERE s < true; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT s FROM ts WHERE s IN (true, 1, 'abcd'); | --- @@ -203,13 +203,13 @@ EXPLAIN QUERY PLAN SELECT a FROM t0 WHERE a = true; | --- | - metadata: | - name: selectid - | type: INTEGER + | type: integer | - name: order - | type: INTEGER + | type: integer | - name: from - | type: INTEGER + | type: integer | - name: detail - | type: TEXT + | type: text | rows: | - [0, 0, 0, 'SEARCH TABLE T0 USING COVERING INDEX I0 (A=?) (~10 rows)'] | ... @@ -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' | ... SELECT lower(a) FROM t0; | --- @@ -393,9 +393,9 @@ box.execute('SELECT ?, ?, return_type($1), typeof($2);', {true, false}) | --- | - metadata: | - name: '?' - | type: BOOLEAN + | type: boolean | - name: '?' - | type: BOOLEAN + | type: boolean | - name: return_type($1) | type: string | - name: typeof($2) @@ -423,9 +423,9 @@ box.execute('SELECT :value1, @value2;', parameters) | --- | - metadata: | - name: :value1 - | type: BOOLEAN + | type: boolean | - name: '@value2' - | type: BOOLEAN + | type: boolean | rows: | - [false, true] | ... @@ -1553,64 +1553,64 @@ SELECT a, a1, a >> a1 FROM t, t6; SELECT true || true; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT true || false; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT false || true; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT false || false; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT a, true || a FROM t; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT a, false || a FROM t; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT a, a || true FROM t; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT a, a || false FROM t; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT a1, a1 || a1 FROM t6; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT a2, a2 || a2 FROM t6; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT a1, a2, a1 || a1 FROM t6; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT a1, a2, a2 || a2 FROM t6; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... -- Check comparisons. @@ -3364,493 +3364,493 @@ SELECT a2, b, b >> a2 FROM t6, t7; SELECT true > 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT false > 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT true < 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT false < 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 > true; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 > false; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 < true; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 < false; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, a1 > 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, a1 < 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, 2 > a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, 2 < a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, a2 > 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, a2 < 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, 2 > a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, 2 < a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, true > b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, false > b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, true < b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, false < b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b > true FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b > false FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b < true FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b < false FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, a1 > b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, a1 < b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, b > a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, b < a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, a2 > b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, a2 < b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, b > a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, b < a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT true >= 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT false >= 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT true <= 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT false <= 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 >= true; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 >= false; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 <= true; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 <= false; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, a1 >= 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, a1 <= 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, 2 >= a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, 2 <= a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, a2 >= 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, a2 <= 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, 2 >= a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, 2 <= a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, true >= b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, false >= b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, true <= b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, false <= b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b >= true FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b >= false FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b <= true FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b <= false FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, a1 >= b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, a1 <= b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, b >= a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, b <= a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, a2 >= b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, a2 <= b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, b >= a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, b <= a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT true == 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT false == 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT true != 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT false != 2; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 == true; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 == false; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 != true; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT 2 != false; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, a1 == 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, a1 != 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, 2 == a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, 2 != a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, a2 == 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, a2 != 2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, 2 == a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, 2 != a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, true == b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, false == b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, true != b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, false != b FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b == true FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b == false FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b != true FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT b, b != false FROM t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, a1 == b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, a1 != b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, b == a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a1, b, b != a1 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, a2 == b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, a2 != b FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, b == a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT a2, b, b != a2 FROM t6, t7; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned to boolean' | ... SELECT true IN (0, 1, 2, 3); @@ -3894,22 +3894,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 unsigned to boolean' | ... SELECT false BETWEEN 0 and 10; | --- | - null - | - 'Type mismatch: can not convert UNSIGNED to BOOLEAN' + | - 'Type mismatch: can not convert unsigned 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 unsigned 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 unsigned to boolean' | ... -- Check interaction of BOOLEAN and NUMBER. @@ -4509,493 +4509,493 @@ SELECT a2, c, c % a2 FROM t6, t8; SELECT true > 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT false > 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT true < 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT false < 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 > true; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 > false; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 < true; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 < false; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, a1 > 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, a1 < 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, 2.3 > a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, 2.3 < a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, a2 > 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, a2 < 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, 2.3 > a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, 2.3 < a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, true > c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, false > c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, true < c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, false < c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c > true FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c > false FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c < true FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c < false FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, a1 > c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, a1 < c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, c > a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, c < a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, a2 > c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, a2 < c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, c > a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, c < a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT true >= 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT false >= 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT true <= 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT false <= 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 >= true; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 >= false; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 <= true; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 <= false; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, a1 >= 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, a1 <= 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, 2.3 >= a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, 2.3 <= a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, a2 >= 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, a2 <= 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, 2.3 >= a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, 2.3 <= a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, true >= c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, false >= c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, true <= c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, false <= c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c >= true FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c >= false FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c <= true FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c <= false FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, a1 >= c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, a1 <= c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, c >= a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, c <= a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, a2 >= c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, a2 <= c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, c >= a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, c <= a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT true == 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT false == 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT true != 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT false != 2.3; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 == true; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 == false; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 != true; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT 2.3 != false; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, a1 == 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, a1 != 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, 2.3 == a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, 2.3 != a1 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, a2 == 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, a2 != 2.3 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, 2.3 == a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, 2.3 != a2 FROM t6 | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, true == c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, false == c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, true != c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, false != c FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c == true FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c == false FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c != true FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT c, c != false FROM t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, a1 == c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, a1 != c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, c == a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, c, c != a1 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, a2 == c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, a2 != c FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, c == a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, c, c != a2 FROM t6, t8; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT true IN (0.1, 1.2, 2.3, 3.4); @@ -5054,22 +5054,22 @@ SELECT a2 IN (SELECT c FROM t8) FROM t6 LIMIT 1; SELECT true BETWEEN 0.1 and 9.9; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT false BETWEEN 0.1 and 9.9; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a1, a1 BETWEEN 0.1 and 9.9 FROM t6; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... SELECT a2, a2 BETWEEN 0.1 and 9.9 FROM t6; | --- | - null - | - 'Type mismatch: can not convert REAL to BOOLEAN' + | - 'Type mismatch: can not convert real to boolean' | ... -- Check interaction of BOOLEAN and TEXT. @@ -5265,187 +5265,187 @@ SELECT a2, d, d OR a2 FROM t6, t9; SELECT true > 'abc'; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT false > 'abc'; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT true < 'abc'; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT false < 'abc'; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT 'abc' > true; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT 'abc' > false; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT 'abc' < true; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT 'abc' < false; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT d, true > d FROM t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT d, false > d FROM t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT d, true < d FROM t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT d, false < d FROM t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT d, d > true FROM t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT d, d > false FROM t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT d, d < true FROM t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT d, d < false FROM t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT a1, d, a1 > d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT a1, d, a1 < d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT a1, d, d > a1 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT a1, d, d < a1 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT a2, d, a2 > d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT a2, d, a2 < d FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT a2, d, d > a2 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT a2, d, d < a2 FROM t6, t9; | --- | - null - | - 'Type mismatch: can not convert TEXT to BOOLEAN' + | - 'Type mismatch: can not convert text to boolean' | ... SELECT true || 'abc'; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT false || 'abc'; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT 'abc' || false; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT 'abc' || true; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT d, true || d FROM t9; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT d, false || d FROM t9; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT d, d || false FROM t9; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT d, d || true FROM t9; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT d, a1 || d FROM t6, t9; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT d, a2 || d FROM t6, t9; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT d, d || a1 FROM t6, t9; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... SELECT d, d || a2 FROM t6, t9; | --- | - null - | - 'Inconsistent types: expected TEXT or VARBINARY got BOOLEAN' + | - 'Inconsistent types: expected text or varbinary got boolean' | ... -- diff --git a/test/sql/iproto.result b/test/sql/iproto.result index 1e5c30aec..67acd0ac1 100644 --- a/test/sql/iproto.result +++ b/test/sql/iproto.result @@ -374,11 +374,11 @@ cn:execute('select $2, $1, $3', parameters) --- - metadata: - name: $2 - type: INTEGER + type: integer - name: $1 - type: INTEGER + type: integer - name: $3 - type: INTEGER + type: integer rows: - [22, 11, 33] ... @@ -683,17 +683,17 @@ res = cn:execute("PRAGMA table_info(t1)") res.metadata --- - - name: cid - type: INTEGER + type: integer - name: name - type: TEXT + type: text - name: type - type: TEXT + type: text - name: notnull - type: INTEGER + type: integer - name: dflt_value - type: TEXT + type: text - name: pk - type: INTEGER + type: integer ... -- EXPLAIN res = cn:execute("EXPLAIN SELECT 1") @@ -702,21 +702,21 @@ res = cn:execute("EXPLAIN SELECT 1") res.metadata --- - - name: addr - type: INTEGER + type: integer - name: opcode - type: TEXT + type: text - name: p1 - type: INTEGER + type: integer - name: p2 - type: INTEGER + type: integer - name: p3 - type: INTEGER + type: integer - name: p4 - type: TEXT + type: text - name: p5 - type: TEXT + type: text - name: comment - type: TEXT + type: text ... res = cn:execute("EXPLAIN QUERY PLAN SELECT COUNT(*) FROM t1") --- @@ -724,13 +724,13 @@ res = cn:execute("EXPLAIN QUERY PLAN SELECT COUNT(*) FROM t1") res.metadata --- - - name: selectid - type: INTEGER + type: integer - name: order - type: INTEGER + type: integer - name: from - type: INTEGER + type: integer - name: detail - type: TEXT + type: text ... -- When pragma count_changes is on, statements INSERT, REPLACE and -- UPDATE returns number of changed columns. Make sure that this @@ -743,7 +743,7 @@ cn:execute("INSERT INTO t1 VALUES (1), (2), (3);") --- - metadata: - name: rows inserted - type: INTEGER + type: integer rows: - [3] ... @@ -751,7 +751,7 @@ cn:execute("REPLACE INTO t1 VALUES (2), (3), (4), (5);") --- - metadata: - name: rows replaced - type: INTEGER + type: integer rows: - [4] ... @@ -759,7 +759,7 @@ cn:execute("UPDATE t1 SET id = id + 100 WHERE id > 10;") --- - metadata: - name: rows updated - type: INTEGER + type: integer rows: - [0] ... diff --git a/test/sql/row-count.result b/test/sql/row-count.result index fb96e213c..6bf74ed9b 100644 --- a/test/sql/row-count.result +++ b/test/sql/row-count.result @@ -296,13 +296,13 @@ box.execute("EXPLAIN QUERY PLAN INSERT INTO t1 VALUES ('b'), ('c'), ('d');") --- - metadata: - name: selectid - type: INTEGER + type: integer - name: order - type: INTEGER + type: integer - name: from - type: INTEGER + type: integer - name: detail - type: TEXT + type: text rows: - [0, 0, 0, 'SCAN TABLE T2 (~262144 rows)'] ... @@ -318,7 +318,7 @@ box.execute('PRAGMA recursive_triggers') --- - metadata: - name: recursive_triggers - type: INTEGER + type: integer rows: - [1] ... diff --git a/test/sql/sql-debug.result b/test/sql/sql-debug.result index 2dba6844a..b19075366 100644 --- a/test/sql/sql-debug.result +++ b/test/sql/sql-debug.result @@ -19,7 +19,7 @@ box.execute('PRAGMA parser_trace') --- - metadata: - name: parser_trace - type: INTEGER + type: integer rows: - [1] ... @@ -34,9 +34,9 @@ box.execute('PRAGMA') --- - metadata: - name: pragma_name - type: TEXT + type: text - name: pragma_value - type: INTEGER + type: integer rows: - ['count_changes', 0] - ['defer_foreign_keys', 0] diff --git a/test/sql/types.result b/test/sql/types.result index 1bb8b0cec..2f7c61cb5 100644 --- a/test/sql/types.result +++ b/test/sql/types.result @@ -155,39 +155,39 @@ sp:drop() box.execute("SELECT 'abc' || 1;") --- - null -- 'Inconsistent types: expected TEXT or VARBINARY got UNSIGNED' +- 'Inconsistent types: expected text or varbinary got unsigned' ... box.execute("SELECT 'abc' || 1.123;") --- - null -- 'Inconsistent types: expected TEXT or VARBINARY got REAL' +- 'Inconsistent types: expected text or varbinary got real' ... box.execute("SELECT 1 || 'abc';") --- - null -- 'Inconsistent types: expected TEXT or VARBINARY got UNSIGNED' +- 'Inconsistent types: expected text or varbinary got unsigned' ... box.execute("SELECT 1.123 || 'abc';") --- - null -- 'Inconsistent types: expected TEXT or VARBINARY got REAL' +- 'Inconsistent types: expected text or varbinary got real' ... box.execute("SELECt 'a' || 'b' || 1;") --- - null -- 'Inconsistent types: expected TEXT or VARBINARY got UNSIGNED' +- 'Inconsistent types: expected text or varbinary got unsigned' ... -- What is more, they must be of the same type. -- box.execute("SELECT 'abc' || randomblob(5);") --- - null -- 'Inconsistent types: expected TEXT got VARBINARY' +- 'Inconsistent types: expected text got varbinary' ... box.execute("SELECT randomblob(5) || 'x';") --- - null -- 'Inconsistent types: expected VARBINARY got TEXT' +- 'Inconsistent types: expected varbinary got text' ... -- Result of BLOBs concatenation must be BLOB. -- @@ -212,17 +212,17 @@ box.execute("INSERT INTO t1 VALUES (randomblob(5));") box.execute("SELECT * FROM t1 WHERE s LIKE 'blob';") --- - null -- 'Inconsistent types: expected TEXT got VARBINARY' +- 'Inconsistent types: expected text got varbinary' ... box.execute("SELECT * FROM t1 WHERE 'blob' LIKE s;") --- - null -- 'Inconsistent types: expected TEXT got VARBINARY' +- 'Inconsistent types: expected text got varbinary' ... box.execute("SELECT * FROM t1 WHERE 'blob' LIKE x'0000';") --- - null -- 'Inconsistent types: expected TEXT got VARBINARY' +- 'Inconsistent types: expected text got varbinary' ... box.execute("SELECT s LIKE NULL FROM t1;") --- @@ -243,12 +243,12 @@ box.execute("INSERT INTO t1 VALUES (1);") box.execute("SELECT * FROM t1 WHERE s LIKE 'int';") --- - null -- 'Inconsistent types: expected TEXT got UNSIGNED' +- 'Inconsistent types: expected text got unsigned' ... box.execute("SELECT * FROM t1 WHERE 'int' LIKE 4;") --- - null -- 'Inconsistent types: expected TEXT got UNSIGNED' +- 'Inconsistent types: expected text got unsigned' ... box.execute("SELECT NULL LIKE s FROM t1;") --- @@ -326,7 +326,7 @@ box.execute('SELECT ?', {true}) --- - metadata: - name: '?' - type: BOOLEAN + type: boolean rows: - [true] ... @@ -354,12 +354,12 @@ box.execute("SELECT * FROM tboolean WHERE s1 = 'abc';") box.execute("SELECT * FROM tboolean WHERE s1 = 1;") --- - null -- 'Type mismatch: can not convert UNSIGNED to BOOLEAN' +- 'Type mismatch: can not convert unsigned to boolean' ... box.execute("SELECT * FROM tboolean WHERE s1 = 1.123;") --- - null -- 'Type mismatch: can not convert REAL to BOOLEAN' +- 'Type mismatch: can not convert real to boolean' ... box.space.TBOOLEAN:drop() --- @@ -1246,17 +1246,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 unsigned to varbinary' ... box.execute("SELECT * FROM t WHERE v = 1.123") --- - null -- 'Type mismatch: can not convert REAL to VARBINARY' +- 'Type mismatch: can not convert real to varbinary' ... box.execute("SELECT * FROM t WHERE v = 'str'") --- - null -- 'Type mismatch: can not convert TEXT to VARBINARY' +- 'Type mismatch: can not convert text to varbinary' ... box.execute("SELECT * FROM t WHERE v = x'616263'") --- @@ -1318,17 +1318,17 @@ box.execute("SELECT group_concat(v) FROM t;") box.execute("SELECT lower(v) FROM t;") --- - null -- 'Inconsistent types: expected TEXT got VARBINARY' +- 'Inconsistent types: expected text got varbinary' ... box.execute("SELECT upper(v) FROM t;") --- - null -- 'Inconsistent types: expected TEXT got VARBINARY' +- 'Inconsistent types: expected text got varbinary' ... box.execute("SELECT abs(v) FROM t;") --- - null -- 'Inconsistent types: expected number got VARBINARY' +- 'Inconsistent types: expected number got varbinary' ... box.execute("SELECT typeof(v) FROM t;") --- -- 2.21.0 (Apple Git-122)
next prev parent reply other threads:[~2019-10-27 21:29 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-27 21:35 [Tarantool-patches] [PATCH 0/3] Booleans and lower vs upper Vladislav Shpilevoy 2019-10-27 21:35 ` [Tarantool-patches] [PATCH 1/3] sql: LENGTH function accepts boolean Vladislav Shpilevoy 2019-10-27 21:35 ` [Tarantool-patches] [PATCH 2/3] sql: CAST(<boolean> AS TEXT) returns lowercase Vladislav Shpilevoy 2019-10-28 14:08 ` Nikita Pettik 2019-10-28 21:48 ` Vladislav Shpilevoy 2019-10-27 21:35 ` Vladislav Shpilevoy [this message] 2019-10-28 14:23 ` [Tarantool-patches] [PATCH 3/3] sql: make type string case lower everywhere Nikita Pettik 2019-10-28 21:45 ` Vladislav Shpilevoy 2019-11-07 12:40 ` Nikita Pettik 2019-10-30 23:28 ` [Tarantool-patches] [PATCH 0/3] Booleans and lower vs upper Nikita Pettik
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=da6abb8566ddc528a76640bf3cb3d0774d5233fb.1572211914.git.v.shpilevoy@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=korablev@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [Tarantool-patches] [PATCH 3/3] sql: make type string case lower everywhere' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox