1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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:
monty@mysql.com
2005-04-01 15:04:50 +03:00
parent e9205dc0f0
commit 201ee3eb78
42 changed files with 603 additions and 224 deletions

View File

@@ -49,14 +49,25 @@ create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int);
#
# Some wrong defaults, so these creates should fail too
# Some wrong defaults, so these creates should fail too (Bug #5902)
#
--error 1067
create table test (a datetime default now());
create table t1 (a datetime default now());
--error 1294
create table test (a datetime on update now());
create table t1 (a datetime on update now());
--error 1067
create table test (a int default 100 auto_increment);
create table t1 (a int default 100 auto_increment);
--error 1067
create table t1 (a tinyint default 1000);
--error 1067
create table t1 (a varchar(5) default 'abcdef');
create table t1 (a varchar(5) default 'abcde');
insert into t1 values();
select * from t1;
--error 1067
alter table t1 alter column a set default 'abcdef';
drop table t1;
#
# test of dummy table names