[Webkit-unassigned] [Bug 28918] Add support for Database.readTransaction()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 8 13:51:07 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28918


Dumitru Daniliuc <dumi at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #39209|                            |review?
               Flag|                            |
  Attachment #39098|0                           |1
        is obsolete|                            |
  Attachment #39098|review?                     |
               Flag|                            |




--- Comment #9 from Dumitru Daniliuc <dumi at chromium.org>  2009-09-08 13:51:06 PDT ---
Created an attachment (id=39209)
 --> (https://bugs.webkit.org/attachment.cgi?id=39209)
patch

Same patch, with resolved ChangeLog files.

(In reply to comment #8)
> With this change we're changing the semantics of what 'readOnly' currently
> means to the authorizer. 
> 
> The existing behavior is to support safari's private browsing mode and
> generally (but no exactly) constrains any side effects of a statement to not be
> visible outside of the connection to the database. Accordingly, creating and
> deleting 'temp' objects only visible on that connection are allowable for
> private browsing. The new readonly transaction semantics constrain any side
> effects to not be visible outside of a transaction, which also excludes
> creating and deleting 'temp' objects. There are also differences in how VIEWS
> are treated, for private browsing purposes these can be created and deleted,
> but in readonly transaction semantics these schema changes can't be made. 
> 
> Unless we can reconcile the two meanings of 'readOnly', we may need two
> separate flags.

I talked to Brady about this. The only differences were the REINDEX and
(CREATE|DROP) [TEMP] VIEW commands. According to Brady, REINDEX was an omission
and should've been fixed, and since VIEWs result in new temp files, they have
no place in private browsing. Basically, as the flag (readOnlyMode) in the code
suggests, private browsing should really be a read-only mode. So I believe the
subsets of allowed operations in readTransaction() and private browsing are
identical.

> 91 static JSValue DatabaseTransactionHelper(... RefPtr<Database> database, bool
> readOnly)
> 
> I think Database* would be better.

done.

> 104     executeStatement(tx, "DROP TABLE TestTempTable;",
> "SQLITE_DROP_TEMP_TABLE");
> 105     executeStatement(tx, "DROP TRIGGER TestTempTrigger;",
> "SQLITE_DROP_TEMP_TRIGGER");
> 106     executeStatement(tx, "DROP VIEW TestTempView;",
> "SQLITE_DROP_TEMP_VIEW");
> 
> These lines look like they intend to operate on TEMP objects, but I don't think
> they actually do.

They do, these entities are created using 'CREATE TEMP <something>'. The syntax
for dropping TEMP tables/triggers/views is the same as the syntax for dropping
permanent entities.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list