[wp-trac] [WordPress Trac] #43578: Unexpected MYSQL data format

WordPress Trac noreply at wordpress.org
Tue Mar 20 06:42:59 UTC 2018


#43578: Unexpected MYSQL data format
-------------------------------------+-----------------------------
 Reporter:  loranrendel              |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Database                 |     Version:  4.9.4
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |     Focuses:
-------------------------------------+-----------------------------

Comment (by loranrendel):

 I think option b) is the greatest one. It doesn't have compatibility
 issues and would not break anything, because for Wordpress' own tables in
 this case it will work properly and will get `%d` format, and for any
 other table it will also receive correct format based on table structure.

 I think, stop receiving `%d` for other tables wouldn't cause back-compat
 issue because if field is integer it will receive `%d` as well, and
 conversion of string to `%d` is incorrect operation.

 I encountered this error when converting some old code to WP plugin and
 got rid of old mysqli wrapper. Some data was lost when added to DB, but I
 recovered it from logs.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43578#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list