strict.result

来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· RESULT 代码 · 共 1,403 行 · 第 1/4 页

RESULT
1,403
字号
ERROR 22001: Data too long for column 'charcol' at row 1insert into t1 (varcharcol) values (repeat('x',256));ERROR 22001: Data too long for column 'varcharcol' at row 1insert into t1 (binarycol) values (repeat('x',256));ERROR 22001: Data too long for column 'binarycol' at row 1insert into t1 (varbinarycol) values (repeat('x',256));ERROR 22001: Data too long for column 'varbinarycol' at row 1insert into t1 (tinytextcol) values (repeat('x',256));ERROR 22001: Data too long for column 'tinytextcol' at row 1insert into t1 (tinyblobcol) values (repeat('x',256));ERROR 22001: Data too long for column 'tinyblobcol' at row 1select * from t1;charcol	varcharcol	binarycol	varbinarycol	tinytextcol	tinyblobcoldrop table t1;set sql_mode='traditional';create table t1 (col1 datetime);insert into t1 values(STR_TO_DATE('31.10.2004 15.30 abc','%d.%m.%Y %H.%i'));ERROR 22007: Truncated incorrect datetime value: '31.10.2004 15.30 abc'insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));ERROR HY000: Incorrect datetime value: '32.10.2004 15.30' for function str_to_timeinsert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r'));ERROR HY000: Incorrect time value: '22:22:33 AM' for function str_to_timeinsert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T'));ERROR HY000: Incorrect time value: 'abc' for function str_to_timeset sql_mode='';insert into t1 values(STR_TO_DATE('31.10.2004 15.30 abc','%d.%m.%Y %H.%i'));Warnings:Warning	1292	Truncated incorrect datetime value: '31.10.2004 15.30 abc'insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));Warnings:Error	1411	Incorrect datetime value: '32.10.2004 15.30' for function str_to_timeinsert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r'));Warnings:Error	1411	Incorrect time value: '22:22:33 AM' for function str_to_timeinsert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T'));Warnings:Error	1411	Incorrect time value: 'abc' for function str_to_timeinsert into t1 values(STR_TO_DATE('31.10.2004 15.30','%d.%m.%Y %H.%i'));insert into t1 values(STR_TO_DATE('2004.12.12 11:22:33 AM','%Y.%m.%d %r'));insert into t1 values(STR_TO_DATE('2004.12.12 10:22:59','%Y.%m.%d %T'));select * from t1;col12004-10-31 15:30:00NULLNULLNULL2004-10-31 15:30:002004-12-12 11:22:332004-12-12 10:22:59set sql_mode='traditional';select count(*) from t1 where STR_TO_DATE('2004.12.12 10:22:61','%Y.%m.%d %T') IS NULL;count(*)7Warnings:Error	1411	Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_timeError	1411	Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_timeError	1411	Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_timedrop table t1;create table t1 (col1 char(3), col2 integer);insert into t1 (col1) values (cast(1000 as char(3)));ERROR 22007: Truncated incorrect CHAR(3) value: '1000'insert into t1 (col1) values (cast(1000E+0 as char(3)));ERROR 22007: Truncated incorrect CHAR(3) value: '1000'insert into t1 (col1) values (cast(1000.0 as char(3)));ERROR 22007: Truncated incorrect CHAR(3) value: '1000.0'insert into t1 (col2) values (cast('abc' as signed integer));ERROR 22007: Truncated incorrect INTEGER value: 'abc'insert into t1 (col2) values (10E+0 + 'a');ERROR 22007: Truncated incorrect DOUBLE value: 'a'insert into t1 (col2) values (cast('10a' as unsigned integer));ERROR 22007: Truncated incorrect INTEGER value: '10a'insert into t1 (col2) values (cast('10' as unsigned integer));insert into t1 (col2) values (cast('10' as signed integer));insert into t1 (col2) values (10E+0 + '0 ');select * from t1;col1	col2NULL	10NULL	10NULL	10drop table t1;create table t1 (col1 date, col2 datetime, col3 timestamp);insert into t1 values (0,0,0);ERROR 22007: Incorrect date value: '0' for column 'col1' at row 1insert into t1 values (0.0,0.0,0.0);ERROR 22007: Incorrect date value: '0' for column 'col1' at row 1insert into t1 (col1) values (convert('0000-00-00',date));ERROR 22007: Truncated incorrect datetime value: '0000-00-00'insert into t1 (col1) values (cast('0000-00-00' as date));ERROR 22007: Truncated incorrect datetime value: '0000-00-00'set sql_mode='no_zero_date';insert into t1 values (0,0,0);Warnings:Warning	1264	Out of range value adjusted for column 'col1' at row 1Warning	1264	Out of range value adjusted for column 'col2' at row 1Warning	1265	Data truncated for column 'col3' at row 1insert into t1 values (0.0,0.0,0.0);Warnings:Warning	1264	Out of range value adjusted for column 'col1' at row 1Warning	1264	Out of range value adjusted for column 'col2' at row 1Warning	1265	Data truncated for column 'col3' at row 1drop table t1;set sql_mode='traditional';create table t1 (col1 date);insert ignore into t1 values ('0000-00-00');Warnings:Warning	1265	Data truncated for column 'col1' at row 1insert into t1 select * from t1;ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1insert ignore into t1 values ('0000-00-00');Warnings:Warning	1265	Data truncated for column 'col1' at row 1insert ignore into t1 (col1) values (cast('0000-00-00' as date));Warnings:Warning	1292	Truncated incorrect datetime value: '0000-00-00'insert into t1 select * from t1;ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1alter table t1 modify col1 datetime;ERROR 22007: Incorrect datetime value: '0000-00-00' for column 'col1' at row 1alter ignore table t1 modify col1 datetime;Warnings:Warning	1264	Out of range value adjusted for column 'col1' at row 1Warning	1264	Out of range value adjusted for column 'col1' at row 2insert into t1 select * from t1;ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'col1' at row 1select * from t1;col10000-00-00 00:00:000000-00-00 00:00:00NULLdrop table t1;create table t1 (col1 tinyint);drop procedure if exists t1;Warnings:Note	1305	PROCEDURE t1 does not existcreate procedure t1 () begin declare exit handler for sqlexceptionselect'a'; insert into t1 values (200); end;|call t1();aaselect * from t1;col1drop procedure t1;drop table t1;set sql_mode=@org_mode;SET @@sql_mode = 'traditional';CREATE TABLE t1 (i int not null);INSERT INTO t1 VALUES ();ERROR HY000: Field 'i' doesn't have a default valueINSERT INTO t1 VALUES (DEFAULT);ERROR HY000: Field 'i' doesn't have a default valueINSERT INTO t1 VALUES (DEFAULT(i));ERROR HY000: Field 'i' doesn't have a default valueALTER TABLE t1 ADD j int;INSERT INTO t1 SET j = 1;ERROR HY000: Field 'i' doesn't have a default valueINSERT INTO t1 SET j = 1, i = DEFAULT;ERROR HY000: Field 'i' doesn't have a default valueINSERT INTO t1 SET j = 1, i = DEFAULT(i);ERROR HY000: Field 'i' doesn't have a default valueINSERT INTO t1 VALUES (DEFAULT,1);ERROR HY000: Field 'i' doesn't have a default valueDROP TABLE t1;SET @@sql_mode = '';CREATE TABLE t1 (i int not null);INSERT INTO t1 VALUES ();Warnings:Warning	1364	Field 'i' doesn't have a default valueINSERT INTO t1 VALUES (DEFAULT);Warnings:Warning	1364	Field 'i' doesn't have a default valueINSERT INTO t1 VALUES (DEFAULT(i));ERROR HY000: Field 'i' doesn't have a default valueALTER TABLE t1 ADD j int;INSERT INTO t1 SET j = 1;Warnings:Warning	1364	Field 'i' doesn't have a default valueINSERT INTO t1 SET j = 1, i = DEFAULT;Warnings:Warning	1364	Field 'i' doesn't have a default valueINSERT INTO t1 SET j = 1, i = DEFAULT(i);ERROR HY000: Field 'i' doesn't have a default valueINSERT INTO t1 VALUES (DEFAULT,1);Warnings:Warning	1364	Field 'i' doesn't have a default valueDROP TABLE t1;set @@sql_mode='traditional';create table t1(a varchar(65537));ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT insteadcreate table t1(a varbinary(65537));ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT insteadset @@sql_mode='traditional';create table t1(a int, b date not null);alter table t1 modify a bigint unsigned not null;show create table t1;Table	Create Tablet1	CREATE TABLE `t1` (  `a` bigint(20) unsigned NOT NULL,  `b` date NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1drop table t1;set @@sql_mode='traditional';create table t1 (d date);insert into t1 values ('2000-10-00');ERROR 22007: Incorrect date value: '2000-10-00' for column 'd' at row 1insert into t1 values (1000);ERROR 22007: Incorrect date value: '1000' for column 'd' at row 1insert into t1 values ('2000-10-01');update t1 set d = 1100;ERROR 22007: Incorrect date value: '1100' for column 'd' at row 1select * from t1;d2000-10-01drop table t1;set @@sql_mode='traditional';create table t1(a int, b timestamp);alter table t1 add primary key(a);show create table t1;Table	Create Tablet1	CREATE TABLE `t1` (  `a` int(11) NOT NULL default '0',  `b` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,  PRIMARY KEY  (`a`)) ENGINE=MyISAM DEFAULT CHARSET=latin1drop table t1;create table t1(a int, b timestamp default 20050102030405);alter table t1 add primary key(a);show create table t1;Table	Create Tablet1	CREATE TABLE `t1` (  `a` int(11) NOT NULL default '0',  `b` timestamp NOT NULL default '2005-01-02 03:04:05',  PRIMARY KEY  (`a`)) ENGINE=MyISAM DEFAULT CHARSET=latin1drop table t1;set @@sql_mode='traditional';create table t1(a bit(2));insert into t1 values(b'101');ERROR 22001: Data too long for column 'a' at row 1select * from t1;adrop table t1;set sql_mode='traditional';create table t1 (date date not null);create table t2 select date from t1;show create table t2;Table	Create Tablet2	CREATE TABLE `t2` (  `date` date NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1drop table t2,t1;set @@sql_mode= @org_mode;set @@sql_mode='traditional';create table t1 (i int)comment '123456789*123456789*123456789*123456789*123456789*         123456789*123456789*123456789*123456789*123456789*';ERROR HY000: Too long comment for table 't1'create table t1 (i int comment'123456789*123456789*123456789*123456789* 123456789*123456789*123456789*123456789* 123456789*123456789*123456789*123456789* 123456789*123456789*123456789*123456789* 123456789*123456789*123456789*123456789* 123456789*123456789*123456789*123456789* 123456789*123456789*123456789*123456789*');ERROR HY000: Too long comment for field 'i'set @@sql_mode= @org_mode;create table t1(i int comment'123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*');Warnings:Warning	1105	Unknown errorselect column_name, column_comment from information_schema.columns wheretable_schema = 'test' and table_name = 't1';column_name	column_commenti	123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*  123456789*123456789*123456789*123456789*drop table t1;set names utf8;create table t1 (i int)comment '123456789*123456789*123456789*123456789*123456789*123456789*';show create table t1;Table	Create Tablet1	CREATE TABLE `t1` (  `i` int(11) default NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='123456789*123456789*123456789*123456789*123456789*123456789*'drop table t1;set sql_mode= 'traditional';create table t1(col1 tinyint, col2 tinyint unsigned, col3 smallint, col4 smallint unsigned,col5 mediumint, col6 mediumint unsigned,col7 int, col8 int unsigned,col9 bigint, col10 bigint unsigned);insert into t1(col1) values('-');ERROR HY000: Incorrect integer value: '-' for column 'col1' at row 1insert into t1(col2) values('+');ERROR HY000: Incorrect integer value: '+' for column 'col2' at row 1insert into t1(col3) values('-');ERROR HY000: Incorrect integer value: '-' for column 'col3' at row 1insert into t1(col4) values('+');ERROR HY000: Incorrect integer value: '+' for column 'col4' at row 1insert into t1(col5) values('-');ERROR HY000: Incorrect integer value: '-' for column 'col5' at row 1insert into t1(col6) values('+');ERROR HY000: Incorrect integer value: '+' for column 'col6' at row 1insert into t1(col7) values('-');ERROR HY000: Incorrect integer value: '-' for column 'col7' at row 1insert into t1(col8) values('+');ERROR HY000: Incorrect integer value: '+' for column 'col8' at row 1insert into t1(col9) values('-');ERROR HY000: Incorrect integer value: '-' for column 'col9' at row 1insert into t1(col10) values('+');ERROR HY000: Incorrect integer value: '+' for column 'col10' at row 1drop table t1;set sql_mode='traditional';create table t1(a year);insert into t1 values ('-');ERROR HY000: Incorrect integer value: '-' for column 'a' at row 1insert into t1 values ('+');ERROR HY000: Incorrect integer value: '+' for column 'a' at row 1insert into t1 values ('');ERROR HY000: Incorrect integer value: '' for column 'a' at row 1insert into t1 values ('2000a');ERROR 01000: Data truncated for column 'a' at row 1insert into t1 values ('2E3x');ERROR 01000: Data truncated for column 'a' at row 1drop table t1;set sql_mode='traditional';create table t1 (f1 set('a','a'));ERROR HY000: Column 'f1' has duplicated value 'a' in SETcreate table t1 (f1 enum('a','a'));ERROR HY000: Column 'f1' has duplicated value 'a' in ENUMset @@sql_mode='NO_ZERO_DATE';create table t1(a datetime not null);select count(*) from t1 where a is null;count(*)0drop table t1;End of 5.0 tests

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?