From 367963639d4291511b7e175a208e2b553aac26c2 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Mon, 19 Oct 2009 22:15:45 -0700 Subject: [PATCH] Fix SQL for upgrade from ver 6 to ver 7 of Email database Fixes #2196917 Change-Id: Ia403e50e9ec4ea553d38ded656bba769a4a4dd18 --- src/com/android/email/provider/EmailProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index e96501b83..4730f164b 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -182,7 +182,7 @@ public class EmailProvider extends ContentProvider { "; delete from " + Message.DELETED_TABLE_NAME + " where " + MessageColumns.MAILBOX_KEY + "=old." + EmailContent.RECORD_ID + "; end"; - + static { // Email URI matching table UriMatcher matcher = sURIMatcher; @@ -692,7 +692,7 @@ public class EmailProvider extends ContentProvider { } if (oldVersion == 6) { // Use the newer mailbox_delete trigger - db.execSQL("delete trigger mailbox_delete;"); + db.execSQL("drop trigger mailbox_delete;"); db.execSQL(TRIGGER_MAILBOX_DELETE); oldVersion = 7; } @@ -874,7 +874,7 @@ public class EmailProvider extends ContentProvider { // Clients shouldn't normally be adding rows to these tables, as they are // maintained by triggers. However, we need to be able to do this for unit // testing, so we allow the insert and then throw the same exception that we - // would if this weren't allowed. + // would if this weren't allowed. if (match == UPDATED_MESSAGE || match == DELETED_MESSAGE) { throw new IllegalArgumentException("Unknown URL " + uri); }