WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/11/2015 01:25:21 AM (6 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.