summaryrefslogtreecommitdiff
path: root/mysql-test/suite/vcol
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2010-07-13 07:34:14 -0700
committerIgor Babaev <igor@askmonty.org>2010-07-13 07:34:14 -0700
commit73be27c07f3283cb35e0fb7085b5068ab360bc01 (patch)
treecffb27f04190da0612b553bcaf451235463c194f /mysql-test/suite/vcol
parent6197332366ec1908af34b2415f01ccca7757f0c2 (diff)
downloadmariadb-git-73be27c07f3283cb35e0fb7085b5068ab360bc01.tar.gz
Fixed bug #604549.
There was no error thrown when creating a table with a virtual table computed by an expression returning a row. This caused a crash when inserting into the table. Removed periods at the end of the error messages for virtual columns. Adjusted output in test result files accordingly.
Diffstat (limited to 'mysql-test/suite/vcol')
-rw-r--r--mysql-test/suite/vcol/r/vcol_archive.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_blackhole.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result140
-rw-r--r--mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result142
-rw-r--r--mysql-test/suite/vcol/r/vcol_csv.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result20
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result20
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_innodb.result30
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_myisam.result30
-rw-r--r--mysql-test/suite/vcol/r/vcol_memory.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_merge.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_misc.result5
-rw-r--r--mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result4
-rw-r--r--mysql-test/suite/vcol/t/vcol_misc.test14
15 files changed, 223 insertions, 204 deletions
diff --git a/mysql-test/suite/vcol/r/vcol_archive.result b/mysql-test/suite/vcol/r/vcol_archive.result
index 1a046dc1fe2..83fb78a5592 100644
--- a/mysql-test/suite/vcol/r/vcol_archive.result
+++ b/mysql-test/suite/vcol/r/vcol_archive.result
@@ -1,7 +1,7 @@
SET @@session.storage_engine = 'archive';
create table t1 (a int, b int as (a+1));
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns.
+ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
create table t1 (a int);
alter table t1 add column b int as (a+1);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns.
+ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_blackhole.result b/mysql-test/suite/vcol/r/vcol_blackhole.result
index 3ee9f626aa9..15e7505aebb 100644
--- a/mysql-test/suite/vcol/r/vcol_blackhole.result
+++ b/mysql-test/suite/vcol/r/vcol_blackhole.result
@@ -1,7 +1,7 @@
SET @@session.storage_engine = 'blackhole';
create table t1 (a int, b int as (a+1));
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns.
+ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
create table t1 (a int);
alter table t1 add column b int as (a+1);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns.
+ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result
index 97991264066..a4099dff381 100644
--- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result
@@ -1,131 +1,131 @@
SET @@session.storage_engine = 'InnoDB';
# RAND()
create table t1 (b double as (rand()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# LOAD_FILE()
create table t1 (a varchar(64), b varchar(1024) as (load_file(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# CURDATE()
create table t1 (a datetime as (curdate()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURRENT_DATE(), CURRENT_DATE
create table t1 (a datetime as (current_date));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a datetime as (current_date()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURRENT_TIME(), CURRENT_TIME
create table t1 (a datetime as (current_time));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a datetime as (current_time()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP
create table t1 (a datetime as (current_timestamp()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a datetime as (current_timestamp));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURTIME()
create table t1 (a datetime as (curtime()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# LOCALTIME(), LOCALTIME
create table t1 (a datetime, b varchar(10) as (localtime()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
create table t1 (a datetime, b varchar(10) as (localtime));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# LOCALTIMESTAMP, LOCALTIMESTAMP()(v4.0.6)
create table t1 (a datetime, b varchar(10) as (localtimestamp()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
create table t1 (a datetime, b varchar(10) as (localtimestamp));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# NOW()
create table t1 (a datetime, b varchar(10) as (now()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# SYSDATE()
create table t1 (a int, b varchar(10) as (sysdate()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UNIX_TIMESTAMP()
create table t1 (a datetime, b datetime as (unix_timestamp()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UTC_DATE()
create table t1 (a datetime, b datetime as (utc_date()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UTC_TIME()
create table t1 (a datetime, b datetime as (utc_time()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UTC_TIMESTAMP()
create table t1 (a datetime, b datetime as (utc_timestamp()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# MATCH()
# BENCHMARK()
create table t1 (a varchar(1024), b varchar(1024) as (benchmark(a,3)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# CONNECTION_ID()
create table t1 (a int as (connection_id()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURRENT_USER(), CURRENT_USER
create table t1 (a varchar(32) as (current_user()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a varchar(32) as (current_user));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# DATABASE()
create table t1 (a varchar(1024), b varchar(1024) as (database()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# FOUND_ROWS()
create table t1 (a varchar(1024), b varchar(1024) as (found_rows()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# GET_LOCK()
create table t1 (a varchar(1024), b varchar(1024) as (get_lock(a,10)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# IS_FREE_LOCK()
create table t1 (a varchar(1024), b varchar(1024) as (is_free_lock(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# IS_USED_LOCK()
create table t1 (a varchar(1024), b varchar(1024) as (is_used_lock(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# LAST_INSERT_ID()
create table t1 (a int as (last_insert_id()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# MASTER_POS_WAIT()
create table t1 (a varchar(32), b int as (master_pos_wait(a,0,2)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# NAME_CONST()
create table t1 (a varchar(32) as (name_const('test',1)));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# RELEASE_LOCK()
create table t1 (a varchar(32), b int as (release_lock(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# ROW_COUNT()
create table t1 (a int as (row_count()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# SCHEMA()
create table t1 (a varchar(32) as (schema()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# SESSION_USER()
create table t1 (a varchar(32) as (session_user()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# SLEEP()
create table t1 (a int, b int as (sleep(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# SYSTEM_USER()
create table t1 (a varchar(32) as (system_user()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# USER()
create table t1 (a varchar(1024), b varchar(1024) as (user()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UUID_SHORT()
create table t1 (a varchar(1024) as (uuid_short()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# UUID()
create table t1 (a varchar(1024) as (uuid()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# VALUES()
create table t1 (a varchar(1024), b varchar(1024) as (values(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# VERSION()
create table t1 (a varchar(1024), b varchar(1024) as (version()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# ENCRYPT()
create table t1 (a varchar(1024), b varchar(1024) as (encrypt(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# Stored procedures
create procedure p1()
begin
@@ -137,77 +137,77 @@ begin
return 1;
end //
create table t1 (a int as (p1()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a int as (f1()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
drop procedure p1;
drop function f1;
# Unknown functions
create table t1 (a int as (f1()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
#
# GROUP BY FUNCTIONS
#
# AVG()
create table t1 (a int, b int as (avg(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# BIT_AND()
create table t1 (a int, b int as (bit_and(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# BIT_OR()
create table t1 (a int, b int as (bit_or(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# BIT_XOR()
create table t1 (a int, b int as (bit_xor(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# COUNT(DISTINCT)
create table t1 (a int, b int as (count(distinct a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# COUNT()
create table t1 (a int, b int as (count(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# GROUP_CONCAT()
create table t1 (a varchar(32), b int as (group_concat(a,'')));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# MAX()
create table t1 (a int, b int as (max(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# MIN()
create table t1 (a int, b int as (min(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# STD()
create table t1 (a int, b int as (std(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# STDDEV_POP()
create table t1 (a int, b int as (stddev_pop(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# STDDEV_SAMP()
create table t1 (a int, b int as (stddev_samp(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# STDDEV()
create table t1 (a int, b int as (stddev(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# SUM()
create table t1 (a int, b int as (sum(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# VAR_POP()
create table t1 (a int, b int as (var_pop(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# VAR_SAMP()
create table t1 (a int, b int as (var_samp(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# VARIANCE()
create table t1 (a int, b int as (variance(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
#
# XML FUNCTIONS
#
# ExtractValue()
create table t1 (a varchar(1024), b varchar(1024) as (ExtractValue(a,'//b[$@j]')));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UpdateXML()
create table t1 (a varchar(1024), b varchar(1024) as (UpdateXML(a,'/a','<e>fff</e>')));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
#
# Sub-selects
#
@@ -216,9 +216,9 @@ create table t2 (a int, b int as (select count(*) from t1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select count(*) from t1))' at line 1
drop table t1;
create table t1 (a int, b int as ((select 1)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
create table t1 (a int, b int as (a+(select 1)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
#
# SP functions
#
@@ -229,7 +229,7 @@ select sub1(1);
sub1(1)
2
create table t1 (a int, b int as (a+sub3(1)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
drop function sub1;
#
# Long expression
@@ -240,4 +240,4 @@ ERROR HY000: String 'concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#
# Constant expression
create table t1 (a int as (PI()));
-ERROR HY000: Constant expression in computed column function is not allowed.
+ERROR HY000: Constant expression in computed column function is not allowed
diff --git a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result
index c3815e991e7..dda222f5e8a 100644
--- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result
@@ -1,133 +1,133 @@
SET @@session.storage_engine = 'MyISAM';
# RAND()
create table t1 (b double as (rand()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# LOAD_FILE()
create table t1 (a varchar(64), b varchar(1024) as (load_file(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# CURDATE()
create table t1 (a datetime as (curdate()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURRENT_DATE(), CURRENT_DATE
create table t1 (a datetime as (current_date));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a datetime as (current_date()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURRENT_TIME(), CURRENT_TIME
create table t1 (a datetime as (current_time));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a datetime as (current_time()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP
create table t1 (a datetime as (current_timestamp()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a datetime as (current_timestamp));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURTIME()
create table t1 (a datetime as (curtime()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# LOCALTIME(), LOCALTIME
create table t1 (a datetime, b varchar(10) as (localtime()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
create table t1 (a datetime, b varchar(10) as (localtime));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# LOCALTIMESTAMP, LOCALTIMESTAMP()(v4.0.6)
create table t1 (a datetime, b varchar(10) as (localtimestamp()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
create table t1 (a datetime, b varchar(10) as (localtimestamp));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# NOW()
create table t1 (a datetime, b varchar(10) as (now()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# SYSDATE()
create table t1 (a int, b varchar(10) as (sysdate()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UNIX_TIMESTAMP()
create table t1 (a datetime, b datetime as (unix_timestamp()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UTC_DATE()
create table t1 (a datetime, b datetime as (utc_date()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UTC_TIME()
create table t1 (a datetime, b datetime as (utc_time()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UTC_TIMESTAMP()
create table t1 (a datetime, b datetime as (utc_timestamp()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# MATCH()
create table t1 (a varchar(32), b bool as (match a against ('sample text')));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# BENCHMARK()
create table t1 (a varchar(1024), b varchar(1024) as (benchmark(a,3)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# CONNECTION_ID()
create table t1 (a int as (connection_id()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# CURRENT_USER(), CURRENT_USER
create table t1 (a varchar(32) as (current_user()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a varchar(32) as (current_user));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# DATABASE()
create table t1 (a varchar(1024), b varchar(1024) as (database()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# FOUND_ROWS()
create table t1 (a varchar(1024), b varchar(1024) as (found_rows()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# GET_LOCK()
create table t1 (a varchar(1024), b varchar(1024) as (get_lock(a,10)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# IS_FREE_LOCK()
create table t1 (a varchar(1024), b varchar(1024) as (is_free_lock(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# IS_USED_LOCK()
create table t1 (a varchar(1024), b varchar(1024) as (is_used_lock(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# LAST_INSERT_ID()
create table t1 (a int as (last_insert_id()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# MASTER_POS_WAIT()
create table t1 (a varchar(32), b int as (master_pos_wait(a,0,2)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# NAME_CONST()
create table t1 (a varchar(32) as (name_const('test',1)));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# RELEASE_LOCK()
create table t1 (a varchar(32), b int as (release_lock(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# ROW_COUNT()
create table t1 (a int as (row_count()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# SCHEMA()
create table t1 (a varchar(32) as (schema()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# SESSION_USER()
create table t1 (a varchar(32) as (session_user()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# SLEEP()
create table t1 (a int, b int as (sleep(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# SYSTEM_USER()
create table t1 (a varchar(32) as (system_user()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# USER()
create table t1 (a varchar(1024), b varchar(1024) as (user()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UUID_SHORT()
create table t1 (a varchar(1024) as (uuid_short()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# UUID()
create table t1 (a varchar(1024) as (uuid()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
# VALUES()
create table t1 (a varchar(1024), b varchar(1024) as (values(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# VERSION()
create table t1 (a varchar(1024), b varchar(1024) as (version()));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# ENCRYPT()
create table t1 (a varchar(1024), b varchar(1024) as (encrypt(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# Stored procedures
create procedure p1()
begin
@@ -139,77 +139,77 @@ begin
return 1;
end //
create table t1 (a int as (p1()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
create table t1 (a int as (f1()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
drop procedure p1;
drop function f1;
# Unknown functions
create table t1 (a int as (f1()));
-ERROR HY000: Function or expression is not allowed for column 'a'.
+ERROR HY000: Function or expression is not allowed for column 'a'
#
# GROUP BY FUNCTIONS
#
# AVG()
create table t1 (a int, b int as (avg(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# BIT_AND()
create table t1 (a int, b int as (bit_and(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# BIT_OR()
create table t1 (a int, b int as (bit_or(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# BIT_XOR()
create table t1 (a int, b int as (bit_xor(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# COUNT(DISTINCT)
create table t1 (a int, b int as (count(distinct a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# COUNT()
create table t1 (a int, b int as (count(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# GROUP_CONCAT()
create table t1 (a varchar(32), b int as (group_concat(a,'')));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# MAX()
create table t1 (a int, b int as (max(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# MIN()
create table t1 (a int, b int as (min(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# STD()
create table t1 (a int, b int as (std(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# STDDEV_POP()
create table t1 (a int, b int as (stddev_pop(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# STDDEV_SAMP()
create table t1 (a int, b int as (stddev_samp(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# STDDEV()
create table t1 (a int, b int as (stddev(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# SUM()
create table t1 (a int, b int as (sum(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# VAR_POP()
create table t1 (a int, b int as (var_pop(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# VAR_SAMP()
create table t1 (a int, b int as (var_samp(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# VARIANCE()
create table t1 (a int, b int as (variance(a)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
#
# XML FUNCTIONS
#
# ExtractValue()
create table t1 (a varchar(1024), b varchar(1024) as (ExtractValue(a,'//b[$@j]')));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
# UpdateXML()
create table t1 (a varchar(1024), b varchar(1024) as (UpdateXML(a,'/a','<e>fff</e>')));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
#
# Sub-selects
#
@@ -218,9 +218,9 @@ create table t2 (a int, b int as (select count(*) from t1));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select count(*) from t1))' at line 1
drop table t1;
create table t1 (a int, b int as ((select 1)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
create table t1 (a int, b int as (a+(select 1)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
#
# SP functions
#
@@ -231,7 +231,7 @@ select sub1(1);
sub1(1)
2
create table t1 (a int, b int as (a+sub3(1)));
-ERROR HY000: Function or expression is not allowed for column 'b'.
+ERROR HY000: Function or expression is not allowed for column 'b'
drop function sub1;
#
# Long expression
@@ -242,4 +242,4 @@ ERROR HY000: String 'concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
#
# Constant expression
create table t1 (a int as (PI()));
-ERROR HY000: Constant expression in computed column function is not allowed.
+ERROR HY000: Constant expression in computed column function is not allowed
diff --git a/mysql-test/suite/vcol/r/vcol_csv.result b/mysql-test/suite/vcol/r/vcol_csv.result
index 79c1bd2d6f4..97977505696 100644
--- a/mysql-test/suite/vcol/r/vcol_csv.result
+++ b/mysql-test/suite/vcol/r/vcol_csv.result
@@ -1,7 +1,7 @@
SET @@session.storage_engine = 'CSV';
create table t1 (a int, b int as (a+1));
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns.
+ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
create table t1 (a int not null);
alter table t1 add column b int as (a+1);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns.
+ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
index 6d1fb0d3526..b996a0108e3 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
@@ -25,8 +25,8 @@ a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols
insert into t1 values (1,2,3);
Warnings:
-Warning 1645 The value specified for computed column 'b' in table 't1' ignored.
-Warning 1645 The value specified for computed column 'c' in table 't1' ignored.
+Warning 1645 The value specified for computed column 'b' in table 't1' ignored
+Warning 1645 The value specified for computed column 'c' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
@@ -65,8 +65,8 @@ a b c
# against vcols
insert into t1 (a,b) values (1,3), (2,4);
Warnings:
-Warning 1645 The value specified for computed column 'b' in table 't1' ignored.
-Warning 1645 The value specified for computed column 'b' in table 't1' ignored.
+Warning 1645 The value specified for computed column 'b' in table 't1' ignored
+Warning 1645 The value specified for computed column 'b' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
@@ -107,8 +107,8 @@ a b c
create table t2 like t1;
insert into t2 select * from t1;
Warnings:
-Warning 1645 The value specified for computed column 'b' in table 't2' ignored.
-Warning 1645 The value specified for computed column 'c' in table 't2' ignored.
+Warning 1645 The value specified for computed column 'b' in table 't2' ignored
+Warning 1645 The value specified for computed column 'c' in table 't2' ignored
select * from t1;
a b c
2 -2 -2
@@ -123,8 +123,8 @@ a b c
create table t2 like t1;
insert into t2 (a,b) select a,b from t1;
Warnings:
-Warning 1645 The value specified for computed column 'b' in table 't2' ignored.
-Warning 1645 The value specified for computed column 'b' in table 't2' ignored.
+Warning 1645 The value specified for computed column 'b' in table 't2' ignored
+Warning 1645 The value specified for computed column 'b' in table 't2' ignored
select * from t2;
a b c
2 -2 -2
@@ -159,7 +159,7 @@ a b c
2 -2 -2
update t1 set c=3 where a=2;
Warnings:
-Warning 1645 The value specified for computed column 'c' in table 't1' ignored.
+Warning 1645 The value specified for computed column 'c' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
@@ -189,7 +189,7 @@ a b c
2 -2 -2
update t1 set c=3 where b=-2;
Warnings:
-Warning 1645 The value specified for computed column 'c' in table 't1' ignored.
+Warning 1645 The value specified for computed column 'c' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
index 9aac0086b4a..fa636597536 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
@@ -25,8 +25,8 @@ a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols
insert into t1 values (1,2,3);
Warnings:
-Warning 1645 The value specified for computed column 'b' in table 't1' ignored.
-Warning 1645 The value specified for computed column 'c' in table 't1' ignored.
+Warning 1645 The value specified for computed column 'b' in table 't1' ignored
+Warning 1645 The value specified for computed column 'c' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
@@ -65,8 +65,8 @@ a b c
# against vcols
insert into t1 (a,b) values (1,3), (2,4);
Warnings:
-Warning 1645 The value specified for computed column 'b' in table 't1' ignored.
-Warning 1645 The value specified for computed column 'b' in table 't1' ignored.
+Warning 1645 The value specified for computed column 'b' in table 't1' ignored
+Warning 1645 The value specified for computed column 'b' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
@@ -107,8 +107,8 @@ a b c
create table t2 like t1;
insert into t2 select * from t1;
Warnings:
-Warning 1645 The value specified for computed column 'b' in table 't2' ignored.
-Warning 1645 The value specified for computed column 'c' in table 't2' ignored.
+Warning 1645 The value specified for computed column 'b' in table 't2' ignored
+Warning 1645 The value specified for computed column 'c' in table 't2' ignored
select * from t1;
a b c
2 -2 -2
@@ -123,8 +123,8 @@ a b c
create table t2 like t1;
insert into t2 (a,b) select a,b from t1;
Warnings:
-Warning 1645 The value specified for computed column 'b' in table 't2' ignored.
-Warning 1645 The value specified for computed column 'b' in table 't2' ignored.
+Warning 1645 The value specified for computed column 'b' in table 't2' ignored
+Warning 1645 The value specified for computed column 'b' in table 't2' ignored
select * from t2;
a b c
2 -2 -2
@@ -159,7 +159,7 @@ a b c
2 -2 -2
update t1 set c=3 where a=2;
Warnings:
-Warning 1645 The value specified for computed column 'c' in table 't1' ignored.
+Warning 1645 The value specified for computed column 'c' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
@@ -189,7 +189,7 @@ a b c
2 -2 -2
update t1 set c=3 where b=-2;
Warnings:
-Warning 1645 The value specified for computed column 'c' in table 't1' ignored.
+Warning 1645 The value specified for computed column 'c' in table 't1' ignored
select * from t1;
a b c
1 -1 -1
diff --git a/mysql-test/suite/vcol/r/vcol_keys_innodb.result b/mysql-test/suite/vcol/r/vcol_keys_innodb.result
index ee272fb7db8..857dcb8423f 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_innodb.result
@@ -7,7 +7,7 @@ SET @@session.storage_engine = 'InnoDB';
# - CHECK (allowed but not used)
# UNIQUE
create table t1 (a int, b int as (a*2) unique);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a*2) persistent unique);
show create table t1;
Table Create Table
@@ -22,7 +22,7 @@ a int(11) YES NULL
b int(11) YES UNI NULL VIRTUAL
drop table t1;
create table t1 (a int, b int as (a*2), unique key (b));
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a*2) persistent, unique (b));
show create table t1;
Table Create Table
@@ -38,7 +38,7 @@ b int(11) YES UNI NULL VIRTUAL
drop table t1;
create table t1 (a int, b int as (a*2));
alter table t1 add unique key (b);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
drop table t1;
create table t1 (a int, b int as (a*2) persistent);
alter table t1 add unique key (b);
@@ -50,9 +50,9 @@ drop table t1;
#
# INDEX
create table t1 (a int, b int as (a*2), index (b));
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a*2), index (a,b));
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a*2) persistent, index (b));
show create table t1;
Table Create Table
@@ -81,9 +81,9 @@ b int(11) YES NULL VIRTUAL
drop table t1;
create table t1 (a int, b int as (a*2));
alter table t1 add index (b);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
alter table t1 add index (a,b);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
drop table t1;
create table t1 (a int, b int as (a*2) persistent);
alter table t1 add index (b);
@@ -103,27 +103,27 @@ drop table t1;
# Rejected FK options.
create table t1 (a int, b int as (a+1) persistent,
foreign key (b) references t2(a) on update set null);
-ERROR HY000: Cannot define foreign key with ON UPDATE SET NULL clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON UPDATE SET NULL clause on a computed column
create table t1 (a int, b int as (a+1) persistent,
foreign key (b) references t2(a) on update cascade);
-ERROR HY000: Cannot define foreign key with ON UPDATE CASCADE clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON UPDATE CASCADE clause on a computed column
create table t1 (a int, b int as (a+1) persistent,
foreign key (b) references t2(a) on delete set null);
-ERROR HY000: Cannot define foreign key with ON DELETE SET NULL clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON DELETE SET NULL clause on a computed column
create table t1 (a int, b int as (a+1) persistent);
alter table t1 add foreign key (b) references t2(a) on update set null;
-ERROR HY000: Cannot define foreign key with ON UPDATE SET NULL clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON UPDATE SET NULL clause on a computed column
alter table t1 add foreign key (b) references t2(a) on update cascade;
-ERROR HY000: Cannot define foreign key with ON UPDATE CASCADE clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON UPDATE CASCADE clause on a computed column
alter table t1 add foreign key (b) references t2(a) on delete set null;
-ERROR HY000: Cannot define foreign key with ON DELETE SET NULL clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON DELETE SET NULL clause on a computed column
drop table t1;
create table t1 (a int, b int as (a+1),
foreign key (b) references t2(a));
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a+1));
alter table t1 add foreign key (b) references t2(a);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
drop table t1;
# Allowed FK options.
create table t2 (a int primary key, b char(5));
diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
index 8a11e44f201..af0935affbc 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
@@ -7,7 +7,7 @@ SET @@session.storage_engine = 'MyISAM';
# - CHECK (allowed but not used)
# UNIQUE
create table t1 (a int, b int as (a*2) unique);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a*2) persistent unique);
show create table t1;
Table Create Table
@@ -22,7 +22,7 @@ a int(11) YES NULL
b int(11) YES UNI NULL VIRTUAL
drop table t1;
create table t1 (a int, b int as (a*2), unique key (b));
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a*2) persistent, unique (b));
show create table t1;
Table Create Table
@@ -38,7 +38,7 @@ b int(11) YES UNI NULL VIRTUAL
drop table t1;
create table t1 (a int, b int as (a*2));
alter table t1 add unique key (b);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
drop table t1;
create table t1 (a int, b int as (a*2) persistent);
alter table t1 add unique key (b);
@@ -50,9 +50,9 @@ drop table t1;
#
# INDEX
create table t1 (a int, b int as (a*2), index (b));
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a*2), index (a,b));
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a*2) persistent, index (b));
show create table t1;
Table Create Table
@@ -81,9 +81,9 @@ b int(11) YES NULL VIRTUAL
drop table t1;
create table t1 (a int, b int as (a*2));
alter table t1 add index (b);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
alter table t1 add index (a,b);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
drop table t1;
create table t1 (a int, b int as (a*2) persistent);
alter table t1 add index (b);
@@ -110,27 +110,27 @@ drop table t1;
# Rejected FK options.
create table t1 (a int, b int as (a+1) persistent,
foreign key (b) references t2(a) on update set null);
-ERROR HY000: Cannot define foreign key with ON UPDATE SET NULL clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON UPDATE SET NULL clause on a computed column
create table t1 (a int, b int as (a+1) persistent,
foreign key (b) references t2(a) on update cascade);
-ERROR HY000: Cannot define foreign key with ON UPDATE CASCADE clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON UPDATE CASCADE clause on a computed column
create table t1 (a int, b int as (a+1) persistent,
foreign key (b) references t2(a) on delete set null);
-ERROR HY000: Cannot define foreign key with ON DELETE SET NULL clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON DELETE SET NULL clause on a computed column
create table t1 (a int, b int as (a+1) persistent);
alter table t1 add foreign key (b) references t2(a) on update set null;
-ERROR HY000: Cannot define foreign key with ON UPDATE SET NULL clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON UPDATE SET NULL clause on a computed column
alter table t1 add foreign key (b) references t2(a) on update cascade;
-ERROR HY000: Cannot define foreign key with ON UPDATE CASCADE clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON UPDATE CASCADE clause on a computed column
alter table t1 add foreign key (b) references t2(a) on delete set null;
-ERROR HY000: Cannot define foreign key with ON DELETE SET NULL clause on a computed column.
+ERROR HY000: Cannot define foreign key with ON DELETE SET NULL clause on a computed column
drop table t1;
create table t1 (a int, b int as (a+1),
foreign key (b) references t2(a));
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
create table t1 (a int, b int as (a+1));
alter table t1 add foreign key (b) references t2(a);
-ERROR HY000: Key/Index cannot be defined on a non-stored computed column.
+ERROR HY000: Key/Index cannot be defined on a non-stored computed column
drop table t1;
# Allowed FK options.
create table t2 (a int primary key, b char(5));
diff --git a/mysql-test/suite/vcol/r/vcol_memory.result b/mysql-test/suite/vcol/r/vcol_memory.result
index 37154df61e7..30b6bd4a4bf 100644
--- a/mysql-test/suite/vcol/r/vcol_memory.result
+++ b/mysql-test/suite/vcol/r/vcol_memory.result
@@ -1,7 +1,7 @@
SET @@session.storage_engine = 'memory';
create table t1 (a int, b int as (a+1));
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns.
+ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
create table t1 (a int);
alter table t1 add column b int as (a+1);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns.
+ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_merge.result b/mysql-test/suite/vcol/r/vcol_merge.result
index 32f3268329f..03a1e151c2e 100644
--- a/mysql-test/suite/vcol/r/vcol_merge.result
+++ b/mysql-test/suite/vcol/r/vcol_merge.result
@@ -4,5 +4,5 @@ create table t2 (a int, b int as (a % 10));
insert into t1 values (1,default);
insert into t2 values (2,default);
create table t3 (a int, b int as (a % 10)) engine=MERGE UNION=(t1,t2);
-ERROR HY000: 'Specified storage engine' is not yet supported for computed columns.
+ERROR HY000: 'Specified storage engine' is not yet supported for computed columns
drop table t1,t2;
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index f312527794a..896dd6fa654 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -30,3 +30,8 @@ a b v
5 50 6
8 80 9
drop table t1;
+CREATE TABLE t1 (
+a int NOT NULL DEFAULT '0',
+v double AS ((1, a)) VIRTUAL
+);
+ERROR HY000: Expression for computed column cannot return a row
diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
index 0f46abf0054..c638ced4f41 100644
--- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
@@ -76,7 +76,7 @@ drop table t1;
# Case 7. ALTER. Modify virtual stored -> virtual non-stored
create table t1 (a int, b int as (a % 2) persistent);
alter table t1 modify b int as (a % 2);
-ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns.
+ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -87,7 +87,7 @@ drop table t1;
# Case 8. ALTER. Modify virtual non-stored -> virtual stored
create table t1 (a int, b int as (a % 2));
alter table t1 modify b int as (a % 2) persistent;
-ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns.
+ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
index 3c7d29ef6fe..be42b8b76c4 100644
--- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
@@ -76,7 +76,7 @@ drop table t1;
# Case 7. ALTER. Modify virtual stored -> virtual non-stored
create table t1 (a int, b int as (a % 2) persistent);
alter table t1 modify b int as (a % 2);
-ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns.
+ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -87,7 +87,7 @@ drop table t1;
# Case 8. ALTER. Modify virtual non-stored -> virtual stored
create table t1 (a int, b int as (a % 2));
alter table t1 modify b int as (a % 2) persistent;
-ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns.
+ERROR HY000: 'Changing the STORED status' is not yet supported for computed columns
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test
index a0e654daa57..06a9313edd3 100644
--- a/mysql-test/suite/vcol/t/vcol_misc.test
+++ b/mysql-test/suite/vcol/t/vcol_misc.test
@@ -19,3 +19,17 @@ update t1 set a=v order by b limit 1;
select * from t1 order by b;
drop table t1;
+
+#
+# Bug#604549: Expression for virtual column returns row
+#
+
+-- error ER_ROW_EXPR_FOR_VCOL
+CREATE TABLE t1 (
+ a int NOT NULL DEFAULT '0',
+ v double AS ((1, a)) VIRTUAL
+);
+
+
+
+