diff options
author | Michael Widenius <monty@mariadb.org> | 2016-06-29 09:14:22 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-06-30 11:43:02 +0200 |
commit | db7edfed17efe6bc3684b0fbacc0b0249e4f0fa2 (patch) | |
tree | f1f484057487a73d32f379a5fdaacd53bfa27b5e /mysql-test | |
parent | 23d03a1b1e486da353f20964a1b91068bec209c0 (diff) | |
download | mariadb-git-db7edfed17efe6bc3684b0fbacc0b0249e4f0fa2.tar.gz |
MDEV-7563 Support CHECK constraint as in (or close to) SQL Standard
MDEV-10134 Add full support for DEFAULT
- Added support for using tables with MySQL 5.7 virtual fields,
including MySQL 5.7 syntax
- Better error messages also for old cases
- CREATE ... SELECT now also updates timestamp columns
- Blob can now have default values
- Added new system variable "check_constraint_checks", to turn of
CHECK constraint checking if needed.
- Removed some engine independent tests in suite vcol to only test myisam
- Moved some tests from 'include' to 't'. Should some day be done for all tests.
- FRM version increased to 11 if one uses virtual fields or constraints
- Changed to use a bitmap to check if a field has got a value, instead of
setting HAS_EXPLICIT_VALUE bit in field flags
- Expressions can now be up to 65K in total
- Ensure we are not refering to uninitialized fields when handling virtual fields or defaults
- Changed check_vcol_func_processor() to return a bitmap of used types
- Had to change some functions that calculated cached value in fix_fields to do
this in val() or getdate() instead.
- store_now_in_TIME() now takes a THD argument
- fill_record() now updates default values
- Add a lookahead for NOT NULL, to be able to handle DEFAULT 1+1 NOT NULL
- Automatically generate a name for constraints that doesn't have a name
- Added support for ALTER TABLE DROP CONSTRAINT
- Ensure that partition functions register virtual fields used. This fixes
some bugs when using virtual fields in a partitioning function
Diffstat (limited to 'mysql-test')
108 files changed, 3841 insertions, 5370 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_extra_col_master.test b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test index 18b6c0532f2..5b2cfc1ea2e 100644 --- a/mysql-test/extra/rpl_tests/rpl_extra_col_master.test +++ b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test @@ -126,7 +126,7 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, --disable_query_log call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535"); -call mtr.add_suppression("Slave.*Can.t DROP .c7.; check that column.key exists.* error.* 1091"); +call mtr.add_suppression("Slave.*Can.t DROP .c7.; check that .* exists.* error.* 1091"); call mtr.add_suppression("Slave.*Unknown column .c7. in .t15.* error.* 1054"); call mtr.add_suppression("Slave.*Key column .c6. doesn.t exist in table.* error.* 1072"); call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* error.* 1677"); diff --git a/mysql-test/include/function_defaults.inc b/mysql-test/include/function_defaults.inc index cb8e8f86f93..8d2387f1cb6 100644 --- a/mysql-test/include/function_defaults.inc +++ b/mysql-test/include/function_defaults.inc @@ -4,51 +4,43 @@ SET TIME_ZONE = "+00:00"; --echo # Test of errors for column data types that dont support function --echo # defaults. --echo # ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a BIT DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a TINYINT DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a SMALLINT DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a MEDIUMINT DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a INT DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a BIGINT DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a FLOAT DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a DECIMAL DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a DATE DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a TIME DEFAULT $current_timestamp ); ---error ER_INVALID_DEFAULT -eval CREATE TABLE t1( a YEAR DEFAULT $current_timestamp ); + +eval CREATE OR REPLACE TABLE t1( a BIT DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a TINYINT DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a SMALLINT DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a MEDIUMINT DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a INT DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a BIGINT DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a FLOAT DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a DECIMAL DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a DATE DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a TIME DEFAULT $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a YEAR DEFAULT $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a BIT ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a BIT ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a TINYINT ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a TINYINT ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a SMALLINT ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a SMALLINT ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a MEDIUMINT ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a MEDIUMINT ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a INT ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a INT ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a BIGINT ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a BIGINT ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a FLOAT ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a FLOAT ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a DECIMAL ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a DECIMAL ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a DATE ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a DATE ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a TIME ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a TIME ON UPDATE $current_timestamp ); --error ER_INVALID_ON_UPDATE -eval CREATE TABLE t1( a YEAR ON UPDATE $current_timestamp ); +eval CREATE OR REPLACE TABLE t1( a YEAR ON UPDATE $current_timestamp ); + +drop table if exists t1; --echo # --echo # Test that the default clause behaves like NOW() regarding time zones. @@ -1066,7 +1058,7 @@ SELECT * FROM v1; --echo # 1970-01-01 03:33:20 SET TIMESTAMP = 2000.000234; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED UPDATE v1 SET a = 2; SELECT * FROM t1; @@ -1091,7 +1083,7 @@ SELECT * FROM v1; SET TIMESTAMP = 1.126789; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2; SELECT * FROM v1; diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 9e3fc14d631..7c1686379fe 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -414,12 +414,12 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ALTER TABLE t1 DROP PRIMARY KEY; -ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists +ERROR 42000: Can't DROP 'PRIMARY'; check that constraint/column/key exists DROP TABLE t1; create table t1 (a int, b int, key(a)); insert into t1 values (1,1), (2,2); alter table t1 drop key no_such_key; -ERROR 42000: Can't DROP 'no_such_key'; check that column/key exists +ERROR 42000: Can't DROP 'no_such_key'; check that constraint/column/key exists alter table t1 drop key a; drop table t1; CREATE TABLE T12207(a int) ENGINE=MYISAM; @@ -1374,7 +1374,7 @@ Note 1060 Duplicate column name 'lol' ALTER TABLE t1 DROP COLUMN IF EXISTS lol; ALTER TABLE t1 DROP COLUMN IF EXISTS lol; Warnings: -Note 1091 Can't DROP 'lol'; check that column/key exists +Note 1091 Can't DROP 'lol'; check that constraint/column/key exists ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); Warnings: @@ -1385,7 +1385,7 @@ Note 1054 Unknown column 'lol' in 't1' DROP INDEX IF EXISTS x_param ON t1; DROP INDEX IF EXISTS x_param ON t1; Warnings: -Note 1091 Can't DROP 'x_param'; check that column/key exists +Note 1091 Can't DROP 'x_param'; check that constraint/column/key exists CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); Warnings: @@ -1416,7 +1416,7 @@ Note 1060 Duplicate column name 'lol' ALTER TABLE t1 DROP COLUMN IF EXISTS lol; ALTER TABLE t1 DROP COLUMN IF EXISTS lol; Warnings: -Note 1091 Can't DROP 'lol'; check that column/key exists +Note 1091 Can't DROP 'lol'; check that constraint/column/key exists ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); ALTER TABLE t1 ADD KEY IF NOT EXISTS x_param(x_param); Warnings: @@ -1427,7 +1427,7 @@ Note 1054 Unknown column 'lol' in 't1' DROP INDEX IF EXISTS x_param ON t1; DROP INDEX IF EXISTS x_param ON t1; Warnings: -Note 1091 Can't DROP 'x_param'; check that column/key exists +Note 1091 Can't DROP 'x_param'; check that constraint/column/key exists CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); CREATE INDEX IF NOT EXISTS x_param1 ON t1(x_param); Warnings: @@ -1447,7 +1447,7 @@ Note 1061 Duplicate key name 'fk' ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk; ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS fk; Warnings: -Note 1091 Can't DROP 'fk'; check that column/key exists +Note 1091 Can't DROP 'fk'; check that constraint/column/key exists SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -1461,7 +1461,7 @@ Note 1061 Duplicate key name 't2_ibfk_1' ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1; ALTER TABLE t2 DROP FOREIGN KEY IF EXISTS t2_ibfk_1; Warnings: -Note 1091 Can't DROP 't2_ibfk_1'; check that column/key exists +Note 1091 Can't DROP 't2_ibfk_1'; check that constraint/column/key exists SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -1486,10 +1486,10 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ALTER TABLE t2 DROP KEY k_id, DROP KEY IF EXISTS k_id; Warnings: -Note 1091 Can't DROP 'k_id'; check that column/key exists +Note 1091 Can't DROP 'k_id'; check that constraint/column/key exists ALTER TABLE t2 DROP COLUMN a, DROP COLUMN IF EXISTS a; Warnings: -Note 1091 Can't DROP 'a'; check that column/key exists +Note 1091 Can't DROP 'a'; check that constraint/column/key exists SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -1667,6 +1667,8 @@ ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= EXCLUSIVE; affected rows: 0 ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= NONE; ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED. +ALTER ONLINE TABLE m1 ADD COLUMN c int; +ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED. ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= SHARED; affected rows: 2 info: Records: 2 Duplicates: 0 Warnings: 0 diff --git a/mysql-test/r/check_constraint.result b/mysql-test/r/check_constraint.result new file mode 100644 index 00000000000..657c9326c38 --- /dev/null +++ b/mysql-test/r/check_constraint.result @@ -0,0 +1,97 @@ +set @save_check_constraint=@@check_constraint_checks; +create table t1 (a int check(a>10), b int check (b > 20), constraint `min` check (a+b > 100), constraint `max` check (a+b <500)) engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL CHECK (a>10), + `b` int(11) DEFAULT NULL CHECK (b > 20), + CONSTRAINT `min` CHECK (a+b > 100), + CONSTRAINT `max` CHECK (a+b <500) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values (100,100); +insert into t1 values (1,1); +ERROR HY000: CONSTRAINT 'a' failed for 'test.t1' +insert into t1 values (20,1); +ERROR HY000: CONSTRAINT 'b' failed for 'test.t1' +insert into t1 values (20,30); +ERROR HY000: CONSTRAINT 'min' failed for 'test.t1' +insert into t1 values (500,500); +ERROR HY000: CONSTRAINT 'max' failed for 'test.t1' +insert into t1 values (101,101),(102,102),(600,600),(103,103); +ERROR HY000: CONSTRAINT 'max' failed for 'test.t1' +select * from t1; +a b +100 100 +101 101 +102 102 +truncate table t1; +insert ignore into t1 values (101,101),(102,102),(600,600),(103,103); +Warnings: +Warning 1369 CONSTRAINT 'max' failed for 'test.t1' +select * from t1; +a b +101 101 +102 102 +103 103 +set check_constraint_checks=0; +truncate table t1; +insert into t1 values (101,101),(102,102),(600,600),(103,103); +select * from t1; +a b +101 101 +102 102 +600 600 +103 103 +set check_constraint_checks=@save_check_constraint; +alter table t1 add c int default 0 check (c < 10); +ERROR HY000: CONSTRAINT 'max' failed for table +set check_constraint_checks=0; +alter table t1 add c int default 0 check (c < 10); +alter table t1 add check (a+b+c < 500); +set check_constraint_checks=@save_check_constraint; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL CHECK (a>10), + `b` int(11) DEFAULT NULL CHECK (b > 20), + `c` int(11) DEFAULT '0' CHECK (c < 10), + CONSTRAINT `min` CHECK (a+b > 100), + CONSTRAINT `max` CHECK (a+b <500), + CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values(105,105,105); +ERROR HY000: CONSTRAINT 'c' failed for 'test.t1' +insert into t1 values(249,249,9); +ERROR HY000: CONSTRAINT 'CONSTRAINT_1' failed for 'test.t1' +insert into t1 values(105,105,9); +select * from t1; +a b c +101 101 0 +102 102 0 +600 600 0 +103 103 0 +105 105 9 +create table t2 like t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL CHECK (a>10), + `b` int(11) DEFAULT NULL CHECK (b > 20), + `c` int(11) DEFAULT '0' CHECK (c < 10), + CONSTRAINT `min` CHECK (a+b > 100), + CONSTRAINT `max` CHECK (a+b <500), + CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t2 drop constraint c; +ERROR 42000: Can't DROP 'c'; check that constraint/column/key exists +alter table t2 drop constraint min; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL CHECK (a>10), + `b` int(11) DEFAULT NULL CHECK (b > 20), + `c` int(11) DEFAULT '0' CHECK (c < 10), + CONSTRAINT `max` CHECK (a+b <500), + CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1,t2; diff --git a/mysql-test/r/constraints.result b/mysql-test/r/constraints.result index 3bec2c3e16d..2c101a209ef 100644 --- a/mysql-test/r/constraints.result +++ b/mysql-test/r/constraints.result @@ -1,17 +1,44 @@ drop table if exists t1; create table t1 (a int check (a>0)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL CHECK (a>0) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1); insert into t1 values (0); +ERROR HY000: CONSTRAINT 'a' failed for 'test.t1' drop table t1; create table t1 (a int, b int, check (a>b)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + CONSTRAINT `CONSTRAINT_1` CHECK (a>b) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,0); insert into t1 values (0,1); +ERROR HY000: CONSTRAINT 'CONSTRAINT_1' failed for 'test.t1' drop table t1; create table t1 (a int ,b int, constraint abc check (a>b)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + CONSTRAINT `abc` CHECK (a>b) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1,0); insert into t1 values (0,1); +ERROR HY000: CONSTRAINT 'abc' failed for 'test.t1' drop table t1; create table t1 (a int null); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (1),(NULL); drop table t1; create table t1 (a int null); diff --git a/mysql-test/r/create_drop_binlog.result b/mysql-test/r/create_drop_binlog.result index 537a1bd4605..bc08ea82809 100644 --- a/mysql-test/r/create_drop_binlog.result +++ b/mysql-test/r/create_drop_binlog.result @@ -363,7 +363,7 @@ t1 CREATE TABLE `t1` ( DROP INDEX IF EXISTS i1 ON t1; DROP INDEX IF EXISTS i1 ON t1; Warnings: -Note 1091 Can't DROP 'i1'; check that column/key exists +Note 1091 Can't DROP 'i1'; check that constraint/column/key exists DROP TABLE t1; DROP TABLE IF EXISTS t1; Warnings: diff --git a/mysql-test/r/create_drop_index.result b/mysql-test/r/create_drop_index.result index 113c32aca4d..f7b9ac02da6 100644 --- a/mysql-test/r/create_drop_index.result +++ b/mysql-test/r/create_drop_index.result @@ -16,7 +16,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP INDEX IF EXISTS i1 ON t1; Warnings: -Note 1091 Can't DROP 'i1'; check that column/key exists +Note 1091 Can't DROP 'i1'; check that constraint/column/key exists SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result index 5531a99ec28..53a0e7b243c 100644 --- a/mysql-test/r/default.result +++ b/mysql-test/r/default.result @@ -236,3 +236,903 @@ DROP TABLE IF EXISTS t1; # # End of 10.1 tests # +# +# Start of 10.2 tests +# + +Check that CURRENT_TIMESTAMP works as before + +CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(2) ON UPDATE CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT SYSDATE(2) ON UPDATE CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `event_time` timestamp(6) NOT NULL DEFAULT SYSDATE(2) ON UPDATE CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; + +Check default expressions + +create or replace table t1 (a int default 1, b int default a+1, c int default a+b) engine myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT '1', + `b` int(11) DEFAULT a+1, + `c` int(11) DEFAULT a+b +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values (); +insert into t1 (a) values (2); +insert into t1 (a,b) values (10,20); +insert into t1 (a,b,c) values (100,200,300); +select * from t1; +a b c +1 2 3 +2 3 5 +10 20 30 +100 200 300 +truncate table t1; +insert delayed into t1 values (); +insert delayed into t1 (a) values (2); +insert delayed into t1 (a,b) values (10,20); +insert delayed into t1 (a,b,c) values (100,200,300); +flush tables t1; +select * from t1; +a b c +1 2 3 +2 3 5 +10 20 30 +100 200 300 +create or replace table t1 (a int, b blob default (1), c blob default ("hello"), t text default (concat(a,b,c))) engine=myisam; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` blob DEFAULT (1), + `c` blob DEFAULT ("hello"), + `t` text DEFAULT (concat(a,b,c)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 (a) values (2); +insert into t1 (a,b) values (10,"test1"); +insert into t1 (a,b,c) values (10,"test2","test3"); +insert delayed into t1 (a,b) values (10,"test4"); +flush tables t1; +select * from t1; +a b c t +2 1 hello 21hello +10 test1 hello 10test1hello +10 test2 test3 10test2test3 +10 test4 hello 10test4hello +drop table t1; +create or replace table t1 (a bigint default uuid_short()); +insert into t1 values(); +select a > 0 from t1; +a > 0 +1 +drop table t1; +create or replace table t1 (param_list int DEFAULT (1+1) NOT NULL); +create or replace table t1 (param_list int DEFAULT 1+1 NOT NULL); +create or replace table t1 (param_list blob DEFAULT "" NOT NULL); +drop table t1; +create table t1 (a int); +insert into t1 values(-1); +alter table t1 add b int default 1, add c int default -1, add d int default 1+1, add e timestamp; +select a,b,c,d,e > 0 from t1; +a b c d e > 0 +-1 1 -1 2 1 +insert into t1 values(10,10,10,10,0); +alter table t1 add f int default 1+1+1 null, add g int default 1+1+1+1 not null,add h int default (2+2+2+2); +select a,b,c,d,e > 0,f,g,h from t1; +a b c d e > 0 f g h +-1 1 -1 2 1 3 4 8 +10 10 10 10 0 3 4 8 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT '1', + `c` int(11) DEFAULT '-1', + `d` int(11) DEFAULT 1+1, + `e` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `f` int(11) DEFAULT 1+1+1, + `g` int(11) NOT NULL DEFAULT 1+1+1+1, + `h` int(11) DEFAULT (2+2+2+2) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +create table t2 like t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT '1', + `c` int(11) DEFAULT '-1', + `d` int(11) DEFAULT 1+1, + `e` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `f` int(11) DEFAULT 1+1+1, + `g` int(11) NOT NULL DEFAULT 1+1+1+1, + `h` int(11) DEFAULT (2+2+2+2) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t2 (a) values (100); +select a,b,c,d,e > 0,f,g,h from t2; +a b c d e > 0 f g h +100 1 -1 2 1 3 4 8 +drop table t1,t2; +create table t1 (a int default 1----1); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT 1----1 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values(); +insert into t1 values(); +select * from t1; +a +2 +2 +drop table t1; + +create or replace can delete a table on error + +create table t1 (a int); +create or replace table t1 (a int default b, b int default a); +ERROR 01000: Expression for field `a` is refering to uninitialized field `b` +show create table t1; +ERROR 42S02: Table 'test.t1' doesn't exist + +Refering to other columns + +create or replace table t1 (a int default 1, b int default a); +create or replace table t1 (a int default 1, b int as (a)); +create or replace table t1 (a int default b, b int default 1); +create or replace table t1 (a int as (b), b int default 1); +create or replace table t1 (a int as (b), b int default 1+1); +create or replace table t1 (a int default 1, b int as (c), c int default (a+1)); +create or replace table t1 (a int default 1+1, b int as (c), c int default (a+1)); +create or replace table t1 (a VARCHAR(128) DEFAULT @@version); +create or replace table t1 (a int not null, b int as (a)); +create or replace table t1 (a int not null, b int default a+1); +create or replace table t1 (a int default a); +ERROR 01000: Expression for field `a` is refering to uninitialized field `a` +create or replace table t1 (a int default b, b int default 1+1); +ERROR 01000: Expression for field `a` is refering to uninitialized field `b` +create or replace table t1 (a int default 1, b int as (c), c int as (a+1)); +ERROR 01000: Expression for field `b` is refering to uninitialized field `c` +CREATE TABLE t1 (a INT DEFAULT a); +ERROR 01000: Expression for field `a` is refering to uninitialized field `a` +CREATE TABLE t1 (a INT DEFAULT (DEFAULT(a))); +ERROR HY000: Field 'a' doesn't have a default value +CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a))); +ERROR HY000: Field 'b' doesn't have a default value +CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL); +ERROR HY000: Field 'b' doesn't have a default value +drop table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' + +Allow defaults to refer to not default fields + +create or replace table t1 (a int as (b), b int not null); +insert into t1 values(); +Warnings: +Warning 1364 Field 'b' doesn't have a default value +insert into t1 (a) values(1); +Warnings: +Warning 1364 Field 'b' doesn't have a default value +Warning 1906 The value specified for computed column 'a' in table 't1' ignored +insert into t1 (b) values(2); +insert into t1 (a,b) values(3,4); +Warnings: +Warning 1906 The value specified for computed column 'a' in table 't1' ignored +select * from t1; +a b +0 0 +0 0 +2 2 +4 4 +drop table t1; + +Error handling + +create or replace table t1 (a bigint default xxx()); +ERROR HY000: Function or expression '`xxx`' is not allowed for 'DEFAULT' of column/constraint 'a' +create or replace table t1 (a bigint default (select (1))); +ERROR HY000: Function or expression 'subselect' is not allowed for 'DEFAULT' of column/constraint 'a' +create or replace table t1 (a bigint default (1,2,3))); +ERROR 21000: Operand should contain 1 column(s) +drop table if exists t1; +Warnings: +Note 1051 Unknown table 'test.t1' +# +# Invalid DEFAULT expressions +# +CREATE TABLE t1 (a INT DEFAULT (SELECT 1)); +ERROR HY000: Function or expression 'subselect' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT (EXISTS (SELECT 1))); +ERROR HY000: Function or expression 'subselect' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT (1=ANY (SELECT 1))); +ERROR HY000: Function or expression 'subselect' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT ROW(1,1)); +ERROR 21000: Operand should contain 1 column(s) +CREATE TABLE t1 (a INT DEFAULT (1,1)); +ERROR 21000: Operand should contain 1 column(s) +CREATE TABLE t1 (a INT DEFAULT ((1,1))); +ERROR 21000: Operand should contain 1 column(s) +CREATE TABLE t1 (a INT DEFAULT ?); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?)' at line 1 +CREATE TABLE t1 (a INT DEFAULT(?)); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?))' at line 1 +CREATE TABLE t1 (a INT DEFAULT (b), b INT DEFAULT(a)); +ERROR 01000: Expression for field `a` is refering to uninitialized field `b` +CREATE TABLE t1 (a INT DEFAULT @v); +ERROR HY000: Function or expression 'user_var' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT @v:=1); +ERROR HY000: Function or expression 'user_var' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT(NAME_CONST('xxx', 'yyy')); +ERROR HY000: Function or expression 'name_const' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT COUNT(*)); +ERROR HY000: Function or expression 'count(' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT COUNT(1)); +ERROR HY000: Function or expression 'count(' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT AVG(1)); +ERROR HY000: Function or expression 'avg(' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT MIN(1)); +ERROR HY000: Function or expression 'min(' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT GROUP_CONCAT(1)); +ERROR HY000: Function or expression 'group_concat' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT ROW_NUMBER() OVER ()); +ERROR HY000: Function or expression 'row_number' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE FUNCTION f1() RETURNS INT RETURN 1; +CREATE TABLE t1 (a INT DEFAULT f1()); +ERROR HY000: Function or expression '`f1`' is not allowed for 'DEFAULT' of column/constraint 'a' +DROP FUNCTION f1; +CREATE PROCEDURE p1(par INT) CREATE TABLE t1 (a INT DEFAULT par); +ERROR HY000: Function or expression '???' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT DEFAULT par); +ERROR 42S22: Unknown column 'par' in 'virtual column function' +CREATE PROCEDURE p1() CREATE TABLE t1 (a INT DEFAULT par); +CALL p1; +ERROR 42S22: Unknown column 'par' in 'virtual column function' +DROP PROCEDURE p1; +CREATE TABLE t1 (a INT DEFAULT VALUES(a)); +ERROR HY000: Function or expression 'values' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a INT); +CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CREATE TABLE t2 (a INT DEFAULT NEW.a); +ERROR HY000: Function or expression 'trigger' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CREATE TEMPORARY TABLE t2 (a INT DEFAULT NEW.a); +ERROR HY000: Function or expression 'trigger' is not allowed for 'DEFAULT' of column/constraint 'a' +DROP TABLE t1; +# +# Prepared statements +# +PREPARE stmt FROM 'CREATE TABLE t1 (a INT DEFAULT(?))'; +set @a=1; +execute stmt using @a; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT '1' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +set @a=-1; +execute stmt using @a; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT '-1' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +DEALLOCATE PREPARE stmt; +PREPARE stmt FROM 'CREATE TABLE t1 (a INT DEFAULT(?), b INT DEFAULT(?))'; +set @a=1, @b=2; +execute stmt using @a,@b; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT '1', + `b` int(11) DEFAULT '2' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +DEALLOCATE PREPARE stmt; +PREPARE stmt FROM 'CREATE TABLE t1 (a INT DEFAULT(?+?))'; +set @a=1; +execute stmt using @a,@a; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?+?))' at line 1 +DEALLOCATE PREPARE stmt; +# +# Parenthesized Item_basic_constant +# +CREATE TABLE t1 ( +i01 INT DEFAULT (((1))), +i02 INT DEFAULT (((0x3939))), +i03 INT DEFAULT (((1.0))), +i04 INT DEFAULT (((1e0))), +i05 INT DEFAULT (((NULL))), +f01 DOUBLE DEFAULT (((PI()))), +s01 VARCHAR(10) DEFAULT (((_latin1'test'))), +s02 VARCHAR(10) DEFAULT ((('test'))), +s03 VARCHAR(10) DEFAULT (((0x40))), +s04 VARCHAR(10) DEFAULT (((X'40'))), +s05 VARCHAR(10) DEFAULT (((B'1000000'))), +d01 TIME DEFAULT (((TIME'10:20:30'))), +d02 DATE DEFAULT (((DATE'2001-01-01'))), +d03 DATETIME DEFAULT (((TIMESTAMP'2001-01-01 10:20:30'))) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i01` int(11) DEFAULT '1', + `i02` int(11) DEFAULT '14649', + `i03` int(11) DEFAULT '1', + `i04` int(11) DEFAULT '1', + `i05` int(11) DEFAULT NULL, + `f01` double DEFAULT '3.141592653589793', + `s01` varchar(10) DEFAULT 'test', + `s02` varchar(10) DEFAULT 'test', + `s03` varchar(10) DEFAULT '@', + `s04` varchar(10) DEFAULT '@', + `s05` varchar(10) DEFAULT '@', + `d01` time DEFAULT '10:20:30', + `d02` date DEFAULT '2001-01-01', + `d03` datetime DEFAULT '2001-01-01 10:20:30' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +i01 1 +i02 14649 +i03 1 +i04 1 +i05 NULL +f01 3.141592653589793 +s01 test +s02 test +s03 @ +s04 @ +s05 @ +d01 10:20:30 +d02 2001-01-01 +d03 2001-01-01 10:20:30 +DROP TABLE t1; +# +# COALESCE(Item_basic_constant) +# +CREATE TABLE t1 ( +i01 INT DEFAULT COALESCE(1), +i02 INT DEFAULT COALESCE(0x3939), +i03 INT DEFAULT COALESCE(1.0), +i04 INT DEFAULT COALESCE(1e0), +i05 INT DEFAULT COALESCE(NULL), +f01 DOUBLE DEFAULT COALESCE(PI()), +s01 VARCHAR(10) DEFAULT COALESCE(_latin1'test'), +s02 VARCHAR(10) DEFAULT COALESCE('test'), +s03 VARCHAR(10) DEFAULT COALESCE(0x40), +s04 VARCHAR(10) DEFAULT COALESCE(X'40'), +s05 VARCHAR(10) DEFAULT COALESCE(B'1000000'), +d01 TIME DEFAULT COALESCE(TIME'10:20:30'), +d02 DATE DEFAULT COALESCE(DATE'2001-01-01'), +d03 DATETIME DEFAULT COALESCE(TIMESTAMP'2001-01-01 10:20:30') +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i01` int(11) DEFAULT COALESCE(1), + `i02` int(11) DEFAULT COALESCE(0x3939), + `i03` int(11) DEFAULT COALESCE(1.0), + `i04` int(11) DEFAULT COALESCE(1e0), + `i05` int(11) DEFAULT COALESCE(NULL), + `f01` double DEFAULT COALESCE(PI()), + `s01` varchar(10) DEFAULT COALESCE(_latin1'test'), + `s02` varchar(10) DEFAULT COALESCE('test'), + `s03` varchar(10) DEFAULT COALESCE(0x40), + `s04` varchar(10) DEFAULT COALESCE(X'40'), + `s05` varchar(10) DEFAULT COALESCE(B'1000000'), + `d01` time DEFAULT COALESCE(TIME'10:20:30'), + `d02` date DEFAULT COALESCE(DATE'2001-01-01'), + `d03` datetime DEFAULT COALESCE(TIMESTAMP'2001-01-01 10:20:30') +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +i01 1 +i02 99 +i03 1 +i04 1 +i05 NULL +f01 3.141592653589793 +s01 test +s02 test +s03 @ +s04 @ +s05 @ +d01 10:20:30 +d02 2001-01-01 +d03 2001-01-01 10:20:30 +DROP TABLE t1; +# +# TINYINT: out of range +# +CREATE TABLE t1 (a TINYINT DEFAULT 300 NOT NULL); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1 (a TINYINT DEFAULT 128 NOT NULL); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1 (a TINYINT DEFAULT -500 NOT NULL); +ERROR 42000: Invalid default value for 'a' +# +# INT: simple numeric expressions +# +CREATE TABLE t1 (a INT DEFAULT 1 NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT '1' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +1 +DROP TABLE t1; +CREATE TABLE t1 (a INT DEFAULT COALESCE(1) NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT COALESCE(1) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +1 +DROP TABLE t1; +# +# INT: simple string expressions +# +CREATE TABLE t1 (a INT DEFAULT '1' NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT '1' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +1 +DROP TABLE t1; +CREATE TABLE t1 (a INT DEFAULT CONCAT('1') NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT CONCAT('1') +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +1 +DROP TABLE t1; +CREATE TABLE t1 (a INT DEFAULT COALESCE('1') NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT COALESCE('1') +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +1 +DROP TABLE t1; +# +# INT: string expressions with garbage +# +CREATE TABLE t1 (a INT DEFAULT 'x'); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1 (a INT DEFAULT CONCAT('x')); +insert into t1 values(); +Warnings: +Warning 1366 Incorrect integer value: 'x' for column 'a' at row 1 +DROP TABLE t1; +CREATE TABLE t1 (a INT DEFAULT COALESCE('x')); +insert into t1 values(); +Warnings: +Warning 1366 Incorrect integer value: 'x' for column 'a' at row 1 +DROP TABLE t1; +# +# INT: string expressions with numbers + garbage +# +CREATE TABLE t1 (a INT DEFAULT '1x'); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1 (a INT DEFAULT COALESCE('1x')); +insert into t1 values(); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +DROP TABLE t1; +CREATE TABLE t1 (a INT DEFAULT CONCAT('1x')); +insert into t1 values(); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +DROP TABLE t1; +# +# INT: string expressions with numbers + trailing space +# +CREATE TABLE t1 (a INT DEFAULT '1 '); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT '1' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +1 +DROP TABLE t1; +CREATE TABLE t1 (a INT DEFAULT CONCAT('1 ')); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT CONCAT('1 ') +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a +1 +DROP TABLE t1; +CREATE TABLE t1 (a INT DEFAULT COALESCE('1 ')); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT COALESCE('1 ') +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +SELECT * FROM t1; +a +1 +DROP TABLE t1; +# +# INT: a HEX value +# +CREATE TABLE t1 (a INT DEFAULT 0x61 NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL DEFAULT '97' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +97 +DROP TABLE t1; +# +# VARCHAR: good defaults +# +CREATE TABLE t1 (a VARCHAR(30) DEFAULT 'xxx' NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(30) NOT NULL DEFAULT 'xxx' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +xxx +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(2) DEFAULT 0x41 NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(2) NOT NULL DEFAULT 'A' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT(0x41) NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(2) NOT NULL DEFAULT CONCAT(0x41) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +A +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(2) DEFAULT COALESCE(0x41) NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(2) NOT NULL DEFAULT COALESCE(0x41) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +A +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT(_utf8 0x41) NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(2) NOT NULL DEFAULT CONCAT(_utf8 0x41) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +A +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT(_utf8 X'41') NOT NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(2) NOT NULL DEFAULT CONCAT(_utf8 X'41') +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +a +A +DROP TABLE t1; +# +# VARCHAR: Too long default +# +CREATE TABLE t1 (a VARCHAR(2) DEFAULT 'xxx' NOT NULL); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT('xxx') NOT NULL); +insert into t1 values(); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +DROP TABLE t1; +# +# VARCHAR: Too long default with non-important data +# +CREATE TABLE t1 (a VARCHAR(2) DEFAULT 'xx ' NOT NULL); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT('xx ') NOT NULL); +insert into t1 values(); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +DROP TABLE t1; +# +# VARCHAR: conversion failures +# +CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET latin1 DEFAULT _utf8 X'D18F' NOT NULL); +ERROR 42000: Invalid default value for 'a' +CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET latin1 DEFAULT CONCAT(_utf8 X'D18F') NOT NULL); +insert into t1 values(); +Warnings: +Warning 1366 Incorrect string value: '\xD1\x8F' for column 'a' at row 1 +DROP TABLE t1; +CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET latin1 DEFAULT CONCAT(_utf8 0xD18F) NOT NULL); +insert into t1 values(); +Warnings: +Warning 1366 Incorrect string value: '\xD1\x8F' for column 'a' at row 1 +DROP TABLE t1; +# +# Field as a default value +# +CREATE TABLE t1 (a INT, b INT DEFAULT (a)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT (a) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (1, 1); +INSERT INTO t1 VALUES (DEFAULT, DEFAULT); +INSERT INTO t1 VALUES (1, DEFAULT); +INSERT INTO t1 VALUES (DEFAULT, 1); +SELECT * FROM t1; +a b +1 1 +NULL NULL +1 1 +NULL 1 +DROP TABLE t1; +# +# Function DEFAULT(field) +# +CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT 1); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT (DEFAULT(b)), + `b` int(11) DEFAULT '1' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT, DEFAULT); +SELECT * FROM t1; +a b +1 1 +DROP TABLE t1; +CREATE TABLE t1 (a INT DEFAULT 1, b INT DEFAULT(DEFAULT(a))); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT '1', + `b` int(11) DEFAULT (DEFAULT(a)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (DEFAULT, DEFAULT); +SELECT * FROM t1; +a b +1 1 +DROP TABLE t1; +# +# SQL Standard <datetime value function> as a <default option> +# +CREATE TABLE t1 (a DATETIME DEFAULT CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` datetime DEFAULT CURRENT_TIMESTAMP +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a TIME DEFAULT CURRENT_TIME); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` time DEFAULT CURRENT_TIME +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a DATE DEFAULT CURRENT_DATE); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` date DEFAULT CURRENT_DATE +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# DECIMAL + CURRENT_TIMESTAMP, no truncation +# +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT CURRENT_TIMESTAMP(6)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` decimal(30,6) DEFAULT CURRENT_TIMESTAMP(6) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +a +20010101102030.123456 +DROP TABLE t1; +CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_TIMESTAMP(6))); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` decimal(30,6) DEFAULT COALESCE(CURRENT_TIMESTAMP(6)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +INSERT IGNORE INTO t1 VALUES(); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +SET sql_mode = 'STRICT_ALL_TABLES'; +INSERT INTO t1 VALUES(); +ERROR 01000: Data truncated for column 'a' at row 1 +SET sql_mode = DEFAULT; +DROP TABLE t1; +SET timestamp=DEFAULT; +# +# DECIMAL + CURRENT_TIME, no truncation +# +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_TIME(6))); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` decimal(30,6) DEFAULT COALESCE(CURRENT_TIME(6)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +DROP TABLE t1; +SET timestamp=DEFAULT; +# +# DECIMAL + CURRENT_DATE, no truncation +# +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_DATE)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` decimal(30,6) DEFAULT COALESCE(CURRENT_DATE) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES(); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +DROP TABLE t1; +SET timestamp=DEFAULT; +# +# COALESCE for SQL Standard <datetime value function> +# +CREATE TABLE t1 (a TIMESTAMP DEFAULT COALESCE(CURRENT_TIMESTAMP)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp NOT NULL DEFAULT COALESCE(CURRENT_TIMESTAMP) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a DATE DEFAULT COALESCE(CURRENT_DATE)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` date DEFAULT COALESCE(CURRENT_DATE) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a TIME DEFAULT COALESCE(CURRENT_TIME)); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` time DEFAULT COALESCE(CURRENT_TIME) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 ( +a TIMESTAMP DEFAULT CURRENT_TIMESTAMP(6), +b TIMESTAMP DEFAULT COALESCE(CURRENT_TIMESTAMP(6)) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `b` timestamp NOT NULL DEFAULT COALESCE(CURRENT_TIMESTAMP(6)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (); +SELECT CURRENT_TIMESTAMP(6); +CURRENT_TIMESTAMP(6) +2001-01-01 10:20:30.123456 +SELECT * FROM t1; +a b +2001-01-01 10:20:30 2001-01-01 10:20:30 +DROP TABLE t1; +SET timestamp=DEFAULT; +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 ( +a DECIMAL(30,0) DEFAULT CURRENT_TIMESTAMP(6), +b DECIMAL(30,0) DEFAULT COALESCE(CURRENT_TIMESTAMP(6)) +); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` decimal(30,0) DEFAULT CURRENT_TIMESTAMP(6), + `b` decimal(30,0) DEFAULT COALESCE(CURRENT_TIMESTAMP(6)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (); +Warnings: +Note 1265 Data truncated for column 'a' at row 1 +Warning 1265 Data truncated for column 'b' at row 1 +SELECT * FROM t1; +a b +20010101102030 2001 +DROP TABLE t1; +# +# Miscelaneous SQL standard <default option> variants +# +CREATE TABLE t1 (a VARCHAR(30) DEFAULT CURRENT_USER); +ERROR HY000: Function or expression 'current_user()' is not allowed for 'DEFAULT' of column/constraint 'a' +CREATE TABLE t1 (a VARCHAR(30) DEFAULT CURRENT_ROLE); +ERROR HY000: Function or expression 'current_role()' is not allowed for 'DEFAULT' of column/constraint 'a' +# +# Check DEFAULT() function +# +CREATE TABLE `t1` (`a` int(11) DEFAULT 3+3,`b` int(11) DEFAULT '1000'); +insert into t1 values (1,1),(2,2); +insert into t1 values (default,default); +select * from t1; +a b +1 1 +2 2 +6 1000 +select default(a),b from t1; +ERROR HY000: Field 'a' doesn't have a default value +select a,default(b) from t1; +a default(b) +1 1000 +2 1000 +6 1000 +drop table t1; diff --git a/mysql-test/r/fulltext_distinct.result b/mysql-test/r/fulltext_distinct.result index 7fd42fab646..de0668ff28c 100644 --- a/mysql-test/r/fulltext_distinct.result +++ b/mysql-test/r/fulltext_distinct.result @@ -8,8 +8,6 @@ KEY kt(tag), KEY kv(value(15)), FULLTEXT KEY kvf(value) ) ENGINE=MyISAM; -Warnings: -Warning 1101 BLOB/TEXT column 'value' can't have a default value CREATE TABLE t2 ( id_t2 mediumint unsigned NOT NULL default '0', id_t1 mediumint unsigned NOT NULL default '0', diff --git a/mysql-test/r/fulltext_update.result b/mysql-test/r/fulltext_update.result index 4a615c88fdd..5d3f95b318c 100644 --- a/mysql-test/r/fulltext_update.result +++ b/mysql-test/r/fulltext_update.result @@ -9,8 +9,6 @@ name VARCHAR(80) DEFAULT '' NOT NULL, FULLTEXT(url,description,shortdesc,longdesc), PRIMARY KEY(gnr) ); -Warnings: -Warning 1101 BLOB/TEXT column 'longdesc' can't have a default value insert into test (url,shortdesc,longdesc,description,name) VALUES ("http:/test.at", "kurz", "lang","desc", "name"); insert into test (url,shortdesc,longdesc,description,name) VALUES diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 387b8545f59..8c4c78460d5 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -319,6 +319,9 @@ id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (not((`test`.`t1`.`a` + 0))) +select not 1, not null, not not null, 1 is not null; +not 1 NULL not not null 1 is not null +0 NULL NULL 1 drop table t1; # # Start of 10.0 tests diff --git a/mysql-test/r/function_defaults.result b/mysql-test/r/function_defaults.result index b8f42b86c1f..a5367c4c591 100644 --- a/mysql-test/r/function_defaults.result +++ b/mysql-test/r/function_defaults.result @@ -9,50 +9,40 @@ SET TIME_ZONE = "+00:00"; # Test of errors for column data types that dont support function # defaults. # -CREATE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column +drop table if exists t1; # # Test that the default clause behaves like NOW() regarding time zones. # @@ -864,8 +854,8 @@ SET TIMESTAMP = 2000.876543; INSERT INTO t2( a ) VALUES ( 3 ); SELECT * FROM t2; b a -0000-00-00 00:00:00 1 -0000-00-00 00:00:00 2 +1970-01-01 00:16:40 1 +1970-01-01 00:16:40 2 1970-01-01 00:33:20 3 DROP TABLE t1, t2; # @@ -1453,7 +1443,7 @@ a b # 1970-01-01 03:33:20 SET TIMESTAMP = 2000.000234; UPDATE v1 SET a = 2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM t1; a b 1 1970-01-01 03:16:40 @@ -1476,7 +1466,7 @@ a c 1973-08-14 09:11:22 1 SET TIMESTAMP = 1.126789; INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM v1; a c 1973-08-14 09:11:22 1 @@ -1565,50 +1555,40 @@ SET TIME_ZONE = "+00:00"; # Test of errors for column data types that dont support function # defaults. # -CREATE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column +drop table if exists t1; # # Test that the default clause behaves like NOW() regarding time zones. # @@ -2420,8 +2400,8 @@ SET TIMESTAMP = 2000.876543; INSERT INTO t2( a ) VALUES ( 3 ); SELECT * FROM t2; b a -0000-00-00 00:00:00.000000 1 -0000-00-00 00:00:00.000000 2 +1970-01-01 00:16:40.987654 1 +1970-01-01 00:16:40.987654 2 1970-01-01 00:33:20.876543 3 DROP TABLE t1, t2; # @@ -3009,7 +2989,7 @@ a b # 1970-01-01 03:33:20 SET TIMESTAMP = 2000.000234; UPDATE v1 SET a = 2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM t1; a b 1 1970-01-01 03:16:40.123456 @@ -3032,7 +3012,7 @@ a c 1973-08-14 09:11:22.089786 1 SET TIMESTAMP = 1.126789; INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM v1; a c 1973-08-14 09:11:22.089786 1 diff --git a/mysql-test/r/function_defaults_innodb.result b/mysql-test/r/function_defaults_innodb.result index 2525d4e948a..ee89d847a5c 100644 --- a/mysql-test/r/function_defaults_innodb.result +++ b/mysql-test/r/function_defaults_innodb.result @@ -10,50 +10,40 @@ SET TIME_ZONE = "+00:00"; # Test of errors for column data types that dont support function # defaults. # -CREATE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP ); +CREATE OR REPLACE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP ); ERROR HY000: Invalid ON UPDATE clause for 'a' column +drop table if exists t1; # # Test that the default clause behaves like NOW() regarding time zones. # @@ -865,8 +855,8 @@ SET TIMESTAMP = 2000.876543; INSERT INTO t2( a ) VALUES ( 3 ); SELECT * FROM t2; b a -0000-00-00 00:00:00 1 -0000-00-00 00:00:00 2 +1970-01-01 00:16:40 1 +1970-01-01 00:16:40 2 1970-01-01 00:33:20 3 DROP TABLE t1, t2; # @@ -1454,7 +1444,7 @@ a b # 1970-01-01 03:33:20 SET TIMESTAMP = 2000.000234; UPDATE v1 SET a = 2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM t1; a b 1 1970-01-01 03:16:40 @@ -1477,7 +1467,7 @@ a c 1973-08-14 09:11:22 1 SET TIMESTAMP = 1.126789; INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM v1; a c 1973-08-14 09:11:22 1 @@ -1566,50 +1556,40 @@ SET TIME_ZONE = "+00:00"; # Test of errors for column data types that dont support function # defaults. # -CREATE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP(6) ); -ERROR 42000: Invalid default value for 'a' -CREATE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a BIT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a TINYINT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a SMALLINT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a MEDIUMINT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a INT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a BIGINT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a FLOAT DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a DECIMAL DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a DATE DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a TIME DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a YEAR DEFAULT CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a BIT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a TINYINT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a SMALLINT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a MEDIUMINT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a INT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a BIGINT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a FLOAT ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a DECIMAL ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a DATE ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a TIME ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column -CREATE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP(6) ); +CREATE OR REPLACE TABLE t1( a YEAR ON UPDATE CURRENT_TIMESTAMP(6) ); ERROR HY000: Invalid ON UPDATE clause for 'a' column +drop table if exists t1; # # Test that the default clause behaves like NOW() regarding time zones. # @@ -2421,8 +2401,8 @@ SET TIMESTAMP = 2000.876543; INSERT INTO t2( a ) VALUES ( 3 ); SELECT * FROM t2; b a -0000-00-00 00:00:00.000000 1 -0000-00-00 00:00:00.000000 2 +1970-01-01 00:16:40.987654 1 +1970-01-01 00:16:40.987654 2 1970-01-01 00:33:20.876543 3 DROP TABLE t1, t2; # @@ -3010,7 +2990,7 @@ a b # 1970-01-01 03:33:20 SET TIMESTAMP = 2000.000234; UPDATE v1 SET a = 2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM t1; a b 1 1970-01-01 03:16:40.123456 @@ -3033,7 +3013,7 @@ a c 1973-08-14 09:11:22.089786 1 SET TIMESTAMP = 1.126789; INSERT INTO v1 ( c ) VALUES ( 1 ) ON DUPLICATE KEY UPDATE c = 2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM v1; a c 1973-08-14 09:11:22.089786 1 diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index 0506a0b2a0a..43c51b838e2 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -804,8 +804,6 @@ INSERT INTO t2 SELECT GeomFromText(st) FROM t1; ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'geometry' can't have a default value INSERT INTO t1 (geometry) VALUES (PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, -18.7186111000 -66.8102777000, -18.7211111000 -66.9269443999, @@ -822,8 +820,6 @@ CREATE TABLE t1 ( c1 geometry NOT NULL default '', SPATIAL KEY i1 (c1) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'c1' can't have a default value INSERT INTO t1 (c1) VALUES ( PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, @@ -838,8 +834,6 @@ CREATE TABLE t1 ( c1 geometry NOT NULL default '', SPATIAL KEY i1 (c1) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'c1' can't have a default value INSERT INTO t1 (c1) VALUES ( PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 33080509114..6731b019ad0 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -614,8 +614,6 @@ t1 CREATE TABLE `t1` ( drop table t1; CREATE TABLE `t1` (`object_id` bigint(20) unsigned NOT NULL default '0', `geo` geometry NOT NULL default '') ENGINE=MyISAM ; -Warnings: -Warning 1101 BLOB/TEXT column 'geo' can't have a default value insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363 36.305435,-114.992394 36.305202,-114.991219 36.305975,-114.991163 36.306845,-114.989432 36.309452,-114.978275 36.312642,-114.977363 diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index fba04812a5b..098332a7de6 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -576,6 +576,7 @@ select s1 from t1 where s1 in (select version from information_schema.tables) union select version from information_schema.tables; s1 +11 10 drop table t1; SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index ca544f40aa8..24dcdeacf60 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -601,8 +601,6 @@ id int(11) DEFAULT '0' NOT NULL, name tinytext DEFAULT '' NOT NULL, UNIQUE id (id) ); -Warnings: -Warning 1101 BLOB/TEXT column 'name' can't have a default value INSERT INTO t1 VALUES (1,'yes'),(2,'no'); CREATE TABLE t2 ( id int(11) DEFAULT '0' NOT NULL, diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result index 3616deaee9c..e20914c6e13 100644 --- a/mysql-test/r/join_outer_jcl6.result +++ b/mysql-test/r/join_outer_jcl6.result @@ -612,8 +612,6 @@ id int(11) DEFAULT '0' NOT NULL, name tinytext DEFAULT '' NOT NULL, UNIQUE id (id) ); -Warnings: -Warning 1101 BLOB/TEXT column 'name' can't have a default value INSERT INTO t1 VALUES (1,'yes'),(2,'no'); CREATE TABLE t2 ( id int(11) DEFAULT '0' NOT NULL, diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index c44eb852fe2..806cc7a7b1a 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -467,7 +467,7 @@ alter table t1 drop index c2, add index (c2(4),c3(7)); alter table t1 add primary key (c1, c2), drop primary key; alter table t1 drop primary key; alter table t1 add primary key (c1, c2), drop primary key; -ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists +ERROR 42000: Can't DROP 'PRIMARY'; check that constraint/column/key exists show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/r/mysql57_virtual.result b/mysql-test/r/mysql57_virtual.result new file mode 100644 index 00000000000..a473a85cb3b --- /dev/null +++ b/mysql-test/r/mysql57_virtual.result @@ -0,0 +1,38 @@ +# +# Test that we can use tables created in MySQL 5.7 +# +SHOW CREATE TABLE mysql57_virtual; +Table Create Table +mysql57_virtual CREATE TABLE `mysql57_virtual` ( + `a` int(11) DEFAULT NULL, + `b` int(11) AS ((`a` + 1)) VIRTUAL, + `c` int(11) AS ((`a` + 3)) PERSISTENT +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into mysql57_virtual (a) values (1),(2); +select * from mysql57_virtual; +a b c +1 2 4 +2 3 5 +alter online table mysql57_virtual comment "I am now a MariaDB table"; +ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED. +alter table mysql57_virtual comment "I am now a MariaDB table"; +SHOW CREATE TABLE mysql57_virtual; +Table Create Table +mysql57_virtual CREATE TABLE `mysql57_virtual` ( + `a` int(11) DEFAULT NULL, + `b` int(11) AS ((`a` + 1)) VIRTUAL, + `c` int(11) AS ((`a` + 3)) PERSISTENT +) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='I am now a MariaDB table' +DROP TABLE mysql57_virtual; +# +# Check MySQL 5.7 syntax +# +create table t1 (a int, b int generated always as (a+1) STORED, c int generated always as (a+2) VIRTUAL); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) AS (a+1) PERSISTENT, + `c` int(11) AS (a+2) VIRTUAL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/r/mysqlbinlog-innodb.result b/mysql-test/r/mysqlbinlog-innodb.result index 2704be9e3ed..9508f725ec4 100644 --- a/mysql-test/r/mysqlbinlog-innodb.result +++ b/mysql-test/r/mysqlbinlog-innodb.result @@ -29,7 +29,7 @@ BEGIN use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -60,7 +60,7 @@ BEGIN use `foo`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index c7da070a622..108e03e5a47 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -22,7 +22,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -102,7 +102,7 @@ BEGIN use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -138,7 +138,7 @@ BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -189,7 +189,7 @@ BEGIN use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -216,7 +216,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -296,7 +296,7 @@ BEGIN use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -332,7 +332,7 @@ BEGIN /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -383,7 +383,7 @@ BEGIN use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -492,7 +492,7 @@ DELIMITER /*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -544,7 +544,7 @@ DELIMITER /*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -724,7 +724,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1253783037/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -778,7 +778,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; SET TIMESTAMP=1253783037/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -813,7 +813,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; SET TIMESTAMP=1266652094/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -855,7 +855,7 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; SET TIMESTAMP=1266652094/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -964,7 +964,7 @@ AAAAAAAAAAAAAAAAAAAgrgJSFzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC # Event: Query thread_id=1 exec_time=0 error_code=0 SET TIMESTAMP=1375907364/*!*/; SET @@session.pseudo_thread_id=1/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1047,7 +1047,7 @@ AAAAAAAAAAAAAAAAAAA/rQJSGzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC # Event: Query thread_id=1 exec_time=1 error_code=0 SET TIMESTAMP=1375907141/*!*/; SET @@session.pseudo_thread_id=1/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1130,7 +1130,7 @@ AAAAAAAAAAAAAAAAAAAnrAJSHzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC # Event: Query thread_id=1 exec_time=0 error_code=0 SET TIMESTAMP=1375906879/*!*/; SET @@session.pseudo_thread_id=1/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1213,7 +1213,7 @@ AAAAAAAAAAAAAAAAAABbsAJSEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC # Event: Query thread_id=1 exec_time=0 error_code=0 SET TIMESTAMP=1375907933/*!*/; SET @@session.pseudo_thread_id=1/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/r/mysqlbinlog_row_minimal.result b/mysql-test/r/mysqlbinlog_row_minimal.result index 20837aeec24..84c0e668981 100644 --- a/mysql-test/r/mysqlbinlog_row_minimal.result +++ b/mysql-test/r/mysqlbinlog_row_minimal.result @@ -31,7 +31,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=X/*!*/; SET @@session.pseudo_thread_id=4/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index a015819e480..697ebe26ad2 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -284,11 +284,7 @@ info text NOT NULL default '', ipnr varchar(30) NOT NULL default '', PRIMARY KEY (member_id) ) ENGINE=MyISAM PACK_KEYS=1; -Warnings: -Warning 1101 BLOB/TEXT column 'info' can't have a default value insert into t1 (member_id) values (1),(2),(3); -Warnings: -Warning 1364 Field 'info' doesn't have a default value select member_id, nickname, voornaam FROM t1 ORDER by lastchange_datum DESC LIMIT 2; member_id nickname voornaam diff --git a/mysql-test/r/partition_explicit_prune.result b/mysql-test/r/partition_explicit_prune.result index 765803d6332..1719556d9c8 100644 --- a/mysql-test/r/partition_explicit_prune.result +++ b/mysql-test/r/partition_explicit_prune.result @@ -126,7 +126,7 @@ HANDLER_WRITE 2 # 4 locks (1 table, 1 partition lock/unlock) FLUSH STATUS; INSERT INTO v1 VALUES (31); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; VARIABLE_NAME VARIABLE_VALUE @@ -135,7 +135,7 @@ HANDLER_TMP_WRITE 22 # 2 locks (1 table, all partitions pruned) FLUSH STATUS; INSERT INTO v1 VALUES (32); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0; VARIABLE_NAME VARIABLE_VALUE diff --git a/mysql-test/r/replace.result b/mysql-test/r/replace.result index 59b8565f671..2c1fc263b2d 100644 --- a/mysql-test/r/replace.result +++ b/mysql-test/r/replace.result @@ -27,6 +27,6 @@ drop table t1; CREATE TABLE t1 (f1 INT); CREATE VIEW v1 AS SELECT f1 FROM t1 WHERE f1 = 0 WITH CHECK OPTION; REPLACE INTO v1 (f1) VALUES (1); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' DROP TABLE t1; DROP VIEW v1; diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index c973bbe11d5..45daac4fa10 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1932,7 +1932,7 @@ create table t1(id int); create table t2(id int); create table t3(flag int); select (select * from t3 where id not null) from t1, t2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'null) from t1, t2' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not null) from t1, t2' at line 1 drop table t1,t2,t3; CREATE TABLE t1 (id INT); CREATE TABLE t2 (id INT); @@ -5001,7 +5001,7 @@ CREATE VIEW v2 (a,b) AS SELECT t2.id, t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; INSERT INTO v2(a,b) VALUES (2,2); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' SELECT * FROM v1; c 1 diff --git a/mysql-test/r/subselect_no_exists_to_in.result b/mysql-test/r/subselect_no_exists_to_in.result index 8ad01c0816c..f95704a28b1 100644 --- a/mysql-test/r/subselect_no_exists_to_in.result +++ b/mysql-test/r/subselect_no_exists_to_in.result @@ -1936,7 +1936,7 @@ create table t1(id int); create table t2(id int); create table t3(flag int); select (select * from t3 where id not null) from t1, t2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'null) from t1, t2' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not null) from t1, t2' at line 1 drop table t1,t2,t3; CREATE TABLE t1 (id INT); CREATE TABLE t2 (id INT); @@ -5003,7 +5003,7 @@ CREATE VIEW v2 (a,b) AS SELECT t2.id, t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; INSERT INTO v2(a,b) VALUES (2,2); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' SELECT * FROM v1; c 1 diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result index 6dc3cba5a77..d2a412caa1d 100644 --- a/mysql-test/r/subselect_no_mat.result +++ b/mysql-test/r/subselect_no_mat.result @@ -1939,7 +1939,7 @@ create table t1(id int); create table t2(id int); create table t3(flag int); select (select * from t3 where id not null) from t1, t2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'null) from t1, t2' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not null) from t1, t2' at line 1 drop table t1,t2,t3; CREATE TABLE t1 (id INT); CREATE TABLE t2 (id INT); @@ -5001,7 +5001,7 @@ CREATE VIEW v2 (a,b) AS SELECT t2.id, t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; INSERT INTO v2(a,b) VALUES (2,2); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' SELECT * FROM v1; c 1 diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result index 843adafe2b9..f06e2d8e554 100644 --- a/mysql-test/r/subselect_no_opts.result +++ b/mysql-test/r/subselect_no_opts.result @@ -1935,7 +1935,7 @@ create table t1(id int); create table t2(id int); create table t3(flag int); select (select * from t3 where id not null) from t1, t2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'null) from t1, t2' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not null) from t1, t2' at line 1 drop table t1,t2,t3; CREATE TABLE t1 (id INT); CREATE TABLE t2 (id INT); @@ -4997,7 +4997,7 @@ CREATE VIEW v2 (a,b) AS SELECT t2.id, t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; INSERT INTO v2(a,b) VALUES (2,2); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' SELECT * FROM v1; c 1 diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result index 348258f5ee1..ab27af586aa 100644 --- a/mysql-test/r/subselect_no_scache.result +++ b/mysql-test/r/subselect_no_scache.result @@ -1938,7 +1938,7 @@ create table t1(id int); create table t2(id int); create table t3(flag int); select (select * from t3 where id not null) from t1, t2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'null) from t1, t2' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not null) from t1, t2' at line 1 drop table t1,t2,t3; CREATE TABLE t1 (id INT); CREATE TABLE t2 (id INT); @@ -5007,7 +5007,7 @@ CREATE VIEW v2 (a,b) AS SELECT t2.id, t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; INSERT INTO v2(a,b) VALUES (2,2); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' SELECT * FROM v1; c 1 diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result index cd28339e4c9..d3be251a9e5 100644 --- a/mysql-test/r/subselect_no_semijoin.result +++ b/mysql-test/r/subselect_no_semijoin.result @@ -1935,7 +1935,7 @@ create table t1(id int); create table t2(id int); create table t3(flag int); select (select * from t3 where id not null) from t1, t2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'null) from t1, t2' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not null) from t1, t2' at line 1 drop table t1,t2,t3; CREATE TABLE t1 (id INT); CREATE TABLE t2 (id INT); @@ -4997,7 +4997,7 @@ CREATE VIEW v2 (a,b) AS SELECT t2.id, t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; INSERT INTO v2(a,b) VALUES (2,2); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' SELECT * FROM v1; c 1 diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index ec33f8ba203..5249c89e4a4 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -37,10 +37,20 @@ ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT CREATE TABLE t2 (a char(256)); ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead CREATE TABLE t1 (a varchar(70000) default "hello"); -ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +Warnings: +Note 1246 Converting column 'a' from VARCHAR to TEXT +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` mediumtext DEFAULT "hello" +) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 (a blob default "hello"); -ERROR 42000: BLOB/TEXT column 'a' can't have a default value -drop table if exists t1,t2; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` blob DEFAULT "hello" +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1,t2; create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr)); insert into t1 values (null,"a","A"); insert into t1 values (null,"bbb","BBB"); @@ -503,11 +513,7 @@ foobar boggle fish 10 drop table t1; create table t1 (id integer auto_increment unique,imagem LONGBLOB not null default ''); -Warnings: -Warning 1101 BLOB/TEXT column 'imagem' can't have a default value insert into t1 (id) values (1); -Warnings: -Warning 1364 Field 'imagem' doesn't have a default value select charset(load_file('../../std_data/words.dat')), collation(load_file('../../std_data/words.dat')), @@ -793,21 +799,24 @@ NULL 620000000000 drop table t1; create table t1 (a text default ''); -Warnings: -Warning 1101 BLOB/TEXT column 'a' can't have a default value show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text DEFAULT NULL + `a` text DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 insert into t1 values (default); select * from t1; a -NULL + drop table t1; set @@sql_mode='TRADITIONAL'; create table t1 (a text default ''); -ERROR 42000: BLOB/TEXT column 'a' can't have a default value +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` text DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; set @@sql_mode=''; CREATE TABLE t (c TEXT CHARSET ASCII); INSERT INTO t (c) VALUES (REPEAT('1',65537)); @@ -879,9 +888,9 @@ CREATE TABLE b15776 (a char(4294967295)); ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead CREATE TABLE b15776 (a char(4294967296)); ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead -CREATE TABLE b15776 (a year(4294967295)); +CREATE TABLE b15776 (a year(?)); Warnings: -Note 1287 'YEAR(4294967295)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1287 'YEAR(?)' is deprecated and will be removed in a future release. Please use YEAR(4) instead INSERT INTO b15776 VALUES (42); SELECT * FROM b15776; a diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index c998c28ebd9..9984d6dddff 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -38,9 +38,6 @@ KEY (ulong), KEY (ulonglong,ulong), KEY (options,flags) ); -Warnings: -Warning 1101 BLOB/TEXT column 'mediumblob_col' can't have a default value -Warning 1101 BLOB/TEXT column 'longblob_col' can't have a default value show full fields from t1; Field Type Collation Null Key Default Extra Privileges Comment auto int(5) unsigned NULL NO PRI NULL auto_increment # @@ -63,8 +60,8 @@ time_field time NULL YES NULL # date_time datetime NULL YES NULL # blob_col blob NULL YES NULL # tinyblob_col tinyblob NULL YES NULL # -mediumblob_col mediumblob NULL NO NULL # -longblob_col longblob NULL NO NULL # +mediumblob_col mediumblob NULL NO '' # +longblob_col longblob NULL NO '' # options enum('one','two','tree') latin1_swedish_ci NO MUL NULL # flags set('one','two','tree') latin1_swedish_ci NO # show keys from t1; @@ -129,9 +126,6 @@ Warning 1264 Out of range value for column 'ushort' at row 1 Warning 1264 Out of range value for column 'umedium' at row 1 Warning 1265 Data truncated for column 'options' at row 1 insert into t1 (tiny) values (1); -Warnings: -Warning 1364 Field 'mediumblob_col' doesn't have a default value -Warning 1364 Field 'longblob_col' doesn't have a default value select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1; auto string tiny short medium long_int longlong real_float real_double utiny ushort umedium ulong ulonglong mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000) date_field time_field date_time blob_col tinyblob_col mediumblob_col longblob_col 10 1 1 1 1 1 1 1.0 1.0000 1 00001 1 1 1 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1 1 1 @@ -238,7 +232,7 @@ time_field time NULL YES NULL # date_time datetime NULL YES NULL # new_blob_col varchar(20) latin1_swedish_ci YES NULL # tinyblob_col tinyblob NULL YES NULL # -mediumblob_col mediumblob NULL NO NULL # +mediumblob_col mediumblob NULL NO '' # options enum('one','two','tree') latin1_swedish_ci NO MUL NULL # flags set('one','two','tree') latin1_swedish_ci NO # new_field char(10) latin1_swedish_ci NO new # @@ -264,7 +258,7 @@ time_field time NULL YES NULL # date_time datetime NULL YES NULL # new_blob_col varchar(20) latin1_swedish_ci YES NULL # tinyblob_col tinyblob NULL YES NULL # -mediumblob_col mediumblob NULL NO NULL # +mediumblob_col mediumblob NULL NO '' # options enum('one','two','tree') latin1_swedish_ci NO NULL # flags set('one','two','tree') latin1_swedish_ci NO # new_field char(10) latin1_swedish_ci NO new # diff --git a/mysql-test/r/type_timestamp_hires.result b/mysql-test/r/type_timestamp_hires.result index 573ebbeb709..89f6754ec9a 100644 --- a/mysql-test/r/type_timestamp_hires.result +++ b/mysql-test/r/type_timestamp_hires.result @@ -273,11 +273,21 @@ a 2011-01-01 01:01:01.12345 drop table t1; create table t1 (a timestamp(5) default current_timestamp); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 (a timestamp(5) default current_timestamp()); drop table t1; create table t1 (a timestamp(5) default current_timestamp(2)); -ERROR 42000: Invalid default value for 'a' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; create table t1 (a timestamp(5) default current_timestamp(5)); drop table t1; create table t1 (a timestamp(5) default current_timestamp(6)); diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result index 2e1eb15cad4..9f4762776a6 100644 --- a/mysql-test/r/user_var-binlog.result +++ b/mysql-test/r/user_var-binlog.result @@ -29,7 +29,7 @@ SET @`a b`:=_latin1 X'68656C6C6F' COLLATE `latin1_swedish_ci`/*!*/; use `test`/*!*/; SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 5b21ba57619..1bf740698fe 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -1134,11 +1134,11 @@ create table t1 (a int); create view v1 as select * from t1 where a < 2 with check option; insert into v1 values(1); insert into v1 values(3); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' insert ignore into v1 values (2),(3),(0); Warnings: -Warning 1369 CHECK OPTION failed 'test.v1' -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1; a 1 @@ -1146,20 +1146,20 @@ a delete from t1; insert into v1 SELECT 1; insert into v1 SELECT 3; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' create table t2 (a int); insert into t2 values (2),(3),(0); insert ignore into v1 SELECT a from t2; Warnings: -Warning 1369 CHECK OPTION failed 'test.v1' -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1 order by a desc; a 1 0 update v1 set a=-1 where a=0; update v1 set a=2 where a=1; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1 order by a desc; a 1 @@ -1174,7 +1174,7 @@ a update v1 set a=a+1; update ignore v1,t2 set v1.a=v1.a+1 where v1.a=t2.a; Warnings: -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1; a 1 @@ -1188,12 +1188,12 @@ create view v3 as select * from v1 where a > 0 with cascaded check option; insert into v2 values (1); insert into v3 values (1); insert into v2 values (0); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' insert into v3 values (0); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' insert into v2 values (2); insert into v3 values (2); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' select * from t1; a 1 @@ -1205,10 +1205,10 @@ create table t1 (a int, primary key (a)); create view v1 as select * from t1 where a < 2 with check option; insert into v1 values (1) on duplicate key update a=2; insert into v1 values (1) on duplicate key update a=2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' insert ignore into v1 values (1) on duplicate key update a=2; Warnings: -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1; a 1 @@ -1263,7 +1263,7 @@ s1 alter view v2 as select * from t2 where s1 in (select s1 from t1) with check option; insert into v2 values (5); update v2 set s1 = 1; -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' insert into t1 values (1); update v2 set s1 = 1; select * from v2; @@ -1300,16 +1300,16 @@ create table t1 (s1 tinyint); create view v1 as select * from t1 where s1 <> 0 with local check option; create view v2 as select * from v1 with cascaded check option; insert into v2 values (0); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' drop view v2, v1; drop table t1; create table t1 (s1 int); create view v1 as select * from t1 where s1 < 5 with check option; insert ignore into v1 values (6); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' insert ignore into v1 values (6),(3); Warnings: -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1; s1 3 @@ -1319,7 +1319,7 @@ create table t1 (s1 tinyint); create trigger t1_bi before insert on t1 for each row set new.s1 = 500; create view v1 as select * from t1 where s1 <> 127 with check option; insert into v1 values (0); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from v1; s1 select * from t1; @@ -1331,7 +1331,7 @@ create table t1 (s1 tinyint); create view v1 as select * from t1 where s1 <> 0; create view v2 as select * from v1 where s1 <> 1 with cascaded check option; insert into v2 values (0); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' select * from v2; s1 select * from t1; @@ -1341,7 +1341,7 @@ drop table t1; create table t1 (a int, b char(10)); create view v1 as select * from t1 where a != 0 with check option; load data infile '../../std_data/loaddata3.dat' into table v1 fields terminated by '' enclosed by '' ignore 1 lines; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1; a b 1 row 1 @@ -1356,10 +1356,10 @@ Warnings: Note 1265 Data truncated for column 'a' at row 1 Note 1265 Data truncated for column 'a' at row 2 Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3 -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' Note 1265 Data truncated for column 'a' at row 3 Warning 1366 Incorrect integer value: 'wrong end ' for column 'a' at row 4 -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1 order by a,b; a b 1 row 1 @@ -1375,7 +1375,7 @@ drop table t1; create table t1 (a text, b text); create view v1 as select * from t1 where a <> 'Field A' with check option; load data infile '../../std_data/loaddata2.dat' into table v1 fields terminated by ',' enclosed by ''''; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select concat('|',a,'|'), concat('|',b,'|') from t1; concat('|',a,'|') concat('|',b,'|') select concat('|',a,'|'), concat('|',b,'|') from v1; @@ -1383,7 +1383,7 @@ concat('|',a,'|') concat('|',b,'|') delete from t1; load data infile '../../std_data/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by ''''; Warnings: -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' Warning 1261 Row 2 doesn't contain data for all columns select concat('|',a,'|'), concat('|',b,'|') from t1; concat('|',a,'|') concat('|',b,'|') @@ -3047,9 +3047,9 @@ CREATE VIEW v1 AS SELECT id, val FROM t1 WHERE val >= 1 AND val <= 5 WITH CHECK INSERT INTO v1 (val) VALUES (2); INSERT INTO v1 (val) VALUES (4); INSERT INTO v1 (val) VALUES (6); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' UPDATE v1 SET val=6 WHERE id=2; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' DROP VIEW v1; DROP TABLE t1; DROP VIEW IF EXISTS v1, v2; @@ -3135,7 +3135,7 @@ b 1 2 UPDATE v1 SET b=3; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM v1; b 1 @@ -3467,14 +3467,14 @@ a1 c 1 0 2 0 UPDATE v1 SET c=3; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' PREPARE t FROM 'UPDATE v1 SET c=3'; EXECUTE t; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' EXECUTE t; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' INSERT INTO v1(a1, c) VALUES (3, 3); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' UPDATE v1 SET c=1 WHERE a1=1; SELECT * FROM v1; a1 c @@ -3493,14 +3493,14 @@ a1 c 1 1 2 0 UPDATE v2 SET c=3; -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' PREPARE t FROM 'UPDATE v2 SET c=3'; EXECUTE t; -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' EXECUTE t; -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' INSERT INTO v2(a1, c) VALUES (3, 3); -ERROR HY000: CHECK OPTION failed 'test.v2' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v2' UPDATE v2 SET c=2 WHERE a1=1; SELECT * FROM v2; a1 c diff --git a/mysql-test/std_data/mysql57_virtual.MYD b/mysql-test/std_data/mysql57_virtual.MYD new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/mysql-test/std_data/mysql57_virtual.MYD diff --git a/mysql-test/std_data/mysql57_virtual.MYI b/mysql-test/std_data/mysql57_virtual.MYI Binary files differnew file mode 100644 index 00000000000..348ce135656 --- /dev/null +++ b/mysql-test/std_data/mysql57_virtual.MYI diff --git a/mysql-test/std_data/mysql57_virtual.frm b/mysql-test/std_data/mysql57_virtual.frm Binary files differnew file mode 100644 index 00000000000..5b7dfb243c5 --- /dev/null +++ b/mysql-test/std_data/mysql57_virtual.frm diff --git a/mysql-test/suite/binlog/r/binlog_base64_flag.result b/mysql-test/suite/binlog/r/binlog_base64_flag.result index d13e13c97b0..34b5d2d419c 100644 --- a/mysql-test/suite/binlog/r/binlog_base64_flag.result +++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result @@ -38,7 +38,7 @@ DELIMITER /*!*/; # at 102 <#>use `test`/*!*/; SET TIMESTAMP=1196959712/*!*/; -<#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +<#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=0/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result index 0f90f721cd6..432f108e538 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result @@ -25,7 +25,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -97,7 +97,7 @@ SET INSERT_ID=1/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -163,7 +163,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -208,7 +208,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -253,7 +253,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -280,7 +280,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -325,7 +325,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -368,7 +368,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -430,7 +430,7 @@ SET INSERT_ID=6/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -460,7 +460,7 @@ SET INSERT_ID=1/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -516,7 +516,7 @@ SET INSERT_ID=6/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -546,7 +546,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -584,7 +584,7 @@ SET INSERT_ID=6/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -611,7 +611,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -687,7 +687,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -725,7 +725,7 @@ SET INSERT_ID=6/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -752,7 +752,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -794,7 +794,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -866,7 +866,7 @@ SET INSERT_ID=1/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -931,7 +931,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -976,7 +976,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1020,7 +1020,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1047,7 +1047,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1092,7 +1092,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1134,7 +1134,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1196,7 +1196,7 @@ SET INSERT_ID=6/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1226,7 +1226,7 @@ SET INSERT_ID=1/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1282,7 +1282,7 @@ SET INSERT_ID=6/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1311,7 +1311,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1349,7 +1349,7 @@ SET INSERT_ID=6/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1376,7 +1376,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1450,7 +1450,7 @@ SET INSERT_ID=3/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609944/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1488,7 +1488,7 @@ SET INSERT_ID=6/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609943/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1515,7 +1515,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1557,7 +1557,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1579609942/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result index 9e3d44952ef..4255d17fda7 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result @@ -362,7 +362,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result index b1d3c166fd5..8320a4655dd 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result @@ -2268,7 +2268,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; @@ -3902,7 +3902,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; @@ -4281,7 +4281,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; @@ -4867,7 +4867,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result index 7f927622631..e668481212d 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result @@ -2268,7 +2268,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; @@ -3925,7 +3925,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; @@ -4310,7 +4310,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; @@ -4906,7 +4906,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8 *//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result index 98ed0196554..9d8de92efdf 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result @@ -146,7 +146,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result index 6070f2da608..ffd8c530a44 100644 --- a/mysql-test/suite/binlog/r/binlog_row_annotate.result +++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result @@ -89,7 +89,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -342,7 +342,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -514,7 +514,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -757,7 +757,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1010,7 +1010,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -1182,7 +1182,7 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result index 6b56c006518..6a8e18ae5bf 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -19,7 +19,7 @@ BEGIN /*!*/; SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result index 9d55f1f145d..5991fd6f37f 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result @@ -50,7 +50,7 @@ use `new_test1`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -262,7 +262,7 @@ use `new_test1`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=#/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result index 825b9bf05a0..a3bcf6cd79d 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -21,7 +21,7 @@ SET @`v`:=_ucs2 X'006100620063' COLLATE `ucs2_general_ci`/*!*/; use `test`/*!*/; SET TIMESTAMP=10000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/federated/federatedx.result b/mysql-test/suite/federated/federatedx.result index 06992038668..84dcb0d0a8c 100644 --- a/mysql-test/suite/federated/federatedx.result +++ b/mysql-test/suite/federated/federatedx.result @@ -1019,8 +1019,6 @@ CREATE TABLE federated.t1 ( `blurb` text default '', PRIMARY KEY (blurb_id)) DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'blurb' can't have a default value connection master; DROP TABLE IF EXISTS federated.t1; CREATE TABLE federated.t1 ( @@ -1030,8 +1028,6 @@ PRIMARY KEY (blurb_id)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; -Warnings: -Warning 1101 BLOB/TEXT column 'blurb' can't have a default value INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values."); INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE."); INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. "); diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index fa9d9df59d9..4a563089922 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -8001,7 +8001,7 @@ Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 where f59 = 195 WITH CHECK OPTION ; UPDATE test.v1 SET f59 = 198 where f59=195 ; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM test.v1 order by f59 ; f59 f60 195 87 @@ -8015,7 +8015,7 @@ CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ; CREATE VIEW test.v2 as SELECT * FROM test.v1 ; UPDATE test.v1 SET F59 = 919 where f59 = 0987 ; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM test.v1 order by f59 ; f59 f60 987 41 @@ -8050,9 +8050,9 @@ f1 f2 A 2 B 2 UPDATE v1 SET f2 = 4; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' INSERT INTO v1 VALUES('B',3); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM v1 order by f1, f2; f1 f2 A 2 @@ -8166,7 +8166,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8200,7 +8200,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8278,21 +8278,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8306,11 +8306,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8386,21 +8386,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8414,11 +8414,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8611,7 +8611,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8645,7 +8645,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8723,21 +8723,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8751,11 +8751,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8831,21 +8831,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8859,11 +8859,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9056,7 +9056,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9090,7 +9090,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9168,21 +9168,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9196,11 +9196,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9276,21 +9276,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9304,11 +9304,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9501,7 +9501,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9535,7 +9535,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9613,21 +9613,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9641,11 +9641,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9721,21 +9721,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9749,11 +9749,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9949,7 +9949,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9983,7 +9983,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10061,21 +10061,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10089,11 +10089,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10169,21 +10169,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10197,11 +10197,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10394,7 +10394,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10428,7 +10428,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10506,21 +10506,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10534,11 +10534,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10614,21 +10614,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10642,11 +10642,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10839,7 +10839,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10873,7 +10873,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10951,21 +10951,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10979,11 +10979,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11059,21 +11059,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11087,11 +11087,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11284,7 +11284,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11318,7 +11318,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11396,21 +11396,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11424,11 +11424,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11504,21 +11504,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11532,11 +11532,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11732,7 +11732,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11766,7 +11766,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11844,21 +11844,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11872,11 +11872,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11952,21 +11952,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11980,11 +11980,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12177,7 +12177,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12211,7 +12211,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12289,21 +12289,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12317,11 +12317,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12397,21 +12397,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12425,11 +12425,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12622,7 +12622,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12656,7 +12656,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12734,21 +12734,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12762,11 +12762,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12842,21 +12842,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12870,11 +12870,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13067,7 +13067,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13101,7 +13101,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13179,21 +13179,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13207,11 +13207,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13287,21 +13287,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13315,11 +13315,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13515,7 +13515,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13549,7 +13549,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13627,21 +13627,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13655,11 +13655,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13735,21 +13735,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13763,11 +13763,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13960,7 +13960,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13994,7 +13994,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14072,21 +14072,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14100,11 +14100,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14180,21 +14180,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14208,11 +14208,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14405,7 +14405,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14439,7 +14439,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14517,21 +14517,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14545,11 +14545,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14625,21 +14625,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14653,11 +14653,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14850,7 +14850,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14884,7 +14884,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14962,21 +14962,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14990,11 +14990,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -15070,21 +15070,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -15098,11 +15098,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result index a0f2424c07c..54bc727fb74 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_is.result +++ b/mysql-test/suite/funcs_1/r/is_tables_is.result @@ -17,7 +17,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ALL_PLUGINS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -40,7 +40,7 @@ TABLE_SCHEMA information_schema TABLE_NAME APPLICABLE_ROLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -63,7 +63,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CHARACTER_SETS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -86,7 +86,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CLIENT_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -109,7 +109,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATIONS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -132,7 +132,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -155,7 +155,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -178,7 +178,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMN_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -201,7 +201,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ENABLED_ROLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -224,7 +224,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ENGINES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -247,7 +247,7 @@ TABLE_SCHEMA information_schema TABLE_NAME EVENTS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -270,7 +270,7 @@ TABLE_SCHEMA information_schema TABLE_NAME FILES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -293,7 +293,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GEOMETRY_COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -316,7 +316,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GLOBAL_STATUS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -339,7 +339,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GLOBAL_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -362,7 +362,7 @@ TABLE_SCHEMA information_schema TABLE_NAME INDEX_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -385,7 +385,7 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_CACHES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -408,7 +408,7 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_COLUMN_USAGE TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -431,7 +431,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -454,7 +454,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARTITIONS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -477,7 +477,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PLUGINS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -500,7 +500,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PROCESSLIST TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -523,7 +523,7 @@ TABLE_SCHEMA information_schema TABLE_NAME REFERENTIAL_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -546,7 +546,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -569,7 +569,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMATA TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -592,7 +592,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMA_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -615,7 +615,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SESSION_STATUS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -638,7 +638,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SESSION_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -661,7 +661,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SPATIAL_REF_SYS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -684,7 +684,7 @@ TABLE_SCHEMA information_schema TABLE_NAME STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -707,7 +707,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SYSTEM_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -730,7 +730,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -753,7 +753,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLESPACES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -776,7 +776,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -799,7 +799,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -822,7 +822,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -845,7 +845,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TRIGGERS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -868,7 +868,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -891,7 +891,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -914,7 +914,7 @@ TABLE_SCHEMA information_schema TABLE_NAME VIEWS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -953,7 +953,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ALL_PLUGINS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -976,7 +976,7 @@ TABLE_SCHEMA information_schema TABLE_NAME APPLICABLE_ROLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -999,7 +999,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CHARACTER_SETS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1022,7 +1022,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CLIENT_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1045,7 +1045,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATIONS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1068,7 +1068,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1091,7 +1091,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1114,7 +1114,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMN_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1137,7 +1137,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ENABLED_ROLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1160,7 +1160,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ENGINES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1183,7 +1183,7 @@ TABLE_SCHEMA information_schema TABLE_NAME EVENTS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1206,7 +1206,7 @@ TABLE_SCHEMA information_schema TABLE_NAME FILES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1229,7 +1229,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GEOMETRY_COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1252,7 +1252,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GLOBAL_STATUS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1275,7 +1275,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GLOBAL_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1298,7 +1298,7 @@ TABLE_SCHEMA information_schema TABLE_NAME INDEX_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1321,7 +1321,7 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_CACHES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1344,7 +1344,7 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_COLUMN_USAGE TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1367,7 +1367,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1390,7 +1390,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARTITIONS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1413,7 +1413,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PLUGINS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1436,7 +1436,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PROCESSLIST TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1459,7 +1459,7 @@ TABLE_SCHEMA information_schema TABLE_NAME REFERENTIAL_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1482,7 +1482,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1505,7 +1505,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMATA TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1528,7 +1528,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMA_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1551,7 +1551,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SESSION_STATUS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1574,7 +1574,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SESSION_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1597,7 +1597,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SPATIAL_REF_SYS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1620,7 +1620,7 @@ TABLE_SCHEMA information_schema TABLE_NAME STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1643,7 +1643,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SYSTEM_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1666,7 +1666,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1689,7 +1689,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLESPACES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1712,7 +1712,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1735,7 +1735,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1758,7 +1758,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1781,7 +1781,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TRIGGERS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1804,7 +1804,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1827,7 +1827,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1850,7 +1850,7 @@ TABLE_SCHEMA information_schema TABLE_NAME VIEWS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# diff --git a/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result index a0f2424c07c..54bc727fb74 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_tables_is_embedded.result @@ -17,7 +17,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ALL_PLUGINS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -40,7 +40,7 @@ TABLE_SCHEMA information_schema TABLE_NAME APPLICABLE_ROLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -63,7 +63,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CHARACTER_SETS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -86,7 +86,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CLIENT_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -109,7 +109,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATIONS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -132,7 +132,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -155,7 +155,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -178,7 +178,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMN_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -201,7 +201,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ENABLED_ROLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -224,7 +224,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ENGINES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -247,7 +247,7 @@ TABLE_SCHEMA information_schema TABLE_NAME EVENTS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -270,7 +270,7 @@ TABLE_SCHEMA information_schema TABLE_NAME FILES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -293,7 +293,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GEOMETRY_COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -316,7 +316,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GLOBAL_STATUS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -339,7 +339,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GLOBAL_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -362,7 +362,7 @@ TABLE_SCHEMA information_schema TABLE_NAME INDEX_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -385,7 +385,7 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_CACHES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -408,7 +408,7 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_COLUMN_USAGE TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -431,7 +431,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -454,7 +454,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARTITIONS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -477,7 +477,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PLUGINS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -500,7 +500,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PROCESSLIST TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -523,7 +523,7 @@ TABLE_SCHEMA information_schema TABLE_NAME REFERENTIAL_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -546,7 +546,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -569,7 +569,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMATA TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -592,7 +592,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMA_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -615,7 +615,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SESSION_STATUS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -638,7 +638,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SESSION_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -661,7 +661,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SPATIAL_REF_SYS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -684,7 +684,7 @@ TABLE_SCHEMA information_schema TABLE_NAME STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -707,7 +707,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SYSTEM_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -730,7 +730,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -753,7 +753,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLESPACES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -776,7 +776,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -799,7 +799,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -822,7 +822,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -845,7 +845,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TRIGGERS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -868,7 +868,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -891,7 +891,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -914,7 +914,7 @@ TABLE_SCHEMA information_schema TABLE_NAME VIEWS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -953,7 +953,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ALL_PLUGINS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -976,7 +976,7 @@ TABLE_SCHEMA information_schema TABLE_NAME APPLICABLE_ROLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -999,7 +999,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CHARACTER_SETS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1022,7 +1022,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CLIENT_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1045,7 +1045,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATIONS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1068,7 +1068,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1091,7 +1091,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1114,7 +1114,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMN_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1137,7 +1137,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ENABLED_ROLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1160,7 +1160,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ENGINES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1183,7 +1183,7 @@ TABLE_SCHEMA information_schema TABLE_NAME EVENTS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1206,7 +1206,7 @@ TABLE_SCHEMA information_schema TABLE_NAME FILES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1229,7 +1229,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GEOMETRY_COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1252,7 +1252,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GLOBAL_STATUS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1275,7 +1275,7 @@ TABLE_SCHEMA information_schema TABLE_NAME GLOBAL_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1298,7 +1298,7 @@ TABLE_SCHEMA information_schema TABLE_NAME INDEX_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1321,7 +1321,7 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_CACHES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1344,7 +1344,7 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_COLUMN_USAGE TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1367,7 +1367,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARAMETERS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1390,7 +1390,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PARTITIONS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1413,7 +1413,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PLUGINS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1436,7 +1436,7 @@ TABLE_SCHEMA information_schema TABLE_NAME PROCESSLIST TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1459,7 +1459,7 @@ TABLE_SCHEMA information_schema TABLE_NAME REFERENTIAL_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1482,7 +1482,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1505,7 +1505,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMATA TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1528,7 +1528,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMA_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1551,7 +1551,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SESSION_STATUS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1574,7 +1574,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SESSION_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1597,7 +1597,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SPATIAL_REF_SYS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1620,7 +1620,7 @@ TABLE_SCHEMA information_schema TABLE_NAME STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1643,7 +1643,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SYSTEM_VARIABLES TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1666,7 +1666,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1689,7 +1689,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLESPACES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1712,7 +1712,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1735,7 +1735,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1758,7 +1758,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1781,7 +1781,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TRIGGERS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1804,7 +1804,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1827,7 +1827,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 10 +VERSION 11 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -1850,7 +1850,7 @@ TABLE_SCHEMA information_schema TABLE_NAME VIEWS TABLE_TYPE SYSTEM VIEW ENGINE MYISAM_OR_MARIA -VERSION 10 +VERSION 11 ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 989f533af16..7ee9dce9ccc 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -8003,7 +8003,7 @@ Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 where f59 = 195 WITH CHECK OPTION ; UPDATE test.v1 SET f59 = 198 where f59=195 ; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM test.v1 order by f59 ; f59 f60 195 87 @@ -8017,7 +8017,7 @@ CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ; CREATE VIEW test.v2 as SELECT * FROM test.v1 ; UPDATE test.v1 SET F59 = 919 where f59 = 0987 ; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM test.v1 order by f59 ; f59 f60 987 41 @@ -8052,9 +8052,9 @@ f1 f2 A 2 B 2 UPDATE v1 SET f2 = 4; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' INSERT INTO v1 VALUES('B',3); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM v1 order by f1, f2; f1 f2 A 2 @@ -8168,7 +8168,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8202,7 +8202,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8280,21 +8280,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8308,11 +8308,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8388,21 +8388,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8416,11 +8416,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8613,7 +8613,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8647,7 +8647,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8725,21 +8725,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8753,11 +8753,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -8833,21 +8833,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -8861,11 +8861,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9058,7 +9058,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9092,7 +9092,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9170,21 +9170,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9198,11 +9198,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9278,21 +9278,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9306,11 +9306,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9503,7 +9503,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9537,7 +9537,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9615,21 +9615,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9643,11 +9643,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9723,21 +9723,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9751,11 +9751,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9951,7 +9951,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9985,7 +9985,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10063,21 +10063,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10091,11 +10091,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10171,21 +10171,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10199,11 +10199,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10396,7 +10396,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10430,7 +10430,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10508,21 +10508,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10536,11 +10536,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10616,21 +10616,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10644,11 +10644,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10841,7 +10841,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10875,7 +10875,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10953,21 +10953,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10981,11 +10981,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11061,21 +11061,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11089,11 +11089,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11286,7 +11286,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11320,7 +11320,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11398,21 +11398,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11426,11 +11426,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11506,21 +11506,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11534,11 +11534,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11734,7 +11734,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11768,7 +11768,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11846,21 +11846,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11874,11 +11874,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11954,21 +11954,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11982,11 +11982,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12179,7 +12179,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12213,7 +12213,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12291,21 +12291,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12319,11 +12319,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12399,21 +12399,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12427,11 +12427,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12624,7 +12624,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12658,7 +12658,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12736,21 +12736,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12764,11 +12764,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12844,21 +12844,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12872,11 +12872,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13069,7 +13069,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13103,7 +13103,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13181,21 +13181,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13209,11 +13209,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13289,21 +13289,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13317,11 +13317,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13517,7 +13517,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13551,7 +13551,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13629,21 +13629,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13657,11 +13657,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13737,21 +13737,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13765,11 +13765,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13962,7 +13962,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13996,7 +13996,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14074,21 +14074,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14102,11 +14102,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14182,21 +14182,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14210,11 +14210,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14407,7 +14407,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14441,7 +14441,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14519,21 +14519,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14547,11 +14547,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14627,21 +14627,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14655,11 +14655,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14852,7 +14852,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14886,7 +14886,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14964,21 +14964,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14992,11 +14992,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -15072,21 +15072,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -15100,11 +15100,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; diff --git a/mysql-test/suite/funcs_1/r/myisam_views-big.result b/mysql-test/suite/funcs_1/r/myisam_views-big.result index c642a05b332..c4f18de6fc1 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views-big.result +++ b/mysql-test/suite/funcs_1/r/myisam_views-big.result @@ -8870,7 +8870,7 @@ Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 where f59 = 195 WITH CHECK OPTION ; UPDATE test.v1 SET f59 = 198 where f59=195 ; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM test.v1 order by f59 ; f59 f60 195 87 @@ -8884,7 +8884,7 @@ CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ; CREATE VIEW test.v2 as SELECT * FROM test.v1 ; UPDATE test.v1 SET F59 = 919 where f59 = 0987 ; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM test.v1 order by f59 ; f59 f60 987 41 @@ -8919,9 +8919,9 @@ f1 f2 A 2 B 2 UPDATE v1 SET f2 = 4; -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' INSERT INTO v1 VALUES('B',3); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' SELECT * FROM v1 order by f1, f2; f1 f2 A 2 @@ -9035,7 +9035,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9069,7 +9069,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9147,21 +9147,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9175,11 +9175,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9255,21 +9255,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9283,11 +9283,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9480,7 +9480,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9514,7 +9514,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9592,21 +9592,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9620,11 +9620,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9700,21 +9700,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9728,11 +9728,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -9925,7 +9925,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -9959,7 +9959,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10037,21 +10037,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10065,11 +10065,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10145,21 +10145,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10173,11 +10173,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10370,7 +10370,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10404,7 +10404,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10482,21 +10482,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10510,11 +10510,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10590,21 +10590,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10618,11 +10618,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10818,7 +10818,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10852,7 +10852,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -10930,21 +10930,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -10958,11 +10958,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11038,21 +11038,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11066,11 +11066,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11263,7 +11263,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11297,7 +11297,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11375,21 +11375,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11403,11 +11403,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11483,21 +11483,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11511,11 +11511,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11708,7 +11708,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11742,7 +11742,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11820,21 +11820,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11848,11 +11848,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -11928,21 +11928,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -11956,11 +11956,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12153,7 +12153,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12187,7 +12187,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12265,21 +12265,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12293,11 +12293,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12373,21 +12373,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12401,11 +12401,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12601,7 +12601,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12635,7 +12635,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12713,21 +12713,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12741,11 +12741,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -12821,21 +12821,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -12849,11 +12849,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13046,7 +13046,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13080,7 +13080,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13158,21 +13158,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13186,11 +13186,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13266,21 +13266,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13294,11 +13294,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13491,7 +13491,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13525,7 +13525,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13603,21 +13603,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13631,11 +13631,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13711,21 +13711,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13739,11 +13739,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -13936,7 +13936,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -13970,7 +13970,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14048,21 +14048,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14076,11 +14076,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14156,21 +14156,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14184,11 +14184,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14384,7 +14384,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14418,7 +14418,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14496,21 +14496,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14524,11 +14524,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14604,21 +14604,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14632,11 +14632,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14829,7 +14829,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14863,7 +14863,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -14941,21 +14941,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -14969,11 +14969,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -15049,21 +15049,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -15077,11 +15077,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -15274,7 +15274,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -15308,7 +15308,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -15386,21 +15386,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -15414,11 +15414,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -15494,21 +15494,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -15522,11 +15522,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -15719,7 +15719,7 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -15753,7 +15753,7 @@ affected rows: 1 INSERT INTO v3 VALUES(0, 'zero'); affected rows: 1 INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -15831,21 +15831,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -15859,11 +15859,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; @@ -15939,21 +15939,21 @@ f1 f2 DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 7 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 0 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight DELETE FROM t1; INSERT INTO t1 VALUES(8, 'eight'); UPDATE v3 SET my_col1 = 16 WHERE my_col1 = 8; -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' SELECT * FROM t1; f1 f2 8 eight @@ -15967,11 +15967,11 @@ f1 f2 10 eight DELETE FROM t1; INSERT INTO v3 VALUES(16, 'sixteen'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(0, 'zero'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(7, 'seven'); -ERROR HY000: CHECK OPTION failed 'test.v3' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v3' INSERT INTO v3 VALUES(8, 'eight'); affected rows: 1 SELECT * FROM t1; diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index 47abc84ec57..6f2ab852d37 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -4981,7 +4981,7 @@ CREATE PROCEDURE sp1() not:BEGIN SELECT @x; END// -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':BEGIN +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'not:BEGIN SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index 54e7f2af54b..7bcec45531e 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -1838,7 +1838,7 @@ Drop view if exists test.v1 ; CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2 where f59 = 195 WITH CHECK OPTION ; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED UPDATE test.v1 SET f59 = 198 where f59=195 ; SELECT * FROM test.v1 order by f59 ; @@ -1863,7 +1863,7 @@ FROM test.tb2 where F59 = 0987 WITH LOCAL CHECK OPTION ; CREATE VIEW test.v2 as SELECT * FROM test.v1 ; # This UPDATE violates the definition of VIEW test.v1. ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED UPDATE test.v1 SET F59 = 919 where f59 = 0987 ; SELECT * FROM test.v1 order by f59 ; @@ -1909,9 +1909,9 @@ INSERT INTO v1 VALUES('B',2); SELECT * FROM v1 order by f1, f2; # negative cases --enable_info ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED UPDATE v1 SET f2 = 4; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED INSERT INTO v1 VALUES('B',3); --disable_info # Bug#11771: View over InnoDB table, wrong result SELECT on VIEW, @@ -2292,7 +2292,7 @@ WHERE v3_to_v1_options LIKE 'WITH %' AND v3_to_v1_options NOT LIKE 'WITH LOCAL % AND v3_to_v1_violation NOT LIKE ' _ _ ' AND errno = 0 ORDER BY v3_to_v1_options; # 5. There must be NO failing INSERT/UPDATE getting a -# sql_errno <> 1369 (ER_VIEW_CHECK_FAILED). +# sql_errno <> 1369 (ER_CONSTRAINT_FAILED). SELECT * FROM t1_results WHERE errno <> 0 AND errno <> 1369 ORDER BY v3_to_v1_options; diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result index d7aa6c46747..48e3138ab56 100644 --- a/mysql-test/suite/innodb/r/innodb-index.result +++ b/mysql-test/suite/innodb/r/innodb-index.result @@ -544,9 +544,9 @@ t2 CREATE TABLE `t2` ( delete from t1; ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `dc` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)) drop index dc on t4; -ERROR 42000: Can't DROP 'dc'; check that column/key exists +ERROR 42000: Can't DROP 'dc'; check that constraint/column/key exists alter table t3 drop foreign key dc; -ERROR 42000: Can't DROP 'dc'; check that column/key exists +ERROR 42000: Can't DROP 'dc'; check that constraint/column/key exists alter table t4 drop foreign key dc; affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns.result b/mysql-test/suite/innodb/r/innodb-virtual-columns.result index 558bb23de0a..e613f76d5bf 100644 --- a/mysql-test/suite/innodb/r/innodb-virtual-columns.result +++ b/mysql-test/suite/innodb/r/innodb-virtual-columns.result @@ -162,50 +162,42 @@ grad_degree CREATE TABLE `grad_degree` ( `plan` varchar(10) NOT NULL, `admit_term` char(4) NOT NULL, `wdraw_rsn` varchar(4) NOT NULL DEFAULT '', - `ofis_deg_status` varchar(15) AS ( -CASE + `ofis_deg_status` varchar(15) AS (CASE WHEN wdraw_rsn = '' THEN 'In progress' WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed' ELSE 'Not Completed' END) VIRTUAL, - `ofis_deg_status2` varchar(15) AS ( -CASE + `ofis_deg_status2` varchar(15) AS (CASE WHEN wdraw_rsn = '' THEN 'In progress2' WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed2' ELSE 'Not Completed2' END) VIRTUAL, - `ofis_deg_status3` varchar(15) AS ( -CASE + `ofis_deg_status3` varchar(15) AS (CASE WHEN wdraw_rsn = '' THEN 'In progress3' WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed3' ELSE 'Not Completed3' END) VIRTUAL, - `ofis_deg_status4` varchar(15) AS ( -CASE + `ofis_deg_status4` varchar(15) AS (CASE WHEN wdraw_rsn = '' THEN 'In progress4' WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed4' ELSE 'Not Completed4' END) VIRTUAL, - `ofis_deg_status5` varchar(15) AS ( -CASE + `ofis_deg_status5` varchar(15) AS (CASE WHEN wdraw_rsn = '' THEN 'In progress5' WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed5' ELSE 'Not Completed5' END) VIRTUAL, - `ofis_deg_status6` varchar(15) AS ( -CASE + `ofis_deg_status6` varchar(15) AS (CASE WHEN wdraw_rsn = '' THEN 'In progress6' WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed6' ELSE 'Not Completed6' END) VIRTUAL, - `ofis_deg_status7` varchar(15) AS ( -CASE + `ofis_deg_status7` varchar(15) AS (CASE WHEN wdraw_rsn = '' THEN 'In progress7' WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed7' ELSE 'Not Completed7' END) VIRTUAL, - `ofis_deg_status8` varchar(15) AS ( -CASE + `ofis_deg_status8` varchar(15) AS (CASE WHEN wdraw_rsn = '' THEN 'In progress8' WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed8' ELSE 'Not Completed8' diff --git a/mysql-test/suite/innodb_fts/r/fulltext_distinct.result b/mysql-test/suite/innodb_fts/r/fulltext_distinct.result index 95a9a617fa6..e660b55c448 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext_distinct.result +++ b/mysql-test/suite/innodb_fts/r/fulltext_distinct.result @@ -8,8 +8,6 @@ KEY kt(tag), KEY kv(value(15)), FULLTEXT KEY kvf(value) ) ENGINE = InnoDB; -Warnings: -Warning 1101 BLOB/TEXT column 'value' can't have a default value CREATE TABLE t2 ( id_t2 mediumint unsigned NOT NULL default '0', id_t1 mediumint unsigned NOT NULL default '0', diff --git a/mysql-test/suite/innodb_fts/r/fulltext_update.result b/mysql-test/suite/innodb_fts/r/fulltext_update.result index df323996dd9..00d0777362f 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext_update.result +++ b/mysql-test/suite/innodb_fts/r/fulltext_update.result @@ -9,8 +9,6 @@ name VARCHAR(80) DEFAULT '' NOT NULL, FULLTEXT(url,description,shortdesc,longdesc), PRIMARY KEY(gnr) ) ENGINE = InnoDB; -Warnings: -Warning 1101 BLOB/TEXT column 'longdesc' can't have a default value insert into test (url,shortdesc,longdesc,description,name) VALUES ("http:/test.at", "kurz", "lang","desc", "name"); insert into test (url,shortdesc,longdesc,description,name) VALUES diff --git a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result index f8487258546..024b929646a 100644 --- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result +++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result @@ -805,8 +805,6 @@ INSERT INTO t2 SELECT GeomFromText(st) FROM t1; ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) row_format=dynamic DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'geometry' can't have a default value INSERT INTO t1 (geometry) VALUES (PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, -18.7186111000 -66.8102777000, -18.7211111000 -66.9269443999, @@ -823,8 +821,6 @@ CREATE TABLE t1 ( c1 geometry NOT NULL default '', SPATIAL KEY i1 (c1) ) row_format=dynamic DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'c1' can't have a default value INSERT INTO t1 (c1) VALUES ( PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, @@ -839,8 +835,6 @@ CREATE TABLE t1 ( c1 geometry NOT NULL default '', SPATIAL KEY i1 (c1) ) row_format=dynamic DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'c1' can't have a default value INSERT INTO t1 (c1) VALUES ( PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result index a8ea6f1d112..2b94bc0ffad 100644 --- a/mysql-test/suite/maria/maria-gis-rtree-trans.result +++ b/mysql-test/suite/maria/maria-gis-rtree-trans.result @@ -805,8 +805,6 @@ INSERT INTO t2 SELECT GeomFromText(st) FROM t1; ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) transactional=1 row_format=page DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'geometry' can't have a default value INSERT INTO t1 (geometry) VALUES (PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, -18.7186111000 -66.8102777000, -18.7211111000 -66.9269443999, @@ -823,8 +821,6 @@ CREATE TABLE t1 ( c1 geometry NOT NULL default '', SPATIAL KEY i1 (c1) ) transactional=1 row_format=page DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'c1' can't have a default value INSERT INTO t1 (c1) VALUES ( PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, @@ -839,8 +835,6 @@ CREATE TABLE t1 ( c1 geometry NOT NULL default '', SPATIAL KEY i1 (c1) ) transactional=1 row_format=page DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'c1' can't have a default value INSERT INTO t1 (c1) VALUES ( PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, diff --git a/mysql-test/suite/maria/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result index c7c65fac003..826aee5fbc2 100644 --- a/mysql-test/suite/maria/maria-gis-rtree.result +++ b/mysql-test/suite/maria/maria-gis-rtree.result @@ -805,8 +805,6 @@ INSERT INTO t2 SELECT GeomFromText(st) FROM t1; ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1, t2; CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) transactional=0 row_format=page DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'geometry' can't have a default value INSERT INTO t1 (geometry) VALUES (PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, -18.7186111000 -66.8102777000, -18.7211111000 -66.9269443999, @@ -823,8 +821,6 @@ CREATE TABLE t1 ( c1 geometry NOT NULL default '', SPATIAL KEY i1 (c1) ) transactional=0 row_format=page DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'c1' can't have a default value INSERT INTO t1 (c1) VALUES ( PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, @@ -839,8 +835,6 @@ CREATE TABLE t1 ( c1 geometry NOT NULL default '', SPATIAL KEY i1 (c1) ) transactional=0 row_format=page DEFAULT CHARSET=latin1; -Warnings: -Warning 1101 BLOB/TEXT column 'c1' can't have a default value INSERT INTO t1 (c1) VALUES ( PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000 -66.8158332999, diff --git a/mysql-test/suite/parts/inc/partition_fail_t2.inc b/mysql-test/suite/parts/inc/partition_fail_t2.inc index 3904ec8662c..12cac51db4d 100644 --- a/mysql-test/suite/parts/inc/partition_fail_t2.inc +++ b/mysql-test/suite/parts/inc/partition_fail_t2.inc @@ -1,4 +1,4 @@ -# Include file to to test failure with error injection. +# Include file to test failure with error injection. # To be used with WL#4445: EXCHANGE PARTITION WITH TABLE. --eval $create_statement2 --eval $insert_statement2 diff --git a/mysql-test/suite/rpl/r/rpl_default.result b/mysql-test/suite/rpl/r/rpl_default.result new file mode 100644 index 00000000000..5edd01a60b2 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_default.result @@ -0,0 +1,19 @@ +include/master-slave.inc +[connection master] +connection master; +create table t1 (a int DEFAULT 1+1, b bigint default uuid_short(), u blob default user()); +insert into t1 (a) values(1); +connection slave; +connection slave; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT 1+1, + `b` bigint(20) DEFAULT uuid_short(), + `u` blob DEFAULT user() +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a uuid user +1 1 1 +connection master; +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result index 8371018f96a..2bc955c508a 100644 --- a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result @@ -643,7 +643,7 @@ c1 c3 hex(c4) c5 c6 ************ connection slave; include/wait_for_slave_sql_error.inc [errno=1091] -Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that constraint/column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result index 6b41925aad7..47e65c1c3c6 100644 --- a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result @@ -643,7 +643,7 @@ c1 c3 hex(c4) c5 c6 ************ connection slave; include/wait_for_slave_sql_error.inc [errno=1091] -Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' +Last_SQL_Error = 'Error 'Can't DROP 'c7'; check that constraint/column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'' STOP SLAVE; RESET SLAVE; diff --git a/mysql-test/suite/rpl/r/rpl_hrtime.result b/mysql-test/suite/rpl/r/rpl_hrtime.result index 99d412d4843..eb470fa2274 100644 --- a/mysql-test/suite/rpl/r/rpl_hrtime.result +++ b/mysql-test/suite/rpl/r/rpl_hrtime.result @@ -37,7 +37,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1293832861/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result index a21d6fe6a5f..0d75d1c2000 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev382.result +++ b/mysql-test/suite/rpl/r/rpl_mdev382.result @@ -179,7 +179,7 @@ ROLLBACK/*!*/; use `db1``; select 'oops!'`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -279,7 +279,7 @@ ROLLBACK/*!*/; use `db1``; select 'oops!'`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -388,7 +388,7 @@ BEGIN use `ts``et`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=1342177280/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index ad99ec5f630..5c3bcf9070c 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -167,7 +167,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -191,7 +191,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -312,7 +312,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; @@ -345,7 +345,7 @@ ROLLBACK/*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 944f7ea06ec..65203cdaba7 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -783,7 +783,7 @@ DELIMITER /*!*/; ROLLBACK/*!*/; SET TIMESTAMP=t/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; diff --git a/mysql-test/suite/rpl/t/rpl_default.test b/mysql-test/suite/rpl/t/rpl_default.test new file mode 100644 index 00000000000..03f24418f77 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_default.test @@ -0,0 +1,29 @@ +# +# Test of replicating default values +# As the table is using non deterministic functions, replication must +# switch to binlog format. +# + +-- source include/have_binlog_format_mixed_or_row.inc +-- source include/master-slave.inc + +connection master; + +create table t1 (a int DEFAULT 1+1, b bigint default uuid_short(), u blob default user()); +insert into t1 (a) values(1); + +let $b=query_get_value(select * from t1, b, 1); +let $u=query_get_value(select * from t1, u, 1); + +sync_slave_with_master; +connection slave; + +show create table t1; +--disable_query_log +eval select a,"$b"=b as uuid,"$u"=u as user from t1; +--enable_query_log +connection master; + +drop table t1; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result index addd4c45be6..7d7c10cf82a 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result @@ -387,6 +387,20 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT NULL +VARIABLE_NAME CHECK_CONSTRAINT_CHECKS +SESSION_VALUE ON +GLOBAL_VALUE ON +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE ON +VARIABLE_SCOPE SESSION +VARIABLE_TYPE BOOLEAN +VARIABLE_COMMENT check_constraint_checks +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST OFF,ON +READ_ONLY NO +COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME COLLATION_CONNECTION SESSION_VALUE latin1_swedish_ci GLOBAL_VALUE latin1_swedish_ci diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result index e075c64c2c1..d8c38e216ea 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -387,6 +387,20 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT NULL +VARIABLE_NAME CHECK_CONSTRAINT_CHECKS +SESSION_VALUE ON +GLOBAL_VALUE ON +GLOBAL_VALUE_ORIGIN COMPILE-TIME +DEFAULT_VALUE ON +VARIABLE_SCOPE SESSION +VARIABLE_TYPE BOOLEAN +VARIABLE_COMMENT check_constraint_checks +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST OFF,ON +READ_ONLY NO +COMMAND_LINE_ARGUMENT NULL VARIABLE_NAME COLLATION_CONNECTION SESSION_VALUE latin1_swedish_ci GLOBAL_VALUE latin1_swedish_ci diff --git a/mysql-test/suite/vcol/inc/vcol_blocked_sql_funcs_main.inc b/mysql-test/suite/vcol/inc/vcol_blocked_sql_funcs_main.inc deleted file mode 100644 index 571fe75560b..00000000000 --- a/mysql-test/suite/vcol/inc/vcol_blocked_sql_funcs_main.inc +++ /dev/null @@ -1,360 +0,0 @@ -################################################################################ -# inc/vcol_blocked_sql_funcs_main.inc # -# # -# Purpose: # -# Tests around sql functions # -# # -# # -#------------------------------------------------------------------------------# -# Original Author: Andrey Zhakov # -# Original Date: 2008-08-31 # -# Change Author: Oleksandr Byelkin (Monty program Ab) -# Date: 2009-03-24 -# Change: Syntax changed -################################################################################ - -# -# NOTE: All SQL functions should be rejected, otherwise BUG. -# - ---echo # RAND() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (b double as (rand())); - ---echo # LOAD_FILE() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(64), b varchar(1024) as (load_file(a))); - ---echo # CURDATE() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime as (curdate())); - ---echo # CURRENT_DATE(), CURRENT_DATE --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime as (current_date)); --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime as (current_date())); - ---echo # CURRENT_TIME(), CURRENT_TIME --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime as (current_time)); --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime as (current_time())); - ---echo # CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime as (current_timestamp())); --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime as (current_timestamp)); - ---echo # CURTIME() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime as (curtime())); - ---echo # LOCALTIME(), LOCALTIME --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b varchar(10) as (localtime())); --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b varchar(10) as (localtime)); - ---echo # LOCALTIMESTAMP, LOCALTIMESTAMP()(v4.0.6) --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b varchar(10) as (localtimestamp())); --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b varchar(10) as (localtimestamp)); - ---echo # NOW() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b varchar(10) as (now())); - ---echo # SYSDATE() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b varchar(10) as (sysdate())); - ---echo # UNIX_TIMESTAMP() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b datetime as (unix_timestamp())); - ---echo # UTC_DATE() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b datetime as (utc_date())); - ---echo # UTC_TIME() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b datetime as (utc_time())); - ---echo # UTC_TIMESTAMP() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b datetime as (utc_timestamp())); - ---echo # WEEK() - one argument version --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a datetime, b datetime as (week(a))); - ---echo # MATCH() -if (!$skip_full_text_checks) -{ - -- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED - create table t1 (a varchar(32), b bool as (match a against ('sample text'))); -} - ---echo # BENCHMARK() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (benchmark(a,3))); - ---echo # CHARSET() --- error ER_CONST_EXPR_IN_VCOL -create table t1 (a varchar(64), b varchar(64) as (charset(a))); - ---echo # COERCIBILITY() --- error ER_CONST_EXPR_IN_VCOL -create table t1 (a varchar(64), b int as (coercibility(a))); - ---echo # COLLATION() --- error ER_CONST_EXPR_IN_VCOL -create table t1 (a varchar(64), b varchar(64) as (collation(a))); - ---echo # CONNECTION_ID() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int as (connection_id())); - ---echo # CURRENT_USER(), CURRENT_USER --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(32) as (current_user())); --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(32) as (current_user)); - ---echo # DATABASE() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (database())); - ---echo # FOUND_ROWS() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (found_rows())); - ---echo # GET_LOCK() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (get_lock(a,10))); - ---echo # IS_FREE_LOCK() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (is_free_lock(a))); - ---echo # IS_USED_LOCK() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (is_used_lock(a))); - ---echo # LAST_INSERT_ID() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int as (last_insert_id())); - ---echo # MASTER_POS_WAIT() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(32), b int as (master_pos_wait(a,0,2))); - ---echo # NAME_CONST() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(32) as (name_const('test',1))); - ---echo # RELEASE_LOCK() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(32), b int as (release_lock(a))); - ---echo # ROW_COUNT() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int as (row_count())); - ---echo # SCHEMA() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(32) as (schema())); - ---echo # SESSION_USER() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(32) as (session_user())); - ---echo # SLEEP() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (sleep(a))); - ---echo # SYSTEM_USER() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(32) as (system_user())); - ---echo # USER() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (user())); - ---echo # UUID_SHORT() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024) as (uuid_short())); - ---echo # UUID() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024) as (uuid())); - ---echo # VALUES() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (values(a))); - ---echo # VERSION() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (version())); - ---echo # ENCRYPT() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (encrypt(a))); - ---echo # Stored procedures - -delimiter //; -create procedure p1() -begin - select current_user(); -end // - -create function f1() -returns int -begin - return 1; -end // - -delimiter ;// - --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int as (p1())); --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int as (f1())); - -drop procedure p1; -drop function f1; - ---echo # Unknown functions --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int as (f1())); - ---echo # ---echo # GROUP BY FUNCTIONS ---echo # - ---echo # AVG() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (avg(a))); - ---echo # BIT_AND() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (bit_and(a))); - ---echo # BIT_OR() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (bit_or(a))); - ---echo # BIT_XOR() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (bit_xor(a))); - ---echo # COUNT(DISTINCT) --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (count(distinct a))); - ---echo # COUNT() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (count(a))); - ---echo # GROUP_CONCAT() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(32), b int as (group_concat(a,''))); - ---echo # MAX() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (max(a))); - ---echo # MIN() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (min(a))); - ---echo # STD() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (std(a))); - ---echo # STDDEV_POP() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (stddev_pop(a))); - ---echo # STDDEV_SAMP() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (stddev_samp(a))); - ---echo # STDDEV() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (stddev(a))); - ---echo # SUM() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (sum(a))); - ---echo # VAR_POP() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (var_pop(a))); - ---echo # VAR_SAMP() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (var_samp(a))); - ---echo # VARIANCE() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (variance(a))); - ---echo # ---echo # XML FUNCTIONS ---echo # - ---echo # ExtractValue() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (ExtractValue(a,'//b[$@j]'))); - ---echo # UpdateXML() --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a varchar(1024), b varchar(1024) as (UpdateXML(a,'/a','<e>fff</e>'))); - ---echo # ---echo # Sub-selects ---echo # - -create table t1 (a int); --- error ER_PARSE_ERROR -create table t2 (a int, b int as (select count(*) from t1)); -drop table t1; - --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as ((select 1))); --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (a+(select 1))); - ---echo # ---echo # SP functions ---echo # - ---disable_warnings -drop function if exists sub1; ---enable_warnings -create function sub1(i int) returns int deterministic - return i+1; -select sub1(1); --- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t1 (a int, b int as (a+sub3(1))); -drop function sub1; - ---echo # ---echo # Long expression - -let $tmp_long_string = `SELECT repeat('a',240)`; -eval create table t1 (a int, b varchar(300) as (concat(a,'$tmp_long_string'))); -drop table t1; -let $tmp_long_string = `SELECT repeat('a',243)`; ---error ER_WRONG_STRING_LENGTH -eval create table t1 (a int, b varchar(300) as (concat(a,'$tmp_long_string'))); - ---echo # ---echo # Constant expression ---error ER_CONST_EXPR_IN_VCOL -create table t1 (a int as (PI())); diff --git a/mysql-test/suite/vcol/inc/vcol_partition.inc b/mysql-test/suite/vcol/inc/vcol_partition.inc index c20dfaaa2a4..b2c0c90ff69 100644 --- a/mysql-test/suite/vcol/inc/vcol_partition.inc +++ b/mysql-test/suite/vcol/inc/vcol_partition.inc @@ -34,6 +34,7 @@ PARTITION BY RANGE( b ) ( insert into t1 values ('2006-01-01',default); insert into t1 values ('2007-01-01',default); insert into t1 values ('2005-01-01',default); +insert into t1 (a) values ('2007-01-02'); select * from t1; select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1'; diff --git a/mysql-test/suite/vcol/r/not_supported.result b/mysql-test/suite/vcol/r/not_supported.result index 251fdaad101..eecc7d63c17 100644 --- a/mysql-test/suite/vcol/r/not_supported.result +++ b/mysql-test/suite/vcol/r/not_supported.result @@ -4,32 +4,28 @@ set time_zone='+10:00'; set div_precision_increment=20; create table t1 (a int, b int, v decimal(20,19) as (a/3)); create table t2 (a int, b int, v int as (a+@a)); -ERROR HY000: Function or expression is not allowed for column 'v' -create table t3 (a int, b int, v int as (a+@@error_count)); -ERROR HY000: Function or expression is not allowed for column 'v' +ERROR HY000: Function or expression 'user_var' is not allowed for 'VIRTUAL' of column/constraint 'v' +create table t2 (a int, b int, v int as (a+@a) PERSISTENT); +ERROR HY000: Function or expression 'user_var' is not allowed for 'VIRTUAL' of column/constraint 'v' +create table t3_ok (a int, b int, v int as (a+@@error_count)); +create table t3 (a int, b int, v int as (a+@@error_count) PERSISTENT); +ERROR HY000: Function or expression 'get_system_var' is not allowed for 'VIRTUAL' of column/constraint 'v' create table t4 (a int, b int, v int as (@a:=a)); -ERROR HY000: Function or expression is not allowed for column 'v' +ERROR HY000: Function or expression 'user_var' is not allowed for 'VIRTUAL' of column/constraint 'v' +create table t4 (a int, b int, v int as (@a:=a) PERSISTENT); +ERROR HY000: Function or expression 'user_var' is not allowed for 'VIRTUAL' of column/constraint 'v' create table t5 (a int, b int, v varchar(100) as (monthname(a))); +ERROR HY000: Function or expression 'monthname' is not allowed for 'VIRTUAL' of column/constraint 'v' create table t6 (a int, b int, v varchar(100) as (dayname(a))); +ERROR HY000: Function or expression 'dayname' is not allowed for 'VIRTUAL' of column/constraint 'v' create table t7 (a int, b int, v varchar(100) as (date_format(a, '%W %a %M %b'))); +ERROR HY000: Function or expression 'date_format' is not allowed for 'VIRTUAL' of column/constraint 'v' create table t8 (a int, b int, v varchar(100) as (from_unixtime(a))); insert t1 (a,b) values (1,2); -insert t5 (a,b) values (20141010,2); -insert t6 (a,b) values (20141010,2); -insert t7 (a,b) values (20141010,2); insert t8 (a,b) values (1234567890,2); select * from t1; a b v 1 2 0.3333333333333333333 -select * from t5; -a b v -20141010 2 octubre -select * from t6; -a b v -20141010 2 viernes -select * from t7; -a b v -20141010 2 viernes vie octubre oct select * from t8; a b v 1234567890 2 2009-02-14 09:31:30 @@ -39,15 +35,6 @@ set time_zone='+1:00'; select * from t1; a b v 1 2 0.3333333333333333333 -select * from t5; -a b v -20141010 2 octubre -select * from t6; -a b v -20141010 2 viernes -select * from t7; -a b v -20141010 2 viernes vie octubre oct select * from t8; a b v 1234567890 2 2009-02-14 09:31:30 @@ -55,16 +42,7 @@ flush tables; select * from t1; a b v 1 2 0.3333333330000000000 -select * from t5; -a b v -20141010 2 October -select * from t6; -a b v -20141010 2 Friday -select * from t7; -a b v -20141010 2 Friday Fri October Oct select * from t8; a b v 1234567890 2 2009-02-14 00:31:30 -drop table t1, t5, t6, t7, t8; +drop table t1, t3_ok, t8; diff --git a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result new file mode 100644 index 00000000000..09d220f9eae --- /dev/null +++ b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result @@ -0,0 +1,268 @@ +SET @@session.storage_engine = 'MyISAM'; +# RAND() +create or replace table t1 (b double as (rand())); +create or replace table t1 (b double as (rand()) PERSISTENT); +ERROR HY000: Function or expression 'rand' is not allowed for 'VIRTUAL' of column/constraint 'b' +# LOAD_FILE() +create or replace table t1 (a varchar(64), b varchar(1024) as (load_file(a))); +ERROR HY000: Function or expression 'load_file' is not allowed for 'VIRTUAL' of column/constraint 'b' +# CURDATE() +create or replace table t1 (a datetime as (curdate()) PERSISTENT); +ERROR HY000: Function or expression 'curdate' is not allowed for 'VIRTUAL' of column/constraint 'a' +# CURRENT_DATE(), CURRENT_DATE +create or replace table t1 (a datetime as (current_date) PERSISTENT); +ERROR HY000: Function or expression 'curdate' is not allowed for 'VIRTUAL' of column/constraint 'a' +create or replace table t1 (a datetime as (current_date()) PERSISTENT); +ERROR HY000: Function or expression 'curdate' is not allowed for 'VIRTUAL' of column/constraint 'a' +# CURRENT_TIME(), CURRENT_TIME +create or replace table t1 (a datetime as (current_time) PERSISTENT); +ERROR HY000: Function or expression 'curtime' is not allowed for 'VIRTUAL' of column/constraint 'a' +create or replace table t1 (a datetime as (current_time()) PERSISTENT); +ERROR HY000: Function or expression 'curtime' is not allowed for 'VIRTUAL' of column/constraint 'a' +# CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP +create or replace table t1 (a datetime as (current_timestamp()) PERSISTENT); +ERROR HY000: Function or expression 'now' is not allowed for 'VIRTUAL' of column/constraint 'a' +create or replace table t1 (a datetime as (current_timestamp) PERSISTENT); +ERROR HY000: Function or expression 'now' is not allowed for 'VIRTUAL' of column/constraint 'a' +# CURTIME() +create or replace table t1 (a datetime as (curtime()) PERSISTENT); +ERROR HY000: Function or expression 'curtime' is not allowed for 'VIRTUAL' of column/constraint 'a' +# LOCALTIME(), LOCALTIME +create or replace table t1 (a datetime, b varchar(10) as (localtime()) PERSISTENT); +ERROR HY000: Function or expression 'now' is not allowed for 'VIRTUAL' of column/constraint 'b' +create or replace table t1 (a datetime, b varchar(10) as (localtime) PERSISTENT); +ERROR HY000: Function or expression 'now' is not allowed for 'VIRTUAL' of column/constraint 'b' +# LOCALTIMESTAMP, LOCALTIMESTAMP()(v4.0.6) +create or replace table t1 (a datetime, b varchar(10) as (localtimestamp()) PERSISTENT); +ERROR HY000: Function or expression 'now' is not allowed for 'VIRTUAL' of column/constraint 'b' +create or replace table t1 (a datetime, b varchar(10) as (localtimestamp) PERSISTENT); +ERROR HY000: Function or expression 'now' is not allowed for 'VIRTUAL' of column/constraint 'b' +# NOW() +create or replace table t1 (a datetime, b varchar(10) as (now()) PERSISTENT); +ERROR HY000: Function or expression 'now' is not allowed for 'VIRTUAL' of column/constraint 'b' +# SYSDATE() +create or replace table t1 (a int, b varchar(10) as (sysdate()) PERSISTENT); +ERROR HY000: Function or expression 'sysdate' is not allowed for 'VIRTUAL' of column/constraint 'b' +# UNIX_TIMESTAMP() +create or replace table t1 (a datetime, b datetime as (unix_timestamp()) PERSISTENT); +ERROR HY000: Function or expression 'unix_timestamp' is not allowed for 'VIRTUAL' of column/constraint 'b' +# UTC_DATE() +create or replace table t1 (a datetime, b datetime as (utc_date()) PERSISTENT); +ERROR HY000: Function or expression 'utc_date' is not allowed for 'VIRTUAL' of column/constraint 'b' +# UTC_TIME() +create or replace table t1 (a datetime, b datetime as (utc_time()) PERSISTENT); +ERROR HY000: Function or expression 'utc_time' is not allowed for 'VIRTUAL' of column/constraint 'b' +# UTC_TIMESTAMP() +create or replace table t1 (a datetime, b datetime as (utc_timestamp()) PERSISTENT); +ERROR HY000: Function or expression 'utc_timestamp' is not allowed for 'VIRTUAL' of column/constraint 'b' +# WEEK() - one argument version +create or replace table t1 (a datetime, b datetime as (week(a)) PERSISTENT); +ERROR HY000: Function or expression 'get_system_var' is not allowed for 'VIRTUAL' of column/constraint 'b' +# MATCH() +create or replace table t1 (a varchar(32), b bool as (match a against ('sample text')) PERSISTENT); +ERROR HY000: Function or expression 'match' is not allowed for 'VIRTUAL' of column/constraint 'b' +# BENCHMARK() +create or replace table t1 (a varchar(1024), b varchar(1024) as (benchmark(a,3))); +ERROR HY000: Function or expression 'benchmark' is not allowed for 'VIRTUAL' of column/constraint 'b' +# CHARSET() +create or replace table t1 (a varchar(64), b varchar(64) as (charset(a)) PERSISTENT); +# COERCIBILITY() +create or replace table t1 (a varchar(64), b int as (coercibility(a)) PERSISTENT); +# COLLATION() +create or replace table t1 (a varchar(64), b varchar(64) as (collation(a)) PERSISTENT); +# CONNECTION_ID() +create or replace table t1 (a int as (connection_id())); +create or replace table t1 (a int as (connection_id()) PERSISTENT); +ERROR HY000: Function or expression 'connection_id' is not allowed for 'VIRTUAL' of column/constraint 'a' +# CURRENT_USER(), CURRENT_USER +create or replace table t1 (a varchar(32) as (current_user())); +ERROR HY000: Function or expression 'current_user()' is not allowed for 'VIRTUAL' of column/constraint 'a' +create or replace table t1 (a varchar(32) as (current_user()) PERSISTENT); +ERROR HY000: Function or expression 'current_user()' is not allowed for 'VIRTUAL' of column/constraint 'a' +create or replace table t1 (a varchar(32) as (current_user) PERSISTENT); +ERROR HY000: Function or expression 'current_user()' is not allowed for 'VIRTUAL' of column/constraint 'a' +# DATABASE() +create or replace table t1 (a varchar(32) as (database())); +create or replace table t1 (a varchar(1024), b varchar(1024) as (database()) PERSISTENT); +ERROR HY000: Function or expression 'database()' is not allowed for 'VIRTUAL' of column/constraint 'b' +# FOUND_ROWS() +create or replace table t1 (a varchar(1024), b varchar(1024) as (found_rows())); +ERROR HY000: Function or expression 'found_rows' is not allowed for 'VIRTUAL' of column/constraint 'b' +# GET_LOCK() +create or replace table t1 (a varchar(1024), b varchar(1024) as (get_lock(a,10))); +ERROR HY000: Function or expression 'get_lock' is not allowed for 'VIRTUAL' of column/constraint 'b' +# IS_FREE_LOCK() +create or replace table t1 (a varchar(1024), b varchar(1024) as (is_free_lock(a))); +ERROR HY000: Function or expression 'is_free_lock' is not allowed for 'VIRTUAL' of column/constraint 'b' +# IS_USED_LOCK() +create or replace table t1 (a varchar(1024), b varchar(1024) as (is_used_lock(a))); +ERROR HY000: Function or expression 'is_used_lock' is not allowed for 'VIRTUAL' of column/constraint 'b' +# LAST_INSERT_ID() +create or replace table t1 (a int as (last_insert_id())); +ERROR HY000: Function or expression 'last_insert_id' is not allowed for 'VIRTUAL' of column/constraint 'a' +# MASTER_POS_WAIT() +create or replace table t1 (a varchar(32), b int as (master_pos_wait(a,0,2))); +ERROR HY000: Function or expression 'master_pos_wait' is not allowed for 'VIRTUAL' of column/constraint 'b' +# NAME_CONST() +create or replace table t1 (a varchar(32) as (name_const('test',1))); +ERROR HY000: Function or expression 'name_const' is not allowed for 'VIRTUAL' of column/constraint 'a' +# RELEASE_LOCK() +create or replace table t1 (a varchar(32), b int as (release_lock(a))); +ERROR HY000: Function or expression 'release_lock' is not allowed for 'VIRTUAL' of column/constraint 'b' +# ROW_COUNT() +create or replace table t1 (a int as (row_count())); +ERROR HY000: Function or expression 'row_count' is not allowed for 'VIRTUAL' of column/constraint 'a' +# SCHEMA() +create or replace table t1 (a varchar(32) as (schema()) PERSISTENT); +ERROR HY000: Function or expression 'database()' is not allowed for 'VIRTUAL' of column/constraint 'a' +# SESSION_USER() +create or replace table t1 (a varchar(32) as (session_user()) PERSISTENT); +ERROR HY000: Function or expression 'user()' is not allowed for 'VIRTUAL' of column/constraint 'a' +# SLEEP() +create or replace table t1 (a int, b int as (sleep(a))); +ERROR HY000: Function or expression 'sleep' is not allowed for 'VIRTUAL' of column/constraint 'b' +# SYSTEM_USER() +create or replace table t1 (a varchar(32) as (system_user()) PERSISTENT); +ERROR HY000: Function or expression 'user()' is not allowed for 'VIRTUAL' of column/constraint 'a' +# USER() +create or replace table t1 (a varchar(1024), b varchar(1024) as (user()) PERSISTENT); +ERROR HY000: Function or expression 'user()' is not allowed for 'VIRTUAL' of column/constraint 'b' +# UUID_SHORT() +create or replace table t1 (a varchar(1024) as (uuid_short()) PERSISTENT); +ERROR HY000: Function or expression 'uuid_short' is not allowed for 'VIRTUAL' of column/constraint 'a' +# UUID() +create or replace table t1 (a varchar(1024) as (uuid()) PERSISTENT); +ERROR HY000: Function or expression 'uuid' is not allowed for 'VIRTUAL' of column/constraint 'a' +# VALUES() +create or replace table t1 (a varchar(1024), b varchar(1024) as (values(a))); +ERROR HY000: Function or expression 'values' is not allowed for 'VIRTUAL' of column/constraint 'b' +# VERSION() +create or replace table t1 (a varchar(1024), b varchar(1024) as (version()) PERSISTENT); +ERROR HY000: Function or expression 'version()' is not allowed for 'VIRTUAL' of column/constraint 'b' +# ENCRYPT() +create or replace table t1 (a varchar(1024), b varchar(1024) as (encrypt(a)) PERSISTENT); +# DATE_FORMAT() +create or replace table t1 (a datetime, b varchar(64) as (date_format(a,'%W %M %D')); +ERROR HY000: Function or expression 'date_format' is not allowed for 'VIRTUAL' of column/constraint 'b' +# Stored procedures +create procedure p1() +begin +select current_user(); +end // +create function f1() +returns int +begin +return 1; +end // +create or replace table t1 (a int as (p1()) PERSISTENT); +ERROR HY000: Function or expression '`p1`' is not allowed for 'VIRTUAL' of column/constraint 'a' +create or replace table t1 (a int as (f1()) PERSISTENT); +ERROR HY000: Function or expression '`f1`' is not allowed for 'VIRTUAL' of column/constraint 'a' +drop procedure p1; +drop function f1; +# Unknown functions +create or replace table t1 (a int as (f1()) PERSISTENT); +ERROR HY000: Function or expression '`f1`' is not allowed for 'VIRTUAL' of column/constraint 'a' +# +# GROUP BY FUNCTIONS +# +# AVG() +create or replace table t1 (a int, b int as (avg(a))); +ERROR HY000: Function or expression 'avg(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# BIT_AND() +create or replace table t1 (a int, b int as (bit_and(a))); +ERROR HY000: Function or expression 'bit_and(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# BIT_OR() +create or replace table t1 (a int, b int as (bit_or(a))); +ERROR HY000: Function or expression 'bit_or(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# BIT_XOR() +create or replace table t1 (a int, b int as (bit_xor(a))); +ERROR HY000: Function or expression 'bit_xor(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# COUNT(DISTINCT) +create or replace table t1 (a int, b int as (count(distinct a))); +ERROR HY000: Function or expression 'count(distinct ' is not allowed for 'VIRTUAL' of column/constraint 'b' +# COUNT() +create or replace table t1 (a int, b int as (count(a))); +ERROR HY000: Function or expression 'count(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# GROUP_CONCAT() +create or replace table t1 (a varchar(32), b int as (group_concat(a,''))); +ERROR HY000: Function or expression 'group_concat' is not allowed for 'VIRTUAL' of column/constraint 'b' +# MAX() +create or replace table t1 (a int, b int as (max(a))); +ERROR HY000: Function or expression 'max(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# MIN() +create or replace table t1 (a int, b int as (min(a))); +ERROR HY000: Function or expression 'min(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# STD() +create or replace table t1 (a int, b int as (std(a))); +ERROR HY000: Function or expression 'std(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# STDDEV_POP() +create or replace table t1 (a int, b int as (stddev_pop(a))); +ERROR HY000: Function or expression 'std(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# STDDEV_SAMP() +create or replace table t1 (a int, b int as (stddev_samp(a))); +ERROR HY000: Function or expression 'std(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# STDDEV() +create or replace table t1 (a int, b int as (stddev(a))); +ERROR HY000: Function or expression 'std(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# SUM() +create or replace table t1 (a int, b int as (sum(a))); +ERROR HY000: Function or expression 'sum(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# VAR_POP() +create or replace table t1 (a int, b int as (var_pop(a))); +ERROR HY000: Function or expression 'variance(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# VAR_SAMP() +create or replace table t1 (a int, b int as (var_samp(a))); +ERROR HY000: Function or expression 'var_samp(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# VARIANCE() +create or replace table t1 (a int, b int as (variance(a))); +ERROR HY000: Function or expression 'variance(' is not allowed for 'VIRTUAL' of column/constraint 'b' +# DAYNAME() +create or replace table t1 (a int, b varchar(10) as (dayname(a))); +ERROR HY000: Function or expression 'dayname' is not allowed for 'VIRTUAL' of column/constraint 'b' +create or replace table t1 (a int, b varchar(10) as (monthname(a))); +ERROR HY000: Function or expression 'monthname' is not allowed for 'VIRTUAL' of column/constraint 'b' +create or replace table t1 (a int, b varchar(10) as (date_format("1963-01-01","%d.%m.%Y"))); +ERROR HY000: Function or expression 'date_format' is not allowed for 'VIRTUAL' of column/constraint 'b' +create or replace table t1 (a int, b varchar(10) as (time_format(now(),"%d.%m.%Y"))); +ERROR HY000: Function or expression 'time_format' is not allowed for 'VIRTUAL' of column/constraint 'b' +# +# XML FUNCTIONS +# +# ExtractValue() +create or replace table t1 (a varchar(1024), b varchar(1024) as (ExtractValue(a,'//b[$@j]')) PERSISTENT); +# UpdateXML() +create or replace table t1 (a varchar(1024), b varchar(1024) as (UpdateXML(a,'/a','<e>fff</e>')) PERSISTENT); +# +# Sub-selects +# +create or replace table t1 (a int); +create or replace 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 MariaDB server version for the right syntax to use near 'select count(*) from t1))' at line 1 +drop table t1; +create or replace table t1 (a int, b int as ((select 1))); +ERROR HY000: Function or expression 'subselect' is not allowed for 'VIRTUAL' of column/constraint 'b' +create or replace table t1 (a int, b int as (a+(select 1))); +ERROR HY000: Function or expression 'subselect' is not allowed for 'VIRTUAL' of column/constraint 'b' +# +# SP functions +# +drop function if exists sub1; +create function sub1(i int) returns int deterministic +return i+1; +select sub1(1); +sub1(1) +2 +create or replace table t1 (a int, b int as (a+sub3(1))); +ERROR HY000: Function or expression '`sub3`' is not allowed for 'VIRTUAL' of column/constraint 'b' +drop function sub1; +# +# Long expression +create or replace table t1 (a int, b varchar(300) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'))); +drop table t1; +create or replace table t1 (a int, b varchar(16384) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'))); +ERROR HY000: Too many columns +# +# Constant expression +create or replace table t1 (a int as (PI()) PERSISTENT); +drop table if exists 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 deleted file mode 100644 index 7f805459264..00000000000 --- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_innodb.result +++ /dev/null @@ -1,255 +0,0 @@ -SET @@session.storage_engine = 'InnoDB'; -# RAND() -create table t1 (b double as (rand())); -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' -# CURDATE() -create table t1 (a datetime as (curdate())); -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' -create table t1 (a datetime as (current_date())); -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' -create table t1 (a datetime as (current_time())); -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' -create table t1 (a datetime as (current_timestamp)); -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' -# LOCALTIME(), LOCALTIME -create table t1 (a datetime, b varchar(10) as (localtime())); -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' -# 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' -create table t1 (a datetime, b varchar(10) as (localtimestamp)); -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' -# SYSDATE() -create table t1 (a int, b varchar(10) as (sysdate())); -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' -# UTC_DATE() -create table t1 (a datetime, b datetime as (utc_date())); -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' -# UTC_TIMESTAMP() -create table t1 (a datetime, b datetime as (utc_timestamp())); -ERROR HY000: Function or expression is not allowed for column 'b' -# WEEK() - one argument version -create table t1 (a datetime, b datetime as (week(a))); -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' -# CHARSET() -create table t1 (a varchar(64), b varchar(64) as (charset(a))); -ERROR HY000: Constant expression in computed column function is not allowed -# COERCIBILITY() -create table t1 (a varchar(64), b int as (coercibility(a))); -ERROR HY000: Constant expression in computed column function is not allowed -# COLLATION() -create table t1 (a varchar(64), b varchar(64) as (collation(a))); -ERROR HY000: Constant expression in computed column function is not allowed -# CONNECTION_ID() -create table t1 (a int as (connection_id())); -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' -create table t1 (a varchar(32) as (current_user)); -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' -# 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' -# 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' -# 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' -# 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' -# LAST_INSERT_ID() -create table t1 (a int as (last_insert_id())); -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' -# NAME_CONST() -create table t1 (a varchar(32) as (name_const('test',1))); -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' -# ROW_COUNT() -create table t1 (a int as (row_count())); -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' -# SESSION_USER() -create table t1 (a varchar(32) as (session_user())); -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' -# SYSTEM_USER() -create table t1 (a varchar(32) as (system_user())); -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' -# UUID_SHORT() -create table t1 (a varchar(1024) as (uuid_short())); -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' -# VALUES() -create table t1 (a varchar(1024), b varchar(1024) as (values(a))); -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' -# ENCRYPT() -create table t1 (a varchar(1024), b varchar(1024) as (encrypt(a))); -ERROR HY000: Function or expression is not allowed for column 'b' -# Stored procedures -create procedure p1() -begin -select current_user(); -end // -create function f1() -returns int -begin -return 1; -end // -create table t1 (a int as (p1())); -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' -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' -# -# 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' -# BIT_AND() -create table t1 (a int, b int as (bit_and(a))); -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' -# BIT_XOR() -create table t1 (a int, b int as (bit_xor(a))); -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' -# COUNT() -create table t1 (a int, b int as (count(a))); -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' -# MAX() -create table t1 (a int, b int as (max(a))); -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' -# STD() -create table t1 (a int, b int as (std(a))); -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' -# STDDEV_SAMP() -create table t1 (a int, b int as (stddev_samp(a))); -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' -# SUM() -create table t1 (a int, b int as (sum(a))); -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' -# VAR_SAMP() -create table t1 (a int, b int as (var_samp(a))); -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' -# -# 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' -# 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' -# -# Sub-selects -# -create table t1 (a int); -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 MariaDB 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' -create table t1 (a int, b int as (a+(select 1))); -ERROR HY000: Function or expression is not allowed for column 'b' -# -# SP functions -# -drop function if exists sub1; -create function sub1(i int) returns int deterministic -return i+1; -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' -drop function sub1; -# -# Long expression -create table t1 (a int, b varchar(300) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'))); -drop table t1; -create table t1 (a int, b varchar(300) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'))); -ERROR HY000: String 'concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long for VIRTUAL COLUMN EXPRESSION (should be no longer than 252) -# -# Constant expression -create table t1 (a int as (PI())); -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 deleted file mode 100644 index 1e1e6d6466e..00000000000 --- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs_myisam.result +++ /dev/null @@ -1,257 +0,0 @@ -SET @@session.storage_engine = 'MyISAM'; -# RAND() -create table t1 (b double as (rand())); -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' -# CURDATE() -create table t1 (a datetime as (curdate())); -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' -create table t1 (a datetime as (current_date())); -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' -create table t1 (a datetime as (current_time())); -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' -create table t1 (a datetime as (current_timestamp)); -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' -# LOCALTIME(), LOCALTIME -create table t1 (a datetime, b varchar(10) as (localtime())); -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' -# 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' -create table t1 (a datetime, b varchar(10) as (localtimestamp)); -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' -# SYSDATE() -create table t1 (a int, b varchar(10) as (sysdate())); -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' -# UTC_DATE() -create table t1 (a datetime, b datetime as (utc_date())); -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' -# UTC_TIMESTAMP() -create table t1 (a datetime, b datetime as (utc_timestamp())); -ERROR HY000: Function or expression is not allowed for column 'b' -# WEEK() - one argument version -create table t1 (a datetime, b datetime as (week(a))); -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' -# 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' -# CHARSET() -create table t1 (a varchar(64), b varchar(64) as (charset(a))); -ERROR HY000: Constant expression in computed column function is not allowed -# COERCIBILITY() -create table t1 (a varchar(64), b int as (coercibility(a))); -ERROR HY000: Constant expression in computed column function is not allowed -# COLLATION() -create table t1 (a varchar(64), b varchar(64) as (collation(a))); -ERROR HY000: Constant expression in computed column function is not allowed -# CONNECTION_ID() -create table t1 (a int as (connection_id())); -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' -create table t1 (a varchar(32) as (current_user)); -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' -# 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' -# 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' -# 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' -# 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' -# LAST_INSERT_ID() -create table t1 (a int as (last_insert_id())); -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' -# NAME_CONST() -create table t1 (a varchar(32) as (name_const('test',1))); -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' -# ROW_COUNT() -create table t1 (a int as (row_count())); -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' -# SESSION_USER() -create table t1 (a varchar(32) as (session_user())); -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' -# SYSTEM_USER() -create table t1 (a varchar(32) as (system_user())); -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' -# UUID_SHORT() -create table t1 (a varchar(1024) as (uuid_short())); -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' -# VALUES() -create table t1 (a varchar(1024), b varchar(1024) as (values(a))); -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' -# ENCRYPT() -create table t1 (a varchar(1024), b varchar(1024) as (encrypt(a))); -ERROR HY000: Function or expression is not allowed for column 'b' -# Stored procedures -create procedure p1() -begin -select current_user(); -end // -create function f1() -returns int -begin -return 1; -end // -create table t1 (a int as (p1())); -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' -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' -# -# 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' -# BIT_AND() -create table t1 (a int, b int as (bit_and(a))); -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' -# BIT_XOR() -create table t1 (a int, b int as (bit_xor(a))); -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' -# COUNT() -create table t1 (a int, b int as (count(a))); -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' -# MAX() -create table t1 (a int, b int as (max(a))); -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' -# STD() -create table t1 (a int, b int as (std(a))); -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' -# STDDEV_SAMP() -create table t1 (a int, b int as (stddev_samp(a))); -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' -# SUM() -create table t1 (a int, b int as (sum(a))); -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' -# VAR_SAMP() -create table t1 (a int, b int as (var_samp(a))); -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' -# -# 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' -# 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' -# -# Sub-selects -# -create table t1 (a int); -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 MariaDB 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' -create table t1 (a int, b int as (a+(select 1))); -ERROR HY000: Function or expression is not allowed for column 'b' -# -# SP functions -# -drop function if exists sub1; -create function sub1(i int) returns int deterministic -return i+1; -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' -drop function sub1; -# -# Long expression -create table t1 (a int, b varchar(300) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'))); -drop table t1; -create table t1 (a int, b varchar(300) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'))); -ERROR HY000: String 'concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long for VIRTUAL COLUMN EXPRESSION (should be no longer than 252) -# -# Constant expression -create table t1 (a int as (PI())); -ERROR HY000: Constant expression in computed column function is not allowed diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index 451898aa972..d4a583c34b2 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -34,7 +34,7 @@ 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 +ERROR 21000: Operand should contain 1 column(s) CREATE TABLE t1 ( a CHAR(255) BINARY NOT NULL DEFAULT 0, b CHAR(255) BINARY NOT NULL DEFAULT 0, @@ -187,11 +187,7 @@ ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL ) ENGINE=MyISAM; INSERT INTO t1 (tsv) VALUES (DEFAULT); -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT); -Warnings: -Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' FLUSH TABLES; SELECT COUNT(*) FROM t1; COUNT(*) @@ -320,7 +316,9 @@ drop table t1; # MDEV-5611: self-referencing virtual column # create table t1 (a int, b int as (b is null) virtual); -ERROR HY000: A computed column cannot be based on a computed column +ERROR 01000: Expression for field `b` is refering to uninitialized field `b` +create table t1 (a int as (1+1), b int as (a is null) virtual); +drop table t1; # end of 5.3 tests create table t1 (v1 varchar(255) as (c1) persistent, c1 varchar(50)) collate=latin1_general_ci; show create table t1; diff --git a/mysql-test/suite/vcol/r/vcol_partition_innodb.result b/mysql-test/suite/vcol/r/vcol_partition_innodb.result index 466c1851800..6a7978a8bf4 100644 --- a/mysql-test/suite/vcol/r/vcol_partition_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_partition_innodb.result @@ -12,15 +12,17 @@ PARTITION p2 VALUES LESS THAN (2008) insert into t1 values ('2006-01-01',default); insert into t1 values ('2007-01-01',default); insert into t1 values ('2005-01-01',default); +insert into t1 (a) values ('2007-01-02'); select * from t1; a b 2005-01-01 2005 2006-01-01 2006 2007-01-01 2007 +2007-01-02 2007 select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1'; partition_name table_rows data_length p0 1 16384 -p2 2 16384 +p2 3 16384 # Modify the expression of virtual column b ALTER TABLE t1 modify b int as (year(a)-1); select * from t1; @@ -28,10 +30,11 @@ a b 2005-01-01 2004 2006-01-01 2005 2007-01-01 2006 +2007-01-02 2006 select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1'; partition_name table_rows data_length p0 2 16384 -p2 1 16384 +p2 2 16384 drop table t1; # Case 2. Partitioning by LIST based on a stored virtual column. CREATE TABLE t1 (a int, b int as (a % 3 ) persistent) diff --git a/mysql-test/suite/vcol/r/vcol_partition_myisam.result b/mysql-test/suite/vcol/r/vcol_partition_myisam.result index 9a92f308c45..cb6f7fe1eca 100644 --- a/mysql-test/suite/vcol/r/vcol_partition_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_partition_myisam.result @@ -12,15 +12,17 @@ PARTITION p2 VALUES LESS THAN (2008) insert into t1 values ('2006-01-01',default); insert into t1 values ('2007-01-01',default); insert into t1 values ('2005-01-01',default); +insert into t1 (a) values ('2007-01-02'); select * from t1; a b 2005-01-01 2005 2006-01-01 2006 2007-01-01 2007 +2007-01-02 2007 select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1'; partition_name table_rows data_length p0 1 7 -p2 2 14 +p2 3 21 # Modify the expression of virtual column b ALTER TABLE t1 modify b int as (year(a)-1); select * from t1; @@ -28,10 +30,11 @@ a b 2005-01-01 2004 2006-01-01 2005 2007-01-01 2006 +2007-01-02 2006 select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1'; partition_name table_rows data_length p0 2 14 -p2 1 7 +p2 2 14 drop table t1; # Case 2. Partitioning by LIST based on a stored virtual column. CREATE TABLE t1 (a int, b int as (a % 3 ) persistent) diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result index 1c6af88f9d7..7ce09a3a967 100644 --- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result @@ -2028,21 +2028,6 @@ a b 2008-08-31 00:00:00 2008-09-30 00:00:00 drop table t1; set sql_warnings = 0; -# DATE_FORMAT() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(64) as (date_format(a,'%W %M %D'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(64) AS (date_format(a,'%W %M %D')) VIRTUAL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 Sunday August 31st -drop table t1; -set sql_warnings = 0; # DATE_SUB() set sql_warnings = 1; create table t1 (a datetime, b datetime as (date_sub(a,interval 1 month))); @@ -2103,21 +2088,6 @@ a b 2008-08-31 00:00:00 31 drop table t1; set sql_warnings = 0; -# DAYNAME() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(10) as (dayname(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(10) AS (dayname(a)) VIRTUAL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 Sunday -drop table t1; -set sql_warnings = 0; # DAYOFMONTH() set sql_warnings = 1; create table t1 (a datetime, b int as (dayofmonth(a))); @@ -2209,21 +2179,6 @@ a b 1196440219 2007-11-30 16:30:19 drop table t1; set sql_warnings = 0; -# GET_FORMAT() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(32) as (date_format(a,get_format(DATE,'EUR')))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(32) AS (date_format(a,get_format(DATE,'EUR'))) VIRTUAL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 31.08.2008 -drop table t1; -set sql_warnings = 0; # HOUR() set sql_warnings = 1; create table t1 (a time, b long as (hour(a))); @@ -2335,21 +2290,6 @@ a b 2009-12-31 23:59:59 12 drop table t1; set sql_warnings = 0; -# MONTHNAME() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(16) as (monthname(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(16) AS (monthname(a)) VIRTUAL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -insert into t1 values ('2009-12-31 23:59:59.000010',default); -select * from t1; -a b -2009-12-31 23:59:59 December -drop table t1; -set sql_warnings = 0; # PERIOD_ADD() set sql_warnings = 1; create table t1 (a int, b int as (period_add(a,2))); @@ -2471,21 +2411,6 @@ a b 2008-08-31 00:00:00 2008-08-30 22:00:00 drop table t1; set sql_warnings = 0; -# TIME_FORMAT() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(32) as (time_format(a,'%r'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(32) AS (time_format(a,'%r')) VIRTUAL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31 02:03:04',default); -select * from t1; -a b -2008-08-31 02:03:04 02:03:04 AM -drop table t1; -set sql_warnings = 0; # TIME_TO_SEC() set sql_warnings = 1; create table t1 (a time, b long as (time_to_sec(a))); diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result deleted file mode 100644 index 772c47aac0d..00000000000 --- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result +++ /dev/null @@ -1,2908 +0,0 @@ -SET @@session.storage_engine = 'InnoDB'; -# -# NUMERIC FUNCTIONS -# -# ABS() -set sql_warnings = 1; -create table t1 (a int, b int as (abs(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (abs(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (-1, default); -select * from t1; -a b --1 1 -drop table t1; -set sql_warnings = 0; -# ACOS() -set sql_warnings = 1; -create table t1 (a double, b double as (format(acos(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(acos(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1, default); -insert into t1 values (1.0001,default); -insert into t1 values (0,default); -select * from t1; -a b -1 0 -1.0001 NULL -0 1.570796 -drop table t1; -set sql_warnings = 0; -# ASIN() -set sql_warnings = 1; -create table t1 (a double, b double as (format(asin(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(asin(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (0.2, default); -insert into t1 values (1.0001,default); -select * from t1; -a b -0.2 0.201358 -1.0001 NULL -drop table t1; -set sql_warnings = 0; -#ATAN -set sql_warnings = 1; -create table t1 (a double, b double, c double as (format(atan(a,b),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double DEFAULT NULL, - `c` double AS (format(atan(a,b),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (-2,2,default); -insert into t1 values (format(PI(),6),0,default); -select * from t1; -a b c --2 2 -0.785398 -3.141593 0 1.570796 -drop table t1; -set sql_warnings = 0; -set sql_warnings = 1; -create table t1 (a double, c double as (format(atan(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `c` double AS (format(atan(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (-2,default); -insert into t1 values (format(PI(),6),default); -select * from t1; -a c --2 -1.107149 -3.141593 1.262627 -drop table t1; -set sql_warnings = 0; -# ATAN2 -set sql_warnings = 1; -create table t1 (a double, b double, c double as (format(atan2(a,b),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double DEFAULT NULL, - `c` double AS (format(atan2(a,b),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (-2,2,default); -insert into t1 values (format(PI(),6),0,default); -select * from t1; -a b c --2 2 -0.785398 -3.141593 0 1.570796 -drop table t1; -set sql_warnings = 0; -# CEIL() -set sql_warnings = 1; -create table t1 (a double, b int as (ceil(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` int(11) AS (ceil(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1.23,default); -insert into t1 values (-1.23,default); -select * from t1; -a b -1.23 2 --1.23 -1 -drop table t1; -set sql_warnings = 0; -# CONV() -set sql_warnings = 1; -create table t1 (a varchar(10), b int, c int, d varchar(10) as (conv(a,b,c))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `c` int(11) DEFAULT NULL, - `d` varchar(10) AS (conv(a,b,c)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('a',16,2,default); -insert into t1 values ('6e',18,8,default); -insert into t1 values (-17,10,-18,default); -insert into t1 values (10+'10'+'10'+0xa,10,10,default); -select * from t1; -a b c d -a 16 2 1010 -6e 18 8 172 --17 10 -18 -H -40 10 10 40 -drop table t1; -set sql_warnings = 0; -# COS() -set sql_warnings = 1; -create table t1 (a double, b double as (format(cos(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(cos(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (format(PI(),6),default); -select * from t1; -a b -3.141593 -1 -drop table t1; -set sql_warnings = 0; -# COT() -set sql_warnings = 1; -create table t1 (a double, b double as (format(cot(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(cot(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (12,default); -insert into t1 values (1,default); -select * from t1; -a b -12 -1.572673 -1 0.642093 -drop table t1; -set sql_warnings = 0; -# CRC32() -set sql_warnings = 1; -create table t1 (a varchar(10), b long as (crc32(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` mediumtext AS (crc32(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -insert into t1 values ('mysql',default); -select * from t1; -a b -MySQL 3259397556 -mysql 2501908538 -drop table t1; -set sql_warnings = 0; -# DEGREES() -set sql_warnings = 1; -create table t1 (a double, b double as (format(degrees(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(degrees(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (format(PI(),6),default); -insert into t1 values (format(PI()/2,6),default); -select * from t1; -a b -3.141593 180.00002 -1.570796 89.999981 -drop table t1; -set sql_warnings = 0; -# / -set sql_warnings = 1; -create table t1 (a double, b double as (a/2)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (a/2) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (2,default); -select * from t1; -a b -2 1 -drop table t1; -set sql_warnings = 0; -# EXP() -set sql_warnings = 1; -create table t1 (a double, b double as (format(exp(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(exp(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (2,default); -insert into t1 values (-2,default); -insert into t1 values (0,default); -select * from t1; -a b -2 7.389056 --2 0.135335 -0 1 -drop table t1; -set sql_warnings = 0; -# FLOOR() -set sql_warnings = 1; -create table t1 (a double, b long as (floor(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` mediumtext AS (floor(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1.23,default); -insert into t1 values (-1.23,default); -select * from t1; -a b -1.23 1 --1.23 -2 -drop table t1; -set sql_warnings = 0; -# LN() -set sql_warnings = 1; -create table t1 (a double, b double as (format(ln(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(ln(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (2,default); -insert into t1 values (-2,default); -select * from t1; -a b -2 0.693147 --2 NULL -drop table t1; -set sql_warnings = 0; -# LOG() -set sql_warnings = 1; -create table t1 (a double, b double, c double as (format(log(a,b),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double DEFAULT NULL, - `c` double AS (format(log(a,b),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (2,65536,default); -insert into t1 values (10,100,default); -insert into t1 values (1,100,default); -select * from t1; -a b c -2 65536 16 -10 100 2 -1 100 NULL -drop table t1; -set sql_warnings = 0; -set sql_warnings = 1; -create table t1 (a double, b double as (format(log(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(log(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (2,default); -insert into t1 values (-2,default); -select * from t1; -a b -2 0.693147 --2 NULL -drop table t1; -set sql_warnings = 0; -# LOG2() -set sql_warnings = 1; -create table t1 (a double, b double as (format(log2(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(log2(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (65536,default); -insert into t1 values (-100,default); -select * from t1; -a b -65536 16 --100 NULL -drop table t1; -set sql_warnings = 0; -# LOG10() -set sql_warnings = 1; -create table t1 (a double, b double as (format(log10(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(log10(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (2,default); -insert into t1 values (100,default); -insert into t1 values (-100,default); -select * from t1; -a b -2 0.30103 -100 2 --100 NULL -drop table t1; -set sql_warnings = 0; -# - -set sql_warnings = 1; -create table t1 (a double, b double as (a-1)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (a-1) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (2,default); -select * from t1; -a b -2 1 -drop table t1; -set sql_warnings = 0; -# MOD() -set sql_warnings = 1; -create table t1 (a int, b int as (mod(a,10))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (mod(a,10)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (11,default); -select * from t1; -a b -1 1 -11 1 -drop table t1; -set sql_warnings = 0; -# % -set sql_warnings = 1; -create table t1 (a int, b int as (a % 10)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a % 10) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (11,default); -select * from t1; -a b -1 1 -11 1 -drop table t1; -set sql_warnings = 0; -# OCT() -set sql_warnings = 1; -create table t1 (a double, b varchar(10) as (oct(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` varchar(10) AS (oct(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (12,default); -select * from t1; -a b -12 14 -drop table t1; -set sql_warnings = 0; -# PI() -set sql_warnings = 1; -create table t1 (a double, b double as (format(PI()*a*a,6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(PI()*a*a,6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -select * from t1; -a b -1 3.141593 -drop table t1; -set sql_warnings = 0; -# + -set sql_warnings = 1; -create table t1 (a int, b int as (a+1)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a+1) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -select * from t1; -a b -1 2 -drop table t1; -set sql_warnings = 0; -# POW, POWER -set sql_warnings = 1; -create table t1 (a int, b int as (pow(a,2)), c int as (power(a,2))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (pow(a,2)) VIRTUAL, - `c` int(11) AS (power(a,2)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default,default); -insert into t1 values (2,default,default); -select * from t1; -a b c -1 1 1 -2 4 4 -drop table t1; -set sql_warnings = 0; -# RADIANS() -set sql_warnings = 1; -create table t1 (a double, b double as (format(radians(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(radians(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (90,default); -select * from t1; -a b -90 1.570796 -drop table t1; -set sql_warnings = 0; -# ROUND() -set sql_warnings = 1; -create table t1 (a double, b int as (round(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` int(11) AS (round(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (-1.23,default); -insert into t1 values (-1.58,default); -insert into t1 values (1.58,default); -select * from t1; -a b --1.23 -1 --1.58 -2 -1.58 2 -drop table t1; -set sql_warnings = 0; -set sql_warnings = 1; -create table t1 (a double, b double, c int as (round(a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double DEFAULT NULL, - `c` int(11) AS (round(a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1.298,1,default); -insert into t1 values (1.298,0,default); -insert into t1 values (23.298,-1,default); -select * from t1; -a b c -1.298 1 1 -1.298 0 1 -23.298 -1 20 -drop table t1; -set sql_warnings = 0; -# SIGN() -set sql_warnings = 1; -create table t1 (a double, b int as (sign(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` int(11) AS (sign(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (-32,default); -insert into t1 values (0,default); -insert into t1 values (234,default); -select * from t1; -a b --32 -1 -0 0 -234 1 -drop table t1; -set sql_warnings = 0; -# SIN() -set sql_warnings = 1; -create table t1 (a double, b double as (format(sin(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(sin(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (format(PI()/2,6),default); -select * from t1; -a b -1.570796 1 -drop table t1; -set sql_warnings = 0; -# SQRT() -set sql_warnings = 1; -create table t1 (a double, b double as (format(sqrt(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(sqrt(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (4,default); -insert into t1 values (20,default); -insert into t1 values (-16,default); -select * from t1; -a b -4 2 -20 4.472136 --16 NULL -drop table t1; -set sql_warnings = 0; -# TAN() -set sql_warnings = 1; -create table t1 (a double, b double as (format(tan(a),6))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (format(tan(a),6)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (format(PI(),6),default); -insert into t1 values (format(PI()+1,6),default); -select * from t1; -a b -3.141593 0 -4.141593 1.557409 -drop table t1; -set sql_warnings = 0; -# * -set sql_warnings = 1; -create table t1 (a double, b double as (a*3)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (a*3) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (0,default); -insert into t1 values (1,default); -insert into t1 values (2,default); -select * from t1; -a b -0 0 -1 3 -2 6 -drop table t1; -set sql_warnings = 0; -# TRUNCATE() -set sql_warnings = 1; -create table t1 (a double, b double as (truncate(a,4))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (truncate(a,4)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1.223,default); -insert into t1 values (1.999,default); -insert into t1 values (1.999,default); -insert into t1 values (122,default); -select * from t1; -a b -1.223 1.223 -1.999 1.999 -1.999 1.999 -122 122 -drop table t1; -set sql_warnings = 0; -# Unary - -set sql_warnings = 1; -create table t1 (a double, b double as (-a)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` double AS (-a) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (-1,default); -select * from t1; -a b -1 -1 --1 1 -drop table t1; -set sql_warnings = 0; -# -# STRING FUNCTIONS -# -# ASCII() -set sql_warnings = 1; -create table t1 (a char(2), b int as (ascii(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` char(2) DEFAULT NULL, - `b` int(11) AS (ascii(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2',default); -insert into t1 values (2,default); -insert into t1 values ('dx',default); -select * from t1; -a b -2 50 -2 50 -dx 100 -drop table t1; -set sql_warnings = 0; -# BIN() -set sql_warnings = 1; -create table t1 (a int, b varchar(10) as (bin(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(10) AS (bin(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (12,default); -select * from t1; -a b -12 1100 -drop table t1; -set sql_warnings = 0; -# BIT_LENGTH() -set sql_warnings = 1; -create table t1 (a varchar(10), b long as (bit_length(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` mediumtext AS (bit_length(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('text',default); -select * from t1; -a b -text 32 -drop table t1; -set sql_warnings = 0; -# CHAR_LENGTH() -set sql_warnings = 1; -create table t1 (a varchar(10), b long as (char_length(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` mediumtext AS (char_length(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('text',default); -select * from t1; -a b -text 4 -drop table t1; -set sql_warnings = 0; -# CHAR() -set sql_warnings = 1; -create table t1 (a int, b int, c varbinary(10) as (char(a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `c` varbinary(10) AS (char(a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (77,121,default); -select * from t1; -a b c -77 121 My -drop table t1; -set sql_warnings = 0; -# CHARACTER_LENGTH() -set sql_warnings = 1; -create table t1 (a varchar(10), b long as (character_length(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` mediumtext AS (character_length(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('text',default); -select * from t1; -a b -text 4 -drop table t1; -set sql_warnings = 0; -# CONCAT_WS() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c varchar(20) as (concat_ws(',',a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` varchar(20) AS (concat_ws(',',a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('value1','value2',default); -select * from t1; -a b c -value1 value2 value1,value2 -drop table t1; -set sql_warnings = 0; -# CONCAT() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c varchar(20) as (concat(a,',',b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` varchar(20) AS (concat(a,',',b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('value1','value2',default); -select * from t1; -a b c -value1 value2 value1,value2 -drop table t1; -set sql_warnings = 0; -# ELT() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c int, d varchar(10) as (elt(c,a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` int(11) DEFAULT NULL, - `d` varchar(10) AS (elt(c,a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('value1','value2',1,default); -insert into t1 values ('value1','value2',2,default); -select * from t1; -a b c d -value1 value2 1 value1 -value1 value2 2 value2 -drop table t1; -set sql_warnings = 0; -# EXPORT_SET() -set sql_warnings = 1; -create table t1 (a int, b varchar(10) as (export_set(a,'1','0','',10))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(10) AS (export_set(a,'1','0','',10)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (6,default); -select * from t1; -a b -6 0110000000 -drop table t1; -set sql_warnings = 0; -# FIELD() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c int as (field('aa',a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` int(11) AS (field('aa',a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('aa','bb',default); -insert into t1 values ('bb','aa',default); -select * from t1; -a b c -aa bb 1 -bb aa 2 -drop table t1; -set sql_warnings = 0; -# FIND_IN_SET() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c int as (find_in_set(a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` int(11) AS (find_in_set(a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('aa','aa,bb,cc',default); -insert into t1 values ('aa','bb,aa,cc',default); -select * from t1; -a b c -aa aa,bb,cc 1 -aa bb,aa,cc 2 -drop table t1; -set sql_warnings = 0; -# FORMAT() -set sql_warnings = 1; -create table t1 (a double, b varchar(20) as (format(a,2))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` double DEFAULT NULL, - `b` varchar(20) AS (format(a,2)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (12332.123456,default); -select * from t1; -a b -12332.123456 12,332.12 -drop table t1; -set sql_warnings = 0; -# HEX() -set sql_warnings = 1; -create table t1 (a int, b varchar(10) as (hex(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(10) AS (hex(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (17,default); -select * from t1; -a b -17 11 -drop table t1; -set sql_warnings = 0; -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (hex(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (hex(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('abc',default); -select * from t1; -a b -abc 616263 -drop table t1; -set sql_warnings = 0; -# INSERT() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c varchar(20) as (insert(a,length(a),length(b),b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` varchar(20) AS (insert(a,length(a),length(b),b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('start,','end',default); -select * from t1; -a b c -start, end startend -drop table t1; -set sql_warnings = 0; -# INSTR() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c int as (instr(a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` int(11) AS (instr(a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('foobarbar,','bar',default); -insert into t1 values ('xbar,','foobar',default); -select * from t1; -a b c -foobarbar, bar 4 -xbar, foobar 0 -drop table t1; -set sql_warnings = 0; -# LCASE() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (lcase(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (lcase(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -select * from t1; -a b -MySQL mysql -drop table t1; -set sql_warnings = 0; -# LEFT() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(5) as (left(a,5))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(5) AS (left(a,5)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('foobarbar',default); -select * from t1; -a b -foobarbar fooba -drop table t1; -set sql_warnings = 0; -# LENGTH() -set sql_warnings = 1; -create table t1 (a varchar(10), b int as (length(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` int(11) AS (length(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('text',default); -select * from t1; -a b -text 4 -drop table t1; -set sql_warnings = 0; -# LIKE -set sql_warnings = 1; -create table t1 (a varchar(10), b bool as (a like 'H%!o' escape '!')); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` tinyint(1) AS (a like 'H%!o' escape '!') VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello',default); -insert into t1 values ('MySQL',default); -select * from t1; -a b -Hello 1 -MySQL 0 -drop table t1; -set sql_warnings = 0; -# LOCATE() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (locate('bar',a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (locate('bar',a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('foobarbar',default); -select * from t1; -a b -foobarbar 4 -drop table t1; -set sql_warnings = 0; -# LOWER() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (lower(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (lower(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -select * from t1; -a b -MySQL mysql -drop table t1; -set sql_warnings = 0; -# LPAD() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (lpad(a,4,' '))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (lpad(a,4,' ')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -insert into t1 values ('M',default); -select * from t1; -a b -MySQL MySQ -M M -drop table t1; -set sql_warnings = 0; -# LTRIM() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (ltrim(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (ltrim(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (' MySQL',default); -insert into t1 values ('MySQL',default); -select * from t1; -a b - MySQL MySQL -MySQL MySQL -drop table t1; -set sql_warnings = 0; -# MAKE_SET() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c int, d varchar(30) as (make_set(c,a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` int(11) DEFAULT NULL, - `d` varchar(30) AS (make_set(c,a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('a','b',1,default); -insert into t1 values ('a','b',3,default); -select * from t1; -a b c d -a b 1 a -a b 3 a,b -drop table t1; -set sql_warnings = 0; -# MID() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (mid(a,1,2))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (mid(a,1,2)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('foobarbar',default); -select * from t1; -a b -foobarbar fo -drop table t1; -set sql_warnings = 0; -# NOT LIKE -set sql_warnings = 1; -create table t1 (a varchar(10), b bool as (a not like 'H%o')); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` tinyint(1) AS (a not like 'H%o') VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello',default); -insert into t1 values ('MySQL',default); -select * from t1; -a b -Hello 0 -MySQL 1 -drop table t1; -set sql_warnings = 0; -# NOT REGEXP -set sql_warnings = 1; -create table t1 (a varchar(10), b bool as (a not regexp 'H.+o')); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` tinyint(1) AS (a not regexp 'H.+o') VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello',default); -insert into t1 values ('hello',default); -select * from t1; -a b -Hello 0 -hello 0 -drop table t1; -set sql_warnings = 0; -# OCTET_LENGTH() -set sql_warnings = 1; -create table t1 (a varchar(10), b int as (octet_length(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` int(11) AS (octet_length(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('text',default); -select * from t1; -a b -text 4 -drop table t1; -set sql_warnings = 0; -# ORD() -set sql_warnings = 1; -create table t1 (a varchar(10), b long as (ord(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` mediumtext AS (ord(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2',default); -select * from t1; -a b -2 50 -drop table t1; -set sql_warnings = 0; -# POSITION() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (position('bar' in a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (position('bar' in a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('foobarbar',default); -select * from t1; -a b -foobarbar 4 -drop table t1; -set sql_warnings = 0; -# QUOTE() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (quote(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (quote(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Don\'t',default); -select * from t1; -a b -Don't 'Don\'t' -drop table t1; -set sql_warnings = 0; -# REGEXP() -set sql_warnings = 1; -create table t1 (a varchar(10), b bool as (a regexp 'H.+o')); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` tinyint(1) AS (a regexp 'H.+o') VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello',default); -insert into t1 values ('hello',default); -select * from t1; -a b -Hello 1 -hello 1 -drop table t1; -set sql_warnings = 0; -# REPEAT() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(30) as (repeat(a,3))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(30) AS (repeat(a,3)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -select * from t1; -a b -MySQL MySQLMySQLMySQL -drop table t1; -set sql_warnings = 0; -# REPLACE() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(30) as (replace(a,'aa','bb'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(30) AS (replace(a,'aa','bb')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('maa',default); -select * from t1; -a b -maa mbb -drop table t1; -set sql_warnings = 0; -# REVERSE() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(30) as (reverse(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(30) AS (reverse(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('maa',default); -select * from t1; -a b -maa aam -drop table t1; -set sql_warnings = 0; -# RIGHT() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (right(a,4))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (right(a,4)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('foobarbar',default); -select * from t1; -a b -foobarbar rbar -drop table t1; -set sql_warnings = 0; -# RLIKE() -set sql_warnings = 1; -create table t1 (a varchar(10), b bool as (a rlike 'H.+o')); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` tinyint(1) AS (a rlike 'H.+o') VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello',default); -insert into t1 values ('MySQL',default); -select * from t1; -a b -Hello 1 -MySQL 0 -drop table t1; -set sql_warnings = 0; -# RPAD() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (rpad(a,4,'??'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (rpad(a,4,'??')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('He',default); -select * from t1; -a b -He He?? -drop table t1; -set sql_warnings = 0; -# RTRIM(); -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (rtrim(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (rtrim(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello ',default); -select * from t1; -a b -Hello Hello -drop table t1; -set sql_warnings = 0; -# SOUNDEX() -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(20) as (soundex(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(20) AS (soundex(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello',default); -select * from t1; -a b -Hello H400 -drop table t1; -set sql_warnings = 0; -# SOUNDS LIKE -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c bool as (a sounds like b)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` tinyint(1) AS (a sounds like b) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello','Hello',default); -insert into t1 values ('Hello','MySQL',default); -insert into t1 values ('Hello','hello',default); -select * from t1; -a b c -Hello Hello 1 -Hello MySQL 0 -Hello hello 1 -drop table t1; -set sql_warnings = 0; -# SPACE() -set sql_warnings = 1; -create table t1 (a varchar(5), b varchar(10) as (concat(a,space(5)))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(5) DEFAULT NULL, - `b` varchar(10) AS (concat(a,space(5))) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello', default); -select * from t1; -a b -Hello Hello -drop table t1; -set sql_warnings = 0; -# STRCMP() -set sql_warnings = 1; -create table t1 (a varchar(9), b varchar(9), c tinyint(1) as (strcmp(a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(9) DEFAULT NULL, - `b` varchar(9) DEFAULT NULL, - `c` tinyint(1) AS (strcmp(a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello','Hello', default); -insert into t1 values ('Hello','Hello1', default); -select * from t1; -a b c -Hello Hello 0 -Hello Hello1 -1 -drop table t1; -set sql_warnings = 0; -# SUBSTR() -set sql_warnings = 1; -create table t1 (a varchar(5), b varchar(10) as (substr(a,2))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(5) DEFAULT NULL, - `b` varchar(10) AS (substr(a,2)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello',default); -select * from t1; -a b -Hello ello -drop table t1; -set sql_warnings = 0; -# SUBSTRING_INDEX() -set sql_warnings = 1; -create table t1 (a varchar(15), b varchar(10) as (substring_index(a,'.',2))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(15) DEFAULT NULL, - `b` varchar(10) AS (substring_index(a,'.',2)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('www.mysql.com',default); -select * from t1; -a b -www.mysql.com www.mysql -drop table t1; -set sql_warnings = 0; -# SUBSTRING() -set sql_warnings = 1; -create table t1 (a varchar(5), b varchar(10) as (substring(a from 2 for 2))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(5) DEFAULT NULL, - `b` varchar(10) AS (substring(a from 2 for 2)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('Hello',default); -select * from t1; -a b -Hello el -drop table t1; -set sql_warnings = 0; -# TRIM() -set sql_warnings = 1; -create table t1 (a varchar(15), b varchar(10) as (trim(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(15) DEFAULT NULL, - `b` varchar(10) AS (trim(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (' aa ',default); -select * from t1; -a b - aa aa -drop table t1; -set sql_warnings = 0; -# UCASE() -set sql_warnings = 1; -create table t1 (a varchar(5), b varchar(10) as (ucase(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(5) DEFAULT NULL, - `b` varchar(10) AS (ucase(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -select * from t1; -a b -MySQL MYSQL -drop table t1; -set sql_warnings = 0; -# UNHEX() -set sql_warnings = 1; -create table t1 (a varchar(15), b varchar(10) as (unhex(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(15) DEFAULT NULL, - `b` varchar(10) AS (unhex(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('4D7953514C',default); -select * from t1; -a b -4D7953514C MySQL -drop table t1; -set sql_warnings = 0; -# UPPER() -set sql_warnings = 1; -create table t1 (a varchar(5), b varchar(10) as (upper(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(5) DEFAULT NULL, - `b` varchar(10) AS (upper(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -select * from t1; -a b -MySQL MYSQL -drop table t1; -set sql_warnings = 0; -# -# CONTROL FLOW FUNCTIONS -# -# CASE -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(16) as (case a when NULL then 'asd' when 'b' then 'B' else a end)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(16) AS (case a when NULL then 'asd' when 'b' then 'B' else a end) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (NULL,default); -insert into t1 values ('b',default); -insert into t1 values ('c',default); -select * from t1; -a b -NULL NULL -b B -c c -drop table t1; -set sql_warnings = 0; -# IF -set sql_warnings = 1; -create table t1 (a int, b int, c int as (if(a=1,a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `c` int(11) AS (if(a=1,a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,2,default); -insert into t1 values (3,4,default); -select * from t1; -a b c -1 2 1 -3 4 4 -drop table t1; -set sql_warnings = 0; -# IFNULL -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c varchar(10) as (ifnull(a,'DEFAULT'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` varchar(10) AS (ifnull(a,'DEFAULT')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (NULL,'adf',default); -insert into t1 values ('a','adf',default); -select * from t1; -a b c -NULL adf DEFAULT -a adf a -drop table t1; -set sql_warnings = 0; -# NULLIF -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10) as (nullif(a,'DEFAULT'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) AS (nullif(a,'DEFAULT')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('DEFAULT',default); -insert into t1 values ('a',default); -select * from t1; -a b -DEFAULT NULL -a a -drop table t1; -set sql_warnings = 0; -# -# OPERATORS -# -# AND, && -set sql_warnings = 1; -create table t1 (a int, b bool as (a>0 && a<2)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` tinyint(1) AS (a>0 && a<2) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (-1,default); -insert into t1 values (1,default); -select * from t1; -a b --1 0 -1 1 -drop table t1; -set sql_warnings = 0; -# BETWEEN ... AND ... -set sql_warnings = 1; -create table t1 (a int, b bool as (a between 0 and 2)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` tinyint(1) AS (a between 0 and 2) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (-1,default); -insert into t1 values (1,default); -select * from t1; -a b --1 0 -1 1 -drop table t1; -set sql_warnings = 0; -# BINARY -set sql_warnings = 1; -create table t1 (a varchar(10), b varbinary(10) as (binary a)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varbinary(10) AS (binary a) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('11',default); -insert into t1 values (1,default); -select * from t1; -a b -11 11 -1 1 -drop table t1; -set sql_warnings = 0; -# & -set sql_warnings = 1; -create table t1 (a int, b int as (a & 5)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a & 5) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (0,default); -select * from t1; -a b -1 1 -0 0 -drop table t1; -set sql_warnings = 0; -# ~ -set sql_warnings = 1; -create table t1 (a int, b int as (~a)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (~a) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -Warnings: -Warning 1264 Out of range value for column 'b' at row 1 -select * from t1; -a b -1 2147483647 -drop table t1; -set sql_warnings = 0; -# | -set sql_warnings = 1; -create table t1 (a int, b int as (a | 5)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a | 5) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (0,default); -insert into t1 values (2,default); -select * from t1; -a b -1 5 -0 5 -2 7 -drop table t1; -set sql_warnings = 0; -# ^ -set sql_warnings = 1; -create table t1 (a int, b int as (a ^ 5)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a ^ 5) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (0,default); -insert into t1 values (2,default); -select * from t1; -a b -1 4 -0 5 -2 7 -drop table t1; -set sql_warnings = 0; -# DIV -set sql_warnings = 1; -create table t1 (a int, b int as (a div 5)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a div 5) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (7,default); -select * from t1; -a b -1 0 -7 1 -drop table t1; -set sql_warnings = 0; -# <=> -set sql_warnings = 1; -create table t1 (a int, b int, c bool as (a <=> b)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `c` tinyint(1) AS (a <=> b) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,1,default); -insert into t1 values (NULL,NULL,default); -insert into t1 values (1,NULL,default); -select * from t1; -a b c -1 1 1 -NULL NULL 1 -1 NULL 0 -drop table t1; -set sql_warnings = 0; -# = -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c bool as (a=b)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` tinyint(1) AS (a=b) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('a','b',default); -insert into t1 values ('a','a',default); -select * from t1; -a b c -a b 0 -a a 1 -drop table t1; -set sql_warnings = 0; -# >= -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c bool as (a >= b)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` tinyint(1) AS (a >= b) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('a','b',default); -insert into t1 values ('a','a',default); -select * from t1; -a b c -a b 0 -a a 1 -drop table t1; -set sql_warnings = 0; -# > -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c bool as (a > b)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` tinyint(1) AS (a > b) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('a','b',default); -insert into t1 values ('a','a',default); -select * from t1; -a b c -a b 0 -a a 0 -drop table t1; -set sql_warnings = 0; -# IS NOT NULL -set sql_warnings = 1; -create table t1 (a int, b bool as (a is not null)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` tinyint(1) AS (a is not null) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (NULL,default); -select * from t1; -a b -1 1 -NULL 0 -drop table t1; -set sql_warnings = 0; -# IS NULL -set sql_warnings = 1; -create table t1 (a int, b bool as (a is null)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` tinyint(1) AS (a is null) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (NULL,default); -select * from t1; -a b -1 0 -NULL 1 -drop table t1; -set sql_warnings = 0; -# << -set sql_warnings = 1; -create table t1 (a int, b int as (a << 2)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a << 2) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (3,default); -select * from t1; -a b -1 4 -3 12 -drop table t1; -set sql_warnings = 0; -# <= -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c bool as (a <= b)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` tinyint(1) AS (a <= b) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('b','a',default); -insert into t1 values ('b','b',default); -insert into t1 values ('b','c',default); -select * from t1; -a b c -b a 0 -b b 1 -b c 1 -drop table t1; -set sql_warnings = 0; -# < -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c bool as (a < b)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` tinyint(1) AS (a < b) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('b','a',default); -insert into t1 values ('b','b',default); -insert into t1 values ('b','c',default); -select * from t1; -a b c -b a 0 -b b 0 -b c 1 -drop table t1; -set sql_warnings = 0; -# NOT BETWEEN ... AND ... -set sql_warnings = 1; -create table t1 (a int, b bool as (a not between 0 and 2)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` tinyint(1) AS (a not between 0 and 2) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (-1,default); -insert into t1 values (1,default); -select * from t1; -a b --1 1 -1 0 -drop table t1; -set sql_warnings = 0; -# <> -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c bool as (a <> b)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` tinyint(1) AS (a <> b) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('b','a',default); -insert into t1 values ('b','b',default); -insert into t1 values ('b','c',default); -select * from t1; -a b c -b a 1 -b b 0 -b c 1 -drop table t1; -set sql_warnings = 0; -# != -set sql_warnings = 1; -create table t1 (a varchar(10), b varchar(10), c bool as (a != b)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(10) DEFAULT NULL, - `b` varchar(10) DEFAULT NULL, - `c` tinyint(1) AS (a != b) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('b','a',default); -insert into t1 values ('b','b',default); -insert into t1 values ('b','c',default); -select * from t1; -a b c -b a 1 -b b 0 -b c 1 -drop table t1; -set sql_warnings = 0; -# ||, OR -set sql_warnings = 1; -create table t1 (a int, b int as (a>5 || a<3)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a>5 || a<3) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (4,default); -select * from t1; -a b -1 1 -4 0 -drop table t1; -set sql_warnings = 0; -# >> -set sql_warnings = 1; -create table t1 (a int, b int as (a >> 2)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a >> 2) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (8,default); -insert into t1 values (3,default); -select * from t1; -a b -8 2 -3 0 -drop table t1; -set sql_warnings = 0; -# XOR -set sql_warnings = 1; -create table t1 (a int, b int as (a xor 5)); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (a xor 5) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (0,default); -insert into t1 values (1,default); -insert into t1 values (2,default); -select * from t1; -a b -0 1 -1 0 -2 0 -drop table t1; -set sql_warnings = 0; -# -# DATE AND TIME FUNCTIONS -# -# ADDDATE() -set sql_warnings = 1; -create table t1 (a datetime, b datetime as (adddate(a,interval 1 month))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime AS (adddate(a,interval 1 month)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 2008-09-30 00:00:00 -drop table t1; -set sql_warnings = 0; -# ADDTIME() -set sql_warnings = 1; -create table t1 (a datetime, b datetime as (addtime(a,'02:00:00'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime AS (addtime(a,'02:00:00')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 2008-08-31 02:00:00 -drop table t1; -set sql_warnings = 0; -# CONVERT_TZ() -set sql_warnings = 1; -create table t1 (a datetime, b datetime as (convert_tz(a,'MET','UTC'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime AS (convert_tz(a,'MET','UTC')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 2008-08-30 22:00:00 -drop table t1; -set sql_warnings = 0; -# DATE_ADD() -set sql_warnings = 1; -create table t1 (a datetime, b datetime as (date_add(a,interval 1 month))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime AS (date_add(a,interval 1 month)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 2008-09-30 00:00:00 -drop table t1; -set sql_warnings = 0; -# DATE_FORMAT() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(64) as (date_format(a,'%W %M %D'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(64) AS (date_format(a,'%W %M %D')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 Sunday August 31st -drop table t1; -set sql_warnings = 0; -# DATE_SUB() -set sql_warnings = 1; -create table t1 (a datetime, b datetime as (date_sub(a,interval 1 month))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime AS (date_sub(a,interval 1 month)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 2008-07-31 00:00:00 -drop table t1; -set sql_warnings = 0; -# DATE() -set sql_warnings = 1; -create table t1 (a datetime, b datetime as (date(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime AS (date(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31 02:00:00',default); -select * from t1; -a b -2008-08-31 02:00:00 2008-08-31 00:00:00 -drop table t1; -set sql_warnings = 0; -# DATEDIFF() -set sql_warnings = 1; -create table t1 (a datetime, b long as (datediff(a,'2000-01-01'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` mediumtext AS (datediff(a,'2000-01-01')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 3165 -drop table t1; -set sql_warnings = 0; -# DAY() -set sql_warnings = 1; -create table t1 (a datetime, b int as (day(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (day(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 31 -drop table t1; -set sql_warnings = 0; -# DAYNAME() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(10) as (dayname(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(10) AS (dayname(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 Sunday -drop table t1; -set sql_warnings = 0; -# DAYOFMONTH() -set sql_warnings = 1; -create table t1 (a datetime, b int as (dayofmonth(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (dayofmonth(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 31 -drop table t1; -set sql_warnings = 0; -# DAYOFWEEK() -set sql_warnings = 1; -create table t1 (a datetime, b int as (dayofweek(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (dayofweek(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 1 -drop table t1; -set sql_warnings = 0; -# DAYOFYEAR() -set sql_warnings = 1; -create table t1 (a datetime, b int as (dayofyear(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (dayofyear(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 244 -drop table t1; -set sql_warnings = 0; -# EXTRACT -set sql_warnings = 1; -create table t1 (a datetime, b int as (extract(year from a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (extract(year from a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 2008 -drop table t1; -set sql_warnings = 0; -# FROM_DAYS() -set sql_warnings = 1; -create table t1 (a long, b datetime as (from_days(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` mediumtext DEFAULT NULL, - `b` datetime AS (from_days(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (730669,default); -select * from t1; -a b -730669 2000-07-03 00:00:00 -drop table t1; -set sql_warnings = 0; -# FROM_UNIXTIME() -set time_zone='UTC'; -set sql_warnings = 1; -create table t1 (a long, b datetime as (from_unixtime(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` mediumtext DEFAULT NULL, - `b` datetime AS (from_unixtime(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1196440219,default); -select * from t1; -a b -1196440219 2007-11-30 16:30:19 -drop table t1; -set sql_warnings = 0; -# GET_FORMAT() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(32) as (date_format(a,get_format(DATE,'EUR')))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(32) AS (date_format(a,get_format(DATE,'EUR'))) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 31.08.2008 -drop table t1; -set sql_warnings = 0; -# HOUR() -set sql_warnings = 1; -create table t1 (a time, b long as (hour(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` time DEFAULT NULL, - `b` mediumtext AS (hour(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('10:05:03',default); -select * from t1; -a b -10:05:03 10 -drop table t1; -set sql_warnings = 0; -# LAST_DAY() -set sql_warnings = 1; -create table t1 (a datetime, b datetime as (last_day(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime AS (last_day(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2003-02-05',default); -insert into t1 values ('2003-02-32',default); -Warnings: -Warning 1265 Data truncated for column 'a' at row 1 -select * from t1; -a b -2003-02-05 00:00:00 2003-02-28 00:00:00 -0000-00-00 00:00:00 NULL -drop table t1; -set sql_warnings = 0; -# MAKEDATE() -set sql_warnings = 1; -create table t1 (a int, b datetime as (makedate(a,1))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` datetime AS (makedate(a,1)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (2001,default); -select * from t1; -a b -2001 2001-01-01 00:00:00 -drop table t1; -set sql_warnings = 0; -# MAKETIME() -set sql_warnings = 1; -create table t1 (a int, b time as (maketime(a,1,3))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` time AS (maketime(a,1,3)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (12,default); -select * from t1; -a b -12 12:01:03 -drop table t1; -set sql_warnings = 0; -# MICROSECOND() -set sql_warnings = 1; -create table t1 (a datetime, b long as (microsecond(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` mediumtext AS (microsecond(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2009-12-31 12:00:00.123456',default); -insert into t1 values ('2009-12-31 23:59:59.000010',default); -select * from t1; -a b -2009-12-31 12:00:00 0 -2009-12-31 23:59:59 0 -drop table t1; -set sql_warnings = 0; -# MINUTE() -set sql_warnings = 1; -create table t1 (a datetime, b int as (minute(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (minute(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2009-12-31 23:59:59.000010',default); -select * from t1; -a b -2009-12-31 23:59:59 59 -drop table t1; -set sql_warnings = 0; -# MONTH() -set sql_warnings = 1; -create table t1 (a datetime, b int as (month(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (month(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2009-12-31 23:59:59.000010',default); -select * from t1; -a b -2009-12-31 23:59:59 12 -drop table t1; -set sql_warnings = 0; -# MONTHNAME() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(16) as (monthname(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(16) AS (monthname(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2009-12-31 23:59:59.000010',default); -select * from t1; -a b -2009-12-31 23:59:59 December -drop table t1; -set sql_warnings = 0; -# PERIOD_ADD() -set sql_warnings = 1; -create table t1 (a int, b int as (period_add(a,2))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (period_add(a,2)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (200801,default); -select * from t1; -a b -200801 200803 -drop table t1; -set sql_warnings = 0; -# PERIOD_DIFF() -set sql_warnings = 1; -create table t1 (a int, b int, c int as (period_diff(a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL, - `c` int(11) AS (period_diff(a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (200802,200703,default); -select * from t1; -a b c -200802 200703 11 -drop table t1; -set sql_warnings = 0; -# QUARTER() -set sql_warnings = 1; -create table t1 (a datetime, b int as (quarter(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (quarter(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 3 -drop table t1; -set sql_warnings = 0; -# SEC_TO_TIME() -set sql_warnings = 1; -create table t1 (a long, b time as (sec_to_time(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` mediumtext DEFAULT NULL, - `b` time AS (sec_to_time(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (2378,default); -select * from t1; -a b -2378 00:39:38 -drop table t1; -set sql_warnings = 0; -# SECOND() -set sql_warnings = 1; -create table t1 (a datetime, b int as (second(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (second(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('10:05:03',default); -select * from t1; -a b -2010-05-03 00:00:00 0 -drop table t1; -set sql_warnings = 0; -# STR_TO_DATE() -set sql_warnings = 1; -create table t1 (a varchar(64), b datetime as (str_to_date(a,'%m/%d/%Y'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(64) DEFAULT NULL, - `b` datetime AS (str_to_date(a,'%m/%d/%Y')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('04/30/2004',default); -select * from t1; -a b -04/30/2004 2004-04-30 00:00:00 -drop table t1; -set sql_warnings = 0; -# SUBDATE() -set sql_warnings = 1; -create table t1 (a datetime, b datetime as (subdate(a,interval 1 month))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime AS (subdate(a,interval 1 month)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 2008-07-31 00:00:00 -drop table t1; -set sql_warnings = 0; -# SUBTIME() -set sql_warnings = 1; -create table t1 (a datetime, b datetime as (subtime(a,'02:00:00'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime AS (subtime(a,'02:00:00')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31',default); -select * from t1; -a b -2008-08-31 00:00:00 2008-08-30 22:00:00 -drop table t1; -set sql_warnings = 0; -# TIME_FORMAT() -set sql_warnings = 1; -create table t1 (a datetime, b varchar(32) as (time_format(a,'%r'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` varchar(32) AS (time_format(a,'%r')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31 02:03:04',default); -select * from t1; -a b -2008-08-31 02:03:04 02:03:04 AM -drop table t1; -set sql_warnings = 0; -# TIME_TO_SEC() -set sql_warnings = 1; -create table t1 (a time, b long as (time_to_sec(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` time DEFAULT NULL, - `b` mediumtext AS (time_to_sec(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('22:23:00',default); -select * from t1; -a b -22:23:00 80580 -drop table t1; -set sql_warnings = 0; -# TIME() -set sql_warnings = 1; -create table t1 (a datetime, b time as (time(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` time AS (time(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-08-31 02:03:04',default); -select * from t1; -a b -2008-08-31 02:03:04 02:03:04 -drop table t1; -set sql_warnings = 0; -# TIMEDIFF() -set sql_warnings = 1; -create table t1 (a datetime, b datetime, c long as (timediff(a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` datetime DEFAULT NULL, - `c` mediumtext AS (timediff(a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',default); -select * from t1; -a b c -2008-12-31 23:59:59 2008-12-30 01:01:01 46:58:58 -drop table t1; -set sql_warnings = 0; -# TIMESTAMP() -set sql_warnings = 1; -create table t1 (a datetime, b timestamp as (timestamp(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` timestamp AS (timestamp(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-12-31',default); -select * from t1; -a b -2008-12-31 00:00:00 2008-12-31 00:00:00 -drop table t1; -set sql_warnings = 0; -# TIMESTAMPADD() -set sql_warnings = 1; -create table t1 (a datetime, b timestamp as (timestampadd(minute,1,a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` timestamp AS (timestampadd(minute,1,a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2003-01-02',default); -select * from t1; -a b -2003-01-02 00:00:00 2003-01-02 00:01:00 -drop table t1; -set sql_warnings = 0; -# TIMESTAMPDIFF() -set sql_warnings = 1; -create table t1 (a timestamp, b timestamp, c long as (timestampdiff(MONTH, a,b))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `b` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - `c` mediumtext AS (timestampdiff(MONTH, a,b)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2003-02-01','2003-05-01',default); -select * from t1; -a b c -2003-02-01 00:00:00 2003-05-01 00:00:00 3 -drop table t1; -set sql_warnings = 0; -# TO_DAYS() -set sql_warnings = 1; -create table t1 (a datetime, b long as (to_days(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` mediumtext AS (to_days(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2007-10-07',default); -select * from t1; -a b -2007-10-07 00:00:00 733321 -drop table t1; -set sql_warnings = 0; -# WEEK() -set sql_warnings = 1; -create table t1 (a datetime, b int as (week(a,0))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (week(a,0)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-09-01',default); -select * from t1; -a b -2008-09-01 00:00:00 35 -drop table t1; -set sql_warnings = 0; -# WEEKDAY() -set sql_warnings = 1; -create table t1 (a datetime, b int as (weekday(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (weekday(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-09-01',default); -select * from t1; -a b -2008-09-01 00:00:00 0 -drop table t1; -set sql_warnings = 0; -# WEEKOFYEAR() -set sql_warnings = 1; -create table t1 (a datetime, b int as (weekofyear(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (weekofyear(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-09-01',default); -select * from t1; -a b -2008-09-01 00:00:00 36 -drop table t1; -set sql_warnings = 0; -# YEAR() -set sql_warnings = 1; -create table t1 (a datetime, b int as (year(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (year(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-09-01',default); -select * from t1; -a b -2008-09-01 00:00:00 2008 -drop table t1; -set sql_warnings = 0; -# YEARWEEK() -set sql_warnings = 1; -create table t1 (a datetime, b int as (yearweek(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` datetime DEFAULT NULL, - `b` int(11) AS (yearweek(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('2008-09-01',default); -select * from t1; -a b -2008-09-01 00:00:00 200835 -drop table t1; -set sql_warnings = 0; -# -# FULL TEXT SEARCH FUNCTIONS -# -# None. -# -# CAST FUNCTIONS AND OPERATORS -# -# CAST() -set sql_warnings = 1; -create table t1 (a int, b long as (cast(a as unsigned))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` mediumtext AS (cast(a as unsigned)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (-1,default); -Warnings: -Note 1105 Cast to unsigned converted negative integer to it's positive complement -select * from t1; -a b -1 1 --1 18446744073709551615 -Warnings: -Note 1105 Cast to unsigned converted negative integer to it's positive complement -Note 1105 Cast to unsigned converted negative integer to it's positive complement -drop table t1; -set sql_warnings = 0; -# Convert() -set sql_warnings = 1; -create table t1 (a int, b long as (convert(a,unsigned))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` mediumtext AS (convert(a,unsigned)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (1,default); -insert into t1 values (-1,default); -Warnings: -Note 1105 Cast to unsigned converted negative integer to it's positive complement -select * from t1; -a b -1 1 --1 18446744073709551615 -Warnings: -Note 1105 Cast to unsigned converted negative integer to it's positive complement -Note 1105 Cast to unsigned converted negative integer to it's positive complement -drop table t1; -set sql_warnings = 0; -# -# XML FUNCTIONS -# -# None. -# -# OTHER FUNCTIONS -# -# AES_DECRYPT(), AES_ENCRYPT() -set sql_warnings = 1; -create table t1 (a varchar(1024), b varchar(1024) as (aes_encrypt(aes_decrypt(a,'adf'),'adf'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT NULL, - `b` varchar(1024) AS (aes_encrypt(aes_decrypt(a,'adf'),'adf')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -select * from t1; -a b -MySQL NULL -drop table t1; -set sql_warnings = 0; -# BIT_COUNT() -set sql_warnings = 1; -create table t1 (a int, b int as (bit_count(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) AS (bit_count(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values (5,default); -select * from t1; -a b -5 2 -drop table t1; -set sql_warnings = 0; -# COMPRESS(), UNCOMPRESS() -set sql_warnings = 1; -create table t1 (a varchar(1024), b varchar(1024) as (uncompress(compress(a)))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT NULL, - `b` varchar(1024) AS (uncompress(compress(a))) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -select * from t1; -a b -MySQL MySQL -drop table t1; -set sql_warnings = 0; -# ENCODE(), DECODE() -set sql_warnings = 1; -create table t1 (a varchar(1024), b varchar(1024) as (decode(encode(a,'abc'),'abc'))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT NULL, - `b` varchar(1024) AS (decode(encode(a,'abc'),'abc')) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('MySQL',default); -select * from t1; -a b -MySQL MySQL -drop table t1; -set sql_warnings = 0; -# DEFAULT() -set sql_warnings = 1; -create table t1 (a varchar(1024) default 'aaa', b varchar(1024) as (ifnull(a,default(a)))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT 'aaa', - `b` varchar(1024) AS (ifnull(a,default(a))) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('any value',default); -select * from t1; -a b -any value any value -drop table t1; -set sql_warnings = 0; -# INET_ATON(), INET_NTOA() -set sql_warnings = 1; -create table t1 (a varchar(1024), b varchar(1024) as (inet_ntoa(inet_aton(a)))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT NULL, - `b` varchar(1024) AS (inet_ntoa(inet_aton(a))) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('127.0.0.1',default); -select * from t1; -a b -127.0.0.1 127.0.0.1 -drop table t1; -set sql_warnings = 0; -# MD5() -set sql_warnings = 1; -create table t1 (a varchar(1024), b varbinary(32) as (md5(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT NULL, - `b` varbinary(32) AS (md5(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('testing',default); -select * from t1; -a b -testing ae2b1fca515949e5d54fb22b8ed95575 -drop table t1; -set sql_warnings = 0; -# OLD_PASSWORD() -set sql_warnings = 1; -create table t1 (a varchar(1024), b varchar(1024) as (old_password(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT NULL, - `b` varchar(1024) AS (old_password(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('badpwd',default); -select * from t1; -a b -badpwd 7f84554057dd964b -drop table t1; -set sql_warnings = 0; -# PASSWORD() -set sql_warnings = 1; -create table t1 (a varchar(1024), b varchar(1024) as (password(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT NULL, - `b` varchar(1024) AS (password(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('badpwd',default); -select * from t1; -a b -badpwd *AAB3E285149C0135D51A520E1940DD3263DC008C -drop table t1; -set sql_warnings = 0; -# SHA1() -set sql_warnings = 1; -create table t1 (a varchar(1024), b varchar(1024) as (sha1(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT NULL, - `b` varchar(1024) AS (sha1(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('abc',default); -select * from t1; -a b -abc a9993e364706816aba3e25717850c26c9cd0d89d -drop table t1; -set sql_warnings = 0; -# SHA() -set sql_warnings = 1; -create table t1 (a varchar(1024), b varchar(1024) as (sha(a))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` varchar(1024) DEFAULT NULL, - `b` varchar(1024) AS (sha(a)) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('abc',default); -select * from t1; -a b -abc a9993e364706816aba3e25717850c26c9cd0d89d -drop table t1; -set sql_warnings = 0; -# UNCOMPRESSED_LENGTH() -set sql_warnings = 1; -create table t1 (a char, b varchar(1024) as (uncompressed_length(compress(repeat(a,30))))); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` char(1) DEFAULT NULL, - `b` varchar(1024) AS (uncompressed_length(compress(repeat(a,30)))) VIRTUAL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -insert into t1 values ('a',default); -select * from t1; -a b -a 30 -drop table t1; -set sql_warnings = 0; diff --git a/mysql-test/suite/vcol/r/vcol_view_innodb.result b/mysql-test/suite/vcol/r/vcol_view_innodb.result index c9a4897e230..43ade0dddaf 100644 --- a/mysql-test/suite/vcol/r/vcol_view_innodb.result +++ b/mysql-test/suite/vcol/r/vcol_view_innodb.result @@ -270,11 +270,11 @@ c int as (-a) persistent); create view v1 as select * from t1 where b > -2 && c >-2 with check option; insert into v1 (a) values (1); insert into v1 (a) values (3); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' insert ignore into v1 (a) values (2),(3),(0); Warnings: -Warning 1369 CHECK OPTION failed 'test.v1' -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1; a b c 1 -1 -1 diff --git a/mysql-test/suite/vcol/r/vcol_view_myisam.result b/mysql-test/suite/vcol/r/vcol_view_myisam.result index e3fb2ec61ca..acd3389e170 100644 --- a/mysql-test/suite/vcol/r/vcol_view_myisam.result +++ b/mysql-test/suite/vcol/r/vcol_view_myisam.result @@ -270,11 +270,11 @@ c int as (-a) persistent); create view v1 as select * from t1 where b > -2 && c >-2 with check option; insert into v1 (a) values (1); insert into v1 (a) values (3); -ERROR HY000: CHECK OPTION failed 'test.v1' +ERROR HY000: CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' insert ignore into v1 (a) values (2),(3),(0); Warnings: -Warning 1369 CHECK OPTION failed 'test.v1' -Warning 1369 CHECK OPTION failed 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' +Warning 1369 CONSTRAINT 'WITH CHECK OPTION' failed for 'test.v1' select * from t1; a b c 1 -1 -1 diff --git a/mysql-test/suite/vcol/t/not_supported.test b/mysql-test/suite/vcol/t/not_supported.test index 70b9dea69fd..4cfc97a1be1 100644 --- a/mysql-test/suite/vcol/t/not_supported.test +++ b/mysql-test/suite/vcol/t/not_supported.test @@ -16,24 +16,26 @@ create table t1 (a int, b int, v decimal(20,19) as (a/3)); --error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED create table t2 (a int, b int, v int as (a+@a)); --error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED -create table t3 (a int, b int, v int as (a+@@error_count)); +create table t2 (a int, b int, v int as (a+@a) PERSISTENT); +create table t3_ok (a int, b int, v int as (a+@@error_count)); +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create table t3 (a int, b int, v int as (a+@@error_count) PERSISTENT); --error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED create table t4 (a int, b int, v int as (@a:=a)); +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create table t4 (a int, b int, v int as (@a:=a) PERSISTENT); +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED create table t5 (a int, b int, v varchar(100) as (monthname(a))); +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED create table t6 (a int, b int, v varchar(100) as (dayname(a))); +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED create table t7 (a int, b int, v varchar(100) as (date_format(a, '%W %a %M %b'))); create table t8 (a int, b int, v varchar(100) as (from_unixtime(a))); insert t1 (a,b) values (1,2); -insert t5 (a,b) values (20141010,2); -insert t6 (a,b) values (20141010,2); -insert t7 (a,b) values (20141010,2); insert t8 (a,b) values (1234567890,2); select * from t1; -select * from t5; -select * from t6; -select * from t7; select * from t8; disconnect con1; @@ -41,18 +43,11 @@ connection default; set time_zone='+1:00'; select * from t1; -select * from t5; -select * from t6; -select * from t7; select * from t8; flush tables; select * from t1; -select * from t5; -select * from t6; -select * from t7; select * from t8; -drop table t1, t5, t6, t7, t8; - +drop table t1, t3_ok, t8; diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_myisam.test b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test index d8eddb4ef15..3e9e5936476 100644 --- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs.test @@ -39,7 +39,7 @@ eval SET @@session.storage_engine = 'MyISAM'; #------------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines ---source suite/vcol/inc/vcol_blocked_sql_funcs_main.inc +--source vcol_blocked_sql_funcs_main.inc #------------------------------------------------------------------------------# # Execute storage engine specific tests diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test deleted file mode 100644 index 516e121a2aa..00000000000 --- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_innodb.test +++ /dev/null @@ -1,52 +0,0 @@ -################################################################################ -# t/vcol_supported_sql_funcs.test # -# # -# Purpose: # -# Test SQL functions not allowed for virtual columns # -# InnoDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: Andrey Zhakov # -# Original Date: 2008-08-31 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source suite/vcol/inc/vcol_init_vars.pre - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/vcol/inc/vcol_cleanup.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested -# Set the session storage engine ---source include/have_innodb.inc -eval SET @@session.storage_engine = 'InnoDB'; - -let $skip_full_text_checks = 1; - -##### Workarounds for known open engine specific bugs -# none - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/vcol/inc/vcol_blocked_sql_funcs_main.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/vcol/inc/vcol_cleanup.inc diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc new file mode 100644 index 00000000000..625a40aca54 --- /dev/null +++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc @@ -0,0 +1,381 @@ +################################################################################ +# inc/vcol_blocked_sql_funcs_main.inc # +# # +# Purpose: # +# Tests around sql functions # +# # +# # +#------------------------------------------------------------------------------# +# Original Author: Andrey Zhakov # +# Original Date: 2008-08-31 # +# Change Author: Oleksandr Byelkin (Monty program Ab) +# Date: 2009-03-24 +# Change: Syntax changed +################################################################################ + +# +# NOTE: All SQL functions should be rejected, otherwise BUG. +# As PERSISTANT has higher level checks than VIRTUAL, we use VIRTUAL +# to check for things that should not work for either VIRTUAL or PERSISTENT +# + +--echo # RAND() +create or replace table t1 (b double as (rand())); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (b double as (rand()) PERSISTENT); + +--echo # LOAD_FILE() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(64), b varchar(1024) as (load_file(a))); + +--echo # CURDATE() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime as (curdate()) PERSISTENT); + +--echo # CURRENT_DATE(), CURRENT_DATE +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime as (current_date) PERSISTENT); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime as (current_date()) PERSISTENT); + +--echo # CURRENT_TIME(), CURRENT_TIME +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime as (current_time) PERSISTENT); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime as (current_time()) PERSISTENT); + +--echo # CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime as (current_timestamp()) PERSISTENT); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime as (current_timestamp) PERSISTENT); + +--echo # CURTIME() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime as (curtime()) PERSISTENT); + +--echo # LOCALTIME(), LOCALTIME +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b varchar(10) as (localtime()) PERSISTENT); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b varchar(10) as (localtime) PERSISTENT); + +--echo # LOCALTIMESTAMP, LOCALTIMESTAMP()(v4.0.6) +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b varchar(10) as (localtimestamp()) PERSISTENT); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b varchar(10) as (localtimestamp) PERSISTENT); + +--echo # NOW() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b varchar(10) as (now()) PERSISTENT); + +--echo # SYSDATE() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b varchar(10) as (sysdate()) PERSISTENT); + +--echo # UNIX_TIMESTAMP() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b datetime as (unix_timestamp()) PERSISTENT); + +--echo # UTC_DATE() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b datetime as (utc_date()) PERSISTENT); + +--echo # UTC_TIME() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b datetime as (utc_time()) PERSISTENT); + +--echo # UTC_TIMESTAMP() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b datetime as (utc_timestamp()) PERSISTENT); + +--echo # WEEK() - one argument version +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b datetime as (week(a)) PERSISTENT); + +--echo # MATCH() +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED + create or replace table t1 (a varchar(32), b bool as (match a against ('sample text')) PERSISTENT); + +--echo # BENCHMARK() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024), b varchar(1024) as (benchmark(a,3))); + +--echo # CHARSET() +create or replace table t1 (a varchar(64), b varchar(64) as (charset(a)) PERSISTENT); + +--echo # COERCIBILITY() +create or replace table t1 (a varchar(64), b int as (coercibility(a)) PERSISTENT); + +--echo # COLLATION() +create or replace table t1 (a varchar(64), b varchar(64) as (collation(a)) PERSISTENT); + +--echo # CONNECTION_ID() +create or replace table t1 (a int as (connection_id())); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int as (connection_id()) PERSISTENT); + +--echo # CURRENT_USER(), CURRENT_USER +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32) as (current_user())); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32) as (current_user()) PERSISTENT); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32) as (current_user) PERSISTENT); + +--echo # DATABASE() +create or replace table t1 (a varchar(32) as (database())); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024), b varchar(1024) as (database()) PERSISTENT); + +--echo # FOUND_ROWS() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024), b varchar(1024) as (found_rows())); + +--echo # GET_LOCK() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024), b varchar(1024) as (get_lock(a,10))); + +--echo # IS_FREE_LOCK() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024), b varchar(1024) as (is_free_lock(a))); + +--echo # IS_USED_LOCK() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024), b varchar(1024) as (is_used_lock(a))); + +--echo # LAST_INSERT_ID() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int as (last_insert_id())); + +--echo # MASTER_POS_WAIT() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32), b int as (master_pos_wait(a,0,2))); + +--echo # NAME_CONST() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32) as (name_const('test',1))); + +--echo # RELEASE_LOCK() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32), b int as (release_lock(a))); + +--echo # ROW_COUNT() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int as (row_count())); + +--echo # SCHEMA() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32) as (schema()) PERSISTENT); + +--echo # SESSION_USER() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32) as (session_user()) PERSISTENT); + +--echo # SLEEP() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (sleep(a))); + +--echo # SYSTEM_USER() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32) as (system_user()) PERSISTENT); + +--echo # USER() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024), b varchar(1024) as (user()) PERSISTENT); + +--echo # UUID_SHORT() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024) as (uuid_short()) PERSISTENT); + +--echo # UUID() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024) as (uuid()) PERSISTENT); + +--echo # VALUES() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024), b varchar(1024) as (values(a))); + +--echo # VERSION() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(1024), b varchar(1024) as (version()) PERSISTENT); + +--echo # ENCRYPT() +create or replace table t1 (a varchar(1024), b varchar(1024) as (encrypt(a)) PERSISTENT); + +--echo # DATE_FORMAT() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a datetime, b varchar(64) as (date_format(a,'%W %M %D')); + +--echo # Stored procedures + +delimiter //; +create procedure p1() +begin + select current_user(); +end // + +create function f1() +returns int +begin + return 1; +end // + +delimiter ;// + +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int as (p1()) PERSISTENT); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int as (f1()) PERSISTENT); + +drop procedure p1; +drop function f1; + +--echo # Unknown functions +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int as (f1()) PERSISTENT); + +--echo # +--echo # GROUP BY FUNCTIONS +--echo # + +--echo # AVG() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (avg(a))); + +--echo # BIT_AND() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (bit_and(a))); + +--echo # BIT_OR() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (bit_or(a))); + +--echo # BIT_XOR() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (bit_xor(a))); + +--echo # COUNT(DISTINCT) +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (count(distinct a))); + +--echo # COUNT() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (count(a))); + +--echo # GROUP_CONCAT() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a varchar(32), b int as (group_concat(a,''))); + +--echo # MAX() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (max(a))); + +--echo # MIN() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (min(a))); + +--echo # STD() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (std(a))); + +--echo # STDDEV_POP() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (stddev_pop(a))); + +--echo # STDDEV_SAMP() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (stddev_samp(a))); + +--echo # STDDEV() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (stddev(a))); + +--echo # SUM() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (sum(a))); + +--echo # VAR_POP() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (var_pop(a))); + +--echo # VAR_SAMP() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (var_samp(a))); + +--echo # VARIANCE() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (variance(a))); + +--echo # DAYNAME() +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b varchar(10) as (dayname(a))); + +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b varchar(10) as (monthname(a))); + +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b varchar(10) as (date_format("1963-01-01","%d.%m.%Y"))); + +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b varchar(10) as (time_format(now(),"%d.%m.%Y"))); + +--echo # +--echo # XML FUNCTIONS +--echo # + +--echo # ExtractValue() +create or replace table t1 (a varchar(1024), b varchar(1024) as (ExtractValue(a,'//b[$@j]')) PERSISTENT); + +--echo # UpdateXML() +create or replace table t1 (a varchar(1024), b varchar(1024) as (UpdateXML(a,'/a','<e>fff</e>')) PERSISTENT); + +--echo # +--echo # Sub-selects +--echo # + +create or replace table t1 (a int); +-- error ER_PARSE_ERROR +create or replace table t2 (a int, b int as (select count(*) from t1)); +drop table t1; + +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as ((select 1))); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (a+(select 1))); + +--echo # +--echo # SP functions +--echo # + +--disable_warnings +drop function if exists sub1; +--enable_warnings +create function sub1(i int) returns int deterministic + return i+1; +select sub1(1); +-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a int, b int as (a+sub3(1))); +drop function sub1; + +--echo # +--echo # Long expression + +let $tmp_long_string = `SELECT repeat('a',240)`; +eval create or replace table t1 (a int, b varchar(300) as (concat(a,'$tmp_long_string'))); +drop table t1; +let $tmp_long_string = `SELECT repeat('a',243)`; +eval create or replace table t1 (a int, b varchar(16384) as (concat(a,'$tmp_long_string'))); + +--disable_query_log +let $tmp_long_string = `SELECT repeat('a',65535)`; +--error ER_TOO_MANY_FIELDS +eval create or replace table t1 (a int, b varchar(16384) as (concat(a,'$tmp_long_string'))); +--enable_query_log + +--echo # +--echo # Constant expression +create or replace table t1 (a int as (PI()) PERSISTENT); + +drop table if exists t1; diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index c78093bce0f..4ca9562221c 100644 --- a/mysql-test/suite/vcol/t/vcol_misc.test +++ b/mysql-test/suite/vcol/t/vcol_misc.test @@ -26,7 +26,7 @@ drop table t1; # Bug#604549: Expression for virtual column returns row # --- error ER_ROW_EXPR_FOR_VCOL +-- error ER_OPERAND_COLUMNS CREATE TABLE t1 ( a int NOT NULL DEFAULT '0', v double AS ((1, a)) VIRTUAL @@ -279,9 +279,12 @@ drop table t1; --echo # MDEV-5611: self-referencing virtual column --echo # ---error ER_VCOL_BASED_ON_VCOL +--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD create table t1 (a int, b int as (b is null) virtual); +create table t1 (a int as (1+1), b int as (a is null) virtual); +drop table t1; + --echo # end of 5.3 tests # diff --git a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_myisam.test b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test index aa5833451c6..d1e21af059b 100644 --- a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_myisam.test +++ b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs.test @@ -39,7 +39,7 @@ eval SET @@session.storage_engine = 'MyISAM'; #------------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines ---source suite/vcol/inc/vcol_supported_sql_funcs_main.inc +--source vcol_supported_sql_funcs_main.inc #------------------------------------------------------------------------------# # Execute storage engine specific tests diff --git a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test deleted file mode 100644 index 53826a460a7..00000000000 --- a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_innodb.test +++ /dev/null @@ -1,50 +0,0 @@ -################################################################################ -# t/vcol_supported_sql_funcs.test # -# # -# Purpose: # -# Test SQL functions allowed for virtual columns # -# InnoDB branch # -# # -#------------------------------------------------------------------------------# -# Original Author: Andrey Zhakov # -# Original Date: 2008-08-31 # -# Change Author: # -# Change Date: # -# Change: # -################################################################################ - -# -# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE ! -# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN -# THE SOURCED FILES ONLY. -# - -#------------------------------------------------------------------------------# -# General not engine specific settings and requirements ---source suite/vcol/inc/vcol_init_vars.pre - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/vcol/inc/vcol_cleanup.inc - -#------------------------------------------------------------------------------# -# Engine specific settings and requirements - -##### Storage engine to be tested -# Set the session storage engine ---source include/have_innodb.inc -SET @@session.storage_engine = 'InnoDB'; - -##### Workarounds for known open engine specific bugs -# none - -#------------------------------------------------------------------------------# -# Execute the tests to be applied to all storage engines ---source suite/vcol/inc/vcol_supported_sql_funcs_main.inc - -#------------------------------------------------------------------------------# -# Execute storage engine specific tests - -#------------------------------------------------------------------------------# -# Cleanup ---source suite/vcol/inc/vcol_cleanup.inc diff --git a/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc index 38f2b00a1a0..cf3183d979d 100644 --- a/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs_main.inc +++ b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc @@ -842,12 +842,6 @@ let $values1 = '2008-08-31',default; let $rows = 1; --source suite/vcol/inc/vcol_supported_sql_funcs.inc ---echo # DATE_FORMAT() -let $cols = a datetime, b varchar(64) as (date_format(a,'%W %M %D')); -let $values1 = '2008-08-31',default; -let $rows = 1; ---source suite/vcol/inc/vcol_supported_sql_funcs.inc - --echo # DATE_SUB() let $cols = a datetime, b datetime as (date_sub(a,interval 1 month)); let $values1 = '2008-08-31',default; @@ -872,12 +866,6 @@ let $values1 = '2008-08-31',default; let $rows = 1; --source suite/vcol/inc/vcol_supported_sql_funcs.inc ---echo # DAYNAME() -let $cols = a datetime, b varchar(10) as (dayname(a)); -let $values1 = '2008-08-31',default; -let $rows = 1; ---source suite/vcol/inc/vcol_supported_sql_funcs.inc - --echo # DAYOFMONTH() let $cols = a datetime, b int as (dayofmonth(a)); let $values1 = '2008-08-31',default; @@ -915,12 +903,6 @@ let $rows = 1; set time_zone='UTC'; --source suite/vcol/inc/vcol_supported_sql_funcs.inc ---echo # GET_FORMAT() -let $cols = a datetime, b varchar(32) as (date_format(a,get_format(DATE,'EUR'))); -let $values1 = '2008-08-31',default; -let $rows = 1; ---source suite/vcol/inc/vcol_supported_sql_funcs.inc - --echo # HOUR() let $cols = a time, b long as (hour(a)); let $values1 = '10:05:03',default; @@ -965,12 +947,6 @@ let $values1 = '2009-12-31 23:59:59.000010',default; let $rows = 1; --source suite/vcol/inc/vcol_supported_sql_funcs.inc ---echo # MONTHNAME() -let $cols = a datetime, b varchar(16) as (monthname(a)); -let $values1 = '2009-12-31 23:59:59.000010',default; -let $rows = 1; ---source suite/vcol/inc/vcol_supported_sql_funcs.inc - --echo # PERIOD_ADD() let $cols = a int, b int as (period_add(a,2)); let $values1 = 200801,default; @@ -1019,12 +995,6 @@ let $values1 = '2008-08-31',default; let $rows = 1; --source suite/vcol/inc/vcol_supported_sql_funcs.inc ---echo # TIME_FORMAT() -let $cols = a datetime, b varchar(32) as (time_format(a,'%r')); -let $values1 = '2008-08-31 02:03:04',default; -let $rows = 1; ---source suite/vcol/inc/vcol_supported_sql_funcs.inc - --echo # TIME_TO_SEC() let $cols = a time, b long as (time_to_sec(a)); let $values1 = '22:23:00',default; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 8f4b3ee2fb7..7811de0f9f7 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -1455,6 +1455,8 @@ ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= SHARED; ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= EXCLUSIVE; --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= NONE; +--error ER_ALTER_OPERATION_NOT_SUPPORTED +ALTER ONLINE TABLE m1 ADD COLUMN c int; # This works because the lock will be SNW for the copy phase. # It will still require exclusive lock for actually enabling keys. ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= SHARED; diff --git a/mysql-test/t/check_constraint.test b/mysql-test/t/check_constraint.test new file mode 100644 index 00000000000..45b85436ec4 --- /dev/null +++ b/mysql-test/t/check_constraint.test @@ -0,0 +1,54 @@ +# +# Check of check constraints + +set @save_check_constraint=@@check_constraint_checks; + +create table t1 (a int check(a>10), b int check (b > 20), constraint `min` check (a+b > 100), constraint `max` check (a+b <500)) engine=myisam; +show create table t1; +insert into t1 values (100,100); +--error ER_CONSTRAINT_FAILED +insert into t1 values (1,1); +--error ER_CONSTRAINT_FAILED +insert into t1 values (20,1); +--error ER_CONSTRAINT_FAILED +insert into t1 values (20,30); +--error ER_CONSTRAINT_FAILED +insert into t1 values (500,500); + +--error ER_CONSTRAINT_FAILED +insert into t1 values (101,101),(102,102),(600,600),(103,103); +select * from t1; +truncate table t1; +insert ignore into t1 values (101,101),(102,102),(600,600),(103,103); +select * from t1; +set check_constraint_checks=0; +truncate table t1; +insert into t1 values (101,101),(102,102),(600,600),(103,103); +select * from t1; +set check_constraint_checks=@save_check_constraint; + +--replace_regex /failed for.*/failed for table/ +--error ER_CONSTRAINT_FAILED +alter table t1 add c int default 0 check (c < 10); + +set check_constraint_checks=0; +alter table t1 add c int default 0 check (c < 10); +alter table t1 add check (a+b+c < 500); +set check_constraint_checks=@save_check_constraint; + +show create table t1; +--error ER_CONSTRAINT_FAILED +insert into t1 values(105,105,105); +--error ER_CONSTRAINT_FAILED +insert into t1 values(249,249,9); +insert into t1 values(105,105,9); +select * from t1; + +create table t2 like t1; +show create table t2; +--error ER_CANT_DROP_FIELD_OR_KEY +alter table t2 drop constraint c; +alter table t2 drop constraint min; +show create table t2; + +drop table t1,t2; diff --git a/mysql-test/t/constraints.test b/mysql-test/t/constraints.test index 70a95e5f16e..e24039cc2ac 100644 --- a/mysql-test/t/constraints.test +++ b/mysql-test/t/constraints.test @@ -7,18 +7,25 @@ drop table if exists t1; --enable_warnings create table t1 (a int check (a>0)); +show create table t1; insert into t1 values (1); +--error ER_CONSTRAINT_FAILED insert into t1 values (0); drop table t1; create table t1 (a int, b int, check (a>b)); +show create table t1; insert into t1 values (1,0); +--error ER_CONSTRAINT_FAILED insert into t1 values (0,1); drop table t1; create table t1 (a int ,b int, constraint abc check (a>b)); +show create table t1; insert into t1 values (1,0); +--error ER_CONSTRAINT_FAILED insert into t1 values (0,1); drop table t1; create table t1 (a int null); +show create table t1; insert into t1 values (1),(NULL); drop table t1; create table t1 (a int null); diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test index 17f4383ae22..5e1805f8a54 100644 --- a/mysql-test/t/default.test +++ b/mysql-test/t/default.test @@ -183,3 +183,680 @@ DROP TABLE IF EXISTS t1; --echo # --echo # End of 10.1 tests --echo # + +--echo # +--echo # Start of 10.2 tests +--echo # + +--echo +--echo Check that CURRENT_TIMESTAMP works as before +--echo + +CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; + +CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(2) ON UPDATE CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; + +CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT SYSDATE(2) ON UPDATE CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; + +drop table t1; + +--echo +--echo Check default expressions +--echo + +create or replace table t1 (a int default 1, b int default a+1, c int default a+b) engine myisam; +show create table t1; +insert into t1 values (); +insert into t1 (a) values (2); +insert into t1 (a,b) values (10,20); +insert into t1 (a,b,c) values (100,200,300); +select * from t1; +truncate table t1; +insert delayed into t1 values (); +insert delayed into t1 (a) values (2); +insert delayed into t1 (a,b) values (10,20); +insert delayed into t1 (a,b,c) values (100,200,300); +flush tables t1; +select * from t1; + +create or replace table t1 (a int, b blob default (1), c blob default ("hello"), t text default (concat(a,b,c))) engine=myisam; +show create table t1; +insert into t1 (a) values (2); +insert into t1 (a,b) values (10,"test1"); +insert into t1 (a,b,c) values (10,"test2","test3"); +insert delayed into t1 (a,b) values (10,"test4"); +flush tables t1; +select * from t1; +drop table t1; + +create or replace table t1 (a bigint default uuid_short()); +insert into t1 values(); +select a > 0 from t1; +drop table t1; + +create or replace table t1 (param_list int DEFAULT (1+1) NOT NULL); +create or replace table t1 (param_list int DEFAULT 1+1 NOT NULL); +create or replace table t1 (param_list blob DEFAULT "" NOT NULL); +drop table t1; + +create table t1 (a int); +insert into t1 values(-1); +alter table t1 add b int default 1, add c int default -1, add d int default 1+1, add e timestamp; +select a,b,c,d,e > 0 from t1; +insert into t1 values(10,10,10,10,0); +alter table t1 add f int default 1+1+1 null, add g int default 1+1+1+1 not null,add h int default (2+2+2+2); +select a,b,c,d,e > 0,f,g,h from t1; +show create table t1; + +create table t2 like t1; +show create table t2; +insert into t2 (a) values (100); +select a,b,c,d,e > 0,f,g,h from t2; +drop table t1,t2; + +create table t1 (a int default 1----1); +show create table t1; +insert into t1 values(); +insert into t1 values(); +select * from t1; +drop table t1; + +--echo +--echo create or replace can delete a table on error +--echo +create table t1 (a int); +--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD +create or replace table t1 (a int default b, b int default a); +--error ER_NO_SUCH_TABLE +show create table t1; + +--echo +--echo Refering to other columns +--echo + +create or replace table t1 (a int default 1, b int default a); +create or replace table t1 (a int default 1, b int as (a)); +create or replace table t1 (a int default b, b int default 1); +create or replace table t1 (a int as (b), b int default 1); +create or replace table t1 (a int as (b), b int default 1+1); +create or replace table t1 (a int default 1, b int as (c), c int default (a+1)); +create or replace table t1 (a int default 1+1, b int as (c), c int default (a+1)); +create or replace table t1 (a VARCHAR(128) DEFAULT @@version); +create or replace table t1 (a int not null, b int as (a)); +create or replace table t1 (a int not null, b int default a+1); + + +--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD +create or replace table t1 (a int default a); +--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD +create or replace table t1 (a int default b, b int default 1+1); +--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD +create or replace table t1 (a int default 1, b int as (c), c int as (a+1)); +--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD +CREATE TABLE t1 (a INT DEFAULT a); +--error ER_NO_DEFAULT_FOR_FIELD +CREATE TABLE t1 (a INT DEFAULT (DEFAULT(a))); +--error ER_NO_DEFAULT_FOR_FIELD +CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT(DEFAULT(a))); +--error ER_NO_DEFAULT_FOR_FIELD +CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)) NOT NULL, b INT DEFAULT(DEFAULT(a)) NOT NULL); +drop table if exists t1; + +--echo +--echo Allow defaults to refer to not default fields +--echo + +create or replace table t1 (a int as (b), b int not null); +insert into t1 values(); +insert into t1 (a) values(1); +insert into t1 (b) values(2); +insert into t1 (a,b) values(3,4); +select * from t1; +drop table t1; + +--echo +--echo Error handling +--echo + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +create or replace table t1 (a bigint default xxx()); +--error ER_VIRTUAL_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))); + +# Cleanup +drop table if exists t1; + +--echo # +--echo # Invalid DEFAULT expressions +--echo # + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT (SELECT 1)); + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT (EXISTS (SELECT 1))); + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT (1=ANY (SELECT 1))); + +--error ER_OPERAND_COLUMNS +CREATE TABLE t1 (a INT DEFAULT ROW(1,1)); + +--error ER_OPERAND_COLUMNS +CREATE TABLE t1 (a INT DEFAULT (1,1)); + +--error ER_OPERAND_COLUMNS +CREATE TABLE t1 (a INT DEFAULT ((1,1))); + +--error ER_PARSE_ERROR +CREATE TABLE t1 (a INT DEFAULT ?); +--error ER_PARSE_ERROR +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 +CREATE TABLE t1 (a INT DEFAULT @v); + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT @v:=1); + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT(NAME_CONST('xxx', 'yyy')); + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT COUNT(*)); + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT COUNT(1)); + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT AVG(1)); + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT MIN(1)); + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a INT DEFAULT GROUP_CONCAT(1)); + +--error ER_VIRTUAL_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 +CREATE TABLE t1 (a INT DEFAULT f1()); +DROP FUNCTION f1; + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE PROCEDURE p1(par INT) CREATE TABLE t1 (a INT DEFAULT par); + +--error ER_BAD_FIELD_ERROR +CREATE TABLE t1 (a INT DEFAULT par); + +CREATE PROCEDURE p1() CREATE TABLE t1 (a INT DEFAULT par); +--error ER_BAD_FIELD_ERROR +CALL p1; +DROP PROCEDURE p1; + +--error ER_VIRTUAL_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 +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 +CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CREATE TEMPORARY TABLE t2 (a INT DEFAULT NEW.a); +DROP TABLE t1; + +--echo # +--echo # Prepared statements +--echo # + +PREPARE stmt FROM 'CREATE TABLE t1 (a INT DEFAULT(?))'; +set @a=1; +execute stmt using @a; +show create table t1; +drop table t1; +set @a=-1; +execute stmt using @a; +show create table t1; +drop table t1; +DEALLOCATE PREPARE stmt; + +PREPARE stmt FROM 'CREATE TABLE t1 (a INT DEFAULT(?), b INT DEFAULT(?))'; +set @a=1, @b=2; +execute stmt using @a,@b; +show create table t1; +drop table t1; +DEALLOCATE PREPARE stmt; + +# +# We can't have an expression for prepared statements +# + +PREPARE stmt FROM 'CREATE TABLE t1 (a INT DEFAULT(?+?))'; +set @a=1; +--error ER_PARSE_ERROR +execute stmt using @a,@a; +DEALLOCATE PREPARE stmt; + +--echo # +--echo # Parenthesized Item_basic_constant +--echo # + + +# It would be better if SHOW would display PI() rather than '3.141592653589793' +# The problem is that PI() is declared as a basic constant item and it +# could cause some problems changing it. + +CREATE TABLE t1 ( + i01 INT DEFAULT (((1))), + i02 INT DEFAULT (((0x3939))), + i03 INT DEFAULT (((1.0))), + i04 INT DEFAULT (((1e0))), + i05 INT DEFAULT (((NULL))), + + f01 DOUBLE DEFAULT (((PI()))), + + s01 VARCHAR(10) DEFAULT (((_latin1'test'))), + s02 VARCHAR(10) DEFAULT ((('test'))), + s03 VARCHAR(10) DEFAULT (((0x40))), + s04 VARCHAR(10) DEFAULT (((X'40'))), + s05 VARCHAR(10) DEFAULT (((B'1000000'))), + + d01 TIME DEFAULT (((TIME'10:20:30'))), + d02 DATE DEFAULT (((DATE'2001-01-01'))), + d03 DATETIME DEFAULT (((TIMESTAMP'2001-01-01 10:20:30'))) +); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (); +--vertical_results +SELECT * FROM t1; +--horizontal_results +DROP TABLE t1; + + +--echo # +--echo # COALESCE(Item_basic_constant) +--echo # + +# i02 INT DEFAULT 0x3939 -- gives 14649 (see the previous query), +# because it treats as a number +# i02 INT DEFAULT COALESCE(0x3939) -- gives 99, because it converts to string +# +# should be at least documented + +CREATE TABLE t1 ( + i01 INT DEFAULT COALESCE(1), + i02 INT DEFAULT COALESCE(0x3939), + i03 INT DEFAULT COALESCE(1.0), + i04 INT DEFAULT COALESCE(1e0), + i05 INT DEFAULT COALESCE(NULL), + + f01 DOUBLE DEFAULT COALESCE(PI()), + + s01 VARCHAR(10) DEFAULT COALESCE(_latin1'test'), + s02 VARCHAR(10) DEFAULT COALESCE('test'), + s03 VARCHAR(10) DEFAULT COALESCE(0x40), + s04 VARCHAR(10) DEFAULT COALESCE(X'40'), + s05 VARCHAR(10) DEFAULT COALESCE(B'1000000'), + + d01 TIME DEFAULT COALESCE(TIME'10:20:30'), + d02 DATE DEFAULT COALESCE(DATE'2001-01-01'), + d03 DATETIME DEFAULT COALESCE(TIMESTAMP'2001-01-01 10:20:30') +); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (); +--vertical_results +SELECT * FROM t1; +--horizontal_results +DROP TABLE t1; + + +--echo # +--echo # TINYINT: out of range +--echo # +--error ER_INVALID_DEFAULT +CREATE TABLE t1 (a TINYINT DEFAULT 300 NOT NULL); +--error ER_INVALID_DEFAULT +CREATE TABLE t1 (a TINYINT DEFAULT 128 NOT NULL); +--error ER_INVALID_DEFAULT +CREATE TABLE t1 (a TINYINT DEFAULT -500 NOT NULL); + +--echo # +--echo # INT: simple numeric expressions +--echo # +CREATE TABLE t1 (a INT DEFAULT 1 NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a INT DEFAULT COALESCE(1) NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +--echo # +--echo # INT: simple string expressions +--echo # + +CREATE TABLE t1 (a INT DEFAULT '1' NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a INT DEFAULT CONCAT('1') NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a INT DEFAULT COALESCE('1') NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +--echo # +--echo # INT: string expressions with garbage +--echo # +--error ER_INVALID_DEFAULT +CREATE TABLE t1 (a INT DEFAULT 'x'); + +CREATE TABLE t1 (a INT DEFAULT CONCAT('x')); +insert into t1 values(); +DROP TABLE t1; + +CREATE TABLE t1 (a INT DEFAULT COALESCE('x')); +insert into t1 values(); +DROP TABLE t1; + + +--echo # +--echo # INT: string expressions with numbers + garbage +--echo # + +--error ER_INVALID_DEFAULT +CREATE TABLE t1 (a INT DEFAULT '1x'); + +CREATE TABLE t1 (a INT DEFAULT COALESCE('1x')); +insert into t1 values(); +DROP TABLE t1; + +CREATE TABLE t1 (a INT DEFAULT CONCAT('1x')); +insert into t1 values(); +DROP TABLE t1; + + +--echo # +--echo # INT: string expressions with numbers + trailing space +--echo # + +CREATE TABLE t1 (a INT DEFAULT '1 '); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +# unlike constant, this preserve trailing spaces +# and sends a note on INSERT. Perhaps CREATE should be rejected +CREATE TABLE t1 (a INT DEFAULT CONCAT('1 ')); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +# unlike constant, this preserve trailing spaces +# and sends a note on INSERT +CREATE TABLE t1 (a INT DEFAULT COALESCE('1 ')); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +--echo # +--echo # INT: a HEX value +--echo # +CREATE TABLE t1 (a INT DEFAULT 0x61 NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + + +--echo # +--echo # VARCHAR: good defaults +--echo # +CREATE TABLE t1 (a VARCHAR(30) DEFAULT 'xxx' NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a VARCHAR(2) DEFAULT 0x41 NOT NULL); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT(0x41) NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a VARCHAR(2) DEFAULT COALESCE(0x41) NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT(_utf8 0x41) NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT(_utf8 X'41') NOT NULL); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + + +--echo # +--echo # VARCHAR: Too long default +--echo # +--error ER_INVALID_DEFAULT +CREATE TABLE t1 (a VARCHAR(2) DEFAULT 'xxx' NOT NULL); + +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT('xxx') NOT NULL); +insert into t1 values(); +DROP TABLE t1; + +--echo # +--echo # VARCHAR: Too long default with non-important data +--echo # +--error ER_INVALID_DEFAULT +CREATE TABLE t1 (a VARCHAR(2) DEFAULT 'xx ' NOT NULL); +CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT('xx ') NOT NULL); +insert into t1 values(); +DROP TABLE t1; + +--echo # +--echo # VARCHAR: conversion failures +--echo # + +# DEFAULT with a Cyrillic letter for a Latin1 column +--error ER_INVALID_DEFAULT +CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET latin1 DEFAULT _utf8 X'D18F' NOT NULL); + +CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET latin1 DEFAULT CONCAT(_utf8 X'D18F') NOT NULL); +insert into t1 values(); +DROP TABLE t1; + +CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET latin1 DEFAULT CONCAT(_utf8 0xD18F) NOT NULL); +insert into t1 values(); +DROP TABLE t1; + +--echo # +--echo # Field as a default value +--echo # + +CREATE TABLE t1 (a INT, b INT DEFAULT (a)); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (1, 1); +INSERT INTO t1 VALUES (DEFAULT, DEFAULT); +INSERT INTO t1 VALUES (1, DEFAULT); +INSERT INTO t1 VALUES (DEFAULT, 1); +SELECT * FROM t1; +DROP TABLE t1; + +--echo # +--echo # Function DEFAULT(field) +--echo # + +CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT 1); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT, DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a INT DEFAULT 1, b INT DEFAULT(DEFAULT(a))); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (DEFAULT, DEFAULT); +SELECT * FROM t1; +DROP TABLE t1; + +--echo # +--echo # SQL Standard <datetime value function> as a <default option> +--echo # + +CREATE TABLE t1 (a DATETIME DEFAULT CURRENT_TIMESTAMP); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 (a TIME DEFAULT CURRENT_TIME); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 (a DATE DEFAULT CURRENT_DATE); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +--echo # +--echo # DECIMAL + CURRENT_TIMESTAMP, no truncation +--echo # +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT CURRENT_TIMESTAMP(6)); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_TIMESTAMP(6))); +SHOW CREATE TABLE t1; +# Same as insert into t1 values ("2016-06-05 12:54:52.342095"); +INSERT INTO t1 VALUES(); +INSERT IGNORE INTO t1 VALUES(); +SET sql_mode = 'STRICT_ALL_TABLES'; +--error WARN_DATA_TRUNCATED +INSERT INTO t1 VALUES(); +SET sql_mode = DEFAULT; +DROP TABLE t1; + +SET timestamp=DEFAULT; + +--echo # +--echo # DECIMAL + CURRENT_TIME, no truncation +--echo # +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_TIME(6))); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES(); +DROP TABLE t1; +SET timestamp=DEFAULT; + +--echo # +--echo # DECIMAL + CURRENT_DATE, no truncation +--echo # +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_DATE)); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES(); +DROP TABLE t1; +SET timestamp=DEFAULT; + + +--echo # +--echo # COALESCE for SQL Standard <datetime value function> +--echo # + +CREATE TABLE t1 (a TIMESTAMP DEFAULT COALESCE(CURRENT_TIMESTAMP)); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 (a DATE DEFAULT COALESCE(CURRENT_DATE)); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 (a TIME DEFAULT COALESCE(CURRENT_TIME)); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 ( + a TIMESTAMP DEFAULT CURRENT_TIMESTAMP(6), + b TIMESTAMP DEFAULT COALESCE(CURRENT_TIMESTAMP(6)) +); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (); +SELECT CURRENT_TIMESTAMP(6); +SELECT * FROM t1; +DROP TABLE t1; +SET timestamp=DEFAULT; + +SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30.123456'); +CREATE TABLE t1 ( + a DECIMAL(30,0) DEFAULT CURRENT_TIMESTAMP(6), + b DECIMAL(30,0) DEFAULT COALESCE(CURRENT_TIMESTAMP(6)) +); +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +DROP TABLE t1; + + +--echo # +--echo # Miscelaneous SQL standard <default option> variants +--echo # + +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a VARCHAR(30) DEFAULT CURRENT_USER); +--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED +CREATE TABLE t1 (a VARCHAR(30) DEFAULT CURRENT_ROLE); + +--echo # +--echo # Check DEFAULT() function +--echo # + +CREATE TABLE `t1` (`a` int(11) DEFAULT 3+3,`b` int(11) DEFAULT '1000'); +insert into t1 values (1,1),(2,2); +insert into t1 values (default,default); +select * from t1; +--error ER_NO_DEFAULT_FOR_FIELD +select default(a),b from t1; +select a,default(b) from t1; +drop table t1; diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index b7bca957e5b..d1c0702da80 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -179,6 +179,8 @@ explain extended select not (a+0) from t1; select * from t1 where not (a+0); explain extended select * from t1 where not (a+0); +select not 1, not null, not not null, 1 is not null; + drop table t1; --echo # diff --git a/mysql-test/t/mysql57_virtual.test b/mysql-test/t/mysql57_virtual.test new file mode 100644 index 00000000000..3ebdd894b79 --- /dev/null +++ b/mysql-test/t/mysql57_virtual.test @@ -0,0 +1,29 @@ +let $MYSQLD_DATADIR= `select @@datadir`; + +--echo # +--echo # Test that we can use tables created in MySQL 5.7 +--echo # + +--copy_file std_data/mysql57_virtual.frm $MYSQLD_DATADIR/test/mysql57_virtual.frm +--copy_file std_data/mysql57_virtual.MYD $MYSQLD_DATADIR/test/mysql57_virtual.MYD +--copy_file std_data/mysql57_virtual.MYI $MYSQLD_DATADIR/test/mysql57_virtual.MYI + +SHOW CREATE TABLE mysql57_virtual; +insert into mysql57_virtual (a) values (1),(2); +select * from mysql57_virtual; + +# We can't do online changes, as the MariaDB storage is incompatible with MySQL +--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON +alter online table mysql57_virtual comment "I am now a MariaDB table"; + +alter table mysql57_virtual comment "I am now a MariaDB table"; +SHOW CREATE TABLE mysql57_virtual; +DROP TABLE mysql57_virtual; + +--echo # +--echo # Check MySQL 5.7 syntax +--echo # + +create table t1 (a int, b int generated always as (a+1) STORED, c int generated always as (a+2) VIRTUAL); +show create table t1; +drop table t1; diff --git a/mysql-test/t/partition_explicit_prune.test b/mysql-test/t/partition_explicit_prune.test index 68b829fbcc3..36ae47a027a 100644 --- a/mysql-test/t/partition_explicit_prune.test +++ b/mysql-test/t/partition_explicit_prune.test @@ -68,12 +68,12 @@ INSERT INTO v1 VALUES (30); eval $get_handler_status_counts; --echo # 4 locks (1 table, 1 partition lock/unlock) FLUSH STATUS; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED INSERT INTO v1 VALUES (31); eval $get_handler_status_counts; --echo # 2 locks (1 table, all partitions pruned) FLUSH STATUS; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED INSERT INTO v1 VALUES (32); eval $get_handler_status_counts; --echo # 4 locks (1 table, 1 partition lock/unlock) diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index c19613da493..111fb51d961 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -4129,7 +4129,7 @@ CREATE VIEW v2 (a,b) AS SELECT t2.id, t2.c AS c FROM t1, t2 WHERE t1.id=t2.id AND 1 IN (SELECT id FROM t1) WITH CHECK OPTION; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED INSERT INTO v2(a,b) VALUES (2,2); # disabled for now as this refers to old content of t2 diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test index 8a6e63bb49b..b818e1b451d 100644 --- a/mysql-test/t/type_blob.test +++ b/mysql-test/t/type_blob.test @@ -33,15 +33,12 @@ drop table t1,t2,t3,t4; CREATE TABLE t1 (a char(257) default "hello"); --error 1074 CREATE TABLE t2 (a char(256)); ---error 1074 CREATE TABLE t1 (a varchar(70000) default "hello"); ---error 1101 +SHOW CREATE TABLE t1; CREATE TABLE t2 (a blob default "hello"); +SHOW CREATE TABLE t2; -# Safety to be able to continue with other tests if above fails ---disable_warnings -drop table if exists t1,t2; ---enable_warnings +drop table t1,t2; # # test of full join with blob @@ -432,8 +429,9 @@ insert into t1 values (default); select * from t1; drop table t1; set @@sql_mode='TRADITIONAL'; ---error ER_BLOB_CANT_HAVE_DEFAULT create table t1 (a text default ''); +show create table t1; +drop table t1; set @@sql_mode=''; # @@ -523,6 +521,7 @@ CREATE TABLE b15776 (a char(4294967296)); ## For year, widths not "2" or "4" are silently rewritten to "4". But ## When we complain about it, we say that the max is 255. We may be ## talking about different things. It's confusing. +--replace_result 4294967295 ? 0 ? CREATE TABLE b15776 (a year(4294967295)); INSERT INTO b15776 VALUES (42); SELECT * FROM b15776; diff --git a/mysql-test/t/type_timestamp_hires.test b/mysql-test/t/type_timestamp_hires.test index 0a49056294f..c51fb2fb247 100644 --- a/mysql-test/t/type_timestamp_hires.test +++ b/mysql-test/t/type_timestamp_hires.test @@ -17,10 +17,13 @@ drop table t1; # # MDEV-438 Microseconds: Precision is ignored in CURRENT_TIMESTAMP(N) when it is given as a default column value # -create table t1 (a timestamp(5) default current_timestamp); drop table t1; +create table t1 (a timestamp(5) default current_timestamp); +show create table t1; +drop table t1; create table t1 (a timestamp(5) default current_timestamp()); drop table t1; ---error ER_INVALID_DEFAULT create table t1 (a timestamp(5) default current_timestamp(2)); +show create table t1; +drop table t1; create table t1 (a timestamp(5) default current_timestamp(5)); drop table t1; create table t1 (a timestamp(5) default current_timestamp(6)); drop table t1; create table t1 (a timestamp(5) on update current_timestamp); drop table t1; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index e2bc2168385..9086240ade8 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -1051,7 +1051,7 @@ create table t1 (a int); create view v1 as select * from t1 where a < 2 with check option; # simple insert insert into v1 values(1); --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert into v1 values(3); # simple insert with ignore insert ignore into v1 values (2),(3),(0); @@ -1060,7 +1060,7 @@ select * from t1; delete from t1; # INSERT SELECT test insert into v1 SELECT 1; --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert into v1 SELECT 3; # prepare data for next check create table t2 (a int); @@ -1070,7 +1070,7 @@ insert ignore into v1 SELECT a from t2; select * from t1 order by a desc; # simple UPDATE test update v1 set a=-1 where a=0; --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED update v1 set a=2 where a=1; select * from t1 order by a desc; # prepare data for next check @@ -1097,12 +1097,12 @@ create view v2 as select * from v1 where a > 0 with local check option; create view v3 as select * from v1 where a > 0 with cascaded check option; insert into v2 values (1); insert into v3 values (1); --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert into v2 values (0); --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert into v3 values (0); insert into v2 values (2); --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert into v3 values (2); select * from t1; drop view v3,v2,v1; @@ -1114,7 +1114,7 @@ drop table t1; create table t1 (a int, primary key (a)); create view v1 as select * from t1 where a < 2 with check option; insert into v1 values (1) on duplicate key update a=2; --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert into v1 values (1) on duplicate key update a=2; insert ignore into v1 values (1) on duplicate key update a=2; select * from t1; @@ -1168,7 +1168,7 @@ select * from t2; # check it with check option alter view v2 as select * from t2 where s1 in (select s1 from t1) with check option; insert into v2 values (5); --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED update v2 set s1 = 1; insert into t1 values (1); update v2 set s1 = 1; @@ -1200,7 +1200,7 @@ drop table t1; create table t1 (s1 tinyint); create view v1 as select * from t1 where s1 <> 0 with local check option; create view v2 as select * from v1 with cascaded check option; --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert into v2 values (0); drop view v2, v1; drop table t1; @@ -1211,7 +1211,7 @@ drop table t1; create table t1 (s1 int); create view v1 as select * from t1 where s1 < 5 with check option; #single value --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert ignore into v1 values (6); #several values insert ignore into v1 values (6),(3); @@ -1225,7 +1225,7 @@ drop table t1; create table t1 (s1 tinyint); create trigger t1_bi before insert on t1 for each row set new.s1 = 500; create view v1 as select * from t1 where s1 <> 127 with check option; --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert into v1 values (0); select * from v1; select * from t1; @@ -1239,7 +1239,7 @@ drop table t1; create table t1 (s1 tinyint); create view v1 as select * from t1 where s1 <> 0; create view v2 as select * from v1 where s1 <> 1 with cascaded check option; --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED insert into v2 values (0); select * from v2; select * from t1; @@ -1252,7 +1252,7 @@ drop table t1; # fixed length fields create table t1 (a int, b char(10)); create view v1 as select * from t1 where a != 0 with check option; --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED load data infile '../../std_data/loaddata3.dat' into table v1 fields terminated by '' enclosed by '' ignore 1 lines; select * from t1; select * from v1; @@ -1265,7 +1265,7 @@ drop table t1; # variable length fields create table t1 (a text, b text); create view v1 as select * from t1 where a <> 'Field A' with check option; --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED load data infile '../../std_data/loaddata2.dat' into table v1 fields terminated by ',' enclosed by ''''; select concat('|',a,'|'), concat('|',b,'|') from t1; select concat('|',a,'|'), concat('|',b,'|') from v1; @@ -3017,9 +3017,9 @@ CREATE TABLE t1(id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, val INT UNS CREATE VIEW v1 AS SELECT id, val FROM t1 WHERE val >= 1 AND val <= 5 WITH CHECK OPTION; INSERT INTO v1 (val) VALUES (2); INSERT INTO v1 (val) VALUES (4); --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED INSERT INTO v1 (val) VALUES (6); --- error ER_VIEW_CHECK_FAILED +-- error ER_CONSTRAINT_FAILED UPDATE v1 SET val=6 WHERE id=2; DROP VIEW v1; DROP TABLE t1; @@ -3122,7 +3122,7 @@ CREATE VIEW v1 AS SELECT t2.b FROM t1,t2 WHERE t1.a = t2.b WITH CHECK OPTION; SELECT * FROM v1; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED UPDATE v1 SET b=3; SELECT * FROM v1; SELECT * FROM t1; @@ -3396,14 +3396,14 @@ CREATE VIEW v1 AS SELECT t1.a1, t1.c FROM t1 JOIN t2 ON t1.a1=t2.a2 AND t1.c < 3 WITH CHECK OPTION; SELECT * FROM v1; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED UPDATE v1 SET c=3; PREPARE t FROM 'UPDATE v1 SET c=3'; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED EXECUTE t; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED EXECUTE t; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED INSERT INTO v1(a1, c) VALUES (3, 3); UPDATE v1 SET c=1 WHERE a1=1; SELECT * FROM v1; @@ -3414,14 +3414,14 @@ CREATE VIEW v2 AS SELECT t1.a1, t1.c JOIN (t3 JOIN t4 ON t3.a3=t4.a4) ON t2.a2=t3.a3 WITH CHECK OPTION; SELECT * FROM v2; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED UPDATE v2 SET c=3; PREPARE t FROM 'UPDATE v2 SET c=3'; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED EXECUTE t; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED EXECUTE t; ---error ER_VIEW_CHECK_FAILED +--error ER_CONSTRAINT_FAILED INSERT INTO v2(a1, c) VALUES (3, 3); UPDATE v2 SET c=2 WHERE a1=1; SELECT * FROM v2; |