[gdal-dev] SQLite driver and drop table problem

Even Rouault even.rouault at mines-paris.org
Fri Jun 14 11:58:19 PDT 2013


Le vendredi 14 juin 2013 20:18:19, Piotr Tracz a écrit :
> Hello,
> 
> I think there might be a bug in OGRSQLiteDataSource::ExecuteSQL but
> before I make bug ticket, I want to be sure I'm not missing anything.
> When one try to execute SQL command "DROP TABLE xxx", error "In
> ExecuteSQL(): sqlite3_step(DROP TABLE xxx):
>    SQL logic error or missing database" occurs.
> 
>   I think this error is related to how SQLite behaves: DROP TABLE can be
> only executed by sqlite3_exec while GDAL is trying to do that by
>   sqlite3_prepare ->  sqlite3_step -> sqlite3_finalize chain.
> 
> Bug is related to GDAL 1.10 version (however previous behaves the same)
> compiled aganist SQLITE 3.7.x.

Can you try downloading 
http://svn.osgeo.org/gdal/trunk/autotest/ogr/data/poly_spatialite.sqlite and 
then do : ogrinfo poly_spatialite.sqlite -sql "drop table poly" ?

This works for me with SQLITE 3.6.22 and 3.7.13.

> 
> Regards,
> 
> Piotr
> 
> 
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list