[wp-trac] [WordPress Trac] #40418: ID columns in multisite database tables should be unsigned

WordPress Trac noreply at wordpress.org
Thu Apr 13 14:56:09 UTC 2017


#40418: ID columns in multisite database tables should be unsigned
-------------------------------------------------+-------------------------
 Reporter:  johnjamesjacoby                      |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Database                             |  Review
 Severity:  major                                |     Version:  3.0
 Keywords:  2nd-opinion has-patch needs-testing  |  Resolution:
                                                 |     Focuses:  multisite
-------------------------------------------------+-------------------------

Comment (by johnjamesjacoby):

 A few questions came up in Slack about this patch, so I'll answer them as
 best I can here:

 * These `ALTER`s will take some time, because indices need to be rebuilt
 * MySQL will invisibly perform table locks & copies for signature changes
 * MySQL will perform string to integer conversions on really large
 numbers, so places where values would be higher than `PHP_INT_MAX` could
 be turned into strings in PHP, and MySQL will save them correctly
 * My research on `signed` vs `unsigned` leads me to believe there is no
 performance benefit for WordPress with this change, as the range of
 available index values has not changed (it's only shifted out of negative
 numbers and into higher ones)

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


More information about the wp-trac mailing list