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
This commit is contained in:
Michael Widenius 2016-06-29 09:14:22 +02:00 committed by Sergei Golubchik
parent 23d03a1b1e
commit db7edfed17
165 changed files with 5793 additions and 6325 deletions

View file

@ -158,8 +158,6 @@ enum enum_server_command
#define FIELD_FLAGS_COLUMN_FORMAT 24 /* Field column format, bit 24-25 */
#define FIELD_FLAGS_COLUMN_FORMAT_MASK (3 << FIELD_FLAGS_COLUMN_FORMAT)
#define FIELD_IS_DROPPED (1<< 26) /* Intern: Field is being dropped */
#define HAS_EXPLICIT_VALUE (1 << 27) /* An INSERT/UPDATE operation supplied
an explicit default value */
#define REFRESH_GRANT (1ULL << 0) /* Refresh grant tables */
#define REFRESH_LOG (1ULL << 1) /* Start on new log file */

View file

@ -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");

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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);

View file

@ -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:

View file

@ -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` (

View file

@ -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;

View file

@ -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',

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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,

View file

@ -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

View file

@ -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;

View file

@ -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,

View file

@ -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,

View file

@ -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` (

View file

@ -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;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 #

View file

@ -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));

View file

@ -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 *//*!*/;

View file

@ -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

View file

Binary file not shown.

Binary file not shown.

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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. ");

File diff suppressed because it is too large Load diff

View file

@ -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#

View file

@ -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#

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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'

View file

@ -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',

View file

@ -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

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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 *//*!*/;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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()));

View file

@ -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';

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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)

View file

@ -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)

View file

@ -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)));

File diff suppressed because it is too large Load diff

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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
#

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -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;

View file

@ -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;

Some files were not shown because too many files have changed in this diff Show more