Closed Bug 465885 Opened 16 years ago Closed 16 years ago

gloda generates illegal identity queries when indexing (kind is specified, but not value)

Categories

(MailNews Core :: Database, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b1

People

(Reporter: asuth, Assigned: asuth)

Details

Attachments

(1 file)

Errors of the following form:

2008-11-19 22:06:40 gloda.indexer WARN Bailing on job (at undefined:undefined) because: error creating async statement SELECT * FROM identities WHERE id IN (SELECT id FROM identities WHERE (kind = ?) AND ()) - 1: near ")": syntax error - [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.createStatement]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::

...have been observed during indexing. The "(kind = ?) AND ()" bit should have a constraint on 'value' in the second cluster.  Without one, the query is dangerously under-specific (it would return all email identities); thankfully, the query generation logic generates the empty grouping which is syntactically illegal.

This is likely the result of a call to getOrCreateMailIdentities without any actual e-mail addresses specified.  It is my suspicion that it's a case of "garbage in", but even if it is that simple, we need to handle that error case better (at all).
putting on blocker list (let me know if that's wrong). Should be on the tracker list too, I think - garbage e-mail addresses definitely occur in the wild...
Flags: blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b1
Priority: -- → P1
moving to b2
Target Milestone: Thunderbird 3.0b1 → Thunderbird 3.0b2
Update Gloda.getOrCreateMailIdentities to notice when it has no addresses and just immediately return empty result sets.  I updated the doxygen which was wrong while I was there.  There's at least more of of it if it isn't more intelligible.

I have a jerky message whose offline store is corrupted into being completely blank, which was one case that could trigger this problem through gp-bugzilla, and this fix resolved that issue.  So, victory.

Also update index_ab just in case it somehow gets an oddly e-mail address lacking card.
Attachment #349725 - Flags: review?(dmose)
Whiteboard: [has patch][needs review dmose]
Attachment #349725 - Flags: review?(dmose) → review?(bienvenu)
Attachment #349725 - Flags: review?(bienvenu) → review+
fix landed.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][needs review dmose]
Target Milestone: Thunderbird 3.0b2 → Thunderbird 3.0b1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: