[Bug #68041] Zero date can be inserted in strict no-zero mode through a default value

Description

Upstream bug: http://bugs.mysql.com/bug.php?id=68041

I create a table with zero date:

Now change sql_mode to traditional:

It correctly rejects the value:

However, It's still possible to insert the bad value through the default:

The INSERT statement works (even without warnings) and the SELECT statement returns:

The expected behaviour would be to reject the INSERT that uses the default value '0000-00-00'.

Using DEFAULT also does not reject:

It also does not reject bad values when using INSERT..SELECT:

Environment

None

Status

Assignee

Alexander Barkov

Reporter

Alexander Barkov

Labels

External issue ID

None

External issue ID

None

Time tracking

0m

Components

Sprint

None

Fix versions

Affects versions

Priority

Major
Configure