[wp-trac] [WordPress Trac] #13310: Extend option_name to varchar(255)

WordPress Trac noreply at wordpress.org
Fri Sep 11 01:25:23 UTC 2015


#13310: Extend option_name to varchar(255)
-------------------------+---------------------
 Reporter:  scribu       |       Owner:  pento
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  4.4
Component:  Database     |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:
-------------------------+---------------------
Changes (by pento):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"34030"]:
 {{{
 #!CommitTicketReference repository="" revision="34030"
 Schema: Increase the length of `wp_options.option_name`.

 It's pretty easy to run over the `option_name` length, which causes
 undefined behaviour when inserting and retrieving options. Increasing the
 length from `VARCHAR(64)` to `VARCHAR(191)` significantly reduces the risk
 of this occurring.

 Because `option_name` has a `UNIQUE` index, we can only increase it to 191
 characters, rather than 255. The index can only use a prefix of 191
 characters, so will incorrectly restrict long different strings that have
 the same prefix, if we make the column longer.

 Props scribu, OriginalEXE, khromov, MikeHansenMe, netweb, pento.

 Fixes #13310.
 }}}

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


More information about the wp-trac mailing list