Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite "out of memory" error #854

Closed
artemp opened this issue Oct 11, 2011 · 3 comments
Closed

sqlite "out of memory" error #854

artemp opened this issue Oct 11, 2011 · 3 comments
Assignees
Milestone

Comments

@artemp
Copy link
Member

artemp commented Oct 11, 2011

Depending on the sqlite3 version being used it appears easy to trigger undefined behavior with the usage of sqlite3_open_v2.

After fixing this problem on osx with the latest sqlite release, on a different osx machine with the system sqlite:

$ sqlite3 --version
3.7.5

I get this during builds:

g++ -o plugins/input/sqlite/sqlite_featureset.os -c -DHAVE_JPEG -ansi -Wall -ftemplate-depth-200 -DDARWIN -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O3 -finline-functions -Wno-inline -DNDEBUG -fPIC -Iagg/include -I. -Iinclude -I/usr/local/Cellar/gdal/1.8.1/include -I/usr/local/include -I/usr/include -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/include/libxml2 plugins/input/sqlite/sqlite_featureset.cpp
In file included from plugins/input/sqlite/sqlite_featureset.hpp:37,
                 from plugins/input/sqlite/sqlite_featureset.cpp:38:
plugins/input/sqlite/sqlite_types.hpp: In constructor ‘sqlite_connection::sqlite_connection(const std::string&)’:
plugins/input/sqlite/sqlite_types.hpp:138: warning: ‘sqlite3_enable_shared_cache’ is deprecated (declared at /usr/include/sqlite3.h:4275)
plugins/input/sqlite/sqlite_types.hpp:138: warning: ‘sqlite3_enable_shared_cache’ is deprecated (declared at /usr/include/sqlite3.h:4275)
In file included from plugins/input/sqlite/sqlite_datasource.hpp:38,
                 from plugins/input/sqlite/sqlite_datasource.cpp:24:

And failures when opening db's.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] pushing to 2.0.1. workaround is to use latest sqlite version until this is fixed.

@kunitoki
Copy link
Member

Exactly. Using sqlite3_enable_shared_cache is deprecated on we should only use SQLITE_OPEN_SHAREDCACHE which does the same.

@ghost ghost assigned springmeyer Nov 2, 2011
@springmeyer
Copy link
Member

this is fixed in the sqlite-refactor branch, and will land in master when #928 is closed. so closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants