You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Urs Zimmermann (Created) (JIRA)" <ji...@apache.org> on 2012/03/21 09:29:43 UTC

[jira] [Created] (CB-363) SQLite database does not grow on Android

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.4.0, 1.3.0, 1.5.0
         Environment: Android Simulator, 
Android 2.2+
PhoneGap (any version)
            Reporter: Urs Zimmermann
            Assignee: Joe Bowser
            Priority: Blocker
             Fix For: 1.6.0


<b>Description</b<

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.

<b>Steps to Reproduce</b>
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. 

<b>Expected Results</b>
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.

<b>Actual Results</b>
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

        

[jira] [Commented] (CB-363) SQLite database does not grow on Android

Posted by "Joe Bowser (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13242839#comment-13242839 ] 

Joe Bowser commented on CB-363:
-------------------------------

Can you please provide some code we can use to reproduce this error, otherwise I'm going to have to close this as "Won't Fix"
                
> 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

        

[jira] [Commented] (CB-363) SQLite database does not grow on Android

Posted by "Urs Zimmermann (Commented) (JIRA)" <ji...@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

        

[jira] [Updated] (CB-363) SQLite database does not grow on Android

Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-363:
--------------------------

         Priority: Major  (was: Blocker)
    Fix Version/s:     (was: 1.6.0)
    
> 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

        

[jira] [Updated] (CB-363) SQLite database does not grow on Android

Posted by "Urs Zimmermann (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Urs Zimmermann updated CB-363:
------------------------------

    Attachment: dbgrow.zip

Sample code:
- Creates database
- Fills the database with test data
=> Fails at row 58 with "error 4: there was not enough remaining storage space, or the storage quota was reached and the user declined to allow more space"

Close and Restart does resolve the problem.
                
> 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
>         Attachments: dbgrow.zip
>
>
> 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

        

[jira] [Commented] (CB-363) SQLite database does not grow on Android

Posted by "Joe Bowser (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13257856#comment-13257856 ] 

Joe Bowser commented on CB-363:
-------------------------------

I tried to fix this by forcing the database to be grown, but this has to be done explicitly.  I can't do anything on the back-end to change this, unfortunately.
                
> 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
>            Priority: Minor
>              Labels: android, phonegap, sqldatabase
>             Fix For: 1.7.0
>
>         Attachments: dbgrow.zip
>
>
> 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

        

[jira] [Resolved] (CB-363) SQLite database does not grow on Android

Posted by "Joe Bowser (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser resolved CB-363.
---------------------------

    Resolution: Won't Fix

The Android API won't let me increment a quota past what the user defines. The user has to re-initalize their database if they run into this error.
                
> 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
>            Priority: Minor
>              Labels: android, phonegap, sqldatabase
>             Fix For: 1.7.0
>
>         Attachments: dbgrow.zip
>
>
> 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

        

[jira] [Updated] (CB-363) SQLite database does not grow on Android

Posted by "Urs Zimmermann (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Urs Zimmermann updated CB-363:
------------------------------

    Description: 
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"


  was:
<b>Description</b<

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.

<b>Steps to Reproduce</b>
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. 

<b>Expected Results</b>
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.

<b>Actual Results</b>
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"


    
> 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
>            Priority: Blocker
>              Labels: android, phonegap, sqldatabase
>             Fix For: 1.6.0
>
>
> 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

        

[jira] [Updated] (CB-363) SQLite database does not grow on Android

Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-363:
--------------------------

         Priority: Minor  (was: Major)
    Fix Version/s: 1.7.0
    
> 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
>            Priority: Minor
>              Labels: android, phonegap, sqldatabase
>             Fix For: 1.7.0
>
>         Attachments: dbgrow.zip
>
>
> 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

        

[jira] [Commented] (CB-363) SQLite database does not grow on Android

Posted by "Urs Zimmermann (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13245048#comment-13245048 ] 

Urs Zimmermann commented on CB-363:
-----------------------------------

The database file is growing already: If you kill and restart the app, then the file grows up to 5mb. On iOs the file grows without a restart.

How would you suggest to solve this: My app is in the stores using the 200000 bytes database, which was fine for the time. For an update I need to insert more data.
                
> 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
>            Priority: Minor
>              Labels: android, phonegap, sqldatabase
>             Fix For: 1.7.0
>
>         Attachments: dbgrow.zip
>
>
> 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

        

[jira] [Commented] (CB-363) SQLite database does not grow on Android

Posted by "Urs Zimmermann (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258046#comment-13258046 ] 

Urs Zimmermann commented on CB-363:
-----------------------------------

Thank you Joe for your work. 
By "re-initialize the database" do you mean restarting the app? Is there a way to re-initialize the database programmatically without loosing data?
                
> 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
>            Priority: Minor
>              Labels: android, phonegap, sqldatabase
>             Fix For: 1.7.0
>
>         Attachments: dbgrow.zip
>
>
> 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

        

[jira] [Commented] (CB-363) SQLite database does not grow on Android

Posted by "Joe Bowser (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244430#comment-13244430 ] 

Joe Bowser commented on CB-363:
-------------------------------

OK, I can recreate the behaviour, but I don't know if this is a bug per-se.  The fact is that you created a database of 200000 bytes, and then you try to re-initialize the database to be larger, which fails.  You then try to fill the database, and this fails because you didn't give it enough memory.  I don't know if I'm comfortable with having a ballooning SQLite database, especially since the W3C spec says that you should prompt for when you reach the end.

Moving to a future release.
                
> 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
>             Fix For: 1.7.0
>
>         Attachments: dbgrow.zip
>
>
> 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

        

[jira] [Commented] (CB-363) SQLite database does not grow on Android

Posted by "Simon MacDonald (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13242379#comment-13242379 ] 

Simon MacDonald commented on CB-363:
------------------------------------

This doesn't appear to be a bug to me. The Android implementation is working the way it is described in the specification:

http://www.w3.org/TR/webdatabase/
                
> 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