WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#14978 closed feature request (maybelater)

MySQL strict mode

Reported by: christian_gnoth Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: General Keywords:
Focuses: Cc:

Description

with one user of my plugin I hve the same issue like this one:

http://wordpress.org/support/topic/string-of-non-fatal-mysql-errors-on-wp-install

so I would request to check the sql if the are conform to MySQL strict mode.

Change History (7)

#1 @mrmist
11 years ago

  • Keywords close added

See #8857

These have been closed as wontfix before. WordPress doesn't work with strict/traditional mode and it'd take a lot to make it do so.

#2 @nacin
11 years ago

Closed by Denis with the note, "Please re-open when we drop MySQL 4 support." Would be interesting to see others weigh in at this point.

#3 @mrmist
11 years ago

ONLY_FULL_GROUP_BY could be an issue. I'm not sure if that's implied by traditional or not. Otherwise it'd probably come down to a reorganization of how dates are handled.

#4 follow-up: @Denis-de-Bernardy
11 years ago

It can also be worth the effort in the long run, as it'll make some potential bugs appear where we're not looking.

It's a lot of work, however:

http://core.trac.wordpress.org/ticket/8857#comment:3

One of the two big changes needed relates to date handlers, but my guess is that'll be the easy part.

The other, which is trickier, relates to wpdb's various escape and prepare methods. My guess is we'd end up introducing a %d placeholder for "digits"; one that doesn't add quotes but casts to int or float instead. We'd additionally need to inject NULL in queries where appropriate, rather than empty strings as we're currently doing.

Both changes will introduce incompatibilities with plugins.

#5 in reply to: ↑ 4 @nacin
11 years ago

Replying to Denis-de-Bernardy:

My guess is we'd end up introducing a %d placeholder for "digits"; one that doesn't add quotes but casts to int or float instead.

We have that. (Though no %f support.)

#6 @mrmist
11 years ago

  • Keywords close removed

removing close keyword in respect of Nacin's comment for further input.

#7 @nacin
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.