miiza / sphivedb Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/sphivedb
License: GNU General Public License v2.0
Automatically exported from code.google.com/p/sphivedb
License: GNU General Public License v2.0
What steps will reproduce the problem?
1. just run the code using the latest SQLite
All memory DBs open with SQLite Error code 14 (can not open file)
Using: Windows 7 x64 in 32bit software.
--
Here is your fix. In spmemvfs.c find spmemvfsAccess() and add *result=0; before
return. This disables WAL (write ahead logging) Since you are implementing VFS
v1... WAL is a v2 feature.
int spmemvfsAccess( sqlite3_vfs * vfs, const char * path, int flags, int *
result )
{
*result = 0; // ANDY: set result to 0 to disable WAL.
return SQLITE_OK;
}
Original issue reported on code.google.com by [email protected]
on 12 Jan 2013 at 5:22
What steps will reproduce the problem?
1. call spmemvfs_env_fini() after calling spmemvfs_env_init(), then call
spmemvfs_env_init() and try to open a DB. It will fail.
What is the expected output? What do you see instead?
I expect to be able to open another DB after calling spmemvfs_env_init()
What version of the product are you using? On what operating system?
Win7 x64 in 32bit exe
Please provide any additional information below.
Here is a fix (look at the commented line):
// ...
void spmemvfs_env_fini()
{
if( NULL != g_spmemvfs_env ) {
spmembuffer_link_t * iter = NULL;
sqlite3_vfs_unregister( (sqlite3_vfs*)&g_spmemvfs );
g_spmemvfs.parent = NULL; // ANDY: makes it so we can init again.
sqlite3_mutex_free( g_spmemvfs_env->mutex );
iter = g_spmemvfs_env->head;
//...
Original issue reported on code.google.com by [email protected]
on 14 Jan 2013 at 5:11
how to update spmemvfs and let it support sqlite 3.7.7.1 version?
I tested 0.3 version of spmemvfs cannot work well with that version
Original issue reported on code.google.com by [email protected]
on 25 Jul 2011 at 1:16
What steps will reproduce the problem?
1. build on RHEL6
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
svn diff of fixes
--------------------------------------------------------------------------
Index: sphivedb/spsqlitesvr.cpp
===================================================================
--- sphivedb/spsqlitesvr.cpp (revision 45)
+++ sphivedb/spsqlitesvr.cpp (working copy)
@@ -10,6 +10,7 @@
#include <signal.h>
#include <assert.h>
#include <fcntl.h>
+#include <sys/stat.h>
#include "sphivehandler.hpp"
#include "sphivemanager.hpp"
Index: sphivedb/sphivedbsvr.cpp
===================================================================
--- sphivedb/sphivedbsvr.cpp (revision 45)
+++ sphivedb/sphivedbsvr.cpp (working copy)
@@ -10,6 +10,7 @@
#include <signal.h>
#include <assert.h>
#include <fcntl.h>
+#include <sys/stat.h>
#include "sphivehandler.hpp"
#include "sphivemanager.hpp"
Index: sphivedb/spfilestore.cpp
===================================================================
--- sphivedb/spfilestore.cpp (revision 45)
+++ sphivedb/spfilestore.cpp (working copy)
@@ -8,6 +8,7 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
+#include <sys/stat.h>
#include "spfilestore.hpp"
Index: sphivedb/sphivemanager.cpp
===================================================================
--- sphivedb/sphivemanager.cpp (revision 45)
+++ sphivedb/sphivemanager.cpp (working copy)
@@ -7,6 +7,7 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
+#include <sys/stat.h>
#include "sphivemanager.hpp"
#include "sphivemsg.hpp"
Original issue reported on code.google.com by [email protected]
on 16 Dec 2010 at 11:20
What steps will reproduce the problem?
1. Open a database in memory with spmemvfs with a table inside
2. Execute this commands in series:
BEGIN TRANSACTION;
DROP TABLE IF EXISTS tablename;
ROLLBACK TRANSACTION;
3. you get a segfault when it execute the DROP statement:
#0 0xb7cbdb03 in strlen () from /lib/libc.so.6
#1 0xb7cbd835 in strdup () from /lib/libc.so.6
#2 0x084c9d4d in spmemvfsOpen (vfs=0x85a3560, path=0x0, file=0x8ba9fb8,
flags=8222, outflags=0x0) at ../../src/thirdparty/spmemvfs/spmemvfs.c:272
#3 0x0846231f in sqlite3OsOpen (pVfs=0x85a3560, zPath=0x0, pFile=0x8ba9fb8,
flags=8222, pFlagsOut=0x0) at ../../src/thirdparty/sqlite/sqlite3.c:12253
#4 0x0846ee1d in pagerOpentemp (pPager=0x8ba9ed0, pFile=0x8ba9fb8,
vfsFlags=8222) at ../../src/thirdparty/sqlite/sqlite3.c:33556
#5 0x0847076e in openSubJournal (pPager=0x8ba9ed0)
at ../../src/thirdparty/sqlite/sqlite3.c:35251
#6 0x084716f2 in sqlite3PagerOpenSavepoint (pPager=0x8ba9ed0, nSavepoint=1)
at ../../src/thirdparty/sqlite/sqlite3.c:36237
#7 0x08476017 in sqlite3BtreeBeginStmt (p=0x8bb22c8, iStatement=1)
at ../../src/thirdparty/sqlite/sqlite3.c:40868
#8 0x0848967e in sqlite3VdbeExec (p=0x8bb02b0)
at ../../src/thirdparty/sqlite/sqlite3.c:54971
#9 0x0848441e in sqlite3Step (p=0x8bb02b0)
at ../../src/thirdparty/sqlite/sqlite3.c:50646
#10 0x084845cc in sqlite3_step (pStmt=0x8bb02b0)
at ../../src/thirdparty/sqlite/sqlite3.c:50705
#11 0x0824528a in SqliteConnection::executeCommand (this=0x8ba7e38,
sqlCommandText=@0xbfead45c) at ../../src/library/Sqlite.cpp:234
#12 ...
...
#17 0x081b074d in main (argc=1, argv=0xbfead734)
at ../../src/Application.cpp:218
Original issue reported on code.google.com by kunitoki
on 18 Mar 2010 at 3:59
What steps will reproduce the problem?
call
1. spmemvfs_env_init() then
2. spmemvfs_env_fini() then
3. spmemvfs_env_init()
What is the expected output? What do you see instead?
The expected output is that the library should properly be initialized.
What I see is that the g_spmemvfs does not re-registers
What version of the product are you using? On what operating system?
spmemvfs.c 0.3
Please provide any additional information below.
The problem is that the g_spmemvfs.parent is not being reset in
spmemvfs_env_fini(), thus the second call to spmemvfs_env_init() fails to
re-register the vfs.
My solution to the problem is to add
g_spmemvfs.parent = NULL;
right after g_spmemvfs_env = NULL; in the spmemvfs_env_fini() function.
The high level problem is that the initializer and finalizers were not expected
to be called more than once. We call it more than once to minimize memory and
properly clean up, and restart...
Original issue reported on code.google.com by [email protected]
on 6 Mar 2012 at 5:01
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.