Commit Graph

73 Commits

Author SHA1 Message Date
Marco Bonardo
0786c95d93 Bug 628921 - Changing from WAL to a rollback journal to change page_size may cause a infinite loop @AsyncExecuteStatements::executeStatement.
r=sdwilsh a=blocking
2011-02-16 13:51:26 +01:00
timeless@mozdev.org
dd2f78db2a Bug 589488 mark DEBUG only variables as ifdef DEBUG in storage; r,a=sdwilsh
--HG--
extra : rebase_source : 330993f8af2139cd6c6fde60be85688472def56b
2011-02-08 14:16:38 -05:00
Ms2ger
60be8b0baa Bug 620360 - Fix unused variable warning in StatementCache::FinalizeCachedStatements; r+a=sdwilsh 2010-12-21 15:03:01 -08:00
Shawn Wilsher
766e3809c2 Bug 599969 - Add a statement cache helper object that is exported by storage.
This adds a templated StatementCache helper object (with tests!) that allows
consumers of storage to easily cache and reuse statements.  Consumers only need
to pass in the query string, and the rest is handled for them.
r=asuth
sr=rs
2010-11-08 11:42:29 -08:00
Shawn Wilsher
8c46198937 Merge mozilla-central into places. 2010-10-20 12:33:53 -07:00
Dan Witte
c50d79868f Bug 595925 - Use OpenUnsharedDatabase in cookies. r=sdwilsh, a=final+ 2010-10-19 17:24:52 -07:00
Marco Bonardo
f8d95d590c Bug 541373 (part 1) - Provide a global VACUUM component. r=sdwilsh sr=vlad a=blocking 2010-10-19 15:46:49 +02:00
Dan Witte
b9cf988084 Back out all cookie changes due to bug 602746. a=omgeverythingisbroken 2010-10-07 19:02:30 -07:00
Marco Bonardo ext:(%2C%20Shawn%20Wilsher%20%3Cme%40shawnwilsher.com%3E)
bf20473281 Bug 573492 - Use WAL journaling for places.sqlite.
r=sdwilsh
r=mak
a=blocking2.0
2010-09-13 09:29:42 -07:00
Dan Witte
26b9bc422a Bug 595925 - Use OpenUnsharedDatabase in cookies. r=sdwilsh, a=final+ 2010-10-07 14:00:17 -07:00
Ben Turner
72b198d8d5 Bug 593045 - 'Add SQLite file size quota management to mozStorage'. r=ted+asuth, a=blocking2.0+. 2010-09-03 07:41:55 -07:00
Taras Glek
f849918830 Bug 581606 - Avoid sqlite fragmentation via SQLITE_FCNTL_CHUNK_SIZE r=asuth sr=shaver a=b6 2010-09-01 20:35:46 -05:00
Shawn Wilsher
31576fbeec Bug 583882 - Need a way to clone an existing connection.
r=asuth
sr=shaver
a=blocking2.0
2010-08-27 12:42:58 -07:00
Marco Bonardo
f9a6abae66 Bug 547190 - AsInt64 (and other AsXXX cpp helpers) ignores GetInt64 failures. r=sdwilsh 2010-06-22 02:01:33 +02:00
Shawn Wilsher
4e43c7eae6 Bug 571581 - Propagate SQLITE_CONSTRAINT as an nsresult
r=asuth
sr=vlad
2010-06-16 09:59:24 -07:00
Saint Wesonga
3ed57717d1 Bug 492625 - "Stop using underscores to start #defines" [r=vlad]
--HG--
extra : rebase_source : d685fb8bc375ba4fcf97742298e9361ebfe9b851
2010-06-01 08:38:00 -04:00
Marco Bonardo
21198dad1f Bug 562787 - Fix getResultByName idl description to specify it needs an AS clause. r=asuth 2010-05-05 15:28:01 +02:00
Marco Bonardo
7a4702f9fa Bug 559678 - Better errors for Storage transactions misuse. r=asuth 2010-04-16 14:31:18 +02:00
Andrew Sutherland
ddd3c4327f Bug 507414 - Add a createAsyncStatement API on mozIStorageConnection. r=sdwilsh, sr=vlad.
--HG--
rename : storage/src/mozStorageStatementJSHelper.cpp => storage/src/mozStorageAsyncStatementJSHelper.cpp
rename : storage/src/mozStorageStatementJSHelper.h => storage/src/mozStorageAsyncStatementJSHelper.h
rename : storage/src/mozStorageStatementParams.cpp => storage/src/mozStorageAsyncStatementParams.cpp
rename : storage/src/mozStorageStatementParams.h => storage/src/mozStorageAsyncStatementParams.h
2010-03-24 00:32:40 -07:00
Shawn Wilsher
5bdff598be Bug 536978 - Cookies should write to the database asynchronously.
This makes cookie insertion, updates, and deletions happen asynchronously off of
the main thread.  The only I/O done on the main thread is the initial loading of
the database at each startup.
r=dwitte
2010-03-12 07:18:38 -08:00
Shawn Wilsher
6371523ca7 Bug 552092 - Expose a length property on mozIStorageBindingParamsArray
Expose the length so that consumers don't have to track if they added anything
to the array themselves.
r=asuth
sr=rob_strong
2010-03-15 10:23:39 -07:00
Marco Bonardo
28774cea88 Backing out bug 536978, due to a Storage assertion causing orange. CLOSED TREE 2010-03-12 17:41:28 +01:00
Shawn Wilsher
6fb0361405 Bug 536978 - Cookies should write to the database asynchronously.
This makes cookie insertion, updates, and deletions happen asynchronously off of
the main thread.  The only I/O done on the main thread is the initial loading of
the database at each startup.
r=dwitte
2010-03-12 07:18:38 -08:00
Shawn Wilsher
e7bf5fc1f2 Bug 496019 - mozilla::storage::Connection::Close can spin a nested event loop
Creates a new close method that must be used when using asynchronous statements,
and disallow Close from being called in that case.
r=asuth
sr=vlad
2009-11-09 09:58:34 -08:00
Shawn Wilsher
116173a4b7 Backout of bug 496019 and bug 526601 due to window build bustage. 2009-11-09 12:16:39 -08:00
Shawn Wilsher
e6c35ff3f0 Bug 496019 - mozilla::storage::Connection::Close can spin a nested event loop
Creates a new close method that must be used when using asynchronous statements,
and disallow Close from being called in that case.
r=asuth
sr=vlad
2009-11-09 09:58:34 -08:00
Paul O’Shannessy
5b3c2717f0 Bug 518440 - Deprecate mozIStorageStatementWrapper & mozIStorageStatement.step() in IDL. r=sdwilsh
--HG--
extra : rebase_source : 0ede87a6eb9a34475d9efafa433809e571a104d3
2009-09-25 15:32:21 -07:00
Akshay Gupta
fea6ebf827 Bug 433456 - mozIStorageFunction should be a [function]; r=sdwilsh 2009-08-06 20:00:39 +02:00
Shawn Wilsher
11b33f0ab8 Bug 506805 - Remove locking in AsyncExecuteStatements
This removes the use of the shared mutex in AsyncExecuteStatements.  We now rely
on PR_AtomicSet and the volatile keyword.  This results in zero lock contention
between the calling thread and the background thread if cancel is ever called.
r=asuth
r=bent
sr=vlad
2009-07-29 17:24:50 -07:00
Shawn Wilsher
c2762f99e9 Bug 455555 - Use asynchronous queries for places AutoComplete.
This changes the location bar's AutoComplete provider to use asynchronous
queries instead of synchronous ones.  No more blocking the main thread FTW!
r=mak
r=Mardak
r=dietrich
2009-07-13 12:19:03 -07:00
Shawn Wilsher
6cbf5ad014 Bug 490085 - Add ability to bind multiple sets of parameters and execute asynchronously
Improves the asynchronous API by allowing multiple parameters to be bound before
executing it.  The statement is then executed with each set of parameters
asynchronously.
r=asuth
sr=vlad
2009-06-17 12:12:51 -07:00
Shawn Wilsher
2b8dcfe38e Backed out changeset d546bd2c46a4 (bug 490085) because it's broken (and thunderbird's test caught it) 2009-06-17 13:43:30 -07:00
Shawn Wilsher
82d918234b Bug 490085 - Add ability to bind multiple sets of parameters and execute asynchronously
Improves the asynchronous API by allowing multiple parameters to be bound before
executing it.  The statement is then executed with each set of parameters
asynchronously.
r=asuth
sr=vlad

--HG--
rename : storage/test/unit/test_storage_statement_executeAsync.js => storage/test/unit/test_statement_executeAsync.js
2009-06-17 12:12:51 -07:00
Benjamin Smedberg
bb1c33c4ea Bug 488175 - flatten dist/include and provide mechanism to install certain headers in namespaced subdirectories (e.g. #include "mozilla/XPCOM.h") r=ted
--HG--
rename : xpcom/ds/nsTimeStamp.cpp => xpcom/ds/TimeStamp.cpp
rename : xpcom/ds/nsTimeStamp.h => xpcom/ds/TimeStamp.h
2009-05-18 14:15:05 -04:00
Shawn Wilsher
385f2d5ef4 Bug 489481 - Get C++ tests for our C++ helper classes
This gets rid of the old, unused native code test file for storage.  It adds two
more test files which test our C++ helper classes to ensure that they behave as
advertised.  Also fixes a bug found in mozStorageTransaction that was uncovered
while writing these tests.
r=asuth
2009-05-13 12:53:57 -04:00
Shawn Wilsher
50a1970205 Bug 490833 - mozIStorageStatement::getParameterIndex should only accept :-named parameters
This makes getParameterIndex only work properly with :-named parameters.  This
simplifies the work callers actually have to do.
r=asuth
2009-05-08 20:29:57 -04:00
Shawn Wilsher
5a70a49dbf Bug 492139 - Expose the Variant publicly so consumers can also use it
This exposes the templated nsIVariant implementation that storage uses
internally so that consumers can use it as well.
r=bsmedberg

--HG--
rename : storage/src/mozStorageVariant.cpp => storage/src/Variant.cpp
rename : storage/src/mozStorageVariant.h => storage/src/Variant.h
2009-05-12 17:08:49 -04:00
Shawn Wilsher
b6c8d54bc7 Backed out changeset b6f09258a505 (bug 490833). 2009-05-08 19:57:37 -07:00
Shawn Wilsher
fa30ee0fe3 Bug 490833 - mozIStorageStatement::getParameterIndex should only accept :-named parameters
This makes getParameterIndex only work properly with :-named parameters.  This
simplifies the work callers actually have to do.
r=asuth
2009-05-08 20:29:57 -04:00
Shawn Wilsher
c0d5aa90c8 Bug 483152 - Stop giving the ability to get the native sqlite3_stmt pointer
We don't really want to give this pointer out to consumers since we track some
state, and if they call SQLite functions on it, can cause our internal state to
be inaccurate.
r=asuth
2009-03-20 18:41:01 -04:00
Robert Sesek
49b3b4bd73 Bug 431473. Kill unused mozIStorageDataSet. r=sdwilsh 2009-01-19 21:44:31 +13:00
Marco Bonardo
ecb72b2c5d Bug 467856 - Expose SQLITE_IOERR, r=sdwilsh 2008-12-09 21:39:32 +01:00
Shawn Wilsher
c10c68340d fix for windows bustage 2008-12-08 17:36:20 -05:00
Shawn Wilsher
dc0b4a75a2 Bug 462173 - We treat transaction errors as fatal when we should not
r=asuth
2008-12-08 17:14:14 -05:00
Shawn Wilsher
39902a3ad9 Bug 451815 - Need a more reliable way to indicate SQLITE_BUSY
This changeset adds a new error result for storage (NS_ERROR_STORAGE_BUSY) that
maps directly to when SQLite would return SQLITE_BUSY.
r=asuth

--HG--
rename : storage/src/mozStorage.h => storage/src/mozStoragePrivateHelpers.h
2008-10-30 18:50:00 -04:00
Shawn Wilsher
92b873c0ea Bug 458998 - AsyncExecute helper classes can complete() before they are added to mPendingEvents
This changeset also fixes a few issues where we were holding a lock while and
kills off a few other race conditions that were noticed in the course of fixing
this bug.
r=bent
2008-10-24 18:30:07 -04:00
Shawn Wilsher
109431d7e2 Bug 461263 - Race condition exists with mozStorageTransaction
While the race was technically "safe", we could have possibly wrongly tried to
commit or rollback.  This changeset makes us operate sanely in all conditions.
r=bent
2008-10-24 16:50:01 -04:00
Shawn Wilsher
7d6e03614c Bug 458811 - Allow for multiple statements to be executed at in a transaction asynchronously
This changeset allows consumers to execute a series of statements, in order,
asynchronously in a transaction.
r=dcamp
sr=sicking
2008-10-13 18:45:40 -04:00
Shawn Wilsher
88ea2a123a comment change to kick off new builds
rs=me
2008-10-09 20:29:14 -04:00
Doug Turner
532a8f794c Bug 456471 - mozIStorageError IDL file needs ERROR undefined for WinCE / WinMobile. patch by wolfe, r=sdwilsh 2008-09-23 11:02:55 -07:00