Make WordPress Core

Opened 18 years ago

Last modified 8 years ago

#8924 reopened enhancement

autoload should be boolean in add_option()

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

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 13 years ago.
Reduce to varchar(3)

Download all attachments as: .zip

Change History (14)

#1 @jacobsantos
18 years ago

  • Severity trivialmajor

This is not a trivial change.

#2 @ryan
18 years ago

  • Milestone 2.8
  • Resolutionwontfix
  • Status newclosed

We're stuck with it, alas.

#3 @Otto42
15 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
15 years ago

  • Resolution wontfix
  • Status closedreopened

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
15 years ago

  • MilestoneAwaiting Review

#6 @nacin
15 years ago

  • Summary autoload should be booleanautoload should be boolean in add_option(), indexed in DB

#7 @sorich87
15 years ago

  • Type defect (bug)enhancement

#8 follow-up: @nacin
14 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
14 years ago

  • Severity majornormal

#10 @brokentone
13 years ago

  • Cc kenton.jacobsen@… added

@ocean90
13 years ago

Reduce to varchar(3)

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

Replying to nacin:

add_option() should accept a boolean

You mean for the 4th arg?

#12 @nacin
13 years ago

  • Component OptimizationScript Loader
  • Summary autoload should be boolean in add_option(), indexed in DBautoload 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
12 years ago

  • Component Script LoaderDatabase
Note: See TracTickets for help on using tickets.