From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 117644696C3 for ; Mon, 27 Apr 2020 02:08:15 +0300 (MSK) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\)) From: Roman Khabibov In-Reply-To: Date: Mon, 27 Apr 2020 02:08:13 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20200309150258.32584-1-roman.habibov@tarantool.org> <6B917D0D-6B5F-4CC3-A7ED-43B0768B2537@tarantool.org> <83e93b75-de08-865d-a8c2-9e899e27cc09@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] sql: use unify pattern for column names List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Hi! Thanks for the review. > On Apr 22, 2020, at 02:37, Vladislav Shpilevoy = wrote: >=20 > Hi! Thanks for the fixes! >=20 >>>> diff --git a/test/sql/gh-3888-values-blob-assert.result = b/test/sql/gh-3888-values-blob-assert.result >>>> index 0a1af28f2..d2e27efd9 100644 >>>> --- a/test/sql/gh-3888-values-blob-assert.result >>>> +++ b/test/sql/gh-3888-values-blob-assert.result >>>> @@ -1,3 +1,4 @@ >>>> +-- test-run result file version 2 >>>> -- sql: assertion fault on VALUES #3888 >>>> -- >>>> -- Make sure that tokens representing values of integer, float, >>>> @@ -5,79 +6,87 @@ >>>> -- keywords of the same names. >>>> -- >>>> test_run =3D require('test_run').new() >>>> ---- >>>> -... >>>> + | --- >>>> + | ... >>>> engine =3D test_run:get_cfg('engine') >>>> ---- >>>> -... >>>> + | --- >>>> + | ... >>>> _ =3D box.space._session_settings:update('sql_default_engine', = {{'=3D', 2, engine}}) >>>> ---- >>>=20 >>> 7. These and similar changes look unrelated to the >>> issue. In some other files too. >> What I should do? Tests will fall, if I don=E2=80=99t add these = changes. >=20 > Well, they won't. Test-run interprets .result files using their > version in the first line. You added the version 2, and it > expects output of the version 2. Don't add version 2, and you > will be able to keep it without these changes. Now, it=E2=80=99s ok. > I suspect you updated the file by removing the old .result, and > creating a new by running the test. But it is not really correct. > Better move .reject file into .result file. Then the version won't > change. No. I always do mv .reject .result > See 6 comments below. >=20 >> sql: use unify pattern for column names >>=20 >> Name resulting columns generated by an expression or >> construction by the "_COLUMN_N" pattern. >=20 > 1. The pattern here and below is outdated. There is no '_' in the > first character anymore. Fixed. >> Closes #3962 >>=20 >> @TarantoolBot document >> Title: Column naming in SQL >>=20 >> Now, every auto generated column is named by the "_COLUMN_N" >> pattern, where N is the number of column in a query (starting) >> from 1). Auto generated column is a column in a query result >> generated by an expression or a column from >> construction. >>=20 >> Examples: >> box.execute("VALUES(1, 2, 3);") >> --- >> - metadata: >> - name: COLUMN_1 >> type: integer >> - name: COLUMN_2 >> type: integer >> - name: COLUMN_3 >> type: integer >> rows: >> - [1, 2, 3] >> ... >> box.execute("SELECT * FROM (VALUES (1+1, 1+1));") >> --- >> - metadata: >> - name: COLUMN_1 >> type: integer >> - name: COLUMN_2 >> type: integer >> rows: >> - [2, 2] >> ... >> box.execute("SELECT 1+1, 1+1;") >> --- >> - metadata: >> - name: COLUMN_1 >> type: integer >> - name: COLUMN_2 >> type: integer >> rows: >> - [2, 2] >> ... >>=20 >> diff --git a/src/box/sql/select.c b/src/box/sql/select.c >> index 65e41f219..f39983761 100644 >> --- a/src/box/sql/select.c >> +++ b/src/box/sql/select.c >> @@ -1946,14 +1946,13 @@ sqlColumnsFromExprList(Parse * parse, = ExprList * expr_list, >> } else if (pColExpr->op =3D=3D TK_ID) { >> assert(!ExprHasProperty(pColExpr, = EP_IntValue)); >> zName =3D pColExpr->u.zToken; >> - } else { >> - /* Use the original text of the column = expression as its name */ >> - zName =3D expr_list->a[i].zSpan; >> } >> } >> - if (zName =3D=3D NULL) >> - zName =3D "_auto_field_"; >> - zName =3D sqlMPrintf(db, "%s", zName); >> + if (zName =3D=3D NULL) { >> + uint32_t idx =3D ++parse->autoname_i; >> + zName =3D (char *) = sql_generate_column_name(idx); >=20 > 2. Wait, I remember I asked to keep it const. I even provided a mini = patch > how to keep it without casts. Why did you leave non-const char here? I know, but now I do uint32_t idx =3D ++parse->autoname_i;, so I need if = else and your construction is not suitable already. >> + } >> + zName =3D sqlDbStrDup(db, zName); >>=20 >> /* Make sure the column name is unique. If the name is = not unique, >> * append an integer to the name so that it becomes = unique. >> diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h >> index 1579cc92e..c355d1b17 100644 >> --- a/src/box/sql/sqlInt.h >> +++ b/src/box/sql/sqlInt.h >> @@ -2223,6 +2223,8 @@ struct Parse { >> TriggerPrg *pTriggerPrg; /* Linked list of coded triggers = */ >> With *pWith; /* Current WITH clause, or NULL */ >> With *pWithToFree; /* Free this WITH object at the end of = the parse */ >> + /** Index of previous auto generated name */ >=20 > 3. Please, add a dot in the end. >=20 >> + uint32_t autoname_i; >> /** Space triggers are being coded for. */ >> struct space *triggered_space; >> /** >> @@ -4513,4 +4515,17 @@ int >> sql_fieldno_by_name(struct Parse *parse_context, struct Expr = *field_name, >> uint32_t *fieldno); >>=20 >> +/** >> + * Return a string of the form "_COLUMN_N", where N is @a number. >=20 > 4. The template it outdated. >=20 >> + * >> + * We decided to name every auto generated column in output by >> + * this pattern (like PostgreSQL), because it is convenient than >=20 > 5. 'convenient' -> 'more convenient'. +++ b/src/box/sql/sqlInt.h @@ -2227,6 +2227,8 @@ struct Parse { TriggerPrg *pTriggerPrg; /* Linked list of coded triggers = */ With *pWith; /* Current WITH clause, or NULL */ With *pWithToFree; /* Free this WITH object at the end of = the parse */ + /** Index of previous auto generated name. */ + uint32_t autoname_i; /** Space triggers are being coded for. */ struct space *triggered_space; /** @@ -4530,4 +4532,17 @@ void sql_setting_set(struct Parse *parse_context, struct Token *name, struct Expr *value); =20 +/** + * Return a string of the form "COLUMN_N", where N is @a number. + * + * We decided to name every auto generated column in output by + * this pattern (like PostgreSQL), because it is more convenient + * than "_auto_name_" and naming with span like MariaDB do. + */ +static inline const char * +sql_generate_column_name(uint32_t number) +{ + return tt_sprintf("COLUMN_%d", number); +} + >> + * "_auto_name_" and naming with span like MariaDB do. >> + */ >> +static inline const char * >> +sql_generate_column_name(uint32_t number) >> +{ >> + return tt_sprintf("COLUMN_%d", number); >> +} >> + >> #endif /* sqlINT_H */ >> diff --git a/test/sql/full_metadata.test.lua = b/test/sql/full_metadata.test.lua >> index a9ba320c9..90972c48c 100644 >> --- a/test/sql/full_metadata.test.lua >> +++ b/test/sql/full_metadata.test.lua >> @@ -47,7 +47,15 @@ execute("SELECT x, y FROM v;") >>=20 >> execute([[UPDATE "_session_settings" SET "value" =3D false WHERE = "name" =3D 'sql_full_metadata';]]) >>=20 >> +-- gh-3962: Check auto generated names in different selects. >=20 > 6. This does not look like the right file for that. Because nothing > here concerns full metadata is sent or not. colname.test.lua may be > the right place. Done. sql: use unify pattern for column names Name resulting columns generated by an expression or construction by the "COLUMN_N" pattern. Closes #3962 @TarantoolBot document Title: Column naming in SQL Now, every auto generated column is named by the "COLUMN_N" pattern, where N is the number of column in a query (starting) from 1). Auto generated column is a column in a query result generated by an expression or a column from construction. Examples: box.execute("VALUES(1, 2, 3);") --- - metadata: - name: COLUMN_1 type: integer - name: COLUMN_2 type: integer - name: COLUMN_3 type: integer rows: - [1, 2, 3] ... box.execute("SELECT * FROM (VALUES (1+1, 1+1));") --- - metadata: - name: COLUMN_1 type: integer - name: COLUMN_2 type: integer rows: - [2, 2] ... box.execute("SELECT 1+1, 1+1;") --- - metadata: - name: COLUMN_1 type: integer - name: COLUMN_2 type: integer rows: - [2, 2] ... --- src/box/sql/select.c | 27 +- src/box/sql/sqlInt.h | 15 + test/box/function1.result | 12 +- test/sql-tap/colname.test.lua | 72 ++++- test/sql-tap/select1.test.lua | 21 +- test/sql-tap/select6.test.lua | 22 +- test/sql-tap/view.test.lua | 4 +- test/sql/bind.result | 42 +-- test/sql/boolean.result | 354 ++++++++++----------- test/sql/collation.result | 14 +- test/sql/errinj.result | 2 +- test/sql/foreign-keys.result | 4 +- test/sql/full_metadata.result | 23 +- test/sql/func-recreate.result | 2 +- test/sql/gh-3199-no-mem-leaks.result | 24 +- test/sql/gh-3888-values-blob-assert.result | 8 +- test/sql/icu-upper-lower.result | 82 ++--- test/sql/integer-overflow.result | 14 +- test/sql/iproto.result | 18 +- test/sql/max-on-index.result | 6 +- test/sql/misc.result | 12 +- test/sql/persistency.result | 66 ++-- test/sql/prepared.result | 36 +-- test/sql/row-count.result | 40 +-- test/sql/transition.result | 66 ++-- test/sql/types.result | 224 +++++++------ 26 files changed, 637 insertions(+), 573 deletions(-) diff --git a/src/box/sql/select.c b/src/box/sql/select.c index f39484013..d65266586 100644 --- a/src/box/sql/select.c +++ b/src/box/sql/select.c @@ -1815,6 +1815,7 @@ generate_column_metadata(struct Parse *pParse, = struct SrcList *pTabList, vdbe_metadata_set_col_nullability(v, i, -1); const char *colname =3D pEList->a[i].zName; const char *span =3D pEList->a[i].zSpan; + p =3D sqlExprSkipCollate(p); if (p->op =3D=3D TK_COLUMN || p->op =3D=3D = TK_AGG_COLUMN) { char *zCol; int iCol =3D p->iColumn; @@ -1847,19 +1848,19 @@ generate_column_metadata(struct Parse *pParse, = struct SrcList *pTabList, if (space->sequence !=3D NULL && space->sequence_fieldno =3D=3D = (uint32_t) iCol) = vdbe_metadata_set_col_autoincrement(v, i); - if (colname !=3D NULL) + if (span !=3D NULL) vdbe_metadata_set_col_span(v, i, = span); } } else { const char *z =3D NULL; - if (colname !=3D NULL) + if (colname !=3D NULL) { z =3D colname; - else if (span !=3D NULL) - z =3D span; - else - z =3D tt_sprintf("column%d", i + 1); + } else { + uint32_t idx =3D ++pParse->autoname_i; + z =3D sql_generate_column_name(idx); + } vdbe_metadata_set_col_name(v, i, z); - if (is_full_meta && colname !=3D NULL) + if (is_full_meta) vdbe_metadata_set_col_span(v, i, span); } } @@ -1948,14 +1949,14 @@ sqlColumnsFromExprList(Parse * parse, ExprList * = expr_list, } else if (pColExpr->op =3D=3D TK_ID) { assert(!ExprHasProperty(pColExpr, = EP_IntValue)); zName =3D pColExpr->u.zToken; - } else { - /* Use the original text of the column = expression as its name */ - zName =3D expr_list->a[i].zSpan; } } - if (zName =3D=3D NULL) - zName =3D "_auto_field_"; - zName =3D sqlMPrintf(db, "%s", zName); + if (zName =3D=3D NULL) { + uint32_t idx =3D ++parse->autoname_i; + zName =3D sqlDbStrDup(db, = sql_generate_column_name(idx)); + } else { + zName =3D sqlDbStrDup(db, zName); + } =20 /* Make sure the column name is unique. If the name is = not unique, * append an integer to the name so that it becomes = unique. diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h index 37283e506..adf90d824 100644 --- a/src/box/sql/sqlInt.h +++ b/src/box/sql/sqlInt.h @@ -2227,6 +2227,8 @@ struct Parse { TriggerPrg *pTriggerPrg; /* Linked list of coded triggers = */ With *pWith; /* Current WITH clause, or NULL */ With *pWithToFree; /* Free this WITH object at the end of = the parse */ + /** Index of previous auto generated name. */ + uint32_t autoname_i; /** Space triggers are being coded for. */ struct space *triggered_space; /** @@ -4530,4 +4532,17 @@ void sql_setting_set(struct Parse *parse_context, struct Token *name, struct Expr *value); =20 +/** + * Return a string of the form "COLUMN_N", where N is @a number. + * + * We decided to name every auto generated column in output by + * this pattern (like PostgreSQL), because it is more convenient + * than "_auto_name_" and naming with span like MariaDB do. + */ +static inline const char * +sql_generate_column_name(uint32_t number) +{ + return tt_sprintf("COLUMN_%d", number); +} + #endif /* sqlINT_H */ diff --git a/test/box/function1.result b/test/box/function1.result index b91d63c51..f198168c1 100644 --- a/test/box/function1.result +++ b/test/box/function1.result @@ -449,7 +449,7 @@ box.execute('SELECT "function1.divide"(6, 3, 3)') box.execute('SELECT "function1.divide"(6, 3)') --- - metadata: - - name: '"function1.divide"(6, 3)' + - name: COLUMN_1 type: number rows: - [2] @@ -457,7 +457,7 @@ box.execute('SELECT "function1.divide"(6, 3)') box.execute('SELECT "function1.divide"(5, 2)') --- - metadata: - - name: '"function1.divide"(5, 2)' + - name: COLUMN_1 type: number rows: - [2.5] @@ -482,7 +482,7 @@ test_run:cmd("setopt delimiter ''"); box.execute('SELECT summarize(1, 2)') --- - metadata: - - name: summarize(1, 2) + - name: COLUMN_1 type: number rows: - [3] @@ -505,7 +505,7 @@ test_run:cmd("setopt delimiter ''"); box.execute('SELECT summarize(1, 2)') --- - metadata: - - name: summarize(1, 2) + - name: COLUMN_1 type: number rows: - [3] @@ -519,7 +519,7 @@ box.func.SUMMARIZE:drop() box.execute('SELECT lua(\'return 1 + 1\')') --- - metadata: - - name: lua('return 1 + 1') + - name: COLUMN_1 type: any rows: - [2] @@ -537,7 +537,7 @@ box.execute('SELECT lua(\'return box.cfg()\')') box.execute('SELECT lua(\'return box.cfg.memtx_memory\')') --- - metadata: - - name: lua('return box.cfg.memtx_memory') + - name: COLUMN_1 type: any rows: - [107374182] diff --git a/test/sql-tap/colname.test.lua = b/test/sql-tap/colname.test.lua index caa61a07a..e895c040b 100755 --- a/test/sql-tap/colname.test.lua +++ b/test/sql-tap/colname.test.lua @@ -1,6 +1,6 @@ #!/usr/bin/env tarantool test =3D require("sqltester") -test:plan(62) +test:plan(69) =20 --!./tcltestrunner.lua -- 2008 July 15 @@ -94,7 +94,7 @@ test:do_execsql2_test( SELECT +tabc.a, -tabc.b, tabc.c, * FROM tabc ]], { -- - "+tabc.a",1,"-tabc.b",-2,"C",3,"A",1,"B",2,"C",3 + "COLUMN_1",1,"COLUMN_2",-2,"C",3,"A",1,"B",2,"C",3 -- }) =20 @@ -194,7 +194,7 @@ test:do_execsql2_test( SELECT +tabc.a, -tabc.b, tabc.c FROM tabc ]], { -- - "+tabc.a", 1, "-tabc.b", -2, "C", 3 + "COLUMN_1",1,"COLUMN_2",-2,"C",3 -- }) =20 @@ -314,7 +314,7 @@ test:do_execsql2_test( SELECT +tabc.a, -tabc.b, tabc.c FROM tabc ]], { -- - "+tabc.a", 1, "-tabc.b", -2, "TABC.C", 3 + "COLUMN_1",1,"COLUMN_2",-2,"TABC.C",3 -- }) =20 @@ -635,4 +635,68 @@ test:do_catchsql_test( [[ CREATE INDEX t1c ON table1('c'); ]], {1, "/Tarantool does not support functional indexes/"}) =20 +-- +-- gh-3962: Check auto generated names in different selects. +-- +test:do_execsql2_test( + "colname-12.1", + [[ + VALUES(1, 2, 'aaa'); + ]], { + "COLUMN_1",1,"COLUMN_2",2,"COLUMN_3","aaa" + }) + +test:do_execsql2_test( + "colname-12.2", + [[ + SELECT * FROM (VALUES (1+1, 1+1, 'aaa')); + ]], { + "COLUMN_1",2,"COLUMN_2",2,"COLUMN_3","aaa" + }) + +test:do_execsql2_test( + "colname-12.3", + [[ + SELECT 1+1, 1+1, 'aaa'; + ]], { + "COLUMN_1",2,"COLUMN_2",2,"COLUMN_3","aaa" + }) + +test:do_execsql2_test( + "colname-12.4", + [[ + SELECT * FROM (SELECT * FROM (VALUES(1, 2, 'aaa'))), + (SELECT * FROM (VALUES(1, 2, 'aaa'))) + ]], { + = "COLUMN_1",1,"COLUMN_2",2,"COLUMN_3","aaa","COLUMN_4",1,"COLUMN_5",2, + "COLUMN_6","aaa" + }) + +test:do_execsql2_test( + "colname-12.5", + [[ + CREATE TABLE j (s1 SCALAR PRIMARY KEY); + INSERT INTO j VALUES(1); + ]], {}) + +-- +-- Column named as 's1', because is skipped in such +-- expressions. +-- +test:do_execsql2_test( + "colname-12.6", + [[ + SELECT s1 COLLATE "unicode_ci" FROM j; + ]], { + "S1",1 + }) + +test:do_catchsql_test( + "colname-12.7", + [[ + SELECT s1 COLLATE "unicode_ci" FROM j ORDER BY column_1; + ]], { + 1,"Can=E2=80=99t resolve field 'COLUMN_1'" + }) + test:finish_test() diff --git a/test/sql-tap/select1.test.lua = b/test/sql-tap/select1.test.lua index fbebfab37..80e94b019 100755 --- a/test/sql-tap/select1.test.lua +++ b/test/sql-tap/select1.test.lua @@ -1032,7 +1032,7 @@ test:do_catchsql2_test( SELECT f1+F2 FROM test1 ORDER BY f2 ]], { -- - 0, {"f1+F2", 33, "f1+F2", 77} + 0, {"COLUMN_1",33,"COLUMN_1",77} -- }) =20 @@ -1042,7 +1042,7 @@ test:do_catchsql2_test( SELECT test1.f1+F2 FROM test1 ORDER BY f2 ]], { -- - 0, {"test1.f1+F2", 33, "test1.f1+F2", 77} + 0, {"COLUMN_1",33,"COLUMN_1",77} -- }) =20 @@ -1059,7 +1059,7 @@ test:do_test( return table.insert(v,msg) or v end, { -- - 0, {'test1.f1+F2', 33, 'test1.f1+F2', 77} + 0, {"COLUMN_1",33,"COLUMN_1",77} -- }) =20 @@ -1068,7 +1068,7 @@ test:do_catchsql2_test( [[SELECT test1.f1+F2, t1 FROM test1, test2=20 ORDER BY f2]], { -- - 0, {"test1.f1+F2", 33, "T1", "abc", "test1.f1+F2", 77, "T1", = "abc"} + 0, {"COLUMN_1",33,"T1","abc","COLUMN_1",77,"T1","abc"} -- }) =20 @@ -1161,7 +1161,7 @@ test:do_test( ]] end, { -- - "123.45", 123.45 + "COLUMN_1",123.45 -- }) =20 @@ -1189,7 +1189,8 @@ test:do_test( return x end, { -- - "A.F1", 11, "A.F2", 22, "sql_subquery.5", 5, "sql_subquery.6", = 6 + "A.F1", 11, "A.F2", 22, "sql_subquery.COLUMN_1", 5, + "sql_subquery.COLUMN_2", 6 -- }) =20 @@ -1816,7 +1817,7 @@ test:do_execsql2_test( SELECT * FROM t3, (SELECT max(a), max(b) FROM t4) as "tx" ]], { -- - "ID", 0, "A", "1", "B", "2", "max(a)", 3, "max(b)", "4" + "ID", 0, "A", "1", "B", "2", "COLUMN_1", 3, "COLUMN_2", "4" -- }) =20 @@ -1826,7 +1827,7 @@ test:do_execsql2_test( SELECT y.*, t3.* FROM t3, (SELECT max(a), max(b) FROM t4) = AS y ]], { -- - "max(a)", 3, "max(b)", "4", "ID", 0, "A", "1", "B", "2" + "COLUMN_1", 3, "COLUMN_2", "4", "ID", 0, "A", "1", "B", "2" -- }) =20 @@ -1850,7 +1851,7 @@ test:do_execsql2_test( SELECT 1+2+3 ]], { -- - "1+2+3", 6 + "COLUMN_1",6 -- }) =20 @@ -1860,7 +1861,7 @@ test:do_execsql2_test( SELECT 1,'hello',2 ]], { -- - '1', 1, "'hello'", "hello", '2', 2 + "COLUMN_1",1,"COLUMN_2","hello","COLUMN_3",2 -- }) =20 diff --git a/test/sql-tap/select6.test.lua = b/test/sql-tap/select6.test.lua index c9960dc29..380fd67c1 100755 --- a/test/sql-tap/select6.test.lua +++ b/test/sql-tap/select6.test.lua @@ -128,9 +128,9 @@ test:do_execsql_test( test:do_execsql_test( "select6-1.7", [=3D[ - SELECT a.y, a."count(*)", "max(x)", "count(*)" - FROM (SELECT count(*),y FROM t1 GROUP BY y) AS a, - (SELECT max(x),y FROM t1 GROUP BY y) as b + SELECT a.y, a.COLUMN_1, COLUMN_2, COLUMN_1 + FROM (SELECT count(*), y FROM t1 GROUP BY y) AS a, + (SELECT max(x), y FROM t1 GROUP BY y) as b WHERE a.y=3Db.y ORDER BY a.y ]=3D], { -- @@ -154,9 +154,9 @@ test:do_execsql_test( test:do_execsql_test( "select6-1.9", [=3D[ - SELECT q, p, r, b."min(x)+y" + SELECT q, p, r, min FROM (SELECT count(*) as p , y as q FROM t1 GROUP BY y) AS a, - (SELECT max(x) as r, y as s, min(x)+y FROM t1 GROUP BY y) = as b + (SELECT max(x) as r, y as s, min(x)+y AS min FROM t1 GROUP = BY y) as b WHERE q=3Ds ORDER BY s ]=3D], { -- @@ -247,9 +247,9 @@ test:do_execsql_test( test:do_execsql_test( "select6-2.7", [=3D[ - SELECT a.b, a."count(*)", "max(a)", "count(*)" - FROM (SELECT count(*),b FROM t2 GROUP BY b) AS a, - (SELECT max(a),b FROM t2 GROUP BY b) as b + SELECT a.b, a.count, max, count + FROM (SELECT count(*) AS count, b FROM t2 GROUP BY b) AS a, + (SELECT max(a) AS max, b FROM t2 GROUP BY b) as b WHERE a.b=3Db.b ORDER BY a.b ]=3D], { -- @@ -432,8 +432,8 @@ test:do_execsql_test( test:do_execsql_test( "select6-3.14", [=3D[ - SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY = y) - ORDER BY "count(*)" + SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP = BY y) + ORDER BY count ]=3D], { -- 1, 1, 2, 2, 4, 3, 5, 5, 8, 4 @@ -443,7 +443,7 @@ test:do_execsql_test( test:do_execsql_test( "select6-3.15", [=3D[ - SELECT "count(*)",y FROM (SELECT count(*), y FROM t1 GROUP BY = y) + SELECT count, y FROM (SELECT count(*) AS count, y FROM t1 GROUP = BY y) ORDER BY y ]=3D], { -- diff --git a/test/sql-tap/view.test.lua b/test/sql-tap/view.test.lua index e553b91c7..66374e374 100755 --- a/test/sql-tap/view.test.lua +++ b/test/sql-tap/view.test.lua @@ -265,7 +265,7 @@ test:do_execsql2_test( SELECT * FROM v1 LIMIT 1 ]], { -- - "XYZ", 2, "PQR", 7, "c-b", 1 + "XYZ", 2, "PQR", 7, "COLUMN_1", 1 -- }) =20 @@ -276,7 +276,7 @@ test:do_execsql2_test( SELECT * FROM v1b LIMIT 1 ]], { -- - "A", 2, "b+c", 7, "C", 4 + "A", 2, "COLUMN_1", 7, "C", 4 -- }) =20 diff --git a/test/sql/bind.result b/test/sql/bind.result index b24094052..cb0302885 100644 --- a/test/sql/bind.result +++ b/test/sql/bind.result @@ -77,11 +77,11 @@ execute('SELECT * FROM test WHERE id =3D :value', = parameters) execute('SELECT ?, ?, ?', {1, 2, 3}) --- - metadata: - - name: '?' + - name: COLUMN_1 type: integer - - name: '?' + - name: COLUMN_2 type: integer - - name: '?' + - name: COLUMN_3 type: integer rows: - [1, 2, 3] @@ -107,11 +107,11 @@ parameters[3][':value1'] =3D 11 execute('SELECT ?, :value1, @value2', parameters) --- - metadata: - - name: '?' + - name: COLUMN_1 type: integer - - name: :value1 + - name: COLUMN_2 type: integer - - name: '@value2' + - name: COLUMN_3 type: integer rows: - [10, 11, 12] @@ -149,22 +149,22 @@ parameters[6]['@value2'] =3D 6 execute('SELECT :value3, ?, :value1, ?, ?, @value2, ?, :value3', = parameters) --- - metadata: - - name: :value3 + - name: COLUMN_1 type: integer - - name: '?' + - name: COLUMN_2 type: integer - - name: :value1 + - name: COLUMN_3 type: integer - - name: '?' + - name: COLUMN_4 type: integer - - name: '?' + - name: COLUMN_5 type: integer - - name: '@value2' + - name: COLUMN_6 type: integer - - name: '?' + - name: COLUMN_7 + type: boolean + - name: COLUMN_8 type: boolean - - name: :value3 - type: integer rows: - [1, 2, 3, 4, 5, 6, null, 1] ... @@ -175,15 +175,15 @@ msgpack =3D require('msgpack') execute('SELECT ?, ?, ?, ?, ?', {'abc', -123.456, msgpack.NULL, true, = false}) --- - metadata: - - name: '?' + - name: COLUMN_1 type: text - - name: '?' + - name: COLUMN_2 type: numeric - - name: '?' + - name: COLUMN_3 type: boolean - - name: '?' + - name: COLUMN_4 type: boolean - - name: '?' + - name: COLUMN_5 type: boolean rows: - ['abc', -123.456, null, true, false] @@ -290,7 +290,7 @@ execute('SELECT :value', parameters) execute('SELECT ? ', {18446744073709551615ULL}) --- - metadata: - - name: '?' + - name: COLUMN_1 type: integer rows: - [18446744073709551615] diff --git a/test/sql/boolean.result b/test/sql/boolean.result index 112e41a12..51ec5820b 100644 --- a/test/sql/boolean.result +++ b/test/sql/boolean.result @@ -241,7 +241,7 @@ i > 0 SELECT return_type(a) FROM t; | --- | - metadata: - | - name: return_type(a) + | - name: COLUMN_1 | type: string | rows: | - ['boolean'] @@ -250,7 +250,7 @@ SELECT return_type(a) FROM t; SELECT return_type('false'); | --- | - metadata: - | - name: return_type('false') + | - name: COLUMN_1 | type: string | rows: | - ['string'] @@ -258,7 +258,7 @@ SELECT return_type('false'); SELECT is_boolean(a) FROM t LIMIT 1; | --- | - metadata: - | - name: is_boolean(a) + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -266,7 +266,7 @@ SELECT is_boolean(a) FROM t LIMIT 1; SELECT is_boolean('true'); | --- | - metadata: - | - name: is_boolean('true') + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -281,7 +281,7 @@ SELECT abs(a) FROM t0; SELECT lower(a) FROM t0; | --- | - metadata: - | - name: lower(a) + | - name: COLUMN_1 | type: string | rows: | - ['false'] @@ -292,7 +292,7 @@ SELECT lower(a) FROM t0; SELECT upper(a) FROM t0; | --- | - metadata: - | - name: upper(a) + | - name: COLUMN_1 | type: string | rows: | - ['FALSE'] @@ -303,7 +303,7 @@ SELECT upper(a) FROM t0; SELECT quote(a) FROM t0; | --- | - metadata: - | - name: quote(a) + | - name: COLUMN_1 | type: string | rows: | - ['FALSE'] @@ -315,7 +315,7 @@ SELECT quote(a) FROM t0; SELECT length(a) FROM t0; | --- | - metadata: - | - name: length(a) + | - name: COLUMN_1 | type: integer | rows: | - [5] @@ -326,7 +326,7 @@ SELECT length(a) FROM t0; SELECT typeof(a) FROM t0; | --- | - metadata: - | - name: typeof(a) + | - name: COLUMN_1 | type: string | rows: | - ['boolean'] @@ -344,7 +344,7 @@ SELECT AVG(a) FROM t0; SELECT MIN(a) FROM t0; | --- | - metadata: - | - name: MIN(a) + | - name: COLUMN_1 | type: scalar | rows: | - [false] @@ -352,7 +352,7 @@ SELECT MIN(a) FROM t0; SELECT MAX(a) FROM t0; | --- | - metadata: - | - name: MAX(a) + | - name: COLUMN_1 | type: scalar | rows: | - [true] @@ -365,7 +365,7 @@ SELECT SUM(a) FROM t0; SELECT COUNT(a) FROM t0; | --- | - metadata: - | - name: COUNT(a) + | - name: COLUMN_1 | type: integer | rows: | - [2] @@ -378,7 +378,7 @@ SELECT TOTAL(a) FROM t0; SELECT GROUP_CONCAT(a, ' +++ ') FROM t0; | --- | - metadata: - | - name: GROUP_CONCAT(a, ' +++ ') + | - name: COLUMN_1 | type: string | rows: | - ['FALSE +++ TRUE'] @@ -392,13 +392,13 @@ SELECT GROUP_CONCAT(a, ' +++ ') FROM t0; box.execute('SELECT ?, ?, return_type($1), typeof($2);', {true, false}) | --- | - metadata: - | - name: '?' + | - name: COLUMN_1 | type: boolean - | - name: '?' + | - name: COLUMN_2 | type: boolean - | - name: return_type($1) + | - name: COLUMN_3 | type: string - | - name: typeof($2) + | - name: COLUMN_4 | type: string | rows: | - [true, false, 'boolean', 'boolean'] @@ -422,9 +422,9 @@ parameters[2][':value1'] =3D false box.execute('SELECT :value1, @value2;', parameters) | --- | - metadata: - | - name: :value1 + | - name: COLUMN_1 | type: boolean - | - name: '@value2' + | - name: COLUMN_2 | type: boolean | rows: | - [false, true] @@ -501,9 +501,9 @@ INSERT INTO t3 VALUES (4, false) SELECT cast(true AS INTEGER), cast(false AS INTEGER); | --- | - metadata: - | - name: cast(true AS INTEGER) + | - name: COLUMN_1 | type: integer - | - name: cast(false AS INTEGER) + | - name: COLUMN_2 | type: integer | rows: | - [1, 0] @@ -511,9 +511,9 @@ SELECT cast(true AS INTEGER), cast(false AS = INTEGER); SELECT cast(true AS NUMBER), cast(false AS NUMBER); | --- | - metadata: - | - name: cast(true AS NUMBER) + | - name: COLUMN_1 | type: number - | - name: cast(false AS NUMBER) + | - name: COLUMN_2 | type: number | rows: | - [1, 0] @@ -522,9 +522,9 @@ SELECT cast(true AS NUMBER), cast(false AS NUMBER); SELECT cast(true AS TEXT), cast(false AS TEXT); | --- | - metadata: - | - name: cast(true AS TEXT) + | - name: COLUMN_1 | type: string - | - name: cast(false AS TEXT) + | - name: COLUMN_2 | type: string | rows: | - ['TRUE', 'FALSE'] @@ -532,9 +532,9 @@ SELECT cast(true AS TEXT), cast(false AS TEXT); SELECT cast(true AS BOOLEAN), cast(false AS BOOLEAN); | --- | - metadata: - | - name: cast(true AS BOOLEAN) + | - name: COLUMN_1 | type: boolean - | - name: cast(false AS BOOLEAN) + | - name: COLUMN_2 | type: boolean | rows: | - [true, false] @@ -544,11 +544,11 @@ SELECT cast(true AS BOOLEAN), cast(false AS = BOOLEAN); SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), cast(0 AS BOOLEAN); | --- | - metadata: - | - name: cast(100 AS BOOLEAN) + | - name: COLUMN_1 | type: boolean - | - name: cast(1 AS BOOLEAN) + | - name: COLUMN_2 | type: boolean - | - name: cast(0 AS BOOLEAN) + | - name: COLUMN_3 | type: boolean | rows: | - [true, true, false] @@ -556,9 +556,9 @@ SELECT cast(100 AS BOOLEAN), cast(1 AS BOOLEAN), = cast(0 AS BOOLEAN); SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN); | --- | - metadata: - | - name: cast(0.123 AS BOOLEAN) + | - name: COLUMN_1 | type: boolean - | - name: cast(0.0 AS BOOLEAN) + | - name: COLUMN_2 | type: boolean | rows: | - [true, false] @@ -566,9 +566,9 @@ SELECT cast(0.123 AS BOOLEAN), cast(0.0 AS BOOLEAN); SELECT cast('true' AS BOOLEAN), cast('false' AS BOOLEAN); | --- | - metadata: - | - name: cast('true' AS BOOLEAN) + | - name: COLUMN_1 | type: boolean - | - name: cast('false' AS BOOLEAN) + | - name: COLUMN_2 | type: boolean | rows: | - [true, false] @@ -576,9 +576,9 @@ SELECT cast('true' AS BOOLEAN), cast('false' AS = BOOLEAN); SELECT cast('TRUE' AS BOOLEAN), cast('FALSE' AS BOOLEAN); | --- | - metadata: - | - name: cast('TRUE' AS BOOLEAN) + | - name: COLUMN_1 | type: boolean - | - name: cast('FALSE' AS BOOLEAN) + | - name: COLUMN_2 | type: boolean | rows: | - [true, false] @@ -887,7 +887,7 @@ SELECT a, COUNT(*) FROM (SELECT * FROM t4 UNION = SELECT * FROM t5) GROUP BY a; | - metadata: | - name: A | type: boolean - | - name: COUNT(*) + | - name: COLUMN_1 | type: integer | rows: | - [false, 3] @@ -907,7 +907,7 @@ INSERT INTO t6 VALUES (true, false), (false, true); SELECT NOT true; | --- | - metadata: - | - name: NOT true + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -915,7 +915,7 @@ SELECT NOT true; SELECT NOT false; | --- | - metadata: - | - name: NOT false + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -925,7 +925,7 @@ SELECT a, NOT a FROM t; | - metadata: | - name: A | type: boolean - | - name: NOT a + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -935,7 +935,7 @@ SELECT a, NOT a FROM t; SELECT true AND true; | --- | - metadata: - | - name: true AND true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -943,7 +943,7 @@ SELECT true AND true; SELECT true AND false; | --- | - metadata: - | - name: true AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -951,7 +951,7 @@ SELECT true AND false; SELECT false AND true; | --- | - metadata: - | - name: false AND true + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -959,7 +959,7 @@ SELECT false AND true; SELECT false AND false; | --- | - metadata: - | - name: false AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -967,7 +967,7 @@ SELECT false AND false; SELECT true OR true; | --- | - metadata: - | - name: true OR true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -975,7 +975,7 @@ SELECT true OR true; SELECT true OR false; | --- | - metadata: - | - name: true OR false + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -983,7 +983,7 @@ SELECT true OR false; SELECT false OR true; | --- | - metadata: - | - name: false OR true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -991,7 +991,7 @@ SELECT false OR true; SELECT false OR false; | --- | - metadata: - | - name: false OR false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -1002,7 +1002,7 @@ SELECT a, true AND a FROM t; | - metadata: | - name: A | type: boolean - | - name: true AND a + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1013,7 +1013,7 @@ SELECT a, false AND a FROM t; | - metadata: | - name: A | type: boolean - | - name: false AND a + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1024,7 +1024,7 @@ SELECT a, true OR a FROM t; | - metadata: | - name: A | type: boolean - | - name: true OR a + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -1035,7 +1035,7 @@ SELECT a, false OR a FROM t; | - metadata: | - name: A | type: boolean - | - name: false OR a + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1046,7 +1046,7 @@ SELECT a, a AND true FROM t; | - metadata: | - name: A | type: boolean - | - name: a AND true + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1057,7 +1057,7 @@ SELECT a, a AND false FROM t; | - metadata: | - name: A | type: boolean - | - name: a AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1068,7 +1068,7 @@ SELECT a, a OR true FROM t; | - metadata: | - name: A | type: boolean - | - name: a OR true + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -1079,7 +1079,7 @@ SELECT a, a OR false FROM t; | - metadata: | - name: A | type: boolean - | - name: a OR false + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1093,7 +1093,7 @@ SELECT a, a1, a AND a1 FROM t, t6; | type: boolean | - name: A1 | type: boolean - | - name: a AND a1 + | - name: COLUMN_1 | type: boolean | rows: | - [false, false, false] @@ -1108,7 +1108,7 @@ SELECT a, a1, a OR a1 FROM t, t6; | type: boolean | - name: A1 | type: boolean - | - name: a OR a1 + | - name: COLUMN_1 | type: boolean | rows: | - [false, false, false] @@ -1622,7 +1622,7 @@ SELECT a1, a2, a2 || a2 FROM t6; SELECT true > true; | --- | - metadata: - | - name: true > true + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -1630,7 +1630,7 @@ SELECT true > true; SELECT true > false; | --- | - metadata: - | - name: true > false + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -1638,7 +1638,7 @@ SELECT true > false; SELECT false > true; | --- | - metadata: - | - name: false > true + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -1646,7 +1646,7 @@ SELECT false > true; SELECT false > false; | --- | - metadata: - | - name: false > false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -1654,7 +1654,7 @@ SELECT false > false; SELECT true < true; | --- | - metadata: - | - name: true < true + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -1662,7 +1662,7 @@ SELECT true < true; SELECT true < false; | --- | - metadata: - | - name: true < false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -1670,7 +1670,7 @@ SELECT true < false; SELECT false < true; | --- | - metadata: - | - name: false < true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -1678,7 +1678,7 @@ SELECT false < true; SELECT false < false; | --- | - metadata: - | - name: false < false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -1689,7 +1689,7 @@ SELECT a, true > a FROM t; | - metadata: | - name: A | type: boolean - | - name: true > a + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -1700,7 +1700,7 @@ SELECT a, false > a FROM t; | - metadata: | - name: A | type: boolean - | - name: false > a + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1711,7 +1711,7 @@ SELECT a, true < a FROM t; | - metadata: | - name: A | type: boolean - | - name: true < a + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1722,7 +1722,7 @@ SELECT a, false < a FROM t; | - metadata: | - name: A | type: boolean - | - name: false < a + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1733,7 +1733,7 @@ SELECT a, a > true FROM t; | - metadata: | - name: A | type: boolean - | - name: a > true + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1744,7 +1744,7 @@ SELECT a, a > false FROM t; | - metadata: | - name: A | type: boolean - | - name: a > false + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1755,7 +1755,7 @@ SELECT a, a < true FROM t; | - metadata: | - name: A | type: boolean - | - name: a < true + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -1766,7 +1766,7 @@ SELECT a, a < false FROM t; | - metadata: | - name: A | type: boolean - | - name: a < false + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1780,7 +1780,7 @@ SELECT a, a1, a > a1 FROM t, t6; | type: boolean | - name: A1 | type: boolean - | - name: a > a1 + | - name: COLUMN_1 | type: boolean | rows: | - [false, false, false] @@ -1795,7 +1795,7 @@ SELECT a, a1, a < a1 FROM t, t6; | type: boolean | - name: A1 | type: boolean - | - name: a < a1 + | - name: COLUMN_1 | type: boolean | rows: | - [false, false, false] @@ -1807,7 +1807,7 @@ SELECT a, a1, a < a1 FROM t, t6; SELECT true >=3D true; | --- | - metadata: - | - name: true >=3D true + | - name: COLUMN_1 | type: any | rows: | - [true] @@ -1815,7 +1815,7 @@ SELECT true >=3D true; SELECT true >=3D false; | --- | - metadata: - | - name: true >=3D false + | - name: COLUMN_1 | type: any | rows: | - [true] @@ -1823,7 +1823,7 @@ SELECT true >=3D false; SELECT false >=3D true; | --- | - metadata: - | - name: false >=3D true + | - name: COLUMN_1 | type: any | rows: | - [false] @@ -1831,7 +1831,7 @@ SELECT false >=3D true; SELECT false >=3D false; | --- | - metadata: - | - name: false >=3D false + | - name: COLUMN_1 | type: any | rows: | - [true] @@ -1839,7 +1839,7 @@ SELECT false >=3D false; SELECT true <=3D true; | --- | - metadata: - | - name: true <=3D true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -1847,7 +1847,7 @@ SELECT true <=3D true; SELECT true <=3D false; | --- | - metadata: - | - name: true <=3D false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -1855,7 +1855,7 @@ SELECT true <=3D false; SELECT false <=3D true; | --- | - metadata: - | - name: false <=3D true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -1863,7 +1863,7 @@ SELECT false <=3D true; SELECT false <=3D false; | --- | - metadata: - | - name: false <=3D false + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -1874,7 +1874,7 @@ SELECT a, true >=3D a FROM t; | - metadata: | - name: A | type: boolean - | - name: true >=3D a + | - name: COLUMN_1 | type: any | rows: | - [false, true] @@ -1885,7 +1885,7 @@ SELECT a, false >=3D a FROM t; | - metadata: | - name: A | type: boolean - | - name: false >=3D a + | - name: COLUMN_1 | type: any | rows: | - [false, true] @@ -1896,7 +1896,7 @@ SELECT a, true <=3D a FROM t; | - metadata: | - name: A | type: boolean - | - name: true <=3D a + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -1907,7 +1907,7 @@ SELECT a, false <=3D a FROM t; | - metadata: | - name: A | type: boolean - | - name: false <=3D a + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -1918,7 +1918,7 @@ SELECT a, a >=3D true FROM t; | - metadata: | - name: A | type: boolean - | - name: a >=3D true + | - name: COLUMN_1 | type: any | rows: | - [false, false] @@ -1929,7 +1929,7 @@ SELECT a, a >=3D false FROM t; | - metadata: | - name: A | type: boolean - | - name: a >=3D false + | - name: COLUMN_1 | type: any | rows: | - [false, true] @@ -1940,7 +1940,7 @@ SELECT a, a <=3D true FROM t; | - metadata: | - name: A | type: boolean - | - name: a <=3D true + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -1951,7 +1951,7 @@ SELECT a, a <=3D false FROM t; | - metadata: | - name: A | type: boolean - | - name: a <=3D false + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -1965,7 +1965,7 @@ SELECT a, a1, a >=3D a1 FROM t, t6; | type: boolean | - name: A1 | type: boolean - | - name: a >=3D a1 + | - name: COLUMN_1 | type: any | rows: | - [false, false, true] @@ -1980,7 +1980,7 @@ SELECT a, a1, a <=3D a1 FROM t, t6; | type: boolean | - name: A1 | type: boolean - | - name: a <=3D a1 + | - name: COLUMN_1 | type: boolean | rows: | - [false, false, true] @@ -1992,7 +1992,7 @@ SELECT a, a1, a <=3D a1 FROM t, t6; SELECT true =3D=3D true; | --- | - metadata: - | - name: true =3D=3D true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2000,7 +2000,7 @@ SELECT true =3D=3D true; SELECT true =3D=3D false; | --- | - metadata: - | - name: true =3D=3D false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2008,7 +2008,7 @@ SELECT true =3D=3D false; SELECT false =3D=3D true; | --- | - metadata: - | - name: false =3D=3D true + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2016,7 +2016,7 @@ SELECT false =3D=3D true; SELECT false =3D=3D false; | --- | - metadata: - | - name: false =3D=3D false + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2024,7 +2024,7 @@ SELECT false =3D=3D false; SELECT true !=3D true; | --- | - metadata: - | - name: true !=3D true + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2032,7 +2032,7 @@ SELECT true !=3D true; SELECT true !=3D false; | --- | - metadata: - | - name: true !=3D false + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2040,7 +2040,7 @@ SELECT true !=3D false; SELECT false !=3D true; | --- | - metadata: - | - name: false !=3D true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2048,7 +2048,7 @@ SELECT false !=3D true; SELECT false !=3D false; | --- | - metadata: - | - name: false !=3D false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2059,7 +2059,7 @@ SELECT a, true =3D=3D a FROM t; | - metadata: | - name: A | type: boolean - | - name: true =3D=3D a + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -2070,7 +2070,7 @@ SELECT a, false =3D=3D a FROM t; | - metadata: | - name: A | type: boolean - | - name: false =3D=3D a + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2081,7 +2081,7 @@ SELECT a, true !=3D a FROM t; | - metadata: | - name: A | type: boolean - | - name: true !=3D a + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2092,7 +2092,7 @@ SELECT a, false !=3D a FROM t; | - metadata: | - name: A | type: boolean - | - name: false !=3D a + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -2103,7 +2103,7 @@ SELECT a, a =3D=3D true FROM t; | - metadata: | - name: A | type: boolean - | - name: a =3D=3D true + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -2114,7 +2114,7 @@ SELECT a, a =3D=3D false FROM t; | - metadata: | - name: A | type: boolean - | - name: a =3D=3D false + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2125,7 +2125,7 @@ SELECT a, a !=3D true FROM t; | - metadata: | - name: A | type: boolean - | - name: a !=3D true + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2136,7 +2136,7 @@ SELECT a, a !=3D false FROM t; | - metadata: | - name: A | type: boolean - | - name: a !=3D false + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -2150,7 +2150,7 @@ SELECT a, a1, a =3D=3D a1 FROM t, t6; | type: boolean | - name: A1 | type: boolean - | - name: a =3D=3D a1 + | - name: COLUMN_1 | type: boolean | rows: | - [false, false, true] @@ -2165,7 +2165,7 @@ SELECT a, a1, a !=3D a1 FROM t, t6; | type: boolean | - name: A1 | type: boolean - | - name: a !=3D a1 + | - name: COLUMN_1 | type: boolean | rows: | - [false, false, false] @@ -2177,7 +2177,7 @@ SELECT a, a1, a !=3D a1 FROM t, t6; SELECT true IN (true); | --- | - metadata: - | - name: true IN (true) + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2185,7 +2185,7 @@ SELECT true IN (true); SELECT false IN (true); | --- | - metadata: - | - name: false IN (true) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2193,7 +2193,7 @@ SELECT false IN (true); SELECT true IN (false); | --- | - metadata: - | - name: true IN (false) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2201,7 +2201,7 @@ SELECT true IN (false); SELECT false IN (false); | --- | - metadata: - | - name: false IN (false) + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2209,7 +2209,7 @@ SELECT false IN (false); SELECT true IN (true, false); | --- | - metadata: - | - name: true IN (true, false) + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2217,7 +2217,7 @@ SELECT true IN (true, false); SELECT false IN (true, false); | --- | - metadata: - | - name: false IN (true, false) + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2225,7 +2225,7 @@ SELECT false IN (true, false); SELECT true IN (SELECT a1 FROM t6); | --- | - metadata: - | - name: true IN (SELECT a1 FROM t6) + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2233,7 +2233,7 @@ SELECT true IN (SELECT a1 FROM t6); SELECT false IN (SELECT a1 FROM t6); | --- | - metadata: - | - name: false IN (SELECT a1 FROM t6) + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2241,7 +2241,7 @@ SELECT false IN (SELECT a1 FROM t6); SELECT true IN (SELECT a1 FROM t6 LIMIT 1); | --- | - metadata: - | - name: true IN (SELECT a1 FROM t6 LIMIT 1) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2249,7 +2249,7 @@ SELECT true IN (SELECT a1 FROM t6 LIMIT 1); SELECT false IN (SELECT a1 FROM t6 LIMIT 1); | --- | - metadata: - | - name: false IN (SELECT a1 FROM t6 LIMIT 1) + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2257,7 +2257,7 @@ SELECT false IN (SELECT a1 FROM t6 LIMIT 1); SELECT true IN (1, 1.2, 'true', false); | --- | - metadata: - | - name: true IN (1, 1.2, 'true', false) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2265,7 +2265,7 @@ SELECT true IN (1, 1.2, 'true', false); SELECT false IN (1, 1.2, 'true', false); | --- | - metadata: - | - name: false IN (1, 1.2, 'true', false) + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2276,7 +2276,7 @@ SELECT a, a IN (true) FROM t; | - metadata: | - name: A | type: boolean - | - name: a IN (true) + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -2287,7 +2287,7 @@ SELECT a, a IN (false) FROM t; | - metadata: | - name: A | type: boolean - | - name: a IN (false) + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2298,7 +2298,7 @@ SELECT a, a IN (true, false) FROM t; | - metadata: | - name: A | type: boolean - | - name: a IN (true, false) + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2309,7 +2309,7 @@ SELECT a, a IN (SELECT a1 FROM t6 LIMIT 1) FROM t; | - metadata: | - name: A | type: boolean - | - name: a IN (SELECT a1 FROM t6 LIMIT 1) + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2320,7 +2320,7 @@ SELECT a, a IN (SELECT a1 FROM t6) FROM t; | - metadata: | - name: A | type: boolean - | - name: a IN (SELECT a1 FROM t6) + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2331,7 +2331,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t; | - metadata: | - name: A | type: boolean - | - name: a IN (1, 1.2, 'true', false) + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2341,7 +2341,7 @@ SELECT a, a IN (1, 1.2, 'true', false) FROM t; SELECT true BETWEEN true AND true; | --- | - metadata: - | - name: true BETWEEN true AND true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2349,7 +2349,7 @@ SELECT true BETWEEN true AND true; SELECT false BETWEEN true AND true; | --- | - metadata: - | - name: false BETWEEN true AND true + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2357,7 +2357,7 @@ SELECT false BETWEEN true AND true; SELECT true BETWEEN false AND false; | --- | - metadata: - | - name: true BETWEEN false AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2365,7 +2365,7 @@ SELECT true BETWEEN false AND false; SELECT false BETWEEN false AND false; | --- | - metadata: - | - name: false BETWEEN false AND false + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2373,7 +2373,7 @@ SELECT false BETWEEN false AND false; SELECT true BETWEEN true AND false; | --- | - metadata: - | - name: true BETWEEN true AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2381,7 +2381,7 @@ SELECT true BETWEEN true AND false; SELECT false BETWEEN true AND false; | --- | - metadata: - | - name: false BETWEEN true AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2389,7 +2389,7 @@ SELECT false BETWEEN true AND false; SELECT true BETWEEN false AND true; | --- | - metadata: - | - name: true BETWEEN false AND true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2397,7 +2397,7 @@ SELECT true BETWEEN false AND true; SELECT false BETWEEN false AND true; | --- | - metadata: - | - name: false BETWEEN false AND true + | - name: COLUMN_1 | type: boolean | rows: | - [true] @@ -2408,7 +2408,7 @@ SELECT a, a BETWEEN true AND true FROM t; | - metadata: | - name: A | type: boolean - | - name: a BETWEEN true AND true + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -2419,7 +2419,7 @@ SELECT a, a BETWEEN false AND false FROM t; | - metadata: | - name: A | type: boolean - | - name: a BETWEEN false AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2430,7 +2430,7 @@ SELECT a, a BETWEEN true AND false FROM t; | - metadata: | - name: A | type: boolean - | - name: a BETWEEN true AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -2441,7 +2441,7 @@ SELECT a, a BETWEEN false AND true FROM t; | - metadata: | - name: A | type: boolean - | - name: a BETWEEN false AND true + | - name: COLUMN_1 | type: boolean | rows: | - [false, true] @@ -2466,7 +2466,7 @@ SELECT true AND 2; SELECT false AND 2; | --- | - metadata: - | - name: false AND 2 + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2489,7 +2489,7 @@ SELECT 2 AND true; SELECT 2 AND false; | --- | - metadata: - | - name: 2 AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -2556,7 +2556,7 @@ SELECT b, false AND b FROM t7; | - metadata: | - name: B | type: integer - | - name: false AND b + | - name: COLUMN_1 | type: boolean | rows: | - [123, false] @@ -2581,7 +2581,7 @@ SELECT b, b AND false FROM t7; | - metadata: | - name: B | type: integer - | - name: b AND false + | - name: COLUMN_1 | type: boolean | rows: | - [123, false] @@ -3861,7 +3861,7 @@ SELECT a2, b, b !=3D a2 FROM t6, t7; SELECT true IN (0, 1, 2, 3); | --- | - metadata: - | - name: true IN (0, 1, 2, 3) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -3869,7 +3869,7 @@ SELECT true IN (0, 1, 2, 3); SELECT false IN (0, 1, 2, 3); | --- | - metadata: - | - name: false IN (0, 1, 2, 3) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -3889,7 +3889,7 @@ SELECT a1, a1 IN (0, 1, 2, 3) FROM t6 | - metadata: | - name: A1 | type: boolean - | - name: a1 IN (0, 1, 2, 3) + | - name: COLUMN_1 | type: boolean | rows: | - [false, false] @@ -3935,7 +3935,7 @@ SELECT true AND 2.3; SELECT false AND 2.3; | --- | - metadata: - | - name: false AND 2.3 + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -3958,7 +3958,7 @@ SELECT 2.3 AND true; SELECT 2.3 AND false; | --- | - metadata: - | - name: 2.3 AND false + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -4025,7 +4025,7 @@ SELECT c, false AND c FROM t8; | - metadata: | - name: C | type: number - | - name: false AND c + | - name: COLUMN_1 | type: boolean | rows: | - [4.56, false] @@ -4050,7 +4050,7 @@ SELECT c, c AND false FROM t8; | - metadata: | - name: C | type: number - | - name: c AND false + | - name: COLUMN_1 | type: boolean | rows: | - [4.56, false] @@ -5006,7 +5006,7 @@ SELECT a2, c, c !=3D a2 FROM t6, t8; SELECT true IN (0.1, 1.2, 2.3, 3.4); | --- | - metadata: - | - name: true IN (0.1, 1.2, 2.3, 3.4) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5014,7 +5014,7 @@ SELECT true IN (0.1, 1.2, 2.3, 3.4); SELECT false IN (0.1, 1.2, 2.3, 3.4); | --- | - metadata: - | - name: false IN (0.1, 1.2, 2.3, 3.4) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5022,7 +5022,7 @@ SELECT false IN (0.1, 1.2, 2.3, 3.4); SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1; | --- | - metadata: - | - name: a1 IN (0.1, 1.2, 2.3, 3.4) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5030,7 +5030,7 @@ SELECT a1 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1; SELECT a2 IN (0.1, 1.2, 2.3, 3.4) FROM t6 LIMIT 1; | --- | - metadata: - | - name: a2 IN (0.1, 1.2, 2.3, 3.4) + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5095,7 +5095,7 @@ SELECT true AND 'abc'; SELECT false AND 'abc'; | --- | - metadata: - | - name: false AND 'abc' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5118,7 +5118,7 @@ SELECT 'abc' AND true; SELECT 'abc' AND false; | --- | - metadata: - | - name: '''abc'' AND false' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5185,7 +5185,7 @@ SELECT d, false AND d FROM t9; | - metadata: | - name: D | type: string - | - name: false AND d + | - name: COLUMN_1 | type: boolean | rows: | - ['AsdF', false] @@ -5210,7 +5210,7 @@ SELECT d, d AND false FROM t9; | - metadata: | - name: D | type: string - | - name: d AND false + | - name: COLUMN_1 | type: boolean | rows: | - ['AsdF', false] @@ -5470,7 +5470,7 @@ SELECT true AND 'TRUE'; SELECT false AND 'TRUE'; | --- | - metadata: - | - name: false AND 'TRUE' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5493,7 +5493,7 @@ SELECT 'TRUE' AND true; SELECT 'TRUE' AND false; | --- | - metadata: - | - name: '''TRUE'' AND false' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5560,7 +5560,7 @@ SELECT d, false AND d FROM t9 WHERE d =3D 'TRUE'; | - metadata: | - name: D | type: string - | - name: false AND d + | - name: COLUMN_1 | type: boolean | rows: | - ['TRUE', false] @@ -5585,7 +5585,7 @@ SELECT d, d AND false FROM t9 WHERE d =3D 'TRUE'; | - metadata: | - name: D | type: string - | - name: d AND false + | - name: COLUMN_1 | type: boolean | rows: | - ['TRUE', false] @@ -5650,7 +5650,7 @@ SELECT true AND 'true'; SELECT false AND 'true'; | --- | - metadata: - | - name: false AND 'true' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5673,7 +5673,7 @@ SELECT 'true' AND true; SELECT 'true' AND false; | --- | - metadata: - | - name: '''true'' AND false' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5740,7 +5740,7 @@ SELECT d, false AND d FROM t9 WHERE d =3D 'true'; | - metadata: | - name: D | type: string - | - name: false AND d + | - name: COLUMN_1 | type: boolean | rows: | - ['true', false] @@ -5765,7 +5765,7 @@ SELECT d, d AND false FROM t9 WHERE d =3D 'true'; | - metadata: | - name: D | type: string - | - name: d AND false + | - name: COLUMN_1 | type: boolean | rows: | - ['true', false] @@ -5830,7 +5830,7 @@ SELECT true AND 'FALSE'; SELECT false AND 'FALSE'; | --- | - metadata: - | - name: false AND 'FALSE' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5853,7 +5853,7 @@ SELECT 'FALSE' AND true; SELECT 'FALSE' AND false; | --- | - metadata: - | - name: '''FALSE'' AND false' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -5920,7 +5920,7 @@ SELECT d, false AND d FROM t9 WHERE d =3D 'FALSE'; | - metadata: | - name: D | type: string - | - name: false AND d + | - name: COLUMN_1 | type: boolean | rows: | - ['FALSE', false] @@ -5945,7 +5945,7 @@ SELECT d, d AND false FROM t9 WHERE d =3D 'FALSE'; | - metadata: | - name: D | type: string - | - name: d AND false + | - name: COLUMN_1 | type: boolean | rows: | - ['FALSE', false] @@ -6010,7 +6010,7 @@ SELECT true AND 'false'; SELECT false AND 'false'; | --- | - metadata: - | - name: false AND 'false' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -6033,7 +6033,7 @@ SELECT 'false' AND true; SELECT 'false' AND false; | --- | - metadata: - | - name: '''false'' AND false' + | - name: COLUMN_1 | type: boolean | rows: | - [false] @@ -6100,7 +6100,7 @@ SELECT d, false AND d FROM t9 WHERE d =3D 'false'; | - metadata: | - name: D | type: string - | - name: false AND d + | - name: COLUMN_1 | type: boolean | rows: | - ['false', false] @@ -6125,7 +6125,7 @@ SELECT d, d AND false FROM t9 WHERE d =3D 'false'; | - metadata: | - name: D | type: string - | - name: d AND false + | - name: COLUMN_1 | type: boolean | rows: | - ['false', false] diff --git a/test/sql/collation.result b/test/sql/collation.result index 4e4c27ef0..ea39b0294 100644 --- a/test/sql/collation.result +++ b/test/sql/collation.result @@ -111,7 +111,7 @@ box.execute([[SELECT descriptor, upper(letter), = letter FROM tu where UPPER(lette - metadata: - name: DESCRIPTOR type: string - - name: upper(letter) + - name: COLUMN_1 type: string - name: LETTER type: string @@ -124,7 +124,7 @@ box.execute([[SELECT descriptor, upper(letter = COLLATE "GERMAN"), letter FROM tu - metadata: - name: DESCRIPTOR type: string - - name: upper(letter COLLATE "GERMAN") + - name: COLUMN_1 type: string - name: LETTER type: string @@ -335,14 +335,14 @@ box.execute("SELECT a FROM t UNION SELECT c FROM = t;") box.execute("SELECT c COLLATE \"binary\" FROM t UNION SELECT a FROM = t;") --- - metadata: - - name: c COLLATE "binary" + - name: C type: string rows: [] ... box.execute("SELECT b COLLATE \"unicode\" FROM t UNION SELECT a FROM = t;") --- - metadata: - - name: b COLLATE "unicode" + - name: B type: string rows: [] ... @@ -1128,7 +1128,7 @@ box.execute("INSERT INTO jj VALUES (1,'A'), = (2,'a')") box.execute("SELECT DISTINCT trim(s2) FROM jj;") --- - metadata: - - name: trim(s2) + - name: COLUMN_1 type: string rows: - ['A'] @@ -1140,7 +1140,7 @@ box.execute("INSERT INTO jj VALUES (3, 'aS'), (4, = 'AS');") box.execute("SELECT DISTINCT replace(s2, 'S', 's') FROM jj;") --- - metadata: - - name: replace(s2, 'S', 's') + - name: COLUMN_1 type: string rows: - ['A'] @@ -1149,7 +1149,7 @@ box.execute("SELECT DISTINCT replace(s2, 'S', 's') = FROM jj;") box.execute("SELECT DISTINCT substr(s2, 1, 1) FROM jj;") --- - metadata: - - name: substr(s2, 1, 1) + - name: COLUMN_1 type: string rows: - ['A'] diff --git a/test/sql/errinj.result b/test/sql/errinj.result index 68c001f28..f19203bc6 100644 --- a/test/sql/errinj.result +++ b/test/sql/errinj.result @@ -120,7 +120,7 @@ insert_res select_res --- - metadata: - - name: '1' + - name: COLUMN_1 type: integer rows: - [1] diff --git a/test/sql/foreign-keys.result b/test/sql/foreign-keys.result index f1d973443..33689a06e 100644 --- a/test/sql/foreign-keys.result +++ b/test/sql/foreign-keys.result @@ -357,7 +357,7 @@ box.execute('ALTER TABLE tc ADD CONSTRAINT fk1 = FOREIGN KEY (id) REFERENCES tp(id box.execute('SELECT row_count();') --- - metadata: - - name: row_count() + - name: COLUMN_1 type: integer rows: - [1] @@ -374,7 +374,7 @@ box.execute('ALTER TABLE tc DROP CONSTRAINT fk1;') box.execute('SELECT row_count();') --- - metadata: - - name: row_count() + - name: COLUMN_1 type: integer rows: - [1] diff --git a/test/sql/full_metadata.result = b/test/sql/full_metadata.result index 5a93c41ec..d8b7e59e6 100644 --- a/test/sql/full_metadata.result +++ b/test/sql/full_metadata.result @@ -57,7 +57,7 @@ execute("SELECT 'aSd' COLLATE \"unicode_ci\";") | - metadata: | - type: string | span: '''aSd'' COLLATE "unicode_ci"' - | name: '''aSd'' COLLATE "unicode_ci"' + | name: COLUMN_1 | collation: unicode_ci | rows: | - ['aSd'] @@ -65,7 +65,7 @@ execute("SELECT 'aSd' COLLATE \"unicode_ci\";") execute("SELECT c FROM t;") | --- | - metadata: - | - span: C + | - span: c | type: string | is_nullable: true | name: C @@ -76,9 +76,10 @@ execute("SELECT c FROM t;") execute("SELECT c COLLATE \"unicode\" FROM t;") | --- | - metadata: - | - type: string - | span: c COLLATE "unicode" - | name: c COLLATE "unicode" + | - span: c COLLATE "unicode" + | type: string + | is_nullable: true + | name: C | collation: unicode | rows: | - ['aSd'] @@ -89,16 +90,16 @@ execute("SELECT c COLLATE \"unicode\" FROM t;") execute("SELECT id, a, c FROM t;") | --- | - metadata: - | - span: ID + | - span: id | type: integer | is_autoincrement: true | name: ID | is_nullable: false | - type: integer - | span: A + | span: a | name: A | is_nullable: false - | - span: C + | - span: c | type: string | is_nullable: true | name: C @@ -165,7 +166,7 @@ execute("SELECT *, id + 1 AS x, a AS y, c || 'abc' = FROM t;") | is_nullable: false | - type: string | span: c || 'abc' - | name: c || 'abc' + | name: COLUMN_1 | rows: | - [1, 1, 'aSd', 2, 1, 'aSdabc'] | ... @@ -185,8 +186,8 @@ execute("SELECT * FROM v;") | name: Y | is_nullable: false | - type: string - | span: c || 'abc' - | name: c || 'abc' + | span: COLUMN_1 + | name: COLUMN_1 | rows: | - [2, 1, 'aSdabc'] | ... diff --git a/test/sql/func-recreate.result = b/test/sql/func-recreate.result index 3709df787..5fd2b79c0 100644 --- a/test/sql/func-recreate.result +++ b/test/sql/func-recreate.result @@ -48,7 +48,7 @@ test_run:cmd("setopt delimiter ''"); ch:get() --- - metadata: - - name: WAITFOR(0.2) + - name: COLUMN_1 type: number rows: - [0.2] diff --git a/test/sql/gh-3199-no-mem-leaks.result = b/test/sql/gh-3199-no-mem-leaks.result index d8590779a..6ce8df436 100644 --- a/test/sql/gh-3199-no-mem-leaks.result +++ b/test/sql/gh-3199-no-mem-leaks.result @@ -32,7 +32,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y') type: integer - name: Y type: integer - - name: x + y + - name: COLUMN_1 type: integer rows: - [1, 1, 2] @@ -49,7 +49,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y') type: integer - name: Y type: integer - - name: x + y + - name: COLUMN_1 type: integer rows: - [1, 1, 2] @@ -62,7 +62,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y') type: integer - name: Y type: integer - - name: x + y + - name: COLUMN_1 type: integer rows: - [1, 1, 2] @@ -75,7 +75,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y') type: integer - name: Y type: integer - - name: x + y + - name: COLUMN_1 type: integer rows: - [1, 1, 2] @@ -88,7 +88,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y') type: integer - name: Y type: integer - - name: x + y + - name: COLUMN_1 type: integer rows: - [1, 1, 2] @@ -115,7 +115,7 @@ box.execute('SELECT a, id + 2, b FROM test2 WHERE b = < id * 2 ORDER BY a ') - metadata: - name: A type: string - - name: id + 2 + - name: COLUMN_1 type: integer - name: B type: integer @@ -134,7 +134,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 = WHERE b < id * 2 ORDER BY a ') - metadata: - name: A type: string - - name: id + 2 * b + - name: COLUMN_1 type: integer - name: A type: string @@ -149,7 +149,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 = WHERE b < id * 2 ORDER BY a ') - metadata: - name: A type: string - - name: id + 2 * b + - name: COLUMN_1 type: integer - name: A type: string @@ -164,7 +164,7 @@ box.execute('SELECT a, id + 2 * b, a FROM test2 = WHERE b < id * 2 ORDER BY a ') - metadata: - name: A type: string - - name: id + 2 * b + - name: COLUMN_1 type: integer - name: A type: string @@ -183,7 +183,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test = WHERE b =3D x') - metadata: - name: X type: integer - - name: y + 3 * b + - name: COLUMN_1 type: integer - name: B type: integer @@ -196,7 +196,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test = WHERE b =3D x') - metadata: - name: X type: integer - - name: y + 3 * b + - name: COLUMN_1 type: integer - name: B type: integer @@ -209,7 +209,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test = WHERE b =3D x') - metadata: - name: X type: integer - - name: y + 3 * b + - name: COLUMN_1 type: integer - name: B type: integer diff --git a/test/sql/gh-3888-values-blob-assert.result = b/test/sql/gh-3888-values-blob-assert.result index 0a1af28f2..669f2eb2f 100644 --- a/test/sql/gh-3888-values-blob-assert.result +++ b/test/sql/gh-3888-values-blob-assert.result @@ -51,7 +51,7 @@ box.execute('SELECT TheColumnName') box.execute('VALUES(-0.5e-2)') --- - metadata: - - name: column1 + - name: COLUMN_1 type: double rows: - [-0.005] @@ -59,7 +59,7 @@ box.execute('VALUES(-0.5e-2)') box.execute('SELECT X\'507265766564\'') --- - metadata: - - name: X'507265766564' + - name: COLUMN_1 type: varbinary rows: - ['Preved'] @@ -68,7 +68,7 @@ box.execute('SELECT X\'507265766564\'') box.execute('SELECT 3.14') --- - metadata: - - name: '3.14' + - name: COLUMN_1 type: double rows: - [3.14] @@ -76,7 +76,7 @@ box.execute('SELECT 3.14') box.execute('SELECT X\'4D6564766564\'') --- - metadata: - - name: X'4D6564766564' + - name: COLUMN_1 type: varbinary rows: - ['Medved'] diff --git a/test/sql/icu-upper-lower.result = b/test/sql/icu-upper-lower.result index f7b9dfa38..3ecc07d94 100644 --- a/test/sql/icu-upper-lower.result +++ b/test/sql/icu-upper-lower.result @@ -23,11 +23,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' Z=C9=99f=C9=99r, jaketini d=C9=99, papa=C4=9F=C4=B1= n=C4=B1 da g=C3=B6t=C3=BCr, bu ax=C5=9Fam hava =C3=A7ox soyuq - olacaq. ') + - name: COLUMN_1 type: string - - name: upper(' Z=C9=99f=C9=99r, jaketini d=C9=99, papa=C4=9F=C4=B1= n=C4=B1 da g=C3=B6t=C3=BCr, bu ax=C5=9Fam hava =C3=A7ox soyuq - olacaq. ') + - name: COLUMN_2 type: string rows: - [' z=C9=99f=C9=99r, jaketini d=C9=99, papa=C4=9F=C4=B1n=C4=B1 = da g=C3=B6t=C3=BCr, bu ax=C5=9Fam hava =C3=A7ox soyuq olacaq. ', @@ -38,9 +36,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' The quick brown fox jumps over the lazy dog. ') + - name: COLUMN_1 type: string - - name: upper(' The quick brown fox jumps over the lazy dog. ') + - name: COLUMN_2 type: string rows: - [' the quick brown fox jumps over the lazy dog. ', ' THE = QUICK BROWN FOX @@ -52,9 +50,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' The quick brown fox jumps over the lazy dog. ') + - name: COLUMN_1 type: string - - name: upper(' The quick brown fox jumps over the lazy dog. ') + - name: COLUMN_2 type: string rows: - [' the quick brown fox jumps over the lazy dog. ', ' THE = QUICK BROWN FOX @@ -66,11 +64,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' =D4=B2=D5=A5=D5=AC =D5=A4=D5=B2=D5=B5=D5=A1=D5=AF=D5= =AB =D5=B1=D5=A1=D5=AD =D5=AA=D5=A1=D5=B4=D5=B6 =D6=85=D6=86 = =D5=A1=D5=A6=D5=A3=D5=B8=D6=82=D5=A9=D5=B5=D5=A1=D5=B6=D5=A8 = =D6=81=D5=BA=D5=A1=D5=B0=D5=A1=D5=B6=D5=BB =D5=B9=D5=B3=D5=B7=D5=BF=D5=A1=D5= =AE =D5=BE=D5=B6=D5=A1=D5=BD =D5=A7=D6=80 =D5=A5=D6=82 - =D6=83=D5=A1=D5=BC=D6=84 ') + - name: COLUMN_1 type: string - - name: upper(' =D4=B2=D5=A5=D5=AC =D5=A4=D5=B2=D5=B5=D5=A1=D5=AF=D5= =AB =D5=B1=D5=A1=D5=AD =D5=AA=D5=A1=D5=B4=D5=B6 =D6=85=D6=86 = =D5=A1=D5=A6=D5=A3=D5=B8=D6=82=D5=A9=D5=B5=D5=A1=D5=B6=D5=A8 = =D6=81=D5=BA=D5=A1=D5=B0=D5=A1=D5=B6=D5=BB =D5=B9=D5=B3=D5=B7=D5=BF=D5=A1=D5= =AE =D5=BE=D5=B6=D5=A1=D5=BD =D5=A7=D6=80 =D5=A5=D6=82 - =D6=83=D5=A1=D5=BC=D6=84 ') + - name: COLUMN_2 type: string rows: - [' =D5=A2=D5=A5=D5=AC =D5=A4=D5=B2=D5=B5=D5=A1=D5=AF=D5=AB = =D5=B1=D5=A1=D5=AD =D5=AA=D5=A1=D5=B4=D5=B6 =D6=85=D6=86 = =D5=A1=D5=A6=D5=A3=D5=B8=D6=82=D5=A9=D5=B5=D5=A1=D5=B6=D5=A8 = =D6=81=D5=BA=D5=A1=D5=B0=D5=A1=D5=B6=D5=BB =D5=B9=D5=B3=D5=B7=D5=BF=D5=A1=D5= =AE =D5=BE=D5=B6=D5=A1=D5=BD =D5=A7=D6=80 =D5=A5=D6=82 =D6=83=D5=A1=D5=BC=D6= =84 ', ' =D4=B2=D4=B5=D4=BC @@ -82,11 +78,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' =D0=A3 =D0=86=D1=9E=D1=96 =D1=85=D1=83=D0=B4=D1=8B = =D0=B6=D0=B2=D0=B0=D0=B2=D1=8B =D1=87=D0=BE=D1=80=D1=82 =D1=83 = =D0=B7=D1=8F=D0=BB=D1=91=D0=BD=D0=B0=D0=B9 =D0=BA=D0=B0=D0=BC=D1=96=D0=B7=D1= =8D=D0=BB=D1=8C=D1=86=D1=8B =D0=BF=D0=B0=D0=B1=D0=B5=D0=B3 = =D0=BF=D0=B0=D0=B4=E2=80=99=D0=B5=D1=81=D1=86=D1=96 =D1=84=D0=B0=D1=80=D1=88= =D1=83 - =D0=B7 =D1=8E=D1=88=D0=BA=D0=B0=D0=B9 ') + - name: COLUMN_1 type: string - - name: upper(' =D0=A3 =D0=86=D1=9E=D1=96 =D1=85=D1=83=D0=B4=D1=8B = =D0=B6=D0=B2=D0=B0=D0=B2=D1=8B =D1=87=D0=BE=D1=80=D1=82 =D1=83 = =D0=B7=D1=8F=D0=BB=D1=91=D0=BD=D0=B0=D0=B9 =D0=BA=D0=B0=D0=BC=D1=96=D0=B7=D1= =8D=D0=BB=D1=8C=D1=86=D1=8B =D0=BF=D0=B0=D0=B1=D0=B5=D0=B3 = =D0=BF=D0=B0=D0=B4=E2=80=99=D0=B5=D1=81=D1=86=D1=96 =D1=84=D0=B0=D1=80=D1=88= =D1=83 - =D0=B7 =D1=8E=D1=88=D0=BA=D0=B0=D0=B9 ') + - name: COLUMN_2 type: string rows: - [' =D1=83 =D1=96=D1=9E=D1=96 =D1=85=D1=83=D0=B4=D1=8B = =D0=B6=D0=B2=D0=B0=D0=B2=D1=8B =D1=87=D0=BE=D1=80=D1=82 =D1=83 = =D0=B7=D1=8F=D0=BB=D1=91=D0=BD=D0=B0=D0=B9 =D0=BA=D0=B0=D0=BC=D1=96=D0=B7=D1= =8D=D0=BB=D1=8C=D1=86=D1=8B =D0=BF=D0=B0=D0=B1=D0=B5=D0=B3 = =D0=BF=D0=B0=D0=B4=E2=80=99=D0=B5=D1=81=D1=86=D1=96 =D1=84=D0=B0=D1=80=D1=88= =D1=83 =D0=B7 =D1=8E=D1=88=D0=BA=D0=B0=D0=B9 ', @@ -98,11 +92,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' =CE=A4=CE=AC=CF=87=CE=B9=CF=83=CF=84=CE=B7 = =CE=B1=CE=BB=CF=8E=CF=80=CE=B7=CE=BE =CE=B2=CE=B1=CF=86=CE=AE=CF=82 = =CF=88=CE=B7=CE=BC=CE=AD=CE=BD=CE=B7 =CE=B3=CE=B7, = =CE=B4=CF=81=CE=B1=CF=83=CE=BA=CE=B5=CE=BB=CE=AF=CE=B6=CE=B5=CE=B9 = =CF=85=CF=80=CE=AD=CF=81 =CE=BD=CF=89=CE=B8=CF=81=CE=BF=CF=8D =CE=BA=CF=85= =CE=BD=CF=8C=CF=82 - ') + - name: COLUMN_1 type: string - - name: upper(' =CE=A4=CE=AC=CF=87=CE=B9=CF=83=CF=84=CE=B7 = =CE=B1=CE=BB=CF=8E=CF=80=CE=B7=CE=BE =CE=B2=CE=B1=CF=86=CE=AE=CF=82 = =CF=88=CE=B7=CE=BC=CE=AD=CE=BD=CE=B7 =CE=B3=CE=B7, = =CE=B4=CF=81=CE=B1=CF=83=CE=BA=CE=B5=CE=BB=CE=AF=CE=B6=CE=B5=CE=B9 = =CF=85=CF=80=CE=AD=CF=81 =CE=BD=CF=89=CE=B8=CF=81=CE=BF=CF=8D =CE=BA=CF=85= =CE=BD=CF=8C=CF=82 - ') + - name: COLUMN_2 type: string rows: - [' =CF=84=CE=AC=CF=87=CE=B9=CF=83=CF=84=CE=B7 =CE=B1=CE=BB=CF=8E=CF= =80=CE=B7=CE=BE =CE=B2=CE=B1=CF=86=CE=AE=CF=82 =CF=88=CE=B7=CE=BC=CE=AD=CE= =BD=CE=B7 =CE=B3=CE=B7, =CE=B4=CF=81=CE=B1=CF=83=CE=BA=CE=B5=CE=BB=CE=AF=CE= =B6=CE=B5=CE=B9 =CF=85=CF=80=CE=AD=CF=81 =CE=BD=CF=89=CE=B8=CF=81=CE=BF=CF= =8D =CE=BA=CF=85=CE=BD=CF=8C=CF=82 ', ' =CE=A4=CE=86=CE=A7=CE=99=CE=A3= =CE=A4=CE=97 @@ -114,11 +106,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' Chuaigh b=C3=A9 mh=C3=B3rsh=C3=A1ch le = dl=C3=BAthsp=C3=A1d f=C3=ADorfhinn tr=C3=AD hata mo dhea-phorc=C3=A1in - bhig ') + - name: COLUMN_1 type: string - - name: upper(' Chuaigh b=C3=A9 mh=C3=B3rsh=C3=A1ch le = dl=C3=BAthsp=C3=A1d f=C3=ADorfhinn tr=C3=AD hata mo dhea-phorc=C3=A1in - bhig ') + - name: COLUMN_2 type: string rows: - [' chuaigh b=C3=A9 mh=C3=B3rsh=C3=A1ch le dl=C3=BAthsp=C3=A1d = f=C3=ADorfhinn tr=C3=AD hata mo dhea-phorc=C3=A1in bhig ', @@ -130,9 +120,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' Quiere la boca exhausta vid, kiwi, pi=C3=B1a y = fugaz jam=C3=B3n ') + - name: COLUMN_1 type: string - - name: upper(' Quiere la boca exhausta vid, kiwi, pi=C3=B1a y = fugaz jam=C3=B3n ') + - name: COLUMN_2 type: string rows: - [' quiere la boca exhausta vid, kiwi, pi=C3=B1a y fugaz jam=C3=B3= n ', ' QUIERE LA @@ -144,9 +134,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' =ED=82=A4=EC=8A=A4=EC=9D=98 =EA=B3=A0=EC=9C=A0=EC=A1= =B0=EA=B1=B4=EC=9D=80 =EC=9E=85=EC=88=A0=EB=81=BC=EB=A6=AC =EB=A7=8C=EB=82= =98=EC=95=BC =ED=95=98=EA=B3=A0 =ED=8A=B9=EB=B3=84=ED=95=9C =EA=B8=B0=EC=88= =A0=EC=9D=80 =ED=95=84=EC=9A=94=EC=B9=98 =EC=95=8A=EB=8B=A4 ') + - name: COLUMN_1 type: string - - name: upper(' =ED=82=A4=EC=8A=A4=EC=9D=98 =EA=B3=A0=EC=9C=A0=EC=A1= =B0=EA=B1=B4=EC=9D=80 =EC=9E=85=EC=88=A0=EB=81=BC=EB=A6=AC =EB=A7=8C=EB=82= =98=EC=95=BC =ED=95=98=EA=B3=A0 =ED=8A=B9=EB=B3=84=ED=95=9C =EA=B8=B0=EC=88= =A0=EC=9D=80 =ED=95=84=EC=9A=94=EC=B9=98 =EC=95=8A=EB=8B=A4 ') + - name: COLUMN_2 type: string rows: - [' =ED=82=A4=EC=8A=A4=EC=9D=98 =EA=B3=A0=EC=9C=A0=EC=A1=B0=EA=B1=B4= =EC=9D=80 =EC=9E=85=EC=88=A0=EB=81=BC=EB=A6=AC =EB=A7=8C=EB=82=98=EC=95=BC= =ED=95=98=EA=B3=A0 =ED=8A=B9=EB=B3=84=ED=95=9C =EA=B8=B0=EC=88=A0=EC=9D=80= =ED=95=84=EC=9A=94=EC=B9=98 =EC=95=8A=EB=8B=A4 ', ' =ED=82=A4=EC=8A=A4= =EC=9D=98 =EA=B3=A0=EC=9C=A0=EC=A1=B0=EA=B1=B4=EC=9D=80 =EC=9E=85=EC=88=A0= =EB=81=BC=EB=A6=AC =EB=A7=8C=EB=82=98=EC=95=BC =ED=95=98=EA=B3=A0 = =ED=8A=B9=EB=B3=84=ED=95=9C @@ -158,9 +148,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' Gl=C4=81=C5=BE=C5=A1=C4=B7=C5=AB=C5=86a = r=C5=AB=C4=B7=C4=AB=C5=A1i dz=C4=93rum=C4=81 =C4=8Diepj Baha = koncertfl=C4=AB=C4=A3e=C4=BCu v=C4=81kus ') + - name: COLUMN_1 type: string - - name: upper(' Gl=C4=81=C5=BE=C5=A1=C4=B7=C5=AB=C5=86a = r=C5=AB=C4=B7=C4=AB=C5=A1i dz=C4=93rum=C4=81 =C4=8Diepj Baha = koncertfl=C4=AB=C4=A3e=C4=BCu v=C4=81kus ') + - name: COLUMN_2 type: string rows: - [' gl=C4=81=C5=BE=C5=A1=C4=B7=C5=AB=C5=86a r=C5=AB=C4=B7=C4=AB=C5= =A1i dz=C4=93rum=C4=81 =C4=8Diepj baha koncertfl=C4=AB=C4=A3e=C4=BCu = v=C4=81kus ', ' GL=C4=80=C5=BD=C5=A0=C4=B6=C5=AA=C5=85A @@ -172,11 +162,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' Zw=C3=B6lf gro=C3=9Fe Boxk=C3=A4mpfer jagen = Viktor quer =C3=BCber den Sylter Deich - ') + - name: COLUMN_1 type: string - - name: upper(' Zw=C3=B6lf gro=C3=9Fe Boxk=C3=A4mpfer jagen = Viktor quer =C3=BCber den Sylter Deich - ') + - name: COLUMN_2 type: string rows: - [' zw=C3=B6lf gro=C3=9Fe boxk=C3=A4mpfer jagen viktor quer = =C3=BCber den sylter deich ', ' ZW=C3=96LF @@ -188,9 +176,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' Pchn=C4=85=C4=87 w t=C4=99 =C5=82=C3=B3d=C5=BA = je=C5=BCa lub o=C5=9Bm skrzy=C5=84 fig. ') + - name: COLUMN_1 type: string - - name: upper(' Pchn=C4=85=C4=87 w t=C4=99 =C5=82=C3=B3d=C5=BA = je=C5=BCa lub o=C5=9Bm skrzy=C5=84 fig. ') + - name: COLUMN_2 type: string rows: - [' pchn=C4=85=C4=87 w t=C4=99 =C5=82=C3=B3d=C5=BA je=C5=BCa lub = o=C5=9Bm skrzy=C5=84 fig. ', ' PCHN=C4=84=C4=86 W T=C4=98 =C5=81=C3=93= D=C5=B9 JE=C5=BBA @@ -202,9 +190,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' =D0=A7=D1=83=D1=94=D1=88 =D1=97=D1=85, =D0=B4=D0=BE= =D1=86=D1=8E, =D0=B3=D0=B0? =D0=9A=D1=83=D0=BC=D0=B5=D0=B4=D0=BD=D0=B0 = =D0=B6 =D1=82=D0=B8, =D0=BF=D1=80=D0=BE=D1=89=D0=B0=D0=B9=D1=81=D1=8F = =D0=B1=D0=B5=D0=B7 =D2=91=D0=BE=D0=BB=D1=8C=D1=84=D1=96=D0=B2! ') + - name: COLUMN_1 type: string - - name: upper(' =D0=A7=D1=83=D1=94=D1=88 =D1=97=D1=85, =D0=B4=D0=BE= =D1=86=D1=8E, =D0=B3=D0=B0? =D0=9A=D1=83=D0=BC=D0=B5=D0=B4=D0=BD=D0=B0 = =D0=B6 =D1=82=D0=B8, =D0=BF=D1=80=D0=BE=D1=89=D0=B0=D0=B9=D1=81=D1=8F = =D0=B1=D0=B5=D0=B7 =D2=91=D0=BE=D0=BB=D1=8C=D1=84=D1=96=D0=B2! ') + - name: COLUMN_2 type: string rows: - [' =D1=87=D1=83=D1=94=D1=88 =D1=97=D1=85, =D0=B4=D0=BE=D1=86=D1=8E= , =D0=B3=D0=B0? =D0=BA=D1=83=D0=BC=D0=B5=D0=B4=D0=BD=D0=B0 =D0=B6 =D1=82=D0= =B8, =D0=BF=D1=80=D0=BE=D1=89=D0=B0=D0=B9=D1=81=D1=8F =D0=B1=D0=B5=D0=B7 = =D2=91=D0=BE=D0=BB=D1=8C=D1=84=D1=96=D0=B2! ', ' =D0=A7=D0=A3=D0=84=D0= =A8 =D0=87=D0=A5, @@ -216,9 +204,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' P=C5=99=C3=ADli=C5=A1 =C5=BElu=C5=A5ou=C4=8Dk=C3=BD= k=C5=AF=C5=88 =C3=BAp=C4=9Bl =C4=8F=C3=A1belsk=C3=A9 =C3=B3dy ') + - name: COLUMN_1 type: string - - name: upper(' P=C5=99=C3=ADli=C5=A1 =C5=BElu=C5=A5ou=C4=8Dk=C3=BD= k=C5=AF=C5=88 =C3=BAp=C4=9Bl =C4=8F=C3=A1belsk=C3=A9 =C3=B3dy ') + - name: COLUMN_2 type: string rows: - [' p=C5=99=C3=ADli=C5=A1 =C5=BElu=C5=A5ou=C4=8Dk=C3=BD k=C5=AF=C5= =88 =C3=BAp=C4=9Bl =C4=8F=C3=A1belsk=C3=A9 =C3=B3dy ', ' P=C5=98=C3=8D= LI=C5=A0 =C5=BDLU=C5=A4OU=C4=8CK=C3=9D K=C5=AE=C5=87 =C3=9AP=C4=9AL @@ -230,11 +218,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' La=C5=AD Ludoviko Zamenhof bongustas fre=C5=9Da = =C4=89e=C4=A5a man=C4=9Da=C4=B5o kun spicoj - ') + - name: COLUMN_1 type: string - - name: upper(' La=C5=AD Ludoviko Zamenhof bongustas fre=C5=9Da = =C4=89e=C4=A5a man=C4=9Da=C4=B5o kun spicoj - ') + - name: COLUMN_2 type: string rows: - [' la=C5=AD ludoviko zamenhof bongustas fre=C5=9Da =C4=89e=C4=A5a= man=C4=9Da=C4=B5o kun spicoj ', ' LA=C5=AC @@ -246,9 +232,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: lower(' =E3=81=84=E3=82=8D=E3=81=AF=E3=81=AB=E3=81=BB=E3=81= =B8=E3=81=A8 =E3=81=A1=E3=82=8A=E3=81=AC=E3=82=8B=E3=82=92 = =E3=82=8F=E3=81=8B=E3=82=88=E3=81=9F=E3=82=8C=E3=81=9D =E3=81=A4=E3=81=AD=E3= =81=AA=E3=82=89=E3=82=80 =E3=81=86=E3=82=90=E3=81=AE=E3=81=8A=E3=81=8F=E3=82= =84=E3=81=BE =E3=81=91=E3=81=B5=E3=81=93=E3=81=88=E3=81=A6 = =E3=81=82=E3=81=95=E3=81=8D=E3=82=86=E3=82=81=E3=81=BF=E3=81=97 = =E3=82=91=E3=81=B2=E3=82=82=E3=81=9B=E3=81=99 ') + - name: COLUMN_1 type: string - - name: upper(' =E3=81=84=E3=82=8D=E3=81=AF=E3=81=AB=E3=81=BB=E3=81= =B8=E3=81=A8 =E3=81=A1=E3=82=8A=E3=81=AC=E3=82=8B=E3=82=92 = =E3=82=8F=E3=81=8B=E3=82=88=E3=81=9F=E3=82=8C=E3=81=9D =E3=81=A4=E3=81=AD=E3= =81=AA=E3=82=89=E3=82=80 =E3=81=86=E3=82=90=E3=81=AE=E3=81=8A=E3=81=8F=E3=82= =84=E3=81=BE =E3=81=91=E3=81=B5=E3=81=93=E3=81=88=E3=81=A6 = =E3=81=82=E3=81=95=E3=81=8D=E3=82=86=E3=82=81=E3=81=BF=E3=81=97 = =E3=82=91=E3=81=B2=E3=82=82=E3=81=9B=E3=81=99 ') + - name: COLUMN_2 type: string rows: - [' =E3=81=84=E3=82=8D=E3=81=AF=E3=81=AB=E3=81=BB=E3=81=B8=E3=81=A8= =E3=81=A1=E3=82=8A=E3=81=AC=E3=82=8B=E3=82=92 =E3=82=8F=E3=81=8B=E3=82=88= =E3=81=9F=E3=82=8C=E3=81=9D =E3=81=A4=E3=81=AD=E3=81=AA=E3=82=89=E3=82=80 = =E3=81=86=E3=82=90=E3=81=AE=E3=81=8A=E3=81=8F=E3=82=84=E3=81=BE = =E3=81=91=E3=81=B5=E3=81=93=E3=81=88=E3=81=A6 =E3=81=82=E3=81=95=E3=81=8D=E3= =82=86=E3=82=81=E3=81=BF=E3=81=97 =E3=82=91=E3=81=B2=E3=82=82=E3=81=9B=E3=81= =99 ', ' =E3=81=84=E3=82=8D=E3=81=AF=E3=81=AB=E3=81=BB=E3=81=B8=E3=81=A8= @@ -260,9 +246,9 @@ upper_lower_test([[ ]]); --- - metadata: - - name: 'lower('' Pijamal=C4=B1 hasta ya=C4=9F=C4=B1z =C5=9Fof=C3=B6= re =C3=A7abucak g=C3=BCvendi. EXTRA: =C4=B0 '')' + - name: COLUMN_1 type: string - - name: 'upper('' Pijamal=C4=B1 hasta ya=C4=9F=C4=B1z =C5=9Fof=C3=B6= re =C3=A7abucak g=C3=BCvendi. EXTRA: =C4=B0 '')' + - name: COLUMN_2 type: string rows: - [' pijamal=C4=B1 hasta ya=C4=9F=C4=B1z =C5=9Fof=C3=B6re = =C3=A7abucak g=C3=BCvendi. extra: i=CC=87 ', ' PIJAMALI diff --git a/test/sql/integer-overflow.result = b/test/sql/integer-overflow.result index 6269cb547..a56fb2412 100644 --- a/test/sql/integer-overflow.result +++ b/test/sql/integer-overflow.result @@ -19,7 +19,7 @@ box.execute('SELECT (2147483647 * 2147483647 * = 2147483647);') box.execute('SELECT (-9223372036854775808 / -1);') --- - metadata: - - name: (-9223372036854775808 / -1) + - name: COLUMN_1 type: integer rows: - [9223372036854775808] @@ -32,7 +32,7 @@ box.execute('SELECT (-9223372036854775808 - 1);') box.execute('SELECT (9223372036854775807 + 1);') --- - metadata: - - name: (9223372036854775807 + 1) + - name: COLUMN_1 type: integer rows: - [9223372036854775808] @@ -50,7 +50,7 @@ box.execute('SELECT 18446744073709551615 * 2;') box.execute('SELECT (-9223372036854775807 * (-2));') --- - metadata: - - name: (-9223372036854775807 * (-2)) + - name: COLUMN_1 type: integer rows: - [18446744073709551614] @@ -60,7 +60,7 @@ box.execute('SELECT (-9223372036854775807 * (-2));') box.execute('SELECT 9223372036854775808;') --- - metadata: - - name: '9223372036854775808' + - name: COLUMN_1 type: integer rows: - [9223372036854775808] @@ -74,7 +74,7 @@ box.execute('SELECT -9223372036854775809;') box.execute('SELECT 9223372036854775808 - 1;') --- - metadata: - - name: 9223372036854775808 - 1 + - name: COLUMN_1 type: integer rows: - [9223372036854775807] @@ -82,7 +82,7 @@ box.execute('SELECT 9223372036854775808 - 1;') box.execute('SELECT 18446744073709551615;') --- - metadata: - - name: '18446744073709551615' + - name: COLUMN_1 type: integer rows: - [18446744073709551615] @@ -98,7 +98,7 @@ box.execute('SELECT 18446744073709551616;') box.execute('SELECT CAST(\'9223372036854775808\' AS INTEGER);') --- - metadata: - - name: CAST('9223372036854775808' AS INTEGER) + - name: COLUMN_1 type: integer rows: - [9223372036854775808] diff --git a/test/sql/iproto.result b/test/sql/iproto.result index 44ba499a0..ee1047fc1 100644 --- a/test/sql/iproto.result +++ b/test/sql/iproto.result @@ -372,11 +372,11 @@ parameters[3] =3D 33 cn:execute('select $2, $1, $3', parameters) --- - metadata: - - name: $2 + - name: COLUMN_1 type: integer - - name: $1 + - name: COLUMN_2 type: integer - - name: $3 + - name: COLUMN_3 type: integer rows: - [22, 11, 33] @@ -736,7 +736,7 @@ res.metadata cn:execute("SELECT zeroblob(1);") --- - metadata: - - name: zeroblob(1) + - name: COLUMN_1 type: varbinary rows: - ["\0"] @@ -749,7 +749,7 @@ res =3D cn:execute("SELECT randomblob(1);") ... res.metadata --- -- - name: randomblob(1) +- - name: COLUMN_1 type: varbinary ... -- Type set during compilation stage, and since min/max are accept @@ -759,7 +759,7 @@ res.metadata cn:execute("SELECT LEAST(1, 2, 3);") --- - metadata: - - name: LEAST(1, 2, 3) + - name: COLUMN_1 type: scalar rows: - [1] @@ -767,7 +767,7 @@ cn:execute("SELECT LEAST(1, 2, 3);") cn:execute("SELECT GREATEST(1, 2, 3);") --- - metadata: - - name: GREATEST(1, 2, 3) + - name: COLUMN_1 type: scalar rows: - [3] @@ -803,7 +803,7 @@ s =3D box.prepare([[ SELECT ?; ]]) s:execute({42}) --- - metadata: - - name: '?' + - name: COLUMN_1 type: integer rows: - [42] @@ -811,7 +811,7 @@ s:execute({42}) box.execute('SELECT 1;') --- - metadata: - - name: '1' + - name: COLUMN_1 type: integer rows: - [1] diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result index 1cd488f85..a90f30993 100644 --- a/test/sql/max-on-index.result +++ b/test/sql/max-on-index.result @@ -48,7 +48,7 @@ box.execute("INSERT INTO test2 VALUES(1, 2)"); box.execute("SELECT MAX(f1) FROM test1") --- - metadata: - - name: MAX(f1) + - name: COLUMN_1 type: scalar rows: - [4] @@ -56,7 +56,7 @@ box.execute("SELECT MAX(f1) FROM test1") box.execute("SELECT MAX(f2) FROM test1") --- - metadata: - - name: MAX(f2) + - name: COLUMN_1 type: scalar rows: - [3] @@ -64,7 +64,7 @@ box.execute("SELECT MAX(f2) FROM test1") box.execute("SELECT MAX(f1) FROM test2") --- - metadata: - - name: MAX(f1) + - name: COLUMN_1 type: scalar rows: - [1] diff --git a/test/sql/misc.result b/test/sql/misc.result index 0190a5897..6af11bfba 100644 --- a/test/sql/misc.result +++ b/test/sql/misc.result @@ -11,7 +11,7 @@ _ =3D = box.space._session_settings:update('sql_default_engine', {{'=3D', 2, = engine}}) box.execute('select 1;') --- - metadata: - - name: '1' + - name: COLUMN_1 type: integer rows: - [1] @@ -78,7 +78,7 @@ box.execute('CREATE TABLE test (id INTEGER PRIMARY = KEY, b TEXT CONSTRAINT c1 COL box.execute('SELECT 1;') --- - metadata: - - name: '1' + - name: COLUMN_1 type: integer rows: - [1] @@ -86,7 +86,7 @@ box.execute('SELECT 1;') box.execute('SELECT 1.5;') --- - metadata: - - name: '1.5' + - name: COLUMN_1 type: double rows: - [1.5] @@ -94,7 +94,7 @@ box.execute('SELECT 1.5;') box.execute('SELECT 1.0;') --- - metadata: - - name: '1.0' + - name: COLUMN_1 type: double rows: - [1] @@ -102,7 +102,7 @@ box.execute('SELECT 1.0;') box.execute('SELECT \'abc\';') --- - metadata: - - name: '''abc''' + - name: COLUMN_1 type: string rows: - ['abc'] @@ -110,7 +110,7 @@ box.execute('SELECT \'abc\';') box.execute('SELECT X\'4D6564766564\'') --- - metadata: - - name: X'4D6564766564' + - name: COLUMN_1 type: varbinary rows: - ['Medved'] diff --git a/test/sql/persistency.result b/test/sql/persistency.result index 6d14d4c4e..95dde5714 100644 --- a/test/sql/persistency.result +++ b/test/sql/persistency.result @@ -41,9 +41,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -57,9 +57,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar LIMIT 2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -72,9 +72,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo=3D2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['bar', 2, 42, 'awesome'] @@ -86,9 +86,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo>2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foobar', 1000, 42, 'awesome'] @@ -100,9 +100,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo>=3D2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['bar', 2, 42, 'awesome'] @@ -115,9 +115,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo=3D10000") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: [] ... @@ -128,9 +128,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo>10000") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: [] ... @@ -141,9 +141,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo<2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -155,9 +155,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo<2.001") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -170,9 +170,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo<=3D2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -185,9 +185,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo<100") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -200,9 +200,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE bar=3D'foo'") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -210,7 +210,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE bar=3D'foo'") box.execute("SELECT count(*) FROM foobar") --- - metadata: - - name: count(*) + - name: COLUMN_1 type: integer rows: - [3] @@ -218,7 +218,7 @@ box.execute("SELECT count(*) FROM foobar") box.execute("SELECT count(*) FROM foobar WHERE bar=3D'foo'") --- - metadata: - - name: count(*) + - name: COLUMN_1 type: integer rows: - [1] @@ -230,9 +230,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar ORDER BY bar") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['bar', 2, 42, 'awesome'] @@ -246,9 +246,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar ORDER BY bar DESC") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foobar', 1000, 42, 'awesome'] @@ -263,7 +263,7 @@ box.execute("REPLACE INTO foobar VALUES (1, = 'cacodaemon')") box.execute("SELECT COUNT(*) FROM foobar WHERE foo=3D1") --- - metadata: - - name: COUNT(*) + - name: COLUMN_1 type: integer rows: - [1] @@ -271,7 +271,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE = foo=3D1") box.execute("SELECT COUNT(*) FROM foobar WHERE bar=3D'cacodaemon'") --- - metadata: - - name: COUNT(*) + - name: COLUMN_1 type: integer rows: - [1] @@ -283,7 +283,7 @@ box.execute("DELETE FROM foobar WHERE = bar=3D'cacodaemon'") box.execute("SELECT COUNT(*) FROM foobar WHERE bar=3D'cacodaemon'") --- - metadata: - - name: COUNT(*) + - name: COLUMN_1 type: integer rows: - [0] diff --git a/test/sql/prepared.result b/test/sql/prepared.result index 666f6e1d3..428329b34 100644 --- a/test/sql/prepared.result +++ b/test/sql/prepared.result @@ -425,13 +425,13 @@ s =3D prepare("SELECT count(*), count(a - 3), = max(b), abs(id) FROM test WHERE b =3D execute(s.stmt_id) | --- | - metadata: - | - name: count(*) + | - name: COLUMN_1 | type: integer - | - name: count(a - 3) + | - name: COLUMN_2 | type: integer - | - name: max(b) + | - name: COLUMN_3 | type: scalar - | - name: abs(id) + | - name: COLUMN_4 | type: number | rows: | - [1, 1, '3', 1] @@ -439,13 +439,13 @@ execute(s.stmt_id) execute(s.stmt_id) | --- | - metadata: - | - name: count(*) + | - name: COLUMN_1 | type: integer - | - name: count(a - 3) + | - name: COLUMN_2 | type: integer - | - name: max(b) + | - name: COLUMN_3 | type: scalar - | - name: abs(id) + | - name: COLUMN_4 | type: number | rows: | - [1, 1, '3', 1] @@ -480,7 +480,7 @@ res =3D execute(s.stmt_id) | ... res.metadata | --- - | - - name: group_concat(TRIM(TRAILING FROM t),x'0a') + | - - name: COLUMN_1 | type: string | ... unprepare(s.stmt_id) @@ -838,11 +838,11 @@ s =3D prepare('SELECT :a, :b, :c'); execute(s.stmt_id, {{[':a'] =3D 1}, {[':b'] =3D 2}, {[':c'] =3D 3}}); | --- | - metadata: - | - name: :a + | - name: COLUMN_1 | type: integer - | - name: :b + | - name: COLUMN_2 | type: integer - | - name: :c + | - name: COLUMN_3 | type: integer | rows: | - [1, 2, 3] @@ -850,11 +850,11 @@ execute(s.stmt_id, {{[':a'] =3D 1}, {[':b'] =3D = 2}, {[':c'] =3D 3}}); execute(s.stmt_id, {{[':a'] =3D 1}, {[':b'] =3D 2}}); | --- | - metadata: - | - name: :a + | - name: COLUMN_1 | type: integer - | - name: :b + | - name: COLUMN_2 | type: integer - | - name: :c + | - name: COLUMN_3 | type: boolean | rows: | - [1, 2, null] @@ -862,11 +862,11 @@ execute(s.stmt_id, {{[':a'] =3D 1}, {[':b'] =3D = 2}}); execute(s.stmt_id); | --- | - metadata: - | - name: :a + | - name: COLUMN_1 | type: boolean - | - name: :b + | - name: COLUMN_2 | type: boolean - | - name: :c + | - name: COLUMN_3 | type: boolean | rows: | - [null, null, null] diff --git a/test/sql/row-count.result b/test/sql/row-count.result index 02acd79b5..7591d1630 100644 --- a/test/sql/row-count.result +++ b/test/sql/row-count.result @@ -16,7 +16,7 @@ box.execute("CREATE TABLE t1 (s1 VARCHAR(10) PRIMARY = KEY);") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [1] @@ -24,7 +24,7 @@ box.execute("SELECT ROW_COUNT();") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [0] @@ -36,7 +36,7 @@ box.execute("CREATE TABLE t2 (s1 VARCHAR(10) PRIMARY = KEY, s2 VARCHAR(10) REFEREN box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [1] @@ -52,7 +52,7 @@ box.execute("INSERT INTO t3 VALUES (0, 0, 0);") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [1] @@ -64,7 +64,7 @@ box.execute("CREATE TRIGGER x AFTER DELETE ON t1 FOR = EACH ROW BEGIN UPDATE t3 SE box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [1] @@ -76,7 +76,7 @@ box.execute("INSERT INTO t1 VALUES ('a');") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [1] @@ -88,7 +88,7 @@ box.execute("INSERT INTO t2 VALUES ('a','a');") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [1] @@ -100,7 +100,7 @@ box.execute("INSERT INTO t1 VALUES ('b'), ('c'), = ('d');") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [3] @@ -113,7 +113,7 @@ box.execute("REPLACE INTO t2 VALUES('a', 'c');") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [2] @@ -125,7 +125,7 @@ box.execute("DELETE FROM t1;") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [4] @@ -141,7 +141,7 @@ box.execute("TRUNCATE TABLE t3;") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [0] @@ -157,7 +157,7 @@ box.execute("UPDATE t3 SET i2 =3D 666;") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [3] @@ -172,7 +172,7 @@ box.execute("DELETE FROM t3 WHERE 0 =3D 0;") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [3] @@ -188,7 +188,7 @@ box.execute("DELETE FROM t3") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [3] @@ -222,7 +222,7 @@ box.execute("DELETE FROM tt1 WHERE id =3D 2;") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [1] @@ -252,7 +252,7 @@ box.execute("START TRANSACTION;") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [0] @@ -264,7 +264,7 @@ box.execute("COMMIT;") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [0] @@ -277,7 +277,7 @@ box.execute("COMMIT;") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [0] @@ -286,7 +286,7 @@ box.execute("SELECT ROW_COUNT();") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [0] @@ -308,7 +308,7 @@ box.execute("EXPLAIN QUERY PLAN INSERT INTO t1 = VALUES ('b'), ('c'), ('d');") box.execute("SELECT ROW_COUNT();") --- - metadata: - - name: ROW_COUNT() + - name: COLUMN_1 type: integer rows: - [0] diff --git a/test/sql/transition.result b/test/sql/transition.result index c14055b4e..8680e3cec 100644 --- a/test/sql/transition.result +++ b/test/sql/transition.result @@ -38,9 +38,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -54,9 +54,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar LIMIT 2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -69,9 +69,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo=3D2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['bar', 2, 42, 'awesome'] @@ -83,9 +83,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo>2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foobar', 1000, 42, 'awesome'] @@ -97,9 +97,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo>=3D2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['bar', 2, 42, 'awesome'] @@ -112,9 +112,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo=3D10000") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: [] ... @@ -125,9 +125,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo>10000") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: [] ... @@ -138,9 +138,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo<2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -152,9 +152,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo<2.001") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -167,9 +167,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo<=3D2") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -182,9 +182,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE foo<100") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -197,9 +197,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE bar=3D'foo'") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foo', 1, 42, 'awesome'] @@ -207,7 +207,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar WHERE bar=3D'foo'") box.execute("SELECT count(*) FROM foobar") --- - metadata: - - name: count(*) + - name: COLUMN_1 type: integer rows: - [3] @@ -215,7 +215,7 @@ box.execute("SELECT count(*) FROM foobar") box.execute("SELECT count(*) FROM foobar WHERE bar=3D'foo'") --- - metadata: - - name: count(*) + - name: COLUMN_1 type: integer rows: - [1] @@ -227,9 +227,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar ORDER BY bar") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['bar', 2, 42, 'awesome'] @@ -243,9 +243,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM = foobar ORDER BY bar DESC") type: string - name: FOO type: integer - - name: '42' + - name: COLUMN_1 type: integer - - name: '''awesome''' + - name: COLUMN_2 type: string rows: - ['foobar', 1000, 42, 'awesome'] @@ -260,7 +260,7 @@ box.execute("REPLACE INTO foobar VALUES (1, = 'cacodaemon')") box.execute("SELECT COUNT(*) FROM foobar WHERE foo=3D1") --- - metadata: - - name: COUNT(*) + - name: COLUMN_1 type: integer rows: - [1] @@ -268,7 +268,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE = foo=3D1") box.execute("SELECT COUNT(*) FROM foobar WHERE bar=3D'cacodaemon'") --- - metadata: - - name: COUNT(*) + - name: COLUMN_1 type: integer rows: - [1] @@ -280,7 +280,7 @@ box.execute("DELETE FROM foobar WHERE = bar=3D'cacodaemon'") box.execute("SELECT COUNT(*) FROM foobar WHERE bar=3D'cacodaemon'") --- - metadata: - - name: COUNT(*) + - name: COLUMN_1 type: integer rows: - [0] diff --git a/test/sql/types.result b/test/sql/types.result index 54aff460e..8204b22bd 100644 --- a/test/sql/types.result +++ b/test/sql/types.result @@ -54,8 +54,8 @@ box.execute("CREATE VIEW v1 AS SELECT b + a, b - a = FROM t1;") ... box.space.V1:format() --- -- [{'type': 'number', 'nullable_action': 'none', 'name': 'b + a', = 'is_nullable': true}, - {'type': 'number', 'nullable_action': 'none', 'name': 'b - a', = 'is_nullable': true}] +- [{'type': 'number', 'nullable_action': 'none', 'name': 'COLUMN_1', = 'is_nullable': true}, + {'type': 'number', 'nullable_action': 'none', 'name': 'COLUMN_2', = 'is_nullable': true}] ... -- gh-2494: index's part also features correct declared type. -- @@ -197,7 +197,7 @@ box.execute("SELECT randomblob(5) || 'x';") box.execute("VALUES (TYPEOF(randomblob(5) || zeroblob(5)));") --- - metadata: - - name: column1 + - name: COLUMN_1 type: string rows: - ['varbinary'] @@ -230,7 +230,7 @@ box.execute("SELECT * FROM t1 WHERE 'blob' LIKE = x'0000';") box.execute("SELECT s LIKE NULL FROM t1;") --- - metadata: - - name: s LIKE NULL + - name: COLUMN_1 type: integer rows: - [null] @@ -256,7 +256,7 @@ box.execute("SELECT * FROM t1 WHERE 'int' LIKE 4;") box.execute("SELECT NULL LIKE s FROM t1;") --- - metadata: - - name: NULL LIKE s + - name: COLUMN_1 type: integer rows: - [null] @@ -295,7 +295,7 @@ box.space.T1:drop() box.execute('SELECT 1 + 1;') --- - metadata: - - name: 1 + 1 + - name: COLUMN_1 type: integer rows: - [2] @@ -303,7 +303,7 @@ box.execute('SELECT 1 + 1;') box.execute('SELECT 1 + 1.1;') --- - metadata: - - name: 1 + 1.1 + - name: COLUMN_1 type: double rows: - [2.1] @@ -311,7 +311,7 @@ box.execute('SELECT 1 + 1.1;') box.execute('SELECT \'9223372036854\' + 1;') --- - metadata: - - name: '''9223372036854'' + 1' + - name: COLUMN_1 type: integer rows: - [9223372036855] @@ -320,7 +320,7 @@ box.execute('SELECT \'9223372036854\' + 1;') box.execute('SELECT ?', {true}) --- - metadata: - - name: '?' + - name: COLUMN_1 type: boolean rows: - [true] @@ -481,7 +481,7 @@ s:drop() box.execute("SELECT 18446744073709551615 > 18446744073709551614;") --- - metadata: - - name: 18446744073709551615 > 18446744073709551614 + - name: COLUMN_1 type: boolean rows: - [true] @@ -489,7 +489,7 @@ box.execute("SELECT 18446744073709551615 > = 18446744073709551614;") box.execute("SELECT 18446744073709551615 > -9223372036854775808;") --- - metadata: - - name: 18446744073709551615 > -9223372036854775808 + - name: COLUMN_1 type: boolean rows: - [true] @@ -497,7 +497,7 @@ box.execute("SELECT 18446744073709551615 > = -9223372036854775808;") box.execute("SELECT -1 < 18446744073709551615;") --- - metadata: - - name: -1 < 18446744073709551615 + - name: COLUMN_1 type: boolean rows: - [true] @@ -505,7 +505,7 @@ box.execute("SELECT -1 < 18446744073709551615;") box.execute("SELECT 1.5 < 18446744073709551615") --- - metadata: - - name: 1.5 < 18446744073709551615 + - name: COLUMN_1 type: boolean rows: - [true] @@ -513,7 +513,7 @@ box.execute("SELECT 1.5 < 18446744073709551615") box.execute("SELECT 1.5 > 18446744073709551615") --- - metadata: - - name: 1.5 > 18446744073709551615 + - name: COLUMN_1 type: boolean rows: - [false] @@ -521,7 +521,7 @@ box.execute("SELECT 1.5 > 18446744073709551615") box.execute("SELECT 18446744073709551615 > 1.5") --- - metadata: - - name: 18446744073709551615 > 1.5 + - name: COLUMN_1 type: boolean rows: - [true] @@ -529,7 +529,7 @@ box.execute("SELECT 18446744073709551615 > 1.5") box.execute("SELECT 18446744073709551615 < 1.5") --- - metadata: - - name: 18446744073709551615 < 1.5 + - name: COLUMN_1 type: boolean rows: - [false] @@ -537,7 +537,7 @@ box.execute("SELECT 18446744073709551615 < 1.5") box.execute("SELECT 18446744073709551615 =3D 18446744073709551615;") --- - metadata: - - name: 18446744073709551615 =3D 18446744073709551615 + - name: COLUMN_1 type: boolean rows: - [true] @@ -545,7 +545,7 @@ box.execute("SELECT 18446744073709551615 =3D = 18446744073709551615;") box.execute("SELECT 18446744073709551615 > -9223372036854775808;") --- - metadata: - - name: 18446744073709551615 > -9223372036854775808 + - name: COLUMN_1 type: boolean rows: - [true] @@ -553,7 +553,7 @@ box.execute("SELECT 18446744073709551615 > = -9223372036854775808;") box.execute("SELECT 18446744073709551615 < -9223372036854775808;") --- - metadata: - - name: 18446744073709551615 < -9223372036854775808 + - name: COLUMN_1 type: boolean rows: - [false] @@ -561,7 +561,7 @@ box.execute("SELECT 18446744073709551615 < = -9223372036854775808;") box.execute("SELECT -1 < 18446744073709551615;") --- - metadata: - - name: -1 < 18446744073709551615 + - name: COLUMN_1 type: boolean rows: - [true] @@ -569,7 +569,7 @@ box.execute("SELECT -1 < 18446744073709551615;") box.execute("SELECT -1 > 18446744073709551615;") --- - metadata: - - name: -1 > 18446744073709551615 + - name: COLUMN_1 type: boolean rows: - [false] @@ -577,7 +577,7 @@ box.execute("SELECT -1 > 18446744073709551615;") box.execute("SELECT 18446744073709551610 - 18446744073709551615;") --- - metadata: - - name: 18446744073709551610 - 18446744073709551615 + - name: COLUMN_1 type: integer rows: - [-5] @@ -585,7 +585,7 @@ box.execute("SELECT 18446744073709551610 - = 18446744073709551615;") box.execute("SELECT 18446744073709551615 =3D null;") --- - metadata: - - name: 18446744073709551615 =3D null + - name: COLUMN_1 type: boolean rows: - [null] @@ -593,7 +593,7 @@ box.execute("SELECT 18446744073709551615 =3D null;") box.execute("SELECT 18446744073709551615 =3D 18446744073709551615.0;") --- - metadata: - - name: 18446744073709551615 =3D 18446744073709551615.0 + - name: COLUMN_1 type: boolean rows: - [false] @@ -601,7 +601,7 @@ box.execute("SELECT 18446744073709551615 =3D = 18446744073709551615.0;") box.execute("SELECT 18446744073709551615.0 > 18446744073709551615") --- - metadata: - - name: 18446744073709551615.0 > 18446744073709551615 + - name: COLUMN_1 type: boolean rows: - [true] @@ -609,7 +609,7 @@ box.execute("SELECT 18446744073709551615.0 > = 18446744073709551615") box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', = 18446744073709551615.0)") --- - metadata: - - name: 18446744073709551615 IN ('18446744073709551615', = 18446744073709551615.0) + - name: COLUMN_1 type: boolean rows: - [true] @@ -617,7 +617,7 @@ box.execute("SELECT 18446744073709551615 IN = ('18446744073709551615', 18446744073 box.execute("SELECT 1 LIMIT 18446744073709551615;") --- - metadata: - - name: '1' + - name: COLUMN_1 type: integer rows: - [1] @@ -625,7 +625,7 @@ box.execute("SELECT 1 LIMIT 18446744073709551615;") box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;") --- - metadata: - - name: '1' + - name: COLUMN_1 type: integer rows: [] ... @@ -637,7 +637,7 @@ box.execute("SELECT CAST('18446744073' || = '709551616' AS INTEGER);") box.execute("SELECT CAST('18446744073' || '709551615' AS INTEGER);") --- - metadata: - - name: CAST('18446744073' || '709551615' AS INTEGER) + - name: COLUMN_1 type: integer rows: - [18446744073709551615] @@ -645,7 +645,7 @@ box.execute("SELECT CAST('18446744073' || = '709551615' AS INTEGER);") box.execute("SELECT 18446744073709551610 + 5;") --- - metadata: - - name: 18446744073709551610 + 5 + - name: COLUMN_1 type: integer rows: - [18446744073709551615] @@ -653,7 +653,7 @@ box.execute("SELECT 18446744073709551610 + 5;") box.execute("SELECT 18446744073709551615 * 1;") --- - metadata: - - name: 18446744073709551615 * 1 + - name: COLUMN_1 type: integer rows: - [18446744073709551615] @@ -661,7 +661,7 @@ box.execute("SELECT 18446744073709551615 * 1;") box.execute("SELECT 1 / 18446744073709551615;") --- - metadata: - - name: 1 / 18446744073709551615 + - name: COLUMN_1 type: integer rows: - [0] @@ -669,7 +669,7 @@ box.execute("SELECT 1 / 18446744073709551615;") box.execute("SELECT 18446744073709551615 / 18446744073709551615;") --- - metadata: - - name: 18446744073709551615 / 18446744073709551615 + - name: COLUMN_1 type: integer rows: - [1] @@ -677,7 +677,7 @@ box.execute("SELECT 18446744073709551615 / = 18446744073709551615;") box.execute("SELECT 18446744073709551615 / -9223372036854775808;") --- - metadata: - - name: 18446744073709551615 / -9223372036854775808 + - name: COLUMN_1 type: integer rows: - [-1] @@ -771,7 +771,7 @@ box.execute("INSERT INTO t VALUES (2, -1);") box.execute("SELECT sum(i) FROM t;") --- - metadata: - - name: sum(i) + - name: COLUMN_1 type: number rows: - [18446744073709551613] @@ -779,7 +779,7 @@ box.execute("SELECT sum(i) FROM t;") box.execute("SELECT avg(i) FROM t;") --- - metadata: - - name: avg(i) + - name: COLUMN_1 type: number rows: - [6148914691236516864] @@ -787,7 +787,7 @@ box.execute("SELECT avg(i) FROM t;") box.execute("SELECT total(i) FROM t;") --- - metadata: - - name: total(i) + - name: COLUMN_1 type: number rows: - [1.844674407371e+19] @@ -795,7 +795,7 @@ box.execute("SELECT total(i) FROM t;") box.execute("SELECT min(i) FROM t;") --- - metadata: - - name: min(i) + - name: COLUMN_1 type: scalar rows: - [-1] @@ -803,7 +803,7 @@ box.execute("SELECT min(i) FROM t;") box.execute("SELECT max(i) FROM t;") --- - metadata: - - name: max(i) + - name: COLUMN_1 type: scalar rows: - [18446744073709551613] @@ -811,7 +811,7 @@ box.execute("SELECT max(i) FROM t;") box.execute("SELECT count(i) FROM t;") --- - metadata: - - name: count(i) + - name: COLUMN_1 type: integer rows: - [3] @@ -819,7 +819,7 @@ box.execute("SELECT count(i) FROM t;") box.execute("SELECT group_concat(i) FROM t;") --- - metadata: - - name: group_concat(i) + - name: COLUMN_1 type: string rows: - ['1,-1,18446744073709551613'] @@ -831,7 +831,7 @@ box.execute("DELETE FROM t WHERE i < = 18446744073709551613;") box.execute("SELECT lower(i) FROM t;") --- - metadata: - - name: lower(i) + - name: COLUMN_1 type: string rows: - ['18446744073709551613'] @@ -839,7 +839,7 @@ box.execute("SELECT lower(i) FROM t;") box.execute("SELECT upper(i) FROM t;") --- - metadata: - - name: upper(i) + - name: COLUMN_1 type: string rows: - ['18446744073709551613'] @@ -847,7 +847,7 @@ box.execute("SELECT upper(i) FROM t;") box.execute("SELECT abs(i) FROM t;") --- - metadata: - - name: abs(i) + - name: COLUMN_1 type: number rows: - [18446744073709551613] @@ -855,7 +855,7 @@ box.execute("SELECT abs(i) FROM t;") box.execute("SELECT typeof(i) FROM t;") --- - metadata: - - name: typeof(i) + - name: COLUMN_1 type: string rows: - ['integer'] @@ -863,7 +863,7 @@ box.execute("SELECT typeof(i) FROM t;") box.execute("SELECT quote(i) FROM t;") --- - metadata: - - name: quote(i) + - name: COLUMN_1 type: string rows: - [18446744073709551613] @@ -871,7 +871,7 @@ box.execute("SELECT quote(i) FROM t;") box.execute("SELECT LEAST(-1, i) FROM t;") --- - metadata: - - name: LEAST(-1, i) + - name: COLUMN_1 type: scalar rows: - [-1] @@ -879,7 +879,7 @@ box.execute("SELECT LEAST(-1, i) FROM t;") box.execute("SELECT quote(i) FROM t;") --- - metadata: - - name: quote(i) + - name: COLUMN_1 type: string rows: - [18446744073709551613] @@ -1012,7 +1012,7 @@ box.space.T1:drop() box.execute("SELECT CAST(18446744073709551615 AS NUMBER);") --- - metadata: - - name: CAST(18446744073709551615 AS NUMBER) + - name: COLUMN_1 type: number rows: - [18446744073709551615] @@ -1020,7 +1020,7 @@ box.execute("SELECT CAST(18446744073709551615 AS = NUMBER);") box.execute("SELECT CAST(18446744073709551615 AS TEXT);") --- - metadata: - - name: CAST(18446744073709551615 AS TEXT) + - name: COLUMN_1 type: string rows: - ['18446744073709551615'] @@ -1028,7 +1028,7 @@ box.execute("SELECT CAST(18446744073709551615 AS = TEXT);") box.execute("SELECT CAST(18446744073709551615 AS SCALAR);") --- - metadata: - - name: CAST(18446744073709551615 AS SCALAR) + - name: COLUMN_1 type: scalar rows: - [18446744073709551615] @@ -1036,7 +1036,7 @@ box.execute("SELECT CAST(18446744073709551615 AS = SCALAR);") box.execute("SELECT CAST(18446744073709551615 AS BOOLEAN);") --- - metadata: - - name: CAST(18446744073709551615 AS BOOLEAN) + - name: COLUMN_1 type: boolean rows: - [true] @@ -1044,7 +1044,7 @@ box.execute("SELECT CAST(18446744073709551615 AS = BOOLEAN);") box.execute("SELECT CAST('18446744073709551615' AS INTEGER);") --- - metadata: - - name: CAST('18446744073709551615' AS INTEGER) + - name: COLUMN_1 type: integer rows: - [18446744073709551615] @@ -1077,7 +1077,7 @@ box.execute("SELECT id FROM t1;") box.execute("SELECT CAST(123 AS UNSIGNED);") --- - metadata: - - name: CAST(123 AS UNSIGNED) + - name: COLUMN_1 type: unsigned rows: - [123] @@ -1090,7 +1090,7 @@ box.execute("SELECT CAST(-123 AS UNSIGNED);") box.execute("SELECT CAST(1.5 AS UNSIGNED);") --- - metadata: - - name: CAST(1.5 AS UNSIGNED) + - name: COLUMN_1 type: unsigned rows: - [1] @@ -1098,7 +1098,7 @@ box.execute("SELECT CAST(1.5 AS UNSIGNED);") box.execute("SELECT CAST(-1.5 AS UNSIGNED);") --- - metadata: - - name: CAST(-1.5 AS UNSIGNED) + - name: COLUMN_1 type: unsigned rows: - [-1] @@ -1106,7 +1106,7 @@ box.execute("SELECT CAST(-1.5 AS UNSIGNED);") box.execute("SELECT CAST(true AS UNSIGNED);") --- - metadata: - - name: CAST(true AS UNSIGNED) + - name: COLUMN_1 type: unsigned rows: - [1] @@ -1114,7 +1114,7 @@ box.execute("SELECT CAST(true AS UNSIGNED);") box.execute("SELECT CAST('123' AS UNSIGNED);") --- - metadata: - - name: CAST('123' AS UNSIGNED) + - name: COLUMN_1 type: unsigned rows: - [123] @@ -1146,7 +1146,7 @@ box.space.T:drop() box.execute("SELECT CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' = END") --- - metadata: - - name: CASE 1 WHEN 1 THEN x'0000000000' WHEN 2 THEN 'str' END + - name: COLUMN_1 type: scalar rows: - ["\0\0\0\0\0"] @@ -1154,7 +1154,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN = x'0000000000' WHEN 2 THEN 'str' END") box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END") --- - metadata: - - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 END + - name: COLUMN_1 type: integer rows: - [666] @@ -1162,7 +1162,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 = THEN 123 END") box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 = END") --- - metadata: - - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 321 END + - name: COLUMN_1 type: integer rows: - [666] @@ -1170,7 +1170,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 = THEN 123 ELSE 321 END") box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' = END") --- - metadata: - - name: CASE 1 WHEN 1 THEN 666 WHEN 2 THEN 123 ELSE 'asd' END + - name: COLUMN_1 type: scalar rows: - [666] @@ -1178,8 +1178,7 @@ box.execute("SELECT CASE 1 WHEN 1 THEN 666 WHEN 2 = THEN 123 ELSE 'asd' END") box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' = THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 END;") --- - metadata: - - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN = 'd' THEN 4 - WHEN 'e' THEN 5 WHEN 'f' THEN 6 END + - name: COLUMN_1 type: integer rows: - [1] @@ -1187,8 +1186,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN = 'b' THEN 2 WHEN 'c' THEN 3 WHE box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' = THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END;") --- - metadata: - - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN = 'd' THEN 4 - WHEN 'e' THEN 5 WHEN 'f' THEN 'asd' END + - name: COLUMN_1 type: scalar rows: - [1] @@ -1196,8 +1194,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN = 'b' THEN 2 WHEN 'c' THEN 3 WHE box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' = THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END;") --- - metadata: - - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN = 'd' THEN 4 - WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 'asd' END + - name: COLUMN_1 type: scalar rows: - [1] @@ -1205,8 +1202,7 @@ box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN = 'b' THEN 2 WHEN 'c' THEN 3 WHE box.execute("SELECT CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' = THEN 3 WHEN 'd' THEN 4 WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END;") --- - metadata: - - name: CASE 'a' WHEN 'a' THEN 1 WHEN 'b' THEN 2 WHEN 'c' THEN 3 WHEN = 'd' THEN 4 - WHEN 'e' THEN 5 WHEN 'f' THEN 6 ELSE 7 END + - name: COLUMN_1 type: integer rows: - [1] @@ -1284,7 +1280,7 @@ box.execute("SELECT total(v) FROM t;") box.execute("SELECT min(v) FROM t;") --- - metadata: - - name: min(v) + - name: COLUMN_1 type: scalar rows: - ['abc'] @@ -1292,7 +1288,7 @@ box.execute("SELECT min(v) FROM t;") box.execute("SELECT max(v) FROM t;") --- - metadata: - - name: max(v) + - name: COLUMN_1 type: scalar rows: - ['abc'] @@ -1300,7 +1296,7 @@ box.execute("SELECT max(v) FROM t;") box.execute("SELECT count(v) FROM t;") --- - metadata: - - name: count(v) + - name: COLUMN_1 type: integer rows: - [1] @@ -1308,7 +1304,7 @@ box.execute("SELECT count(v) FROM t;") box.execute("SELECT group_concat(v) FROM t;") --- - metadata: - - name: group_concat(v) + - name: COLUMN_1 type: string rows: - ['abc'] @@ -1331,7 +1327,7 @@ box.execute("SELECT abs(v) FROM t;") box.execute("SELECT typeof(v) FROM t;") --- - metadata: - - name: typeof(v) + - name: COLUMN_1 type: string rows: - ['varbinary'] @@ -1339,7 +1335,7 @@ box.execute("SELECT typeof(v) FROM t;") box.execute("SELECT quote(v) FROM t;") --- - metadata: - - name: quote(v) + - name: COLUMN_1 type: string rows: - ['X''616263'''] @@ -1347,7 +1343,7 @@ box.execute("SELECT quote(v) FROM t;") box.execute("SELECT LEAST(v, x'') FROM t;") --- - metadata: - - name: LEAST(v, x'') + - name: COLUMN_1 type: scalar rows: - [''] @@ -1467,7 +1463,7 @@ box.execute("SELECT CAST(true AS VARBINARY);") box.execute("SELECT CAST('asd' AS VARBINARY);") --- - metadata: - - name: CAST('asd' AS VARBINARY) + - name: COLUMN_1 type: varbinary rows: - ['asd'] @@ -1475,7 +1471,7 @@ box.execute("SELECT CAST('asd' AS VARBINARY);") box.execute("SELECT CAST(x'' AS VARBINARY);") --- - metadata: - - name: CAST(x'' AS VARBINARY) + - name: COLUMN_1 type: varbinary rows: - [''] @@ -1494,9 +1490,9 @@ box.execute("INSERT INTO t VALUES (1, 1, 1), (2, = NULL, NULL);") box.execute("SELECT typeof(a), typeof(s) FROM t;") --- - metadata: - - name: typeof(a) + - name: COLUMN_1 type: string - - name: typeof(s) + - name: COLUMN_2 type: string rows: - ['integer', 'integer'] @@ -1513,7 +1509,7 @@ box.execute('INSERT INTO t1 VALUES (1, NULL, = NULL);') box.execute('SELECT typeof(a & b) FROM t1;') --- - metadata: - - name: typeof(a & b) + - name: COLUMN_1 type: string rows: - ['integer'] @@ -1521,11 +1517,11 @@ box.execute('SELECT typeof(a & b) FROM t1;') box.execute('SELECT typeof(a), typeof(b), typeof(a & b) FROM t1') --- - metadata: - - name: typeof(a) + - name: COLUMN_1 type: string - - name: typeof(b) + - name: COLUMN_2 type: string - - name: typeof(a & b) + - name: COLUMN_3 type: string rows: - ['integer', 'integer', 'integer'] @@ -1533,7 +1529,7 @@ box.execute('SELECT typeof(a), typeof(b), typeof(a = & b) FROM t1') box.execute("SELECT typeof(CAST(0 AS UNSIGNED));") --- - metadata: - - name: typeof(CAST(0 AS UNSIGNED)) + - name: COLUMN_1 type: string rows: - ['unsigned'] @@ -1693,7 +1689,7 @@ box.execute('DROP TABLE t1;') box.execute("SELECT 1.0;") --- - metadata: - - name: '1.0' + - name: COLUMN_1 type: double rows: - [1] @@ -1701,7 +1697,7 @@ box.execute("SELECT 1.0;") box.execute("SELECT .01;") --- - metadata: - - name: '.01' + - name: COLUMN_1 type: double rows: - [0.01] @@ -1709,7 +1705,7 @@ box.execute("SELECT .01;") box.execute("SELECT CAST(1 AS DOUBLE);") --- - metadata: - - name: CAST(1 AS DOUBLE) + - name: COLUMN_1 type: double rows: - [1] @@ -1717,7 +1713,7 @@ box.execute("SELECT CAST(1 AS DOUBLE);") box.execute("SELECT CAST(1.123 AS DOUBLE);") --- - metadata: - - name: CAST(1.123 AS DOUBLE) + - name: COLUMN_1 type: double rows: - [1.123] @@ -1735,7 +1731,7 @@ box.execute("SELECT CAST('asd' AS DOUBLE);") box.execute("SELECT CAST('1' AS DOUBLE);") --- - metadata: - - name: CAST('1' AS DOUBLE) + - name: COLUMN_1 type: double rows: - [1] @@ -1743,7 +1739,7 @@ box.execute("SELECT CAST('1' AS DOUBLE);") box.execute("SELECT CAST('1.123' AS DOUBLE);") --- - metadata: - - name: CAST('1.123' AS DOUBLE) + - name: COLUMN_1 type: double rows: - [1.123] @@ -1761,7 +1757,7 @@ box.execute("SELECT CAST(x'35' AS DOUBLE);") box.execute("SELECT CAST(CAST(x'35' AS STRING) AS DOUBLE);") --- - metadata: - - name: CAST(CAST(x'35' AS STRING) AS DOUBLE) + - name: COLUMN_1 type: double rows: - [5] @@ -1795,7 +1791,7 @@ box.execute('SELECT * FROM t;') box.execute('SELECT d / 100 FROM t;') --- - metadata: - - name: d / 100 + - name: COLUMN_1 type: double rows: - [0.1] @@ -1828,7 +1824,7 @@ box.execute('SELECT * from t WHERE d =3D 3.3;') box.execute("SELECT sum(d) FROM t;") --- - metadata: - - name: sum(d) + - name: COLUMN_1 type: number rows: - [18000000000000000000] @@ -1836,7 +1832,7 @@ box.execute("SELECT sum(d) FROM t;") box.execute("SELECT avg(d) FROM t;") --- - metadata: - - name: avg(d) + - name: COLUMN_1 type: number rows: - [4500000000000000000] @@ -1844,7 +1840,7 @@ box.execute("SELECT avg(d) FROM t;") box.execute("SELECT total(d) FROM t;") --- - metadata: - - name: total(d) + - name: COLUMN_1 type: number rows: - [18000000000000000000] @@ -1852,7 +1848,7 @@ box.execute("SELECT total(d) FROM t;") box.execute("SELECT min(d) FROM t;") --- - metadata: - - name: min(d) + - name: COLUMN_1 type: scalar rows: - [-2] @@ -1860,7 +1856,7 @@ box.execute("SELECT min(d) FROM t;") box.execute("SELECT max(d) FROM t;") --- - metadata: - - name: max(d) + - name: COLUMN_1 type: scalar rows: - [18000000000000000000] @@ -1868,7 +1864,7 @@ box.execute("SELECT max(d) FROM t;") box.execute("SELECT count(d) FROM t;") --- - metadata: - - name: count(d) + - name: COLUMN_1 type: integer rows: - [4] @@ -1876,7 +1872,7 @@ box.execute("SELECT count(d) FROM t;") box.execute("SELECT group_concat(d) FROM t;") --- - metadata: - - name: group_concat(d) + - name: COLUMN_1 type: string rows: - ['10.0,-2.0,3.3,1.8e+19'] @@ -1884,7 +1880,7 @@ box.execute("SELECT group_concat(d) FROM t;") box.execute("SELECT lower(d) FROM t;") --- - metadata: - - name: lower(d) + - name: COLUMN_1 type: string rows: - ['10.0'] @@ -1895,7 +1891,7 @@ box.execute("SELECT lower(d) FROM t;") box.execute("SELECT upper(d) FROM t;") --- - metadata: - - name: upper(d) + - name: COLUMN_1 type: string rows: - ['10.0'] @@ -1906,7 +1902,7 @@ box.execute("SELECT upper(d) FROM t;") box.execute("SELECT abs(d) FROM t;") --- - metadata: - - name: abs(d) + - name: COLUMN_1 type: number rows: - [10] @@ -1917,7 +1913,7 @@ box.execute("SELECT abs(d) FROM t;") box.execute("SELECT typeof(d) FROM t;") --- - metadata: - - name: typeof(d) + - name: COLUMN_1 type: string rows: - ['double'] @@ -1928,7 +1924,7 @@ box.execute("SELECT typeof(d) FROM t;") box.execute("SELECT quote(d) FROM t;") --- - metadata: - - name: quote(d) + - name: COLUMN_1 type: string rows: - ['10.0'] @@ -1939,7 +1935,7 @@ box.execute("SELECT quote(d) FROM t;") box.execute("SELECT LEAST(d, 0) FROM t;") --- - metadata: - - name: LEAST(d, 0) + - name: COLUMN_1 type: scalar rows: - [0] @@ -2081,9 +2077,9 @@ box.execute("DROP TABLE t4;") box.execute("SELECT 1.0, typeof(1.0);") --- - metadata: - - name: '1.0' + - name: COLUMN_1 type: double - - name: typeof(1.0) + - name: COLUMN_2 type: string rows: - [1, 'double'] @@ -2091,9 +2087,9 @@ box.execute("SELECT 1.0, typeof(1.0);") box.execute("SELECT CAST(2 AS DOUBLE), typeof(CAST(2 AS DOUBLE));") --- - metadata: - - name: CAST(2 AS DOUBLE) + - name: COLUMN_1 type: double - - name: typeof(CAST(2 AS DOUBLE)) + - name: COLUMN_2 type: string rows: - [2, 'double'] @@ -2101,9 +2097,9 @@ box.execute("SELECT CAST(2 AS DOUBLE), = typeof(CAST(2 AS DOUBLE));") box.execute("SELECT 3e3, typeof(3e3);") --- - metadata: - - name: '3e3' + - name: COLUMN_1 type: double - - name: typeof(3e3) + - name: COLUMN_2 type: string rows: - [3000, 'double'] @@ -2121,7 +2117,7 @@ box.execute("SELECT d, TYPEOF(d) FROM t5;") - metadata: - name: D type: double - - name: TYPEOF(d) + - name: COLUMN_1 type: string rows: - [4, 'double'] --=20 2.21.0 (Apple Git-122)