Shawn Wilsher
b2f739eafd
Bug 494828 - Stop using our own mutexes and use SQLite's where possible.
...
Part 2: Use the helper object in a few places where we had our own mutexes.
r=asuth
--HG--
extra : rebase_source : 3f2f703274df0405bc395191dec8f522e5aa4e40
2009-07-22 15:18:33 -07:00
Shawn Wilsher
a92cc18aae
Bug 507674 - Safer protection of AsyncExecuteStatements::mState and AsyncExecuteStatements::mCancelRequested
...
This is essentially a backout of bug 506805, followed by changing the locking
protection rules to only protect mCancelRequested writing on the calling thread,
and reading on the background thread.
--HG--
extra : rebase_source : 249a61e40c2fd140527f034e36e8c1a53518baac
2009-09-02 13:30:24 -07:00
Shawn Wilsher
23ff1a9392
Bug 507199 - Fix race condition in finalizing asynchronous storage statements
...
(was "test_browserGlue_corrupt_nobackup_default.js, test_browserGlue_corrupt_nobackup.js, test_browserGlue_shutdown.js randomly crash")
Fixes a race condition with asynchronous statements that causes a crash. We do
not always have access to the background thread, so we should not assume we
always can get it.
2009-08-25 23:54:56 -07:00
Benjamin Smedberg
28fb767bd1
Followup to bug 398573 - remove REQUIRES from the tree since it is no longer used... automatically generated patch, rs=ted
2009-08-25 08:59:31 -07:00
Jacek Caban
1a92cc84f6
Bug 505734 - mozStorageStatementParams.cpp compilation fails on MinGW. r=sdwilsh
2009-08-09 22:30:38 +02:00
Shawn Wilsher
d5d76dcf77
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
2e3b0f1356
Bug 506959 - AsyncExecuteStatements assumes ms, but calls functions that assume microseconds
...
This fixes the code to use functions that expect milliseconds instead of
microseconds, and updates to use the new TimeStamp and TimeDuration class.
r=asuth
2009-07-28 13:18:10 -07:00
Shawn Wilsher
ce8cac9837
Bug 506022 - Avoid obtaining the database mutex at all costs in Connection::ExecuteAsync
...
Stop calling any SQLite functions that would acquire the database mutex inside
Connection::ExecuteAsync. Additionally, do not actually bind parameters when
the binding functions are called, but rather when we execute (so for async
statements, that will happen on the background thread creating no mutex
contention with the main thread).
r=asuth
2009-07-28 10:21:03 -07:00
Curtis Bartley
45140eeda8
Bug 498938 - Add Levenshtein Edit Distance function to Sqlite so we can use it in queries. r=sdwilsh sr=vlad
2009-07-24 11:39:34 -04:00
Shawn Wilsher
88060b8940
Backout of bug 494828 and bug 505550 due to orange.
2009-07-23 10:34:54 -07:00
Shawn Wilsher
e74cef816a
Bug 505550 - Acquire the db's mutex when cloning statements in Connection::ExecuteAsync
...
Hold the lock around all our API calls so we don't lose so much to the
background thread.
r=asuth
2009-07-22 15:18:33 -07:00
Shawn Wilsher
74a4ee10e1
Bug 494828 - Stop using our own mutexes and use SQLite's where possible.
...
Part 2: Use the helper object in a few places where we had our own mutexes.
r=asuth
2009-07-22 15:18:33 -07:00
Shawn Wilsher
fb2565a3ec
Bug 494828 - Stop using our own mutexes and use SQLite's where possible.
...
Part 1: Create helper objects to make using sqlite3_mutex safer and easier.
r=cjones
2009-07-22 15:18:33 -07:00
timeless@mozdev.org
d44786ab02
Bug 491196 don't implement static functions in headers
...
r=sdwilsh
Moving JSValStorageStatementBinder to mozStoragePrivateHelpers as bindJSValue
storage/src/mozStorageStatementParams.h: At global scope:
storage/src/mozStorageStatementParams.h:78: warning: ‘PRBool mozilla::storage::JSValStorageStatementBinder(JSContext*, mozIStorageStatement*, int, jsval)’ defined but not used
storage/src/mozStorageStatementParams.h:78: warning: ‘PRBool mozilla::storage::JSValStorageStatementBinder(JSContext*, mozIStorageStatement*, int, jsval)’ defined but not used
You get this once for each file that includes a header that defines a static function which is not used in that file.
2009-07-22 17:31:03 -05:00
Drew Willcoxon
66b05bc3f2
Bug 499990 - Locale-aware collation, r=sdwilsh, sr=vladimir
2009-07-15 10:49:05 -07:00
Makoto Kato
91fcbe6be9
Bug 499268 - storage code for Symbian emulator. r=sdwilsh
2009-06-29 14:42:56 +09:00
Shailen
9e5aca51bc
Bug 497823. Fix compilation errors in Stroage on AIX. r=sdwilsh
...
--HG--
extra : rebase_source : 58bdecd2cec8b9a39be37514fa2465015addec42
2009-06-29 10:59:40 +12:00
Shawn Wilsher
6aea4ed852
Bug 500750 - mDBConn is not set to NULL in release builds
...
r=asuth
2009-06-26 15:03:53 -07:00
Drew Willcoxon
4427484d44
Bug 490867 - Variant fixes: coerce null to empty string, GetIsNull should check correct type, variant base type should be void, r=sdwilsh
...
Adds a NullVariant derived class of Variant_base.
2009-06-24 15:04:49 -07:00
Shawn Wilsher
12b8fe4b3c
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
6ff78d5f2e
Bug 488148 - Share the mutex used by AsyncExecuteStatements on Connection
...
Greatly reduces the number of mutexes used when using the asynchronous storage
API.
r=bent
r=asuth
2009-06-17 12:12:43 -07:00
Shawn Wilsher
3c9aa7bba8
Backed out changeset 0997bcc75daf (bug 488148). Silly me - this patch is wrong!
2009-06-19 12:21:44 -07:00
Shawn Wilsher
b10c468693
Bug 488148 - Share the mutex used by AsyncExecuteStatements on Connection
...
Greatly reduces the number of mutexes used when using the asynchronous storage
API.
r=bent
r=asuth
2009-06-17 12:12:43 -07:00
Shawn Wilsher
4dce46aee4
Bug 485107 - Do not throw in NewResolve
...
This changeset makes sure that we allow for properties to be defined on the
prototype chain for the JS language helpers in storage.
r=bent
2009-06-11 13:18:58 -07:00
Shawn Wilsher
e3a25dad6a
imported patch storage.remove-statement-state-checks
2009-06-11 13:18:58 -07:00
Shawn Wilsher
89e8db6b31
Bug 492139 - Expose the Variant publicly so consumers can also use it
...
Actually makes this usable to things outside of the storage module.
r=bsmedberg
--HG--
rename : storage/src/Variant.cpp => storage/src/Variant_inl.h
2009-06-11 13:18:58 -07:00
Benjamin Smedberg
03afda7494
Follow-up to bug 488175 with correct capitalization of makefile variable.
2009-05-19 11:20:20 -04:00
Benjamin Smedberg
2b75f94db4
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
2ba3c00bd0
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
5ebd9a41ab
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
e96d5a20af
Backed out changeset b6f09258a505 (bug 490833).
2009-05-08 19:57:37 -07:00
Shawn Wilsher
68a95cfd58
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
2a8994626f
Bug 490084 - Add support for arrays in variantToSQLiteT
...
This adds support for blobs in variantToSQLiteT which means that functions can
no return blobs, as well as future consumers of variantToSQLiteT.
r=asuth
2009-05-08 20:29:57 -04:00
Shawn Wilsher
b252ec66eb
Bug 490083 - Refactor VariantToSQLite3Result to be more abstract
...
This refactors this refactors a method currently only used by the Connection
object to be more abstract so we can use it in future work.
r=asuth
2009-05-08 20:29:57 -04:00
Shawn Wilsher
b01d0d9c54
Bug 489702 - Update mozStorageStatement.* to follow style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:56 -04:00
Shawn Wilsher
25405ef9ba
Bug 489661 - Update mozStorageStatementWrapper.* to follow style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:56 -04:00
Shawn Wilsher
7fe9e9d3c7
Bug 489624 - Update mozStorageRow.* to follow style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:56 -04:00
Shawn Wilsher
f569886ca2
Bug 489617 - Update mozStorageResultSet.* to follow style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:56 -04:00
Shawn Wilsher
c22f22ae3d
Bug 489612 - Update mozStoragePrivateHelpers.* to follow style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:56 -04:00
Shawn Wilsher
6d309e1d32
Bug 489603 - Update mozStorageError.* to follow style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:55 -04:00
Shawn Wilsher
54396a500b
Bug 489257 - Rename and update mozStorageEvents.* to mozStorageAsyncStatementExecution.*
...
Renames the files to be more representative to what they actually contain. This
also updates the files to follow the storage style guidelines.
r=asuth
--HG--
rename : storage/src/mozStorageEvents.cpp => storage/src/mozStorageAsyncStatementExecution.cpp
rename : storage/src/mozStorageEvents.h => storage/src/mozStorageAsyncStatementExecution.h
2009-04-21 11:27:03 -04:00
Shawn Wilsher
17f2833430
Bug 489030 - Rename mozStorageValueArray.* to mozStorageArgValueArray.*
...
Better reflects the contents of the file. Also updated the file to follow the
storage style guidelines.
r=asuth
--HG--
rename : storage/src/mozStorageValueArray.cpp => storage/src/mozStorageArgValueArray.cpp
rename : storage/src/mozStorageValueArray.h => storage/src/mozStorageArgValueArray.h
2009-04-20 08:01:51 -07:00
Shawn Wilsher
b0eccdda0d
Bug 489018 - Rename mozStorageUnicodeFunctions.* to mozStorageSQLFunctions.*
...
New filename better reflects current (and future) contents. Also updates the
files to follow the storage style guidelines.
r=asuth
--HG--
rename : storage/src/mozStorageUnicodeFunctions.cpp => storage/src/mozStorageSQLFunctions.cpp
rename : storage/src/mozStorageUnicodeFunctions.h => storage/src/mozStorageSQLFunctions.h
2009-04-20 07:59:52 -07:00
Shawn Wilsher
6434b7006d
Bug 488379 - Update mozStorageConnection.* to follow style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-04-17 17:19:31 -04:00
Shawn Wilsher
faf027b5ff
Bug 487871 - Update vim modeline in style doc
...
Also updates the files that have already been updated.
r=asuth
2009-04-13 12:29:41 -04:00
Shawn Wilsher
9b82cdd18c
Bug 487715 - Update mozStorageVariant.* to follow style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-04-10 13:20:12 -04:00
Matthew Hayward
c9c6fdc4d5
Bug 461902 - Remove obsoleted 'CompletionNotifier::cancel()'
...
Removes some code that is no longer needed (or executed).
r=sdwilsh
2009-04-08 17:30:26 -04:00
Shawn Wilsher
49f7753ec1
Bug 487145 - Update language helpers to follow style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-04-08 12:24:25 -04:00
Shawn Wilsher
64d6c9cbee
Bug 487230 - Remove dead code in mozStorageValueArray.*
...
Removes code that appears to have never been used...
r=asuth
2009-04-08 12:24:22 -04:00
Shawn Wilsher
d63270efba
Bug 485628 - Clean up mozStorageService.* to match what is in the style guidelines
...
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-03-31 07:26:16 -07:00
Paul O’Shannessy
2ad1306b82
Bug 485223 - Stop checking mDBConnection is non-null in mozStorageStatement, r=sdwilsh
2009-03-27 10:15:33 -07:00
Shawn Wilsher
1c82f19a4e
Bug 484717 - Assert that our lock is held when the precondition says it should be
...
Use the new NSPR assertion to assert that a given PRLock is held when entering
a function.
r=asuth
2009-03-26 16:33:35 -04:00
Shawn Wilsher
ebd57691df
Bug 485071 - implement mozStorageStatementParams::NewEnumerate
...
This allows for the enumeration of named parameters on the parameter JS helper
object.
r=asuth
r=bent
2009-03-26 16:33:35 -04:00
Shawn Wilsher
ebc887cb7d
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
Shawn Wilsher
bab89c260d
Bug 483154 - mozStorageStatementParams should use mozIStorageStatement API
...
This makes us use the public API on mozIStorageStatement, which centralizes some
of our logic.
r=asuth
r=bent
2009-03-20 18:41:01 -04:00
Shawn Wilsher
5caa5a955a
Bug 483157 - mozStorageStatementRow needs to use mozIStorageStatement API
...
This makes our language helper use public API instead of calling SQLite
directly, which centralizes some of our logic.
r=asuth
r=bent
2009-03-20 18:41:01 -04:00
Shawn Wilsher
3232ba2f77
Bug 483880 - Pull out implementation of mozStorageVariant_base so we can include it in more than one file
...
The current implementation means it can only be #included once, which makes it
not terribly useful for other consumers.
r=asuth
2009-03-20 16:28:16 -04:00
Shawn Wilsher
6bc483d368
Bug 482159 - Add support for nsCString in mozStorageVariant
...
r=asuth
r=bent
2009-03-20 16:28:16 -04:00
Shawn Wilsher
41347a1d92
Bug 481261 - Expose when queries are being inefficient in debug builds
...
Follow-up change to support suppressing the warning for a certain query, and
reducing the verbosity of the message.
r=asuth
2009-03-20 16:28:16 -04:00
Shawn Wilsher
6eabcb4053
Bug 479728 - Rename AsyncExecute.
...
This renames the class to AsyncExecuteStatement to be a bit more clear as to
what it does.
r=asuth
2009-03-13 16:32:19 -07:00
Shawn Wilsher
33e7f34754
Bug 481261 - Expose when queries are being inefficient in debug builds.
...
This adds a warning in debug builds about queries that do not use an index to
sort, which tend to be much much slower.
r=asuth
2009-03-12 14:30:15 -04:00
Ben Turner
a39258a0fc
Bug 482614 - mozStorageVariant leaks its internal data due to non-virtual destructor
...
Most commonly seen when using executeAsync and having the results return a
string or blob.
r=sdwilsh
2009-03-10 18:54:24 -04:00
Ryan VanderMeulen
0bd4d5dba7
Bug 479543 - mozStorageConnection::Close should use NS_ERROR instead of NS_WARNING to complain about unfinalized statements; r=sdwilsh
2009-03-01 18:23:26 +01:00
Shawn Wilsher
45c1136267
Bug 479729 - Unable to shutdown using async statements.
...
This changeset finalizes statements before we try to rollback a transaction with
the async storage API. This problem only came up when you canceled a statement.
r=asuth
2009-02-26 12:55:47 -05:00
Shawn Wilsher
ea40827b9e
merge for backout
2009-02-23 17:35:19 -05:00
Shawn Wilsher
20bb637c5e
Backed out changeset f8926cd4a7b2 (bug 479543) since it breaks unit tests in
...
debug builds.
2009-02-23 17:34:46 -05:00
Alex Gartrell
1fc4220051
Bug 453781 - Merge TableExists and IndexExists, and replace nsCString with nsCAutoString
...
r=sdwilsh
2009-02-23 13:05:24 -05:00
Ryan VanderMeulen
ab18aff513
Bug 479543 - mozStorageConnection::Close should use NS_ERROR instead of NS_WARNING to complain about unfinalized statements
...
r=sdwilsh
2009-02-22 00:11:57 -05:00
Nilay Vaish
397f5b8964
Bug 473268 - We should use forget instead of swap in mozStorageService.cpp; r=sdwilsh
2009-02-03 15:42:28 +01:00
Andrew Sutherland
4b289a7f96
Bug 463907 - mozStorageConnection::ExecuteAsync does not check that provided statements have not been finalized; r=sdwilsh
2009-02-03 15:42:22 +01:00
Fred Jendrzejewski
fd612bd117
Bug 466622. Replace nsCStringArray with nsTArray<nsCString> for more consistent code and fewer heap allocations. r+sr=roc,r=bsmedberg
...
--HG--
extra : rebase_source : b963bf5de9d9c445b14620479691482512e0faf2
2009-01-22 17:15:34 +13:00
Blake Kaplan
a233c2b99b
Add missing return (from bug 473845).
2009-01-21 17:12:41 -08:00
Shawn Wilsher
52d28021fc
Bug 473845 - Break a potential cycle with XPConnect and mozStroageService
...
This changeset removes a cycle that gets created between XPConnect and the
storage service. This accomplishes this by releasing the cached reference to
XPConnect during xpcom-shutdown.
This was the last remaining leak of the browser-chrome test harness, so this
also sets the leak threshold to zero for that test.
r=bent
2009-01-21 16:52:16 -05:00
Robert Sesek
3d284940b1
Bug 431473. Kill unused mozIStorageDataSet. r=sdwilsh
2009-01-19 21:44:31 +13:00
Fred Jendrzejewski
9bd9de1b83
Bug 461047 - Replace nsStringArray with nsTArray<nsString>. r+sr=roc
2009-01-18 21:14:14 +01:00
Robert O'Callahan
730e65f154
Backed out changeset 8019a959aade
2009-01-16 22:20:33 +13:00
Fred Jendrzejewski
6e7f270ba9
Bug 461047. Replace nsStringArray with nsTArray<nsString>. r+sr=roc
...
--HG--
extra : rebase_source : 7a20af24c97867efbb28dafa6a70ea1b4cf00e58
2009-01-16 20:51:04 +13:00
Andrew Sutherland
83fc6b2f91
Bug 445525 - set SQLITE_CONFIG_MEMSTATUS to 0. v1.1 turn off SQLITE_CONFIG_MEMSTATUS at init-time. r=sdwilsh
2008-12-13 22:38:18 -08:00
Andrew Sutherland
39602a9277
Bug 463988 - Gloda: mozStorageConnection holds lock while calling outside its module leading to PR_ASSERT(lock->owner != me) on shutting down while indexing is active. v1 add flag that indicates async thread is shutting down, don't call nsIThread::Shutdown with a lock held. r=sdwilsh.
2008-12-13 18:59:17 -08:00
Marco Bonardo
4948060132
Bug 467856 - Expose SQLITE_IOERR, r=sdwilsh
2008-12-09 21:39:32 +01:00
Shawn Wilsher
644c5c2f22
Bug 462173 - We treat transaction errors as fatal when we should not
...
r=asuth
2008-12-08 17:14:14 -05:00
Shawn Wilsher
ab6e04edbe
Bug 448114 - Notify about non-finalized statements in debug builds
...
r=asuth
2008-12-08 17:14:14 -05:00
Andrew Sutherland
e7b6546ecc
Bug 462432 - Leak mAsyncExecutionMutex
...
r=sdwilsh
2008-11-27 12:34:40 -08:00
Shawn Wilsher
bd4da6090f
Addressing review nit for bug 464202 that was improperly addressed in changeset 59d84ac24da2
...
original patch r=mrbkap, a=beltzner
2008-11-20 14:11:03 -05:00
Jeff Walden
48be90e20f
Address followup nit for bug 464202.
2008-11-19 11:54:29 -08:00
Shawn Wilsher
c1e885c29f
Bug 457743 - Automatic wrapper creates cycles, and thus leaks. r=dcamp, r=asuth, a=beltzner for 1.9.1b2
2008-11-19 11:33:00 -08:00
Shawn Wilsher
d5f15cea7e
Bug 464202 - nsGlobalWindow leak running browser-chrome Mochitests. r=mrbkap a=beltzner
2008-11-19 01:11:30 -05:00
Shawn Wilsher
4fd637e531
Bug 461344 - abort if the version of sqlite we are using is not new enough
...
This adds a runtime check to ensure that the version of SQLite that is running
is the same as the one that we were compiled with. If the check fails, we will
display a prompt to the user, and abort.
r=bsmedberg
2008-10-31 20:38:58 -04:00
Shawn Wilsher
8b0141cbb2
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
d407c1afce
Bug 462434 - Transaction semantics are bad
...
This propagates errors in starting and ending transactions.
r=asuth
2008-10-30 18:46:25 -04:00
Shawn Wilsher
2d74e0a9c6
Bug 454740 - Asynchronous storage should batch/chunk results
...
This changeset batches results obtained by the async storage API so we are not
flooding the calling thread with so many events.
r=asuth
2008-10-29 13:13:32 -04:00
Serge Gautherie
8fa4f59fe4
Bustage fix (= missed additional change) for
...
Bug 460635 - There should be one async execution thread per mozStorageConnection connection; v1.2; r=(bugmail + sdwilsh)
2008-10-29 05:09:23 +01:00
Andrew Sutherland
c92dc265ef
Bug 460635 - There should be one async execution thread per mozStorageConnection connection; v1.2; r=(bugmail + sdwilsh)
2008-10-29 04:53:19 +01:00
Shawn Wilsher
398afe4d48
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
bc4175ab7e
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
afd5d7dc09
Bug 458756 - Use raw sqlite3_stmt pointers instead of the mozStorageStatement object for async statements
...
This ends up saving us a bunch of work when we execute a statement
asynchronously, and makes bug 458811 easier to do.
r=dcamp
2008-10-10 17:41:31 -04:00
Shawn Wilsher
46425c4d33
Bug 453722 - Do not need to safeguard more than one call to Init for storage service
...
Bug 449822 made it so services can not be initialized more than once when being
called from multiple threads. Storage used to protect against this, but no
longer needs to do this (which this changeset makes us do).
r=bent
2008-09-25 14:28:29 -04:00
Doug Turner
7f1936dbf7
Bug 456489 - WinCE Compiler keyword interface used in mozStorageRow.cpp. patch by wolfe, r=sdwilsh
2008-09-23 11:03:48 -07:00
Andrew Sutherland
c7864d5e2c
Bug 455202 - executeAsync without listener/callback results in segfault when error encountered; fix part; r=sdwilsh
2008-09-15 18:49:18 +02:00
Shawn Wilsher
b69823387d
Bustage fix - double semi-colon.
2008-09-12 17:40:55 -04:00
Shawn Wilsher
2bb92e1ff4
Bug 452897 - Automatically provide the wrapper for JavaScript
...
This changeset adds a language helper to mozStorageStatement so it gets the
attributes and methods that mozIStorageStatementWrapper has. We can now mark
the wrapper as depreciated.
r=vlad
r=mrbkap
--HG--
rename : storage/test/unit/test_storage_statement_wrapper.js => storage/test/unit/test_statement_wrapper_automatically.js
2008-09-12 17:30:41 -04:00
Shawn Wilsher
d208bc667c
Bug 452897 - Automatically provide the wrapper for JS
...
This changeset has no code changes - it just separates three classes that were
all contained in one file into three files (with appropriate headers). This is
being done to make the actual code changes for the bug simpler.
rs=me
2008-09-12 17:30:37 -04:00
Shawn Wilsher
0c9d8a25ee
Bug 452836 - Optimize calls to sqlite3_prepare_v2
...
This changeset makes all calls pass -1 for length which indicates that the
string is null terminated.
r=Neil
2008-09-03 12:20:10 -04:00
Jason Orendorff
979242fda9
Bug 407216 - DOM quick stubs - faster paths for top N DOM methods (r+sr=jst, security r=mrbkap, build r=bsmedberg)
...
* * *
* * *
* * *
2008-08-19 21:38:24 -05:00
Shawn Wilsher
47f3ce1223
Bug 452836 - Optimize calls to sqlite3_prepare_v2
...
This makes sqlite not copy the sql string when preparing it, saving us a string
copy every time.
r=bholley
2008-08-29 17:19:23 -04:00
Shawn Wilsher
fea0d344af
Bug 452833 - Do not loop if we get SQLITE_SCHEMA
...
We used to have to try again if we got SQLITE_SCHEMA back from sqlite when we
prepare a statement. However, this isn't needed with the new v2 interface,
which we now use.
r=bholley
2008-08-29 17:17:01 -04:00
Shawn Wilsher
52d9a425e5
Bug 451058 - Address post-review comments.
...
This addresses some comments that were brought up after the code had already
landed.
r=Neil
2008-08-29 16:46:14 -04:00
Shawn Wilsher
e96df2c373
Bug 452841 - Remove hack in mozStorageStatement::Initialize
...
This removes some code that was at one time needed to work around a sqlite but
that no longer exists.
r=vlad
2008-08-29 16:42:12 -04:00
Shawn Wilsher
67c7cc11c7
Bug 451463 - mozStorageStatement needs threadsafe refcounting
...
This changeset makes mozStoageStatement use threadsafe refcounting. The class
is still not threadsafe, but JS consumers cannot create a statement off of the
main thread since it would be garbage collected on the main thread.
r=bent
2008-08-27 13:11:02 -04:00
Shawn Wilsher
8415fd9d17
Bug 448607 - Includes and comments are not accurate in mozStorageBackground.*
...
This fixes some comments that are wrong and removes unneeded includes.
rs=me; there's really no change here.
2008-08-27 13:05:03 -04:00
Jason Orendorff
fa48fad167
Backing out changeset cf6c811e1272 (bug 407216) due to debug assertions.
2008-08-19 22:28:26 -05:00
Jason Orendorff
f70c775843
Bug 407216 - DOM quick stubs - faster paths for top N DOM methods (r+sr=jst, security r=mrbkap, build r=bsmedberg)
...
* * *
* * *
2008-08-19 21:38:24 -05:00
Shawn Wilsher
bbe06d499c
Make mozIStorageConnection threadsafe - bug 448476 r=robarnold
2008-08-12 17:50:25 -07:00
Blake Kaplan
93a1d9d3d0
Avoid returning false without setting an exception. bug 429521, r=sdwilsh
2008-08-04 10:04:27 -07:00
Shawn Wilsher
7d890ca2b0
Bug 429986 - Provide an option for database access to be asynchronous.
...
This adds a method to mozIStorageStatement to allow for a statement to execute
asynchronously and report to a callback. For writes, this can move fsyncs,
which can be painful, off of the main thread.
r=vlad
sr=shaver
2008-07-11 15:47:33 -04:00
Shawn Wilsher
b994d6a1f7
Bug 435994 - Implement ResultSet and Row for mozIStorageStatement::executeAsync
...
These creates the result set and row objects to be used with the async storage
API added in bug 429986.
r=vlad
sr=shaver
2008-07-11 15:47:28 -04:00
Shawn Wilsher
d4a8e28e6c
Bug 435995 - Implement an nsIVariant object storage can use.
...
This creates a templated C++ class for storage to map SQLite data types to the
correct nsIVariant.
r=robarnold
r=vlad
2008-07-11 15:47:21 -04:00
Shawn Wilsher
5ccdb6b65b
Bug 444347 - Make NSPR logging a bit more useful
...
This adds additional NSPR logging to storage. Logging is now done when a sql
statement is prepared, a connection is opened, and a connection is closed.
Additionally, when sqlite3_trace is called, we also log the address of the
connection so you know what queries are running on which database. The address
is also logged at connection open so you can perform the mapping.
r=vlad
2008-07-11 15:00:58 -04:00
Arpad Borsos
a9bfd7a480
Bug 434838 - mozStorageConnection uses nsDataHashtable when it should use nsInterfaceHashtable
...
This makes mozStorageConnection no longer manually AddRef and Release user
defined functions.
r=sdwilsh
r=bent
2008-07-08 18:38:25 -04:00
Shawn Wilsher
5186757c75
Bug 434796
...
Remove mozIStorageStatement::initialize
r=vlad
sr=shaver
2008-06-11 11:00:09 -04:00
Shawn Wilsher
af474342bb
Bug 434247
...
Remove mozStorageStatement's mStatementString
r=vlad
2008-06-11 10:25:20 -04:00
Shawn Wilsher
7bb32c0f6c
Backed out changeset 5ccc3423220f
2008-06-04 12:55:44 -04:00
Shawn Wilsher
cbaeb177b3
Bug 434247
...
Remove mozStorageStatement's mStatementString
r=vlad
2008-06-04 11:59:43 -04:00
Shawn Wilsher
4f7847336c
Bug 434244
...
Remove mozStorageStatement::Recreate
r=shaver
2008-06-04 11:42:15 -04:00
sdwilsh@shawnwilsher.com
f0604a344a
Bug 421482 - Firefox 3 uses fsync excessively. r=shaver, a=schrep
2008-05-23 07:56:10 -07:00
sdwilsh@shawnwilsher.com
78099ebf94
Bug 423273 - Fix storage API to not break old behavior. r=shaver, sr=shaver, a=shaver
2008-03-24 15:14:38 -07:00
edward.lee@engineering.uiuc.edu
6fd6cccd12
Bug 420505 - mozStorageService isn't as threadsafe as it claims to be. p=sdwilsh, r=brendan, r=bsmedberg, b1.9=sayrer
2008-03-19 18:37:04 -07:00
dveditz@cruzio.com
8c64ad4e10
bug 423964 uninitialized variable, r=sdwilsh, a=beltzner
2008-03-19 15:55:34 -07:00
timeless@mozdev.org
3b14330ed3
Bug 422687 encfs makes Firefox crash at start [@ libsqlite3.so@0x30fad][@ sqlite3_exec] r=sdwilsh a=beltzner
2008-03-17 14:01:16 -07:00
sayrer@gmail.com
93649c472e
Bug 419905. turn off pgo in places, mozstorage, sqlite. r=ted.mielczarek, a=beltzner
2008-02-27 12:25:45 -08:00
reed@reedloden.com
458910fcde
Bug 263381 - "support --with-system-sqlite3 in storage builds" [p=mh+mozilla@glandium.org (Mike Hommey) r=bsmedberg a1.9=beltzner]
2008-02-22 03:25:59 -08:00
jag@tty.nl
60e16aa5b6
Bug 73353: Clean up our MODULE/REQUIRES story. rs=dbaron, a=brendan
2008-02-18 00:50:04 -08:00
sdwilsh@shawnwilsher.com
7efaade60c
Bug 416173 - BackupDB is completely useless. r=vlad, a=damons
2008-02-09 11:05:49 -08:00
myk@mozilla.org
22e51a82e6
bug 413589: enable fts3 (full text index) sqlite module; r=sdwilsh, a=damons
2008-01-29 15:34:19 -08:00
sdwilsh@shawnwilsher.com
ad1612cdbf
Bug 408914 - Disable sqlite async IO. r=vlad
2008-01-09 19:21:56 -08:00
reed@reedloden.com
ca04052974
Bug 408914 - "Disable sqlite async IO" [p=vladimir@pobox.com (Vladimir Vukicevic [vlad]) r=sdwilsh a1.9=beltzner]
2008-01-07 00:27:25 -08:00
reed@reedloden.com
06d2d2f0d1
Bug 409386 - "mozStorageArgvValueArray::GetString returns wrong length" [p=ondrej@allpeers.com (Ondrej Brablc) r=sdwilsh a1.9=schrep]
2007-12-21 22:09:25 -08:00
reed@reedloden.com
cff8cd4f84
Bug 385066 - "Remove preloading from mozStorage" [p=comrade693+bmo@gmail.com (Shawn Wilsher [sdwilsh]) r=gavin a=blocking1.9+]
2007-12-17 21:34:50 -08:00
reed@reedloden.com
a8ff36f025
Bug 403068 - "Need a wrapper function for SQLite function sqlite3_column_decltype" [p=jzhang@aptana.com (john Zhang) r=sdwilsh a1.9=damons]
2007-11-13 00:26:45 -08:00
sdwilsh@shawnwilsher.com
83f417766f
Bug 395526 - Change assertions to real errors in mozStorageStatement.cpp. r=sspitzer, a=bzbarsky
2007-09-21 11:13:47 -07:00
sdwilsh@shawnwilsher.com
dee8ac7f39
Bug 394789 - Add a finalize() method to mozStorageStatement. r=neil, r=sspitzer, a=bzbarsky
2007-09-18 20:26:51 -07:00
sdwilsh@shawnwilsher.com
4eac417aa8
Bug 394241 - Add a closeDatabase() method to mozStorage. r=sspitzer
2007-08-30 06:43:17 -07:00
sdwilsh@shawnwilsher.com
0ef0a97fb7
Bug 393082 - Warn on unsafe usage of LIKE. r=sspitzer
2007-08-29 18:56:14 -07:00
sdwilsh@shawnwilsher.com
6f3a35794d
Bug 383673 - mozStorageValueArray only asserts on out of bounds (and other cleanup). r=sspitzer
2007-08-28 08:29:49 -07:00
sspitzer@mozilla.org
892e2b9e5c
fix for bug #393952 : crash when I try to VACUUM (StorageUnicodeFunctions::likeFunction() should handle null aArgv[0] and aArgv[1]) r=sdwilsh
2007-08-27 21:43:10 -07:00
sspitzer@mozilla.org
baa64e03da
fix for bug #391697 : add escapeStringForLIKE to mozIStorageStatement r=sdwilsh
2007-08-10 15:57:02 -07:00
sdwilsh@shawnwilsher.com
02be52e34c
Bug 391156 - mozStorage doesn't handle unicode in LIKE, UPPER, or LOWER functions (string nit follow-up patch). r=sspitzer
2007-08-10 11:33:14 -07:00
sspitzer@mozilla.org
5019028ac3
fix for bug: mozStorage doesn't handle unicode in LIKE, UPPER, or LOWER functions patch=Shawn Wilsher <sdwilsh@mozilla.com> r=sspitzer
2007-08-10 09:19:57 -07:00
sspitzer@mozilla.org
c388675fed
fix for bug #385067 : upgrade to latest version of sqlite (3.4.0)
...
patch=sdwilsh, rs=sspitzer
fix for bug #387609 : Add check for lastError in test_storage_progresshandler.js
patch=sdwish, r=sspitzer
2007-08-02 08:24:50 -07:00
flamingice@sourmilk.net
09a2e8231b
Bug 386179, Stop using sqlite3ApiExit, r=sdwilsh
2007-07-24 19:18:54 -07:00
sdwilsh@shawnwilsher.com
510bb3d6b4
Bug 388059 - Add a getColumnIndex method to mozIStorageStatement. r=sspitzer
2007-07-19 09:30:17 -07:00
sdwilsh@shawnwilsher.com
7e7cab07e6
Bug 388048 - mozIStorageStatement::getParameterIndexes is useless. r=sspitzer
2007-07-15 11:03:20 -07:00
sdwilsh@shawnwilsher.com
7019922adf
Bug 384526 - Use sqlite3_prepare_v2 instead of sqlite3_prepare. r=sspitzer
2007-07-11 15:20:39 -07:00
sdwilsh@shawnwilsher.com
997b6310e9
Backout of Bug 384526 (causes orange)
2007-07-10 10:23:36 -07:00
sdwilsh@shawnwilsher.com
ac4890c33d
Bug 384526 - Use sqlite3_prepare_v2 instead of sqlite3_prepare. r=sspitzer
2007-07-10 09:58:17 -07:00
jwalden@mit.edu
12e960c504
Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros.
2007-07-08 00:08:04 -07:00
sdwilsh@shawnwilsher.com
7f9c748719
Bug 333848 - add full-featured user-defined functions and progress handlers to storage. Patch by Lev Serebryakov <blacklion@gmail.com>. r=sdwilsh
2007-07-07 14:14:51 -07:00
sdwilsh@shawnwilsher.com
8b24012813
Bug 386394 - Add a BackupDB method to mozIStorageConnection. r=mano
2007-07-03 13:54:36 -07:00
sdwilsh@shawnwilsher.com
a77dbe81b6
Bug 365166 - crash [@ strlen] calling mozIStorageStatement::getColumnName of a statement created with "PRAGMA user_version" or "PRAGMA schema_version". Patch by Nickolay Ponomarev <asqueella@gmail.com>. r=sdwilsh
2007-07-02 15:36:41 -07:00
sdwilsh@shawnwilsher.com
fdacbba11f
Bug 386179 - Stop using private sqlite functions. r=sspitzer
2007-07-02 10:25:36 -07:00
philringnalda@gmail.com
05ae532ba4
Bug 386366 - Add convenience method for getting the database schema version, patch by Shawn Wilsher <sdwilsh@mozilla.com>, r=sspitzer
2007-06-29 20:32:09 -07:00
sdwilsh@shawnwilsher.com
72a0b4ca0d
Bug 385396 - Go back to vanilla sqlite files. r=mconnor
2007-06-22 14:34:14 -07:00
sdwilsh@shawnwilsher.com
070ef2b777
Bug 385431 - mozStorageAsyncIO.cpp:559: warning: unused variable 'message'. Patch by Ryan Jones <sciguyryan@gmail.com>. r=sdwilsh
2007-06-22 13:24:43 -07:00
sdwilsh@shawnwilsher.com
2f5dc24a10
Bug 385262 - NOTREACHED called before logging. Patch by Ryan Jones <sciguyryan@gmail.com>. r=sdwilsh
2007-06-21 16:52:18 -07:00
sdwilsh@shawnwilsher.com
bc5af742fb
Bug 341137 - Upgrade to latest version of sqlite (take 2). r=vladimir
2007-06-20 20:17:26 -07:00
sdwilsh@shawnwilsher.com
6cb92e7b35
Backout of Bug 341137
2007-06-19 16:47:38 -07:00
sdwilsh@shawnwilsher.com
aaf8d336cf
Bug 341137 - Upgrade to latest version of sqlite. r=vladimir
2007-06-19 12:54:01 -07:00
sdwilsh@shawnwilsher.com
ed928796c5
Bug 363024 - Calling createInstance() on mozIStorageService crashes. r=sspitzer
2007-06-18 19:22:01 -07:00
sdwilsh@shawnwilsher.com
bf2a319179
Bug 384454 - Remove sqlite3_bind_parameter_indexes. r=sspitzer
2007-06-18 16:42:23 -07:00
sdwilsh@shawnwilsher.com
439e6bd5c4
Bug 383543 - mozStorageService cleanup. r=sspitzer
2007-06-12 16:31:59 -07:00
sdwilsh@shawnwilsher.com
2811b49856
Bug 383534 - mozStorageConnection ignores return values (and other cleanup). r=sspitzer
2007-06-12 16:19:34 -07:00
sdwilsh@shawnwilsher.com
e4f8536def
Bug 381549 - mozStorageStatement ignores return values from SQLite. r=sspitzer
2007-06-12 15:01:05 -07:00
igor@mir2.org
3b6c4a7b39
Bug 377751: Switching JSClass.mark in XPConnect to the tracing semantics. r=jst, sr=brendan
2007-05-02 13:20:21 -07:00
igor@mir2.org
4d2fa17276
Bug 377751: removal of the commit.
2007-05-01 14:54:29 -07:00
igor@mir2.org
4d525734e5
Bug 377751: JSClass instances in xpconnect use the tracing API. r=brendan, sr=jst
2007-05-01 14:06:07 -07:00
roc+@cs.cmu.edu
0054412272
Bug 374866. Reftests for text-transform. r=dbaron
2007-03-22 16:01:14 -07:00
sdwilsh%shawnwilsher.com
50cf696aaf
Bug 421482 - Firefox 3 uses fsync excessively. r=shaver, a=schrep
2008-05-23 14:56:10 +00:00
sdwilsh%shawnwilsher.com
4dc42ff373
Bug 423273 - Fix storage API to not break old behavior. r=shaver, sr=shaver, a=shaver
2008-03-24 22:14:40 +00:00
edward.lee%engineering.uiuc.edu
80ae595f78
Bug 420505 - mozStorageService isn't as threadsafe as it claims to be. p=sdwilsh, r=brendan, r=bsmedberg, b1.9=sayrer
2008-03-20 01:37:04 +00:00
dveditz%cruzio.com
b6d26ac6ef
bug 423964 uninitialized variable, r=sdwilsh, a=beltzner
2008-03-19 22:55:34 +00:00
timeless%mozdev.org
1ca9bee0ed
Bug 422687 encfs makes Firefox crash at start [@ libsqlite3.so@0x30fad][@ sqlite3_exec]
...
r=sdwilsh a=beltzner
2008-03-17 21:01:16 +00:00
sayrer%gmail.com
3d734ed178
Bug 419905. turn off pgo in places, mozstorage, sqlite. r=ted.mielczarek, a=beltzner
2008-02-27 20:25:46 +00:00
reed%reedloden.com
981869b961
Bug 263381 - "support --with-system-sqlite3 in storage builds" [p=mh+mozilla@glandium.org (Mike Hommey) r=bsmedberg a1.9=beltzner]
2008-02-22 11:26:00 +00:00
jag%tty.nl
4221353fba
Bug 73353: Clean up our MODULE/REQUIRES story. rs=dbaron, a=brendan
2008-02-18 08:50:33 +00:00
sdwilsh%shawnwilsher.com
fa9a0b9fce
Bug 416173 - BackupDB is completely useless. r=vlad, a=damons
2008-02-09 19:05:49 +00:00
myk%mozilla.org
0575dd8932
bug 413589: enable fts3 (full text index) sqlite module; r=sdwilsh, a=damons
2008-01-29 23:34:21 +00:00
sdwilsh%shawnwilsher.com
c738a80c4f
Bug 408914 - Disable sqlite async IO. r=vlad
2008-01-10 03:21:56 +00:00
reed%reedloden.com
3294ec276d
Bug 408914 - "Disable sqlite async IO" [p=vladimir@pobox.com (Vladimir Vukicevic [vlad]) r=sdwilsh a1.9=beltzner]
2008-01-07 08:27:25 +00:00
reed%reedloden.com
87fc52cdca
Bug 409386 - "mozStorageArgvValueArray::GetString returns wrong length" [p=ondrej@allpeers.com (Ondrej Brablc) r=sdwilsh a1.9=schrep]
2007-12-22 06:09:25 +00:00
reed%reedloden.com
d72c347691
Bug 385066 - "Remove preloading from mozStorage" [p=comrade693+bmo@gmail.com (Shawn Wilsher [sdwilsh]) r=gavin a=blocking1.9+]
2007-12-18 05:34:51 +00:00
reed%reedloden.com
4b8d43fb2c
Bug 403068 - "Need a wrapper function for SQLite function sqlite3_column_decltype" [p=jzhang@aptana.com (john Zhang) r=sdwilsh a1.9=damons]
2007-11-13 08:26:46 +00:00
sdwilsh%shawnwilsher.com
6d02471410
Bug 395526 - Change assertions to real errors in mozStorageStatement.cpp. r=sspitzer, a=bzbarsky
2007-09-21 18:13:47 +00:00
sdwilsh%shawnwilsher.com
d3b754ab84
Bug 394789 - Add a finalize() method to mozStorageStatement. r=neil, r=sspitzer, a=bzbarsky
2007-09-19 03:26:52 +00:00
sdwilsh%shawnwilsher.com
9f9c9e8932
Bug 394241 - Add a closeDatabase() method to mozStorage. r=sspitzer
2007-08-30 13:43:18 +00:00
sdwilsh%shawnwilsher.com
1b8e3ea446
Bug 393082 - Warn on unsafe usage of LIKE. r=sspitzer
2007-08-30 01:56:14 +00:00
sdwilsh%shawnwilsher.com
a050439d90
Bug 383673 - mozStorageValueArray only asserts on out of bounds (and other cleanup). r=sspitzer
2007-08-28 15:29:49 +00:00
sspitzer%mozilla.org
b9976d5426
fix for bug #393952 : crash when I try to VACUUM (StorageUnicodeFunctions::likeFunction() should handle null aArgv[0] and aArgv[1])
...
r=sdwilsh
2007-08-28 04:43:10 +00:00
sspitzer%mozilla.org
6d27fcd5a3
fix for bug #391697 : add escapeStringForLIKE to mozIStorageStatement
...
r=sdwilsh
2007-08-10 22:57:03 +00:00
sdwilsh%shawnwilsher.com
a94543eae3
Bug 391156 - mozStorage doesn't handle unicode in LIKE, UPPER, or LOWER functions (string nit follow-up patch). r=sspitzer
2007-08-10 18:33:14 +00:00
sspitzer%mozilla.org
1c17670599
fix for bug: mozStorage doesn't handle unicode in LIKE, UPPER, or LOWER functions
...
patch=Shawn Wilsher <sdwilsh@mozilla.com>
r=sspitzer
2007-08-10 16:19:58 +00:00