[Tarantool-patches] [PATCH] sql: use unify pattern for column names
Roman Khabibov
roman.habibov at tarantool.org
Sun Feb 16 13:14:38 MSK 2020
Name resulting columns generated by an expression or <VALUES>
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. Auto
generated column is a column in a query result generated by an
expression or a column from <VALUES> construction.
---
Branch: https://github.com/tarantool/tarantool/tree/romanhabibov/gh-3962-column
Issue: https://github.com/tarantool/tarantool/issues/3962
src/box/sql/select.c | 8 +-
src/box/sql/sqlInt.h | 13 +
test/box/function1.result | 12 +-
test/sql-tap/colname.test.lua | 6 +-
test/sql-tap/select1.test.lua | 14 +-
test/sql/bind.result | 42 +-
test/sql/boolean.result | 350 ++++-----
test/sql/collation.result | 14 +-
test/sql/errinj.result | 2 +-
test/sql/foreign-keys.result | 4 +-
test/sql/full_metadata.result | 6 +-
test/sql/func-recreate.result | 2 +-
test/sql/gh-3199-no-mem-leaks.result | 24 +-
test/sql/gh-3888-values-blob-assert.result | 125 ++--
test/sql/icu-upper-lower.result | 82 +-
test/sql/integer-overflow.result | 14 +-
test/sql/iproto.result | 14 +-
test/sql/max-on-index.result | 6 +-
test/sql/misc.result | 299 ++++----
test/sql/persistency.result | 826 +++++++++++----------
test/sql/prepared.result | 18 +-
test/sql/row-count.result | 40 +-
test/sql/transition.result | 66 +-
test/sql/types.result | 222 +++---
24 files changed, 1119 insertions(+), 1090 deletions(-)
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index 65e41f219..a3e53f13b 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1852,12 +1852,10 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
const char *z = NULL;
if (colname != NULL)
z = colname;
- else if (span != NULL)
- z = span;
else
- z = tt_sprintf("column%d", i + 1);
+ z = sql_generate_column_name(i + 1);
vdbe_metadata_set_col_name(v, i, z);
- if (is_full_meta && colname != NULL)
+ if (is_full_meta)
vdbe_metadata_set_col_span(v, i, span);
}
}
@@ -1952,7 +1950,7 @@ sqlColumnsFromExprList(Parse * parse, ExprList * expr_list,
}
}
if (zName == NULL)
- zName = "_auto_field_";
+ zName = sql_generate_column_name(i + 1);
zName = sqlMPrintf(db, "%s", zName);
/* Make sure the column name is unique. If the name is not unique,
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index d1fcf4761..3d1b0a76e 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -4510,4 +4510,17 @@ int
sql_fieldno_by_name(struct Parse *parse_context, struct Expr *field_name,
uint32_t *fieldno);
+/**
+ * Return a string of the form "_COLUMN_N", where N is @a number.
+ *
+ * @param number Number of column.
+ *
+ * @retval string success.
+ */
+static inline char *
+sql_generate_column_name(uint32_t number)
+{
+ return (char *) tt_sprintf("_COLUMN_%d", number);
+}
+
#endif /* sqlINT_H */
diff --git a/test/box/function1.result b/test/box/function1.result
index b91d63c51..86cea4f3b 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..f8cd5cc0e 100755
--- a/test/sql-tap/colname.test.lua
+++ b/test/sql-tap/colname.test.lua
@@ -94,7 +94,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c, * FROM tabc
]], {
-- <colname-2.3>
- "+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
-- </colname-2.3>
})
@@ -194,7 +194,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-3.3>
- "+tabc.a", 1, "-tabc.b", -2, "C", 3
+ "_COLUMN_1",1,"_COLUMN_2",-2,"C",3
-- </colname-3.3>
})
@@ -314,7 +314,7 @@ test:do_execsql2_test(
SELECT +tabc.a, -tabc.b, tabc.c FROM tabc
]], {
-- <colname-4.3>
- "+tabc.a", 1, "-tabc.b", -2, "TABC.C", 3
+ "_COLUMN_1",1,"_COLUMN_2",-2,"TABC.C",3
-- </colname-4.3>
})
diff --git a/test/sql-tap/select1.test.lua b/test/sql-tap/select1.test.lua
index fbebfab37..f983843e5 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
]], {
-- <select1-6.4a>
- 0, {"f1+F2", 33, "f1+F2", 77}
+ 0, {"_COLUMN_1",33,"_COLUMN_1",77}
-- </select1-6.4a>
})
@@ -1042,7 +1042,7 @@ test:do_catchsql2_test(
SELECT test1.f1+F2 FROM test1 ORDER BY f2
]], {
-- <select1-6.5>
- 0, {"test1.f1+F2", 33, "test1.f1+F2", 77}
+ 0, {"_COLUMN_1",33,"_COLUMN_1",77}
-- </select1-6.5>
})
@@ -1059,7 +1059,7 @@ test:do_test(
return table.insert(v,msg) or v
end, {
-- <select1-6.5.1>
- 0, {'test1.f1+F2', 33, 'test1.f1+F2', 77}
+ 0, {"_COLUMN_1",33,"_COLUMN_1",77}
-- </select1-6.5.1>
})
@@ -1068,7 +1068,7 @@ test:do_catchsql2_test(
[[SELECT test1.f1+F2, t1 FROM test1, test2
ORDER BY f2]], {
-- <select1-6.6>
- 0, {"test1.f1+F2", 33, "T1", "abc", "test1.f1+F2", 77, "T1", "abc"}
+ 0, {"_COLUMN_1",33,"T1","abc","_COLUMN_1",77,"T1","abc"}
-- </select1-6.6>
})
@@ -1161,7 +1161,7 @@ test:do_test(
]]
end, {
-- <select1-6.9.5>
- "123.45", 123.45
+ "_COLUMN_1",123.45
-- </select1-6.9.5>
})
@@ -1850,7 +1850,7 @@ test:do_execsql2_test(
SELECT 1+2+3
]], {
-- <select1-12.1>
- "1+2+3", 6
+ "_COLUMN_1",6
-- </select1-12.1>
})
@@ -1860,7 +1860,7 @@ test:do_execsql2_test(
SELECT 1,'hello',2
]], {
-- <select1-12.2>
- '1', 1, "'hello'", "hello", '2', 2
+ "_COLUMN_1",1,"_COLUMN_2","hello","_COLUMN_3",2
-- </select1-12.2>
})
diff --git a/test/sql/bind.result b/test/sql/bind.result
index b24094052..fd6eac834 100644
--- a/test/sql/bind.result
+++ b/test/sql/bind.result
@@ -77,11 +77,11 @@ execute('SELECT * FROM test WHERE id = :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'] = 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'] = 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 = 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 7769d0cb3..8fe4306a0 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'] = 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]
@@ -517,9 +517,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']
@@ -527,9 +527,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]
@@ -539,11 +539,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]
@@ -551,9 +551,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]
@@ -561,9 +561,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]
@@ -571,9 +571,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]
@@ -882,7 +882,7 @@ SELECT a, COUNT(*) FROM (SELECT * FROM t4 UNION SELECT * FROM t5) GROUP BY a;
| - metadata:
| - name: A
| type: boolean
- | - name: COUNT(*)
+ | - name: _COLUMN_2
| type: integer
| rows:
| - [false, 3]
@@ -902,7 +902,7 @@ INSERT INTO t6 VALUES (true, false), (false, true);
SELECT NOT true;
| ---
| - metadata:
- | - name: NOT true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -910,7 +910,7 @@ SELECT NOT true;
SELECT NOT false;
| ---
| - metadata:
- | - name: NOT false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -920,7 +920,7 @@ SELECT a, NOT a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: NOT a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -930,7 +930,7 @@ SELECT a, NOT a FROM t;
SELECT true AND true;
| ---
| - metadata:
- | - name: true AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -938,7 +938,7 @@ SELECT true AND true;
SELECT true AND false;
| ---
| - metadata:
- | - name: true AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -946,7 +946,7 @@ SELECT true AND false;
SELECT false AND true;
| ---
| - metadata:
- | - name: false AND true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -954,7 +954,7 @@ SELECT false AND true;
SELECT false AND false;
| ---
| - metadata:
- | - name: false AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -962,7 +962,7 @@ SELECT false AND false;
SELECT true OR true;
| ---
| - metadata:
- | - name: true OR true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -970,7 +970,7 @@ SELECT true OR true;
SELECT true OR false;
| ---
| - metadata:
- | - name: true OR false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -978,7 +978,7 @@ SELECT true OR false;
SELECT false OR true;
| ---
| - metadata:
- | - name: false OR true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -986,7 +986,7 @@ SELECT false OR true;
SELECT false OR false;
| ---
| - metadata:
- | - name: false OR false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -997,7 +997,7 @@ SELECT a, true AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true AND a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1008,7 +1008,7 @@ SELECT a, false AND a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false AND a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1019,7 +1019,7 @@ SELECT a, true OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true OR a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1030,7 +1030,7 @@ SELECT a, false OR a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false OR a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1041,7 +1041,7 @@ SELECT a, a AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1052,7 +1052,7 @@ SELECT a, a AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1063,7 +1063,7 @@ SELECT a, a OR true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1074,7 +1074,7 @@ SELECT a, a OR false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a OR false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1088,7 +1088,7 @@ SELECT a, a1, a AND a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a AND a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1103,7 +1103,7 @@ SELECT a, a1, a OR a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a OR a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1617,7 +1617,7 @@ SELECT a1, a2, a2 || a2 FROM t6;
SELECT true > true;
| ---
| - metadata:
- | - name: true > true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1625,7 +1625,7 @@ SELECT true > true;
SELECT true > false;
| ---
| - metadata:
- | - name: true > false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1633,7 +1633,7 @@ SELECT true > false;
SELECT false > true;
| ---
| - metadata:
- | - name: false > true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1641,7 +1641,7 @@ SELECT false > true;
SELECT false > false;
| ---
| - metadata:
- | - name: false > false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1649,7 +1649,7 @@ SELECT false > false;
SELECT true < true;
| ---
| - metadata:
- | - name: true < true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1657,7 +1657,7 @@ SELECT true < true;
SELECT true < false;
| ---
| - metadata:
- | - name: true < false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1665,7 +1665,7 @@ SELECT true < false;
SELECT false < true;
| ---
| - metadata:
- | - name: false < true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1673,7 +1673,7 @@ SELECT false < true;
SELECT false < false;
| ---
| - metadata:
- | - name: false < false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1684,7 +1684,7 @@ SELECT a, true > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true > a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1695,7 +1695,7 @@ SELECT a, false > a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false > a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1706,7 +1706,7 @@ SELECT a, true < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true < a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1717,7 +1717,7 @@ SELECT a, false < a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false < a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1728,7 +1728,7 @@ SELECT a, a > true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1739,7 +1739,7 @@ SELECT a, a > false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a > false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1750,7 +1750,7 @@ SELECT a, a < true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1761,7 +1761,7 @@ SELECT a, a < false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a < false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1775,7 +1775,7 @@ SELECT a, a1, a > a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a > a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1790,7 +1790,7 @@ SELECT a, a1, a < a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a < a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -1802,7 +1802,7 @@ SELECT a, a1, a < a1 FROM t, t6;
SELECT true >= true;
| ---
| - metadata:
- | - name: true >= true
+ | - name: _COLUMN_1
| type: any
| rows:
| - [true]
@@ -1810,7 +1810,7 @@ SELECT true >= true;
SELECT true >= false;
| ---
| - metadata:
- | - name: true >= false
+ | - name: _COLUMN_1
| type: any
| rows:
| - [true]
@@ -1818,7 +1818,7 @@ SELECT true >= false;
SELECT false >= true;
| ---
| - metadata:
- | - name: false >= true
+ | - name: _COLUMN_1
| type: any
| rows:
| - [false]
@@ -1826,7 +1826,7 @@ SELECT false >= true;
SELECT false >= false;
| ---
| - metadata:
- | - name: false >= false
+ | - name: _COLUMN_1
| type: any
| rows:
| - [true]
@@ -1834,7 +1834,7 @@ SELECT false >= false;
SELECT true <= true;
| ---
| - metadata:
- | - name: true <= true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1842,7 +1842,7 @@ SELECT true <= true;
SELECT true <= false;
| ---
| - metadata:
- | - name: true <= false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -1850,7 +1850,7 @@ SELECT true <= false;
SELECT false <= true;
| ---
| - metadata:
- | - name: false <= true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1858,7 +1858,7 @@ SELECT false <= true;
SELECT false <= false;
| ---
| - metadata:
- | - name: false <= false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1869,7 +1869,7 @@ SELECT a, true >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true >= a
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, true]
@@ -1880,7 +1880,7 @@ SELECT a, false >= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false >= a
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, true]
@@ -1891,7 +1891,7 @@ SELECT a, true <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true <= a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -1902,7 +1902,7 @@ SELECT a, false <= a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false <= a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1913,7 +1913,7 @@ SELECT a, a >= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= true
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, false]
@@ -1924,7 +1924,7 @@ SELECT a, a >= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a >= false
+ | - name: _COLUMN_2
| type: any
| rows:
| - [false, true]
@@ -1935,7 +1935,7 @@ SELECT a, a <= true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1946,7 +1946,7 @@ SELECT a, a <= false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a <= false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -1960,7 +1960,7 @@ SELECT a, a1, a >= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a >= a1
+ | - name: _COLUMN_3
| type: any
| rows:
| - [false, false, true]
@@ -1975,7 +1975,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a <= a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, true]
@@ -1987,7 +1987,7 @@ SELECT a, a1, a <= a1 FROM t, t6;
SELECT true == true;
| ---
| - metadata:
- | - name: true == true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -1995,7 +1995,7 @@ SELECT true == true;
SELECT true == false;
| ---
| - metadata:
- | - name: true == false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2003,7 +2003,7 @@ SELECT true == false;
SELECT false == true;
| ---
| - metadata:
- | - name: false == true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2011,7 +2011,7 @@ SELECT false == true;
SELECT false == false;
| ---
| - metadata:
- | - name: false == false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2019,7 +2019,7 @@ SELECT false == false;
SELECT true != true;
| ---
| - metadata:
- | - name: true != true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2027,7 +2027,7 @@ SELECT true != true;
SELECT true != false;
| ---
| - metadata:
- | - name: true != false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2035,7 +2035,7 @@ SELECT true != false;
SELECT false != true;
| ---
| - metadata:
- | - name: false != true
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2043,7 +2043,7 @@ SELECT false != true;
SELECT false != false;
| ---
| - metadata:
- | - name: false != false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2054,7 +2054,7 @@ SELECT a, true == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true == a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2065,7 +2065,7 @@ SELECT a, false == a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false == a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2076,7 +2076,7 @@ SELECT a, true != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: true != a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2087,7 +2087,7 @@ SELECT a, false != a FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: false != a
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2098,7 +2098,7 @@ SELECT a, a == true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2109,7 +2109,7 @@ SELECT a, a == false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a == false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2120,7 +2120,7 @@ SELECT a, a != true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2131,7 +2131,7 @@ SELECT a, a != false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a != false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2145,7 +2145,7 @@ SELECT a, a1, a == a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a == a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, true]
@@ -2160,7 +2160,7 @@ SELECT a, a1, a != a1 FROM t, t6;
| type: boolean
| - name: A1
| type: boolean
- | - name: a != a1
+ | - name: _COLUMN_3
| type: boolean
| rows:
| - [false, false, false]
@@ -2172,7 +2172,7 @@ SELECT a, a1, a != a1 FROM t, t6;
SELECT true IN (true);
| ---
| - metadata:
- | - name: true IN (true)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2180,7 +2180,7 @@ SELECT true IN (true);
SELECT false IN (true);
| ---
| - metadata:
- | - name: false IN (true)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2188,7 +2188,7 @@ SELECT false IN (true);
SELECT true IN (false);
| ---
| - metadata:
- | - name: true IN (false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2196,7 +2196,7 @@ SELECT true IN (false);
SELECT false IN (false);
| ---
| - metadata:
- | - name: false IN (false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2204,7 +2204,7 @@ SELECT false IN (false);
SELECT true IN (true, false);
| ---
| - metadata:
- | - name: true IN (true, false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2212,7 +2212,7 @@ SELECT true IN (true, false);
SELECT false IN (true, false);
| ---
| - metadata:
- | - name: false IN (true, false)
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [true]
@@ -2220,7 +2220,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]
@@ -2228,7 +2228,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]
@@ -2236,7 +2236,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]
@@ -2244,7 +2244,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]
@@ -2252,7 +2252,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]
@@ -2260,7 +2260,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]
@@ -2271,7 +2271,7 @@ SELECT a, a IN (true) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2282,7 +2282,7 @@ SELECT a, a IN (false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (false)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2293,7 +2293,7 @@ SELECT a, a IN (true, false) FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a IN (true, false)
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2304,7 +2304,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_2
| type: boolean
| rows:
| - [false, true]
@@ -2315,7 +2315,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_2
| type: boolean
| rows:
| - [false, true]
@@ -2326,7 +2326,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_2
| type: boolean
| rows:
| - [false, true]
@@ -2336,7 +2336,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]
@@ -2344,7 +2344,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]
@@ -2352,7 +2352,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]
@@ -2360,7 +2360,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]
@@ -2368,7 +2368,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]
@@ -2376,7 +2376,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]
@@ -2384,7 +2384,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]
@@ -2392,7 +2392,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]
@@ -2403,7 +2403,7 @@ SELECT a, a BETWEEN true AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2414,7 +2414,7 @@ SELECT a, a BETWEEN false AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2425,7 +2425,7 @@ SELECT a, a BETWEEN true AND false FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN true AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, false]
@@ -2436,7 +2436,7 @@ SELECT a, a BETWEEN false AND true FROM t;
| - metadata:
| - name: A
| type: boolean
- | - name: a BETWEEN false AND true
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [false, true]
@@ -2461,7 +2461,7 @@ SELECT true AND 2;
SELECT false AND 2;
| ---
| - metadata:
- | - name: false AND 2
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2484,7 +2484,7 @@ SELECT 2 AND true;
SELECT 2 AND false;
| ---
| - metadata:
- | - name: 2 AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -2551,7 +2551,7 @@ SELECT b, false AND b FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: false AND b
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [123, false]
@@ -2576,7 +2576,7 @@ SELECT b, b AND false FROM t7;
| - metadata:
| - name: B
| type: integer
- | - name: b AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [123, false]
@@ -3856,7 +3856,7 @@ SELECT a2, b, b != 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]
@@ -3864,7 +3864,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]
@@ -3884,7 +3884,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_2
| type: boolean
| rows:
| - [false, false]
@@ -3930,7 +3930,7 @@ SELECT true AND 2.3;
SELECT false AND 2.3;
| ---
| - metadata:
- | - name: false AND 2.3
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -3953,7 +3953,7 @@ SELECT 2.3 AND true;
SELECT 2.3 AND false;
| ---
| - metadata:
- | - name: 2.3 AND false
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -4020,7 +4020,7 @@ SELECT c, false AND c FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: false AND c
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [4.56, false]
@@ -4045,7 +4045,7 @@ SELECT c, c AND false FROM t8;
| - metadata:
| - name: C
| type: number
- | - name: c AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - [4.56, false]
@@ -5001,7 +5001,7 @@ SELECT a2, c, c != 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]
@@ -5009,7 +5009,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]
@@ -5017,7 +5017,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]
@@ -5025,7 +5025,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]
@@ -5090,7 +5090,7 @@ SELECT true AND 'abc';
SELECT false AND 'abc';
| ---
| - metadata:
- | - name: false AND 'abc'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5113,7 +5113,7 @@ SELECT 'abc' AND true;
SELECT 'abc' AND false;
| ---
| - metadata:
- | - name: '''abc'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5180,7 +5180,7 @@ SELECT d, false AND d FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5205,7 +5205,7 @@ SELECT d, d AND false FROM t9;
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['AsdF', false]
@@ -5465,7 +5465,7 @@ SELECT true AND 'TRUE';
SELECT false AND 'TRUE';
| ---
| - metadata:
- | - name: false AND 'TRUE'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5488,7 +5488,7 @@ SELECT 'TRUE' AND true;
SELECT 'TRUE' AND false;
| ---
| - metadata:
- | - name: '''TRUE'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5555,7 +5555,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5580,7 +5580,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'TRUE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['TRUE', false]
@@ -5645,7 +5645,7 @@ SELECT true AND 'true';
SELECT false AND 'true';
| ---
| - metadata:
- | - name: false AND 'true'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5668,7 +5668,7 @@ SELECT 'true' AND true;
SELECT 'true' AND false;
| ---
| - metadata:
- | - name: '''true'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5735,7 +5735,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['true', false]
@@ -5760,7 +5760,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'true';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['true', false]
@@ -5825,7 +5825,7 @@ SELECT true AND 'FALSE';
SELECT false AND 'FALSE';
| ---
| - metadata:
- | - name: false AND 'FALSE'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5848,7 +5848,7 @@ SELECT 'FALSE' AND true;
SELECT 'FALSE' AND false;
| ---
| - metadata:
- | - name: '''FALSE'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -5915,7 +5915,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['FALSE', false]
@@ -5940,7 +5940,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'FALSE';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['FALSE', false]
@@ -6005,7 +6005,7 @@ SELECT true AND 'false';
SELECT false AND 'false';
| ---
| - metadata:
- | - name: false AND 'false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6028,7 +6028,7 @@ SELECT 'false' AND true;
SELECT 'false' AND false;
| ---
| - metadata:
- | - name: '''false'' AND false'
+ | - name: _COLUMN_1
| type: boolean
| rows:
| - [false]
@@ -6095,7 +6095,7 @@ SELECT d, false AND d FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: false AND d
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['false', false]
@@ -6120,7 +6120,7 @@ SELECT d, d AND false FROM t9 WHERE d = 'false';
| - metadata:
| - name: D
| type: string
- | - name: d AND false
+ | - name: _COLUMN_2
| type: boolean
| rows:
| - ['false', false]
diff --git a/test/sql/collation.result b/test/sql/collation.result
index 4e4c27ef0..b1035d569 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_2
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_2
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: _COLUMN_1
type: string
rows: []
...
box.execute("SELECT b COLLATE \"unicode\" FROM t UNION SELECT a FROM t;")
---
- metadata:
- - name: b COLLATE "unicode"
+ - name: _COLUMN_1
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..c41739bb7 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..3093b5852 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..697177ae1 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']
@@ -78,7 +78,7 @@ execute("SELECT c COLLATE \"unicode\" FROM t;")
| - metadata:
| - type: string
| span: c COLLATE "unicode"
- | name: c COLLATE "unicode"
+ | name: _COLUMN_1
| collation: unicode
| rows:
| - ['aSd']
@@ -165,7 +165,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_6
| rows:
| - [1, 1, 'aSd', 2, 1, 'aSdabc']
| ...
diff --git a/test/sql/func-recreate.result b/test/sql/func-recreate.result
index 3709df787..36e6b1fc4 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 35d8572b4..a049cfa65 100644
--- a/test/sql/gh-3199-no-mem-leaks.result
+++ b/test/sql/gh-3199-no-mem-leaks.result
@@ -29,7 +29,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -46,7 +46,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -59,7 +59,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -72,7 +72,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -85,7 +85,7 @@ box.execute('SELECT x, y, x + y FROM test ORDER BY y')
type: integer
- name: Y
type: integer
- - name: x + y
+ - name: _COLUMN_3
type: integer
rows:
- [1, 1, 2]
@@ -112,7 +112,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_2
type: integer
- name: B
type: integer
@@ -131,7 +131,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_2
type: integer
- name: A
type: string
@@ -146,7 +146,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_2
type: integer
- name: A
type: string
@@ -161,7 +161,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_2
type: integer
- name: A
type: string
@@ -180,7 +180,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
@@ -193,7 +193,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: _COLUMN_2
type: integer
- name: B
type: integer
@@ -206,7 +206,7 @@ box.execute('SELECT x, y + 3 * b, b FROM test2, test WHERE b = x')
- metadata:
- name: X
type: integer
- - name: y + 3 * b
+ - name: _COLUMN_2
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..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 = require('test_run').new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- check 'VALUES' against typedef keywords (should fail)
box.execute('VALUES(scalar)')
----
-- null
-- Syntax error at line 1 near 'scalar'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'scalar'
+ | ...
box.execute('VALUES(float)')
----
-- null
-- Syntax error at line 1 near 'float'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'float'
+ | ...
+
-- check 'SELECT' against typedef keywords (should fail)
box.execute('SELECT scalar')
----
-- null
-- Syntax error at line 1 near 'scalar'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'scalar'
+ | ...
box.execute('SELECT float')
----
-- null
-- Syntax error at line 1 near 'float'
-...
+ | ---
+ | - null
+ | - Syntax error at line 1 near 'float'
+ | ...
+
-- check 'VALUES' against ID (should fail)
box.execute('VALUES(TheColumnName)')
----
-- null
-- Can’t resolve field 'THECOLUMNNAME'
-...
+ | ---
+ | - null
+ | - Can’t resolve field 'THECOLUMNNAME'
+ | ...
+
-- check 'SELECT' against ID (should fail)
box.execute('SELECT TheColumnName')
----
-- null
-- Can’t resolve field 'THECOLUMNNAME'
-...
+ | ---
+ | - null
+ | - Can’t resolve field 'THECOLUMNNAME'
+ | ...
+
-- check 'VALUES' well-formed expression (returns value)
box.execute('VALUES(-0.5e-2)')
----
-- metadata:
- - name: column1
- type: double
- rows:
- - [-0.005]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [-0.005]
+ | ...
box.execute('SELECT X\'507265766564\'')
----
-- metadata:
- - name: X'507265766564'
- type: varbinary
- rows:
- - ['Preved']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Preved']
+ | ...
+
-- check 'SELECT' well-formed expression (return value)
box.execute('SELECT 3.14')
----
-- metadata:
- - name: '3.14'
- type: double
- rows:
- - [3.14]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [3.14]
+ | ...
box.execute('SELECT X\'4D6564766564\'')
----
-- metadata:
- - name: X'4D6564766564'
- type: varbinary
- rows:
- - ['Medved']
-...
+ | ---
+ | - metadata:
+ | - 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..8acaed2d4 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əfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Zəfər, jaketini də, papağını da götür, bu axşam hava çox soyuq
- olacaq. ')
+ - name: _COLUMN_2
type: string
rows:
- [' zəfər, jaketini də, papağını da götür, bu axşam hava çox 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(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ
- փառք ')
+ - name: _COLUMN_2
type: string
rows:
- [' բել դղյակի ձախ ժամն օֆ ազգությանը ցպահանջ չճշտած վնաս էր եւ փառք ', ' ԲԵԼ
@@ -82,11 +78,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: _COLUMN_1
type: string
- - name: upper(' У Іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу
- з юшкай ')
+ - name: _COLUMN_2
type: string
rows:
- [' у іўі худы жвавы чорт у зялёнай камізэльцы пабег пад’есці фаршу з юшкай ',
@@ -98,11 +92,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
- ')
+ - name: _COLUMN_2
type: string
rows:
- [' τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός ', ' ΤΆΧΙΣΤΗ
@@ -114,11 +106,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin
- bhig ')
+ - name: _COLUMN_2
type: string
rows:
- [' chuaigh bé mhórshách le dlúthspád fíorfhinn trí hata mo dhea-phorcáin bhig ',
@@ -130,9 +120,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Quiere la boca exhausta vid, kiwi, piña y fugaz jamón ')
+ - name: _COLUMN_2
type: string
rows:
- [' quiere la boca exhausta vid, kiwi, piña y fugaz jamón ', ' QUIERE LA
@@ -144,9 +134,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: _COLUMN_1
type: string
- - name: upper(' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ')
+ - name: _COLUMN_2
type: string
rows:
- [' 키스의 고유조건은 입술끼리 만나야 하고 특별한 기술은 필요치 않다 ', ' 키스의 고유조건은 입술끼리 만나야 하고 특별한
@@ -158,9 +148,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Glāžšķūņa rūķīši dzērumā čiepj Baha koncertflīģeļu vākus ')
+ - name: _COLUMN_2
type: string
rows:
- [' glāžšķūņa rūķīši dzērumā čiepj baha koncertflīģeļu vākus ', ' GLĀŽŠĶŪŅA
@@ -172,11 +162,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich
- ')
+ - name: _COLUMN_2
type: string
rows:
- [' zwölf große boxkämpfer jagen viktor quer über den sylter deich ', ' ZWÖLF
@@ -188,9 +176,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Pchnąć w tę łódź jeża lub ośm skrzyń fig. ')
+ - name: _COLUMN_2
type: string
rows:
- [' pchnąć w tę łódź jeża lub ośm skrzyń fig. ', ' PCHNĄĆ W TĘ ŁÓDŹ JEŻA
@@ -202,9 +190,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Чуєш їх, доцю, га? Кумедна ж ти, прощайся без ґольфів! ')
+ - name: _COLUMN_2
type: string
rows:
- [' чуєш їх, доцю, га? кумедна ж ти, прощайся без ґольфів! ', ' ЧУЄШ ЇХ,
@@ -216,9 +204,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Příliš žluťoučký kůň úpěl ďábelské ódy ')
+ - name: _COLUMN_2
type: string
rows:
- [' příliš žluťoučký kůň úpěl ďábelské ódy ', ' PŘÍLIŠ ŽLUŤOUČKÝ KŮŇ ÚPĚL
@@ -230,11 +218,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: _COLUMN_1
type: string
- - name: upper(' Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj
- ')
+ - name: _COLUMN_2
type: string
rows:
- [' laŭ ludoviko zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj ', ' LAŬ
@@ -246,9 +232,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: lower(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: _COLUMN_1
type: string
- - name: upper(' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ')
+ - name: _COLUMN_2
type: string
rows:
- [' いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす ', ' いろはにほへと
@@ -260,9 +246,9 @@ upper_lower_test([[
]]);
---
- metadata:
- - name: 'lower('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: _COLUMN_1
type: string
- - name: 'upper('' Pijamalı hasta yağız şoföre çabucak güvendi. EXTRA: İ '')'
+ - name: _COLUMN_2
type: string
rows:
- [' pijamalı hasta yağız şoföre çabucak güvendi. extra: i̇ ', ' PIJAMALI
diff --git a/test/sql/integer-overflow.result b/test/sql/integer-overflow.result
index db5c2f725..b383e44d4 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 7df11b0bf..6d8dd8e13 100644
--- a/test/sql/iproto.result
+++ b/test/sql/iproto.result
@@ -372,11 +372,11 @@ parameters[3] = 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 = 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]
diff --git a/test/sql/max-on-index.result b/test/sql/max-on-index.result
index 1cd488f85..35665ce58 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..552c5196d 100644
--- a/test/sql/misc.result
+++ b/test/sql/misc.result
@@ -1,142 +1,148 @@
+-- test-run result file version 2
test_run = require('test_run').new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- Forbid multistatement queries.
box.execute('select 1;')
----
-- metadata:
- - name: '1'
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute('select 1; select 2;')
----
-- null
-- 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
- quotes if ''select'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 11: keyword ''select'' is reserved. Please use double
+ | quotes if ''select'' is an identifier.'
+ | ...
box.execute('create table t1 (id INT primary key); select 100;')
----
-- null
-- 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
- quotes if ''select'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 39: keyword ''select'' is reserved. Please use double
+ | quotes if ''select'' is an identifier.'
+ | ...
box.space.t1 == nil
----
-- true
-...
+ | ---
+ | - true
+ | ...
box.execute(';')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute('')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute(' ;')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
box.execute('\n\n\n\t\t\t ')
----
-- null
-- Failed to execute an empty SQL statement
-...
+ | ---
+ | - null
+ | - Failed to execute an empty SQL statement
+ | ...
+
-- gh-3820: only table constraints can have a name.
--
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 NULL)')
----
-- null
-- 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
- quotes if ''NULL'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 68: keyword ''NULL'' is reserved. Please use double
+ | quotes if ''NULL'' is an identifier.'
+ | ...
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b INTEGER CONSTRAINT c1 DEFAULT 300)')
----
-- null
-- 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
- quotes if ''DEFAULT'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 68: keyword ''DEFAULT'' is reserved. Please use double
+ | quotes if ''DEFAULT'' is an identifier.'
+ | ...
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, b TEXT CONSTRAINT c1 COLLATE "binary")')
----
-- null
-- 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
- quotes if ''COLLATE'' is an identifier.'
-...
+ | ---
+ | - null
+ | - 'At line 1 at or near position 65: keyword ''COLLATE'' is reserved. Please use double
+ | quotes if ''COLLATE'' is an identifier.'
+ | ...
+
-- Make sure that type of literals in meta complies with its real
-- type. For instance, typeof(0.5) is number, not integer.
--
box.execute('SELECT 1;')
----
-- metadata:
- - name: '1'
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute('SELECT 1.5;')
----
-- metadata:
- - name: '1.5'
- type: double
- rows:
- - [1.5]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [1.5]
+ | ...
box.execute('SELECT 1.0;')
----
-- metadata:
- - name: '1.0'
- type: double
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: double
+ | rows:
+ | - [1]
+ | ...
box.execute('SELECT \'abc\';')
----
-- metadata:
- - name: '''abc'''
- type: string
- rows:
- - ['abc']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: string
+ | rows:
+ | - ['abc']
+ | ...
box.execute('SELECT X\'4D6564766564\'')
----
-- metadata:
- - name: X'4D6564766564'
- type: varbinary
- rows:
- - ['Medved']
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: varbinary
+ | rows:
+ | - ['Medved']
+ | ...
+
--
-- gh-4139: assertion when reading a temporary space.
--
format = {{name = 'id', type = 'integer'}}
----
-...
+ | ---
+ | ...
s = box.schema.space.create('s',{format=format, temporary=true})
----
-...
+ | ---
+ | ...
i = s:create_index('i')
----
-...
+ | ---
+ | ...
box.execute('select * from "s"')
----
-- metadata:
- - name: id
- type: integer
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: id
+ | type: integer
+ | rows: []
+ | ...
s:drop()
----
-...
+ | ---
+ | ...
+
--
-- gh-4267: Full power of vdbe_field_ref
-- Tarantool's SQL internally stores data offset for all acceded
@@ -151,56 +157,57 @@ s:drop()
-- beginning.
---
format = {}
----
-...
+ | ---
+ | ...
t = {}
----
-...
+ | ---
+ | ...
for i = 1, 70 do \
format[i] = {name = 'FIELD'..i, type = 'unsigned'} \
t[i] = i \
end
----
-...
+ | ---
+ | ...
s = box.schema.create_space('TEST', {format = format})
----
-...
+ | ---
+ | ...
pk = s:create_index('pk', {parts = {70}})
----
-...
+ | ---
+ | ...
s:insert(t)
----
-- [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70]
-...
+ | ---
+ | - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ | 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ | 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ | 63, 64, 65, 66, 67, 68, 69, 70]
+ | ...
box.execute('SELECT field70, field64 FROM test')
----
-- metadata:
- - name: FIELD70
- type: unsigned
- - name: FIELD64
- type: unsigned
- rows:
- - [70, 64]
-...
+ | ---
+ | - metadata:
+ | - name: FIELD70
+ | type: unsigned
+ | - name: FIELD64
+ | type: unsigned
+ | rows:
+ | - [70, 64]
+ | ...
+
-- In the case below described optimization works fine.
pk:alter({parts = {66}})
----
-...
+ | ---
+ | ...
box.execute('SELECT field66, field68, field70 FROM test')
----
-- metadata:
- - name: FIELD66
- type: unsigned
- - name: FIELD68
- type: unsigned
- - name: FIELD70
- type: unsigned
- rows:
- - [66, 68, 70]
-...
+ | ---
+ | - metadata:
+ | - name: FIELD66
+ | type: unsigned
+ | - name: FIELD68
+ | type: unsigned
+ | - name: FIELD70
+ | type: unsigned
+ | rows:
+ | - [66, 68, 70]
+ | ...
box.space.TEST:drop()
----
-...
+ | ---
+ | ...
diff --git a/test/sql/persistency.result b/test/sql/persistency.result
index 6d14d4c4e..307b5333b 100644
--- a/test/sql/persistency.result
+++ b/test/sql/persistency.result
@@ -1,475 +1,495 @@
+-- test-run result file version 2
env = require('test_run')
----
-...
+ | ---
+ | ...
test_run = env.new()
----
-...
+ | ---
+ | ...
engine = test_run:get_cfg('engine')
----
-...
+ | ---
+ | ...
_ = box.space._session_settings:update('sql_default_engine', {{'=', 2, engine}})
----
-...
+ | ---
+ | ...
+
-- create space
box.execute("CREATE TABLE foobar (foo INT PRIMARY KEY, bar TEXT)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- prepare data
box.execute("INSERT INTO foobar VALUES (1, 'foo')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO foobar VALUES (2, 'bar')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO foobar VALUES (1000, 'foobar')")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
box.execute("INSERT INTO foobar VALUES (1, 'duplicate')")
----
-- null
-- Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
-...
+ | ---
+ | - null
+ | - Duplicate key exists in unique index 'pk_unnamed_FOOBAR_1' in space 'FOOBAR'
+ | ...
+
-- simple select
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar LIMIT 2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows: []
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>10000")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows: []
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<2.001")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<100")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foo', 1, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foo', 1, 42, 'awesome']
+ | ...
box.execute("SELECT count(*) FROM foobar")
----
-- metadata:
- - name: count(*)
- type: integer
- rows:
- - [3]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [3]
+ | ...
box.execute("SELECT count(*) FROM foobar WHERE bar='foo'")
----
-- metadata:
- - name: count(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['bar', 2, 42, 'awesome']
- - ['foo', 1, 42, 'awesome']
- - ['foobar', 1000, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['bar', 2, 42, 'awesome']
+ | - ['foo', 1, 42, 'awesome']
+ | - ['foobar', 1000, 42, 'awesome']
+ | ...
box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar ORDER BY bar DESC")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: integer
- - name: '42'
- type: integer
- - name: '''awesome'''
- type: string
- rows:
- - ['foobar', 1000, 42, 'awesome']
- - ['foo', 1, 42, 'awesome']
- - ['bar', 2, 42, 'awesome']
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: integer
+ | - name: _COLUMN_3
+ | type: integer
+ | - name: _COLUMN_4
+ | type: string
+ | rows:
+ | - ['foobar', 1000, 42, 'awesome']
+ | - ['foo', 1, 42, 'awesome']
+ | - ['bar', 2, 42, 'awesome']
+ | ...
+
-- updates
box.execute("REPLACE INTO foobar VALUES (1, 'cacodaemon')")
----
-- row_count: 2
-...
+ | ---
+ | - row_count: 2
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [1]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [1]
+ | ...
box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
----
-- metadata:
- - name: COUNT(*)
- type: integer
- rows:
- - [0]
-...
+ | ---
+ | - metadata:
+ | - name: _COLUMN_1
+ | type: integer
+ | rows:
+ | - [0]
+ | ...
+
-- multi-index
+
-- create space
box.execute("CREATE TABLE barfoo (bar TEXT, foo NUMBER PRIMARY KEY)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("CREATE UNIQUE INDEX barfoo2 ON barfoo(bar)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- prepare data
box.execute("INSERT INTO barfoo VALUES ('foo', 1)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO barfoo VALUES ('bar', 2)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("INSERT INTO barfoo VALUES ('foobar', 1000)")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
+
-- create a trigger
box.execute("CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW BEGIN INSERT INTO barfoo VALUES ('trigger test', 9999); END")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- Many entries
box.execute("CREATE TABLE t1(a INT,b INT,c INT,PRIMARY KEY(b,c));")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000) INSERT INTO t1 SELECT x, x%40, x/40 FROM cnt;")
----
-- row_count: 1000
-...
+ | ---
+ | - row_count: 1000
+ | ...
box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
----
-- metadata:
- - name: A
- type: integer
- rows:
- - [840]
- - [880]
- - [920]
- - [960]
- - [1000]
- - [1]
- - [41]
- - [81]
- - [121]
- - [161]
-...
+ | ---
+ | - metadata:
+ | - name: A
+ | type: integer
+ | rows:
+ | - [840]
+ | - [880]
+ | - [920]
+ | - [960]
+ | - [1000]
+ | - [1]
+ | - [41]
+ | - [81]
+ | - [121]
+ | - [161]
+ | ...
+
test_run:cmd('restart server default');
+ |
+
-- prove that trigger survived
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"");
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- ... functional
box.execute("INSERT INTO foobar VALUES ('foobar trigger test', 8888)")
----
-- null
-- 'Type mismatch: can not convert foobar trigger test to integer'
-...
+ | ---
+ | - null
+ | - 'Type mismatch: can not convert foobar trigger test to integer'
+ | ...
box.execute("SELECT * FROM barfoo WHERE foo = 9999");
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: number
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: number
+ | rows: []
+ | ...
+
-- and still persistent
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows:
- - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
- BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows:
+ | - ['TFOOBAR', {'sql': 'CREATE TRIGGER tfoobar AFTER INSERT ON foobar FOR EACH ROW
+ | BEGIN INSERT INTO barfoo VALUES (''trigger test'', 9999); END'}]
+ | ...
+
-- and can be dropped just once
box.execute("DROP TRIGGER tfoobar")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
-- Should error
box.execute("DROP TRIGGER tfoobar")
----
-- null
-- Trigger 'TFOOBAR' doesn't exist
-...
+ | ---
+ | - null
+ | - Trigger 'TFOOBAR' doesn't exist
+ | ...
-- Should be empty
box.execute("SELECT \"name\", \"opts\" FROM \"_trigger\"")
----
-- metadata:
- - name: name
- type: string
- - name: opts
- type: map
- rows: []
-...
+ | ---
+ | - metadata:
+ | - name: name
+ | type: string
+ | - name: opts
+ | type: map
+ | rows: []
+ | ...
+
-- prove barfoo2 still exists
box.execute("INSERT INTO barfoo VALUES ('xfoo', 1)")
----
-- null
-- Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
-...
+ | ---
+ | - null
+ | - Duplicate key exists in unique index 'pk_unnamed_BARFOO_1' in space 'BARFOO'
+ | ...
+
box.execute("SELECT * FROM barfoo")
----
-- metadata:
- - name: BAR
- type: string
- - name: FOO
- type: number
- rows:
- - ['foo', 1]
- - ['bar', 2]
- - ['foobar', 1000]
-...
+ | ---
+ | - metadata:
+ | - name: BAR
+ | type: string
+ | - name: FOO
+ | type: number
+ | rows:
+ | - ['foo', 1]
+ | - ['bar', 2]
+ | - ['foobar', 1000]
+ | ...
box.execute("SELECT * FROM foobar");
----
-- metadata:
- - name: FOO
- type: integer
- - name: BAR
- type: string
- rows:
- - [2, 'bar']
- - [1000, 'foobar']
-...
+ | ---
+ | - metadata:
+ | - name: FOO
+ | type: integer
+ | - name: BAR
+ | type: string
+ | rows:
+ | - [2, 'bar']
+ | - [1000, 'foobar']
+ | ...
box.execute("SELECT a FROM t1 ORDER BY b, a LIMIT 10 OFFSET 20;");
----
-- metadata:
- - name: A
- type: integer
- rows:
- - [840]
- - [880]
- - [920]
- - [960]
- - [1000]
- - [1]
- - [41]
- - [81]
- - [121]
- - [161]
-...
+ | ---
+ | - metadata:
+ | - name: A
+ | type: integer
+ | rows:
+ | - [840]
+ | - [880]
+ | - [920]
+ | - [960]
+ | - [1000]
+ | - [1]
+ | - [41]
+ | - [81]
+ | - [121]
+ | - [161]
+ | ...
+
-- cleanup
box.execute("DROP TABLE foobar")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("DROP TABLE barfoo")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
box.execute("DROP TABLE t1")
----
-- row_count: 1
-...
+ | ---
+ | - row_count: 1
+ | ...
diff --git a/test/sql/prepared.result b/test/sql/prepared.result
index 5a16ea3b1..f3f79954e 100644
--- a/test/sql/prepared.result
+++ b/test/sql/prepared.result
@@ -425,13 +425,13 @@ s = prepare("SELECT count(*), count(a - 3), max(b), abs(id) FROM test WHERE b =
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 = execute(s.stmt_id)
| ...
res.metadata
| ---
- | - - name: group_concat(TRIM(TRAILING FROM t),x'0a')
+ | - - name: _COLUMN_1
| type: string
| ...
unprepare(s.stmt_id)
diff --git a/test/sql/row-count.result b/test/sql/row-count.result
index 02acd79b5..71b932285 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 = 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 = 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 = 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..0decc528c 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_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
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_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -69,9 +69,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
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_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foobar', 1000, 42, 'awesome']
@@ -97,9 +97,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo>=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['bar', 2, 42, 'awesome']
@@ -112,9 +112,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo=10000")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
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_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
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_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
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_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -167,9 +167,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE foo<=2")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
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_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -197,9 +197,9 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='foo'")
type: string
- name: FOO
type: integer
- - name: '42'
+ - name: _COLUMN_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
type: string
rows:
- ['foo', 1, 42, 'awesome']
@@ -207,7 +207,7 @@ box.execute("SELECT bar, foo, 42, 'awesome' FROM foobar WHERE bar='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='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_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
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_3
type: integer
- - name: '''awesome'''
+ - name: _COLUMN_4
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=1")
---
- metadata:
- - name: COUNT(*)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -268,7 +268,7 @@ box.execute("SELECT COUNT(*) FROM foobar WHERE foo=1")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -280,7 +280,7 @@ box.execute("DELETE FROM foobar WHERE bar='cacodaemon'")
box.execute("SELECT COUNT(*) FROM foobar WHERE bar='cacodaemon'")
---
- metadata:
- - name: COUNT(*)
+ - name: _COLUMN_1
type: integer
rows:
- [0]
diff --git a/test/sql/types.result b/test/sql/types.result
index f0c34b6fa..c8c7dfb1f 100644
--- a/test/sql/types.result
+++ b/test/sql/types.result
@@ -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]
@@ -270,7 +270,7 @@ box.space.T1:drop()
box.execute("SELECT CAST('1.123' AS INTEGER);")
---
- metadata:
- - name: CAST('1.123' AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -286,7 +286,7 @@ box.execute("INSERT INTO t1 VALUES('0.0'), ('1.5'), ('3.9312453');")
box.execute("SELECT CAST(f AS INTEGER) FROM t1;")
---
- metadata:
- - name: CAST(f AS INTEGER)
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -303,7 +303,7 @@ box.space.T1:drop()
box.execute('SELECT 1 + 1;')
---
- metadata:
- - name: 1 + 1
+ - name: _COLUMN_1
type: integer
rows:
- [2]
@@ -311,7 +311,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]
@@ -319,7 +319,7 @@ box.execute('SELECT 1 + 1.1;')
box.execute('SELECT \'9223372036854\' + 1;')
---
- metadata:
- - name: '''9223372036854'' + 1'
+ - name: _COLUMN_1
type: integer
rows:
- [9223372036855]
@@ -328,7 +328,7 @@ box.execute('SELECT \'9223372036854\' + 1;')
box.execute('SELECT ?', {true})
---
- metadata:
- - name: '?'
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -489,7 +489,7 @@ s:drop()
box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
---
- metadata:
- - name: 18446744073709551615 > 18446744073709551614
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -497,7 +497,7 @@ box.execute("SELECT 18446744073709551615 > 18446744073709551614;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -505,7 +505,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -513,7 +513,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT 1.5 < 18446744073709551615")
---
- metadata:
- - name: 1.5 < 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -521,7 +521,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]
@@ -529,7 +529,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]
@@ -537,7 +537,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]
@@ -545,7 +545,7 @@ box.execute("SELECT 18446744073709551615 < 1.5")
box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -553,7 +553,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615;")
box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 > -9223372036854775808
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -561,7 +561,7 @@ box.execute("SELECT 18446744073709551615 > -9223372036854775808;")
box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 < -9223372036854775808
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -569,7 +569,7 @@ box.execute("SELECT 18446744073709551615 < -9223372036854775808;")
box.execute("SELECT -1 < 18446744073709551615;")
---
- metadata:
- - name: -1 < 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -577,7 +577,7 @@ box.execute("SELECT -1 < 18446744073709551615;")
box.execute("SELECT -1 > 18446744073709551615;")
---
- metadata:
- - name: -1 > 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -585,7 +585,7 @@ box.execute("SELECT -1 > 18446744073709551615;")
box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551610 - 18446744073709551615
+ - name: _COLUMN_1
type: integer
rows:
- [-5]
@@ -593,7 +593,7 @@ box.execute("SELECT 18446744073709551610 - 18446744073709551615;")
box.execute("SELECT 18446744073709551615 = null;")
---
- metadata:
- - name: 18446744073709551615 = null
+ - name: _COLUMN_1
type: boolean
rows:
- [null]
@@ -601,7 +601,7 @@ box.execute("SELECT 18446744073709551615 = null;")
box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
---
- metadata:
- - name: 18446744073709551615 = 18446744073709551615.0
+ - name: _COLUMN_1
type: boolean
rows:
- [false]
@@ -609,7 +609,7 @@ box.execute("SELECT 18446744073709551615 = 18446744073709551615.0;")
box.execute("SELECT 18446744073709551615.0 > 18446744073709551615")
---
- metadata:
- - name: 18446744073709551615.0 > 18446744073709551615
+ - name: _COLUMN_1
type: boolean
rows:
- [true]
@@ -617,7 +617,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]
@@ -625,7 +625,7 @@ box.execute("SELECT 18446744073709551615 IN ('18446744073709551615', 18446744073
box.execute("SELECT 1 LIMIT 18446744073709551615;")
---
- metadata:
- - name: '1'
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -633,7 +633,7 @@ box.execute("SELECT 1 LIMIT 18446744073709551615;")
box.execute("SELECT 1 LIMIT 1 OFFSET 18446744073709551614;")
---
- metadata:
- - name: '1'
+ - name: _COLUMN_1
type: integer
rows: []
...
@@ -645,7 +645,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]
@@ -653,7 +653,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]
@@ -661,7 +661,7 @@ box.execute("SELECT 18446744073709551610 + 5;")
box.execute("SELECT 18446744073709551615 * 1;")
---
- metadata:
- - name: 18446744073709551615 * 1
+ - name: _COLUMN_1
type: integer
rows:
- [18446744073709551615]
@@ -669,7 +669,7 @@ box.execute("SELECT 18446744073709551615 * 1;")
box.execute("SELECT 1 / 18446744073709551615;")
---
- metadata:
- - name: 1 / 18446744073709551615
+ - name: _COLUMN_1
type: integer
rows:
- [0]
@@ -677,7 +677,7 @@ box.execute("SELECT 1 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
---
- metadata:
- - name: 18446744073709551615 / 18446744073709551615
+ - name: _COLUMN_1
type: integer
rows:
- [1]
@@ -685,7 +685,7 @@ box.execute("SELECT 18446744073709551615 / 18446744073709551615;")
box.execute("SELECT 18446744073709551615 / -9223372036854775808;")
---
- metadata:
- - name: 18446744073709551615 / -9223372036854775808
+ - name: _COLUMN_1
type: integer
rows:
- [-1]
@@ -779,7 +779,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]
@@ -787,7 +787,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]
@@ -795,7 +795,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]
@@ -803,7 +803,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]
@@ -811,7 +811,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]
@@ -819,7 +819,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]
@@ -827,7 +827,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']
@@ -839,7 +839,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']
@@ -847,7 +847,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']
@@ -855,7 +855,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]
@@ -863,7 +863,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']
@@ -871,7 +871,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]
@@ -879,7 +879,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]
@@ -887,7 +887,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]
@@ -1020,7 +1020,7 @@ box.space.T1:drop()
box.execute("SELECT CAST(18446744073709551615 AS NUMBER);")
---
- metadata:
- - name: CAST(18446744073709551615 AS NUMBER)
+ - name: _COLUMN_1
type: number
rows:
- [1.844674407371e+19]
@@ -1028,7 +1028,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']
@@ -1036,7 +1036,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]
@@ -1044,7 +1044,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]
@@ -1052,7 +1052,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]
@@ -1085,7 +1085,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]
@@ -1098,7 +1098,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]
@@ -1111,7 +1111,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]
@@ -1119,7 +1119,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]
@@ -1151,7 +1151,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"]
@@ -1159,7 +1159,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]
@@ -1167,7 +1167,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]
@@ -1175,7 +1175,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]
@@ -1183,8 +1183,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]
@@ -1192,8 +1191,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]
@@ -1201,8 +1199,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]
@@ -1210,8 +1207,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]
@@ -1289,7 +1285,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']
@@ -1297,7 +1293,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']
@@ -1305,7 +1301,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]
@@ -1313,7 +1309,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']
@@ -1336,7 +1332,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']
@@ -1344,7 +1340,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''']
@@ -1352,7 +1348,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:
- ['']
@@ -1472,7 +1468,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']
@@ -1480,7 +1476,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:
- ['']
@@ -1499,9 +1495,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']
@@ -1518,7 +1514,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']
@@ -1526,11 +1522,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']
@@ -1538,7 +1534,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']
@@ -1698,7 +1694,7 @@ box.execute('DROP TABLE t1;')
box.execute("SELECT 1.0;")
---
- metadata:
- - name: '1.0'
+ - name: _COLUMN_1
type: double
rows:
- [1]
@@ -1706,7 +1702,7 @@ box.execute("SELECT 1.0;")
box.execute("SELECT .01;")
---
- metadata:
- - name: '.01'
+ - name: _COLUMN_1
type: double
rows:
- [0.01]
@@ -1714,7 +1710,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]
@@ -1722,7 +1718,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]
@@ -1740,7 +1736,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]
@@ -1748,7 +1744,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]
@@ -1766,7 +1762,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]
@@ -1800,7 +1796,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]
@@ -1833,7 +1829,7 @@ box.execute('SELECT * from t WHERE d = 3.3;')
box.execute("SELECT sum(d) FROM t;")
---
- metadata:
- - name: sum(d)
+ - name: _COLUMN_1
type: number
rows:
- [18000000000000000000]
@@ -1841,7 +1837,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]
@@ -1849,7 +1845,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]
@@ -1857,7 +1853,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]
@@ -1865,7 +1861,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]
@@ -1873,7 +1869,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]
@@ -1881,7 +1877,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']
@@ -1889,7 +1885,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']
@@ -1900,7 +1896,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']
@@ -1911,7 +1907,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]
@@ -1922,7 +1918,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']
@@ -1933,7 +1929,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']
@@ -1944,7 +1940,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]
@@ -2086,9 +2082,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']
@@ -2096,9 +2092,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']
@@ -2106,9 +2102,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']
@@ -2126,7 +2122,7 @@ box.execute("SELECT d, TYPEOF(d) FROM t5;")
- metadata:
- name: D
type: double
- - name: TYPEOF(d)
+ - name: _COLUMN_2
type: string
rows:
- [4, 'double']
--
2.21.0 (Apple Git-122)
More information about the Tarantool-patches
mailing list