summaryrefslogtreecommitdiff
path: root/mysql-test/t/default.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-11-24 09:49:12 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-12 20:35:51 +0100
commit1db438c83386e0e58487056d6ea25a0f5e97f4d9 (patch)
tree7b40eb0c4a9a26fb1b56bae6f78ca64baa6d6318 /mysql-test/t/default.test
parent6eaa5fd21081c23f3d4da5be71a32886d98de5e9 (diff)
downloadmariadb-git-1db438c83386e0e58487056d6ea25a0f5e97f4d9.tar.gz
MDEV-11066 use MySQL terminology for "virtual columns"
Diffstat (limited to 'mysql-test/t/default.test')
-rw-r--r--mysql-test/t/default.test64
1 files changed, 32 insertions, 32 deletions
diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test
index 6eca3a64562..d9d7f429848 100644
--- a/mysql-test/t/default.test
+++ b/mysql-test/t/default.test
@@ -321,9 +321,9 @@ drop table t1;
--echo # Error handling
--echo #
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
create or replace table t1 (a bigint default xxx());
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
create or replace table t1 (a bigint default (select (1)));
--error ER_OPERAND_COLUMNS
create or replace table t1 (a bigint default (1,2,3));
@@ -338,13 +338,13 @@ CREATE TABLE t1 (a INT, b INT DEFAULT -a);
--echo # Invalid DEFAULT expressions
--echo #
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT ((SELECT 1)));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT (EXISTS (SELECT 1)));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT (1=ANY (SELECT 1)));
--error ER_OPERAND_COLUMNS
@@ -364,39 +364,39 @@ CREATE TABLE t1 (a INT DEFAULT(?));
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
CREATE TABLE t1 (a INT DEFAULT (b), b INT DEFAULT(a));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT @v);
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT @v:=1);
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT(NAME_CONST('xxx', 'yyy'));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT COUNT(*));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT COUNT(1));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT AVG(1));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT MIN(1));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT GROUP_CONCAT(1));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT ROW_NUMBER() OVER ());
CREATE FUNCTION f1() RETURNS INT RETURN 1;
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT f1());
DROP FUNCTION f1;
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE PROCEDURE p1(par INT) CREATE TABLE t1 (a INT DEFAULT par);
--error ER_BAD_FIELD_ERROR
@@ -407,18 +407,18 @@ CREATE PROCEDURE p1() CREATE TABLE t1 (a INT DEFAULT par);
CALL p1;
DROP PROCEDURE p1;
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT VALUES(a));
CREATE TABLE t1 (a INT);
# "Explicit or implicit commit is not allowed in stored function or trigger
# because the entire CREATE TABLE is actually not allowed in triggers!
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CREATE TABLE t2 (a INT DEFAULT NEW.a);
# This is OK to return Function or expression is not allowed for 'DEFAULT'
# because CREATE TEMPORARY TABLE is allowed in triggers
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CREATE TEMPORARY TABLE t2 (a INT DEFAULT NEW.a);
DROP TABLE t1;
@@ -930,37 +930,37 @@ INSERT INTO t1 VALUES ();
SELECT a>0 FROM t1;
DROP TABLE t1;
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT BENCHMARK(1,1));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT GET_LOCK('a',1));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT RELEASE_LOCK('a'));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT IS_USED_LOCK('a'));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT IS_FREE_LOCK('a'));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT SLEEP(1));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT ROW_COUNT());
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT FOUND_ROWS());
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT MASTER_POS_WAIT('test',100));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a INT DEFAULT MASTER_GTID_WAIT('test'));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a VARCHAR(30), b DOUBLE DEFAULT MATCH (a) AGAINST('bbbb' IN BOOLEAN MODE));
--echo #
@@ -1594,7 +1594,7 @@ INSERT INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT);
SELECT * FROM t1;
DROP TABLE t1;
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1 (a VARCHAR(30), b BLOB DEFAULT LOAD_FILE(a));
--echo #
@@ -1722,7 +1722,7 @@ DROP TABLE t1;
--echo #
# QQ: LAST_INSERT_ID() should probably be allowed
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
+--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED
CREATE TABLE t1
(
id SERIAL PRIMARY KEY,