Make WordPress Core

Opened 15 years ago

Last modified 5 years ago

#8924 reopened enhancement

autoload should be boolean in add_option()

Reported by: jidanni's profile jidanni Owned by:
Milestone: Awaiting Review Priority: lowest
Severity: normal Version:
Component: Database Keywords:
Focuses: Cc:

Description

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

Why not boolean binary, or one character long?

Attachments (1)

8924.patch (565 bytes) - added by ocean90 11 years ago.
Reduce to varchar(3)

Download all attachments as: .zip

Change History (14)

#1 @jacobsantos
15 years ago

  • Severity changed from trivial to major

This is not a trivial change.

#2 @ryan
15 years ago

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

We're stuck with it, alas.

#3 @Otto42
13 years ago

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.

#4 @nacin
13 years ago

  • 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).

#5 @SergeyBiryukov
13 years ago

  • Milestone set to Awaiting Review

#6 @nacin
13 years ago

  • Summary changed from autoload should be boolean to autoload should be boolean in add_option(), indexed in DB

#7 @sorich87
12 years ago

  • Type changed from defect (bug) to enhancement

#8 follow-up: @nacin
12 years ago

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

#9 @nacin
12 years ago

  • Severity changed from major to normal

#10 @brokentone
11 years ago

  • Cc kenton.jacobsen@… added

@ocean90
11 years ago

Reduce to varchar(3)

#11 in reply to: ↑ 8 @ocean90
11 years ago

Replying to nacin:

add_option() should accept a boolean

You mean for the 4th arg?

#12 @nacin
10 years ago

  • Component changed from Optimization to Script Loader
  • Summary changed from autoload should be boolean in add_option(), indexed in DB to autoload should be boolean in add_option()

More indexing discussion is occurring in #24044. Let's make clear this ticket is for add_option().

#13 @wonderboymusic
9 years ago

  • Component changed from Script Loader to Database
Note: See TracTickets for help on using tickets.