Closed Bug 977154 Opened 11 years ago Closed 7 years ago

use WITHOUT ROWID in hosts table

Categories

(Toolkit :: Places, defect, P5)

defect
Points:
3

Tracking

()

RESOLVED INACTIVE

People

(Reporter: mak, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

this is backwards compatible ALTER TABLE moz_hosts RENAME TO moz_hosts_old CREATE TABLE moz_hosts ( host TEXT PRIMARY KEY, frecency INTEGER, typed NOT NULL DEFAULT 0, prefix ) WITHOUT ROWID INSERT INTO moz_hosts SELECT host, frecency, typed, prefix from moz_hosts_old DROP TABLE moz_hosts_old
No longer blocks: fxdesktopbacklog
Flags: firefox-backlog+
Whiteboard: p=3
Basic patch. No tests. Are they required? Can add in 977153 and 977151 to schema 25 and push the new tag tables to 26.
Attachment #8467167 - Flags: feedback?(mak77)
Forgot to update the triggers
Attachment #8467167 - Attachment is obsolete: true
Attachment #8467167 - Flags: feedback?(mak77)
Attachment #8467774 - Flags: feedback?(mak77)
Comment on attachment 8467774 [details] [diff] [review] bug977154_without_rowid_hosts_table.diff v1 Review of attachment 8467774 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/places/Database.cpp @@ +1974,5 @@ > + nsresult rv = mMainConn->CreateStatement(NS_LITERAL_CSTRING( > + "SELECT id FROM moz_hosts" > + ), getter_AddRefs(stmt)); > + > + if (!NS_FAILED(rv)) { NS_SUCCEEDED @@ +1985,5 @@ > + NS_ENSURE_SUCCESS(rv, rv); > + // migrate data from old table > + rv = mMainConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING( > + "INSERT INTO moz_hosts SELECT host, frecency, typed, " > + "prefix from moz_hosts_old ")); indent as INSERT ... SELECT ... FROM ...
Attachment #8467774 - Flags: feedback?(mak77) → feedback+
Points: --- → 3
Whiteboard: p=3
Priority: -- → P5
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: