summaryrefslogtreecommitdiffstats
path: root/sql/connection_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move scoped_temp_dir from base to base/filesbrettw@chromium.org2012-11-161-3/+3
| | | | | | | | | | Also add to base namespace. BUG= Review URL: https://codereview.chromium.org/11359217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168281 0039d316-1c4b-4281-b951-d872f2087c98
* Make sql::Connection::Raze() more robust against corruptions.shess@chromium.org2012-11-101-1/+1
| | | | | | | | | | | | | | Corruptions resulting from the first page showing a different database size than the filesystem shows cause very basic functions to fail. This does fewer queries against the corrupt database, and also enables a magic pragma to let it make better progress. BUG=159490 Review URL: https://chromiumcodereview.appspot.com/11369126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167019 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream sqlite gyp changes for Android.yfriedman@chromium.org2012-08-061-2/+21
| | | | | | | | | | | Includes a change to sql/Connection to propagate the auto_vacuum pragma across a raze operation. Also updates test expectations. BUG=137853 Review URL: https://chromiumcodereview.appspot.com/10829062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150128 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the sqlite errors of content unittests on Androidyongsheng.zhu@intel.com2012-07-241-0/+14
| | | | | | | | | | | | | | | | | | | | | Many tests are failed due to sqlite errors on Android. The reason is that sqlite need a temporary directory to store internal temporary files. However, Android doesn't have this kind of directory while Linux has /var/tmp. To fix this, use in-memory temporary files. It also includes: 1) Add one unit test in sql unittests to reproduce this issue for Android. 2) Remove those disabled cases for content unitests on Android. BUG= TEST=run_tests.py -s sql_unittests; run_test.py -s net_unittests Review URL: https://chromiumcodereview.appspot.com/10809015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148064 0039d316-1c4b-4281-b951-d872f2087c98
* Modify sql unittests to pass on iOS.rohitrao@chromium.org2012-07-131-4/+5
| | | | | | | | | | BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10702203 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146604 0039d316-1c4b-4281-b951-d872f2087c98
* Added parameter 'clear_bound_vars', so we could reset the statement without ↵michaelbai@chromium.org2012-04-251-2/+2
| | | | | | | | | | | | | | clearing bound variables, so and current row is reset to the beginning. It is used to support the Andorid' sqlite cursor feature which could move the cursor around the result set. BUG= TEST=Added a new test. TBR=agl,akalin,michaeln Review URL: http://codereview.chromium.org/10171014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133985 0039d316-1c4b-4281-b951-d872f2087c98
* Implement sql::Connection::Raze() in terms of sqlite3_backup API.shess@chromium.org2012-04-061-1/+133
| | | | | | | | | | | | | | | | | | Wraps up the notion of reseting a database in a way which respects SQLite locking constraints and doesn't require closing the database. A similar outcome could be managed using filesystem operations, which requires coordination between clients of the database to make sure that no corruption occurs due to incorrect handling of -journal files. Also, Windows pins files until the last handle closes, making that approach challenging in some cases. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9768006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131167 0039d316-1c4b-4281-b951-d872f2087c98
* Reset needs_rollback after rollback.michaelbai@chromium.org2012-03-231-1/+10
| | | | | | | | | | | | Fix issue that the transaction can not be started if the nesting_transaction rollback. BUG= TEST=Add a new test to cover this case. Also pass the existing tests. Review URL: http://codereview.chromium.org/9839021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128352 0039d316-1c4b-4281-b951-d872f2087c98
* Put debugging assertions into sql::Statement.shess@chromium.org2011-12-121-4/+20
| | | | | | | | | | | | | | | | | | | | | | | 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
* Move app/sql/* files to sql/ directory.tfarina@chromium.org2011-07-191-0/+106
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