Crash with pragma statements that return values

RESOLVED FIXED

Status

()

Toolkit
Storage
RESOLVED FIXED
12 years ago
12 years ago

People

(Reporter: Matthew Gertner, Assigned: Matthew Gertner)

Tracking

({fixed1.8.1})

unspecified
x86
Windows XP
fixed1.8.1
Points:
---
Dependency tree / graph
Bug Flags:
blocking-firefox2 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

12 years ago
I got a crash when using PRAGMA user_version. The reason is that mozStorageStatement retrieves the name for each column in a result set and storages it in an array (which, as far as I can see, is never used for anything... but I might be missing something). In the case of PRAGMA user_version (and, I assume, other PRAGMA statements that return values), the name is NULL.
(Assignee)

Comment 1

12 years ago
Created attachment 217725 [details] [diff] [review]
Adds a check to prevent crashing when the column name is NULL
Assignee: vladimir → matthew
Status: NEW → ASSIGNED
Attachment #217725 - Flags: first-review?
(Assignee)

Updated

12 years ago
Attachment #217725 - Flags: first-review? → first-review?(vladimir)
Comment on attachment 217725 [details] [diff] [review]
Adds a check to prevent crashing when the column name is NULL

We should still append something to mColumnNames -- an empty string or even a string with the null bit set.
Attachment #217725 - Flags: first-review?(vladimir) → first-review-
(Assignee)

Comment 3

12 years ago
Created attachment 218851 [details] [diff] [review]
Adds an empty string if no column name is available
Attachment #217725 - Attachment is obsolete: true
Attachment #218851 - Flags: first-review?(vladimir)
Comment on attachment 218851 [details] [diff] [review]
Adds an empty string if no column name is available

Looks good, thanks for making the change!
Attachment #218851 - Flags: first-review?(vladimir) → first-review+
(Assignee)

Updated

12 years ago
Attachment #218851 - Flags: approval-branch-1.8.1?(vladimir)
(Assignee)

Comment 5

12 years ago
I requested 1.8.1 approval since we won't be able to run on FF 2.0 without this.
Attachment #218851 - Flags: approval-branch-1.8.1?(vladimir) → approval-branch-1.8.1+
Whiteboard: [checkin needed]

Updated

12 years ago
Flags: blocking-firefox2?
Does this need to be checked in?
(Assignee)

Comment 7

12 years ago
Yes.

Comment 8

12 years ago
This shouldn't be checked in until bug 338155 has landed, which is the new version of sqlite.
Depends on: 338155

Updated

12 years ago
Flags: blocking-firefox2? → blocking-firefox2+

Comment 9

12 years ago
Fixed on trunk and 1.8 branch.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [checkin needed]

Updated

12 years ago
Blocks: 365166
You need to log in before you can comment on or make changes to this bug.