mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902)
CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912) ALTER TABLE now fails in STRICT mode if it generates warnings. Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)
This commit is contained in:
@ -44,12 +44,24 @@ create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
||||
create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int);
|
||||
ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is too long
|
||||
create table test (a datetime default now());
|
||||
create table t1 (a datetime default now());
|
||||
ERROR 42000: Invalid default value for 'a'
|
||||
create table test (a datetime on update now());
|
||||
create table t1 (a datetime on update now());
|
||||
ERROR HY000: Invalid ON UPDATE clause for 'a' column
|
||||
create table test (a int default 100 auto_increment);
|
||||
create table t1 (a int default 100 auto_increment);
|
||||
ERROR 42000: Invalid default value for 'a'
|
||||
create table t1 (a tinyint default 1000);
|
||||
ERROR 42000: Invalid default value for 'a'
|
||||
create table t1 (a varchar(5) default 'abcdef');
|
||||
ERROR 42000: Invalid default value for 'a'
|
||||
create table t1 (a varchar(5) default 'abcde');
|
||||
insert into t1 values();
|
||||
select * from t1;
|
||||
a
|
||||
abcde
|
||||
alter table t1 alter column a set default 'abcdef';
|
||||
ERROR 42000: Invalid default value for 'a'
|
||||
drop table t1;
|
||||
create table 1ea10 (1a20 int,1e int);
|
||||
insert into 1ea10 values(1,1);
|
||||
select 1ea10.1a20,1e+ 1e+10 from 1ea10;
|
||||
|
Reference in New Issue
Block a user