Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.0.16
-
None
-
Redhat Linux 2.6.32-431.29.2.el6.x86_64
10.0.16-MariaDB-log
Description
We came across this issue when a developer tried to set a date value to 2015-04-31 only 30 days in April.
If using the above value it will set that date column to null not throw an error.
Test case
CREATE TABLE test.baddate (
|
id int(11) NOT NULL AUTO_INCREMENT,
|
testtext varchar(255) DEFAULT NULL,
|
startdate date DEFAULT '1970-01-01',
|
enddate date DEFAULT '1970-01-01',
|
PRIMARY KEY (id),
|
INDEX UK_baddate_testtext (testtext)
|
)
|
ENGINE = INNODB
|
AUTO_INCREMENT = 8
|
AVG_ROW_LENGTH = 5461
|
CHARACTER SET latin1
|
COLLATE latin1_swedish_ci
|
COMMENT = 'Testing of date bug in update with erroneous date';
|
Insert some values
INSERT INTO test.baddate(testtext) SELECT tp.Table_name FROM mysql.tables_priv tp;
|
Check the contents All dates set to 01/01/1970
SELECT * FROM test.baddate;
|
Update to erroneous date value
UPDATE test.baddate SET enddate = '2013-10-32';
|
Evaluate the result
SELECT * FROM test.baddate;
|
Date is now null in the column set to erroneous date
Attachments
Issue Links
- relates to
-
MDEV-7635 update defaults and simplify mysqld config parameters
- Closed