[wp-trac] [WordPress Trac] #41944: Add %u support to wpdb->prepare

WordPress Trac noreply at wordpress.org
Thu Sep 21 13:30:33 UTC 2017


#41944: Add %u support to wpdb->prepare
--------------------------+-----------------------------
 Reporter:  charlestonsw  |      Owner:
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Database      |    Version:  4.8.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 MySQL unsigned int: 4bn [[BR]]
 PHP %d signed int: 2bn[[BR]]
 [[BR]]
 Maybe the standard should be %u not %d or at the very least support both
 while internally using %u for all key lookups?[[BR]]
 [[BR]]
 Especially since much of the WP Core specifically sets ID fields as bigint
 unsigned not null auto_increment.[[BR]]
 [[BR]]
 If a site never has more than 2bn records, and MOST will NEVER get that
 big, it is a non-issue but shouldn't the standard be consistent between
 the DB engine and the language processor (PHP)?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41944>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list