Hi,

I've discovered a potential bug in handling of SQLite database files on 
gvfs mounted network shares.

Steps to reproduce:
1. Under vanilla Ubuntu 15.04 with latest official patches and SQLite 
version 2.8.17, mount a Windows / SMB network share via Nautilus file 
manager. The share can be via SMBv2 or v3.
2. Assert that the share is accessible on console via 
`/var/run/user/USERID/gvfs/smb-share:server=SERVERADDRESS,share=SHARENAME/`
3. In a terminal `cd` to the share
4. `touch test.txt` to verify the share is writeable
5. Open a new SQLite database in the same folder with `sqlite test.sqlite`
6. Execute `create table tbl1(one varchar(10), two smallint);` to create 
a table
7. Insert data with `insert into tbl1 values('hello!',10);`

Actual result:
* Inserting data fails with `SQL error: database disk image is malformed`

Expected result:
* Data is inserted and correctly persisted to disk

Notes:
* After the above steps, the database file exists and is about 3kb large.
* I originally noticed the issue with Calibre, which is unable to 
maintain its SQLite ebook database file on a network share because of 
this issue.

I'd appreciate if someone on the list could verify the above findings 
and open an official bug report as needed.

Thank you.



Reply via email to