Opened 12 years ago
Closed 11 years ago
#24912 closed enhancement (duplicate)
patch allowing wordpress to function normally on mysql strict servers
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 3.5.2 |
Component: | Database | Keywords: | has-patch |
Focuses: | Cc: |
Description
when the server is configured with sql-mode='ANSI,TRADITIONAL,ONLY_FULL_GROUP_BY', installation and operation of wordpress fails, as it has not yet been modified to run in a strict environment.
This one-line patch to wp-db.php allows wordpress to function normally as it would on a default mysql install where strict is NOT enabled by default (we won't debate the merits of this horrifying decision by mysql developers)
you can preview it as a gist here: https://gist.github.com/WebDragon/6066884
and additionally I will attach it as a .patch
I've tested it here on my local system and all seems well (since it would die horribly otherwise)
Please consider adding this to core as a workaround for strict servers until such time as wordpress can be rewritten to function in a strict environment.
Attachments (1)
Change History (7)
#1
@
12 years ago
It's to late for 3.6 so I think we should first check which queries can be fixed when running mysql in a strict environment.
#3
@
12 years ago
FYI, Percona ships with a tighter configuration than "standard" MySQL. In this instance, the installation may run without any apparent problems and the resultant site appears to be fine. The issues may only come to light when trying to view tag or category pages when the query returns zero results. This has been documented in http://wordpress.org/support/topic/unable-to-view-posts-by-categorys-or-tags (fresh, vanilla install of 3.6).
#4
@
12 years ago
Would still like to see this patch applied to current wordpress, if nothing else in lieu of a full switch-over to ability to run in a strict mysql environment as outlined above
This same patch applied cleanly to 3.6/3.7/3.8 installation, so the applicable version number can be bumped
patch for wp-includes/wp-db.php