Bug report #8638

Spatialite layers are added as tables without geometries or "Error 11 Connection to database failed" error

Added by Giovanni Manghi over 10 years ago. Updated over 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Data Provider/SpatiaLite
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed
Crashes QGIS or corrupts data:No Copied to github as #:17370

Description

In QGIS 2 with DB manager the Spatialite layers are shown as they were geometry less tables and are added as such.

Does not happen when adding the same layer from the browser or from the "add SL layers" dialog.

Tested on Windows.

sl_samples.zip (3.04 MB) Giovanni Manghi, 2013-09-21 01:59 PM

History

#1 Updated by Giovanni Manghi over 10 years ago

  • Subject changed from DB manager: Spatialite layers are added as tables without geometries to DB manager (on windows standalone): Spatialite layers are added as tables without geometries

update: on qgis 2.0 installed with osgeo4w is ok, the described issue appear just on qgis 2.0 installed with the standalone installer and ONLY if the SL db was created with QGIS standalone.

In fact even in qgis standalone, if the SL db was created with qgis osgeo4w then it behaves as expected.

Note:

creating a new SL db with qgis standalone take several seconds, while is very fast on osgeo4w. The DB created with qgis standalone does also shows a long list of tables that do not show if the db was created with qgis osgeo4w.

#2 Updated by Giovanni Manghi over 10 years ago

  • Category changed from DB Manager to Build/Install
  • Target version changed from Future Release - High Priority to Version 2.0.0

so after all this seems a packaging issue.

#3 Updated by Giovanni Manghi over 10 years ago

  • Subject changed from DB manager (on windows standalone): Spatialite layers are added as tables without geometries to (Windows) Spatialite layers are added as tables without geometries or "Error 11 Connection to database failed" error
  • Category changed from Build/Install to Data Provider/SpatiaLite

This is so frustrating... now I removed qgis 2.0/standalone, cleaned the system and installed again qgis 2.0/osgeo4w and I see the same issues I was seening on standalone...

it takes a long to create the SL sb, and now I can't even import shapes in it (d&d from browser, for example) as I get

Error 11
Connection to database failed

#4 Updated by Giovanni Manghi over 10 years ago

  • File sl_samples.zip added
  • Subject changed from (Windows) Spatialite layers are added as tables without geometries or "Error 11 Connection to database failed" error to Spatialite layers are added as tables without geometries or "Error 11 Connection to database failed" error

adding sample SL db, one "good" and one not, both created with the same qgis installation (osgeo4w).

#5 Updated by aperi2007 - over 10 years ago

I see a problem using the
menu commando:

new -> new spatialite layer

when set a new file name it (qgis) start to create a new spatialite , and this tkae many second.
On my pc about 60 seconda, but effectively my pc ha a very fast ssd hd.

I see also that the create of a new db will use the journaling mode.
That method (journal write) solution is the more slow.
Expecially is evere single insert is inside a single transacion.

I see the jounraling file will grow slowly from to 4 Mbyte.
When a db spatialite is create it need to have insede a table (spatialite-ref-sys) with many SRS definitiion.

I guess they are all inseted as many single insrt every one insed a single commit session.

I guess really best should be to disable the journaling method for the DB creation file.

Also I guess more better could be that the user can choose if act on the spatialite using journal or not.

Regards,

Andrea.

#6 Updated by Giovanni Manghi over 10 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority

when set a new file name it (qgis) start to create a new spatialite , and this tkae many second.
On my pc about 60 seconda, but effectively my pc ha a very fast ssd hd.

on "normal" Windows machines it takes ages to create the SL DB, I have also a high machine and it takes ages on Linux too.

Then the resulting DB is "useless":

the imported layers are "missing" the geometry part or it gives the

"Error 11 Connection to database failed"

for example when D&D from browser and/or DB Manager.

#7 Updated by Giovanni Manghi over 10 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

seems fixed by

#e04b426f00f86a154ff74ed6bda5727086596b0f

Also available in: Atom PDF