Bug #40052 SQL_NO_STRICT: per-query way to disable strict mode
Submitted: 15 Oct 2008 14:46 Modified: 15 Oct 2008 15:09
Reporter: Olaf van der Spek (Basic Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: qc

[15 Oct 2008 14:46] Olaf van der Spek
Description:
Could you implement a way to disable strict mode (columns without default value) on a per-query basis?
I'd especially like to disable it for insert ... on duplicate key update queries.

How to repeat:
insert SQL_NO_STRICT into f (id, a) values (1, 1), (2, 2) on duplicate key update a = values(a)
[15 Oct 2008 15:07] Valeriy Kravchuk
Thank you for a reasonable feature request. As a workaround, you can save current mode in a variable, reset it to empty, do your statement and restore back.
[15 Oct 2008 15:09] Olaf van der Spek
I won't bother with that. I'll tell the admin to disable strict mode entirely.