summaryrefslogtreecommitdiffstats
path: root/sql
Commit message (Collapse)AuthorAgeFilesLines
* Clear statement before closing db in cookie code.shess@chromium.org2012-02-172-0/+9
| | | | | | | | | | | | | | | sql::Statement maintains a weak ref to the associated sql::Connection, meaning that if the database and statement are destructed in the wrong order, a use-after-free can result. sql::Statement::Clear() allows resetting the statement to the default-constructed state. BUG=111376 TEST=fewer crashes. Review URL: http://codereview.chromium.org/9418021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122430 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Android build.benm@chromium.org2012-02-101-4/+2
| | | | | | | | | | Android does not have toLower in it's <algorithm>, use StringToLowerASCII instead. Review URL: http://codereview.chromium.org/9384004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121505 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak inside sql::Connection::OpenInternal.benm@chromium.org2012-02-101-1/+2
| | | | | | | | | | | Make sure to close the database even if we failed to open it. BUG=113658 Review URL: http://codereview.chromium.org/9381011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121501 0039d316-1c4b-4281-b951-d872f2087c98
* Create a class to represent a Dom Storage Database.benm@chromium.org2012-02-103-6/+40
| | | | | | | | | | | | | Add a class that can read/write a local storage database in the same format as WebCore's StorageArea. Also add a method to sql::Statement to query the declared type of a column and a method to return a string16 from a Blob. BUG=106763 Review URL: http://codereview.chromium.org/9159020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121442 0039d316-1c4b-4281-b951-d872f2087c98
* [sql] WARN_UNUSED_RESULT on Execute().shess@chromium.org2011-12-231-5/+11
| | | | | | | | | | | | | | | | | | Goal is to encourage callers to handle errors, especially in cases like schema changes, where dropped errors can result in broken databases. Many CREATE INDEX calls where ignoring errors rather than checking if the index already existed before creating it. Recoded those to CREATE INDEX IF NOT EXISTS, which is for exactly this purpose. BUG=none TEST=none Review URL: http://codereview.chromium.org/9005036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115725 0039d316-1c4b-4281-b951-d872f2087c98
* Update webdata files to take advantage of DLOG(FATAL) ingbillock@chromium.org2011-12-222-1/+6
| | | | | | | | | | | | | sql/Statement and Connection. R=shess@chromium.org BUG= TEST=webdata/*Test*.* Review URL: http://codereview.chromium.org/8966003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115574 0039d316-1c4b-4281-b951-d872f2087c98
* AppCache INTERCEPT namespace.michaeln@google.com2011-12-132-2/+18
| | | | | | | | | | | | | | - Add support for a custom CHROMIUM CACHE MANIFEST signature. Other browsers should ignore files with this signature. - Parse intercept namespace entries out of the new CHROMIUM-INTERCEPT manifest section. Other browsers should ignore this entire section. - Store and retrieve the new kind of namespace records in the database layer. - Upgrade existing databases to the new schema. - Look for matches in the new namespaces when handling main and sub resource requests. - Add unit tests. BUG=101565 Review URL: http://codereview.chromium.org/8396013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114151 0039d316-1c4b-4281-b951-d872f2087c98
* Put debugging assertions into sql::Statement.shess@chromium.org2011-12-129-138/+180
| | | | | | | | | | | | | | | | | | | | | | | Pulls out the core of gbillock's http://codereview.chromium.org/8283002/ - Move NOTREACHED and similar checks into the sql:: implementation code. - Add malformed SQL checks to Connection::Execute. - Add SQL-checking convenience methods to Connection. The general idea is that the sql:: framework assumes valid statements, rather than having client code contain scattered ad-hoc (and thus inconsistent) checks. This version puts back Statement operator overloading and loosy-goosy Execute() calls to allow other code to be updated in small batches. R=gbillock@chromium.org,jhawkins@chromium.org,dhollowa@chromium.org BUG=none TEST=sql_unittests,unit_tests:*Table*.* Review URL: http://codereview.chromium.org/8899012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114118 0039d316-1c4b-4281-b951-d872f2087c98
* Remove 4 static initializers.thakis@chromium.org2011-11-241-1/+4
| | | | | | | | | | | | Most of them caused by gcc 4.4 being not sufficiently smart. BUG=94925 TEST=none TBR=akalin Review URL: http://codereview.chromium.org/8690005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111560 0039d316-1c4b-4281-b951-d872f2087c98
* export StatementRefdpranke@chromium.org2011-11-121-1/+1
| | | | | | | | | | R=tony@chromium.org BUG=103987 TEST=sql_unittests compiles on the webkit win shared builder Review URL: http://codereview.chromium.org/8538031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109753 0039d316-1c4b-4281-b951-d872f2087c98
* build sql as a component - this will help ensure there is only one copydpranke@chromium.org2011-11-107-6/+38
| | | | | | | | | | of sqlite getting linked in. R=rsesek@chromium.org Review URL: http://codereview.chromium.org/8506027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109510 0039d316-1c4b-4281-b951-d872f2087c98
* [SQLite] Hack to touch page cache to debug slow connection close.shess@chromium.org2011-09-141-0/+14
| | | | | | | | | | | | | | | | | | The shutdown-monitor has noted cases where sqlite3_close() is taking a very long time to finish. In reviewing the code, writes are committed before the close is called, so there should be almost no I/O involved (excepting perhaps unlocking the file?). One hypothesis is that the SQLite page cache, which is LRU, may have very old pages which have been paged out. This change touches them all, so if they are paged out the crash should move to this code. BUG=95527 TEST=Monitor crash in bug, see if it changes. Review URL: http://codereview.chromium.org/7891025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101034 0039d316-1c4b-4281-b951-d872f2087c98
* Enable SQLite's secure-delete at runtime so thatphajdan.jr@chromium.org2011-08-091-0/+6
| | | | | | | | | | | we don't need to rely on system SQLite being compiled with specific flags. BUG=22208 Review URL: http://codereview.chromium.org/7552022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96095 0039d316-1c4b-4281-b951-d872f2087c98
* Move app/sql/* files to sql/ directory.tfarina@chromium.org2011-07-1917-15/+2153
| | | | | | | | | | | | | | | | I can't remove app/app.gyp and app/app_base.gypi yet because they are referenced by third_party gyp files :( BUG=72317 TEST=None R=rsesek@chromium.org move app/sql to sql Review URL: http://codereview.chromium.org/7353026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93069 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the comments setting emands and vim tab width and expansion variables.tony@chromium.org2011-07-111-6/+0
| | | | | | | | | | | | | | | | | These were added in r28089 (http://codereview.chromium.org/256059) but are unnecessary bloat for everyone to carry around, even those that don't use emacs or vim. In an earlier change, I added editor config files in src/tools/emacs/ and src/tools/vim/ so users of the appropriate editor can source those instead. BUG=none TEST=none Review URL: http://codereview.chromium.org/7310019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92046 0039d316-1c4b-4281-b951-d872f2087c98
* Add sql/sql.gyp to start building libsql and sql_unittests.rsesek@chromium.org2011-06-301-0/+67
Nothing uses this yet, but is needed to make the changes to buildbot. It only hooks into all.gyp so it can be built. BUG=72317 TEST=sql_unittests Review URL: http://codereview.chromium.org/7281015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91132 0039d316-1c4b-4281-b951-d872f2087c98