Opened 4 years ago

Last modified 3 weeks ago

#8924 reopened enhancement

autoload should be boolean in add_option(), indexed in DB

Reported by: jidanni Owned by: anonymous
Priority: lowest Milestone: Awaiting Review
Component: Optimization Version:
Severity: normal Keywords:
Cc: kenton.jacobsen@…

Description

Regarding: CREATE TABLE wp_options (autoload varchar(20) NOT NULL DEFAULT 'yes',

Why not boolean binary, or one character long?

Change History (10)

  • Severity changed from trivial to major

This is not a trivial change.

comment:2   ryan4 years ago

  • Milestone 2.8 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

We're stuck with it, alas.

Bringing this back up for debate.

Even if we can't make it a boolean or int or something, is there any reason it has no index on it? With options tables inflating due to storage of things like transients and caches, this might be worth indexing.

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I meant to convert add_option() to accept a boolean in #10788, but didn't.

There's little reason to change the storage mechanism, but... I completely forgot it wasn't indexed. Could also consider making it varchar(3).

  • Milestone set to Awaiting Review
  • Summary changed from autoload should be boolean to autoload should be boolean in add_option(), indexed in DB
  • Type changed from defect (bug) to enhancement

add_option() should accept a boolean. But the DB doesn't need to change (no index, either) — see pento's comment in #14258.

  • Severity changed from major to normal
  • Cc kenton.jacobsen@… added
Note: See TracTickets for help on using tickets.