Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70EBA95A5 for ; Sat, 31 Mar 2012 06:05:04 +0000 (UTC) Received: (qmail 94008 invoked by uid 500); 31 Mar 2012 06:05:03 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 93966 invoked by uid 500); 31 Mar 2012 06:05:03 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 93941 invoked by uid 99); 31 Mar 2012 06:05:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2012 06:05:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 31 Mar 2012 06:05:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D4EC6350F46 for ; Sat, 31 Mar 2012 06:04:38 +0000 (UTC) Date: Sat, 31 Mar 2012 06:04:38 +0000 (UTC) From: "Urs Zimmermann (Commented) (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1083689541.339.1333173879017.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <510810222.40892.1332318583077.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CB-363) SQLite database does not grow on Android MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13243045#comment-13243045 ] Urs Zimmermann commented on CB-363: ----------------------------------- If you create a database of some initial size, then insert data around as much as the database size you get the above error. I don't know if this is according to the specification. In my case it renders the storage API useless for my app since I created a small database with an older version and I need to insert more data in the new version. Will provide sample code later today. > SQLite database does not grow on Android > ---------------------------------------- > > Key: CB-363 > URL: https://issues.apache.org/jira/browse/CB-363 > Project: Apache Callback > Issue Type: Bug > Components: Android > Affects Versions: 1.3.0, 1.4.0, 1.5.0 > Environment: Android Simulator, > Android 2.2+ > PhoneGap (any version) > Reporter: Urs Zimmermann > Assignee: Joe Bowser > Labels: android, phonegap, sqldatabase > > Description > ------------------ > If I create a database with the PhoneGap API (1.3.0 or higher) I can set an initial size. If I insert data, the size of the database file should grow if there is not enough space for all the inserted data. This is not working properly on Android, and I will get the following error: > error.code: 4 > error.message: there was not enough remaining storage space, or the storage quota was reached and the user declined to allow more space > When I close the app (kill the process) and reopen it, the database file is grown by ~1MB and I can insert data up to that size. > I tried inserting all of the data in one single transaction, or with every single insert being one transaction, the result is the same. Changing the database size after creation has no effect. > Steps to Reproduce > ------------------ > Create a Database with the phonegap API using > var db = window.openDatabase("test", "1.0", "Test DB", 200000); > 200000 being the size of the database, as used in the (former) API examples. > Expected Results > ------------------ > The database is created and I can read from and write to. > The size of the database file should grow, so all the data can get inserted. > Actual Results > ------------------ > The database is created and I can read from and write to. > When I insert data, the initial size seems to be the upper limit for the size of the db (filesize of the .db file) > When this size is reached and I try to insert data, phonegap aborts with the error described above. > This only happens on Android, device or simulator > For iOS the database seems to grow "on the fly" -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira