4 ms·
In the context of this post (MySQL 5.7) it does not accept invalid data :) The default sql mode has changed.
by morgo 12y ago
In the context of this post (MySQL 5.7) it does not accept invalid data :) The default sql mode has changed.
- tsuraan 12y agoSo, MySQL, as of 5.7, no longer accepts dates with year 0, and it also stopped converting unrecognized date strings into the date 00-00-0000? That would be a very positive change.
- FireBeyond 12y agoIt has "not supported" them for a long time. But it wasn't the default, due to backward compatibility (of course the decision that lead to this in the first place is no less suspect).
- morgo 12y agoYes. See slide 43 for examples of statements that now produce errors by default: http://www.slideshare.net/morgo/upcoming-changes-in-mysql-57 http://www.slideshare.net/morgo/upcoming-changes-in-mysql-57 This will break some applications that are upgrading. I have a whitelist/blacklist suggestion on how to transition on my blog: http://www.tocker.ca/2014/09/01/suggestions-for-transitioning-into-strict-sql-mode.html http://www.tocker.ca/2014/09/01/suggestions-for-transitionin...
- equoid 12y ago"The default sql mode has changed." So long as it possible to redefine the mode at will on a per connection basis or on startup then the integrity of data held within MySQL cannot be guaranteed.
- morgo 12y agoBeing able to change it on a per connection basis is required for earlier applications. If we use Wordpress as an example, upon initial connection it will set the SQL mode to what it is compatible with (magento, drupal, others also do similar). Integrity can also not be upheld if applications lie. i.e. I always enter the same incorrect birthday if an application asks me for this, but I don't think they have a reason for it.