GithubHelp home page GithubHelp logo

miiza / sphivedb Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.48 MB

Automatically exported from code.google.com/p/sphivedb

License: GNU General Public License v2.0

Makefile 0.09% Java 0.53% PHP 0.17% Python 0.42% Shell 0.01% C 95.86% C++ 2.92%

sphivedb's People

sphivedb's Issues

Fix for opening memory DBs in SQLite 3.7.15.2

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

spmemvfs_env_fini() does not reset static global properly

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

patch spmemvfs?

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

Doesn't build on RHEL6

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

spmemvfs segfault when issuing DROP TABLE IF EXISTS

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

spmemvfs_env_fini() does not properly cleanup. calling spmemvfs_env_init()->spmemvfs_env_fini()->spmemvfs_env_init() is not the same as calling spmemvfs_env_init()

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.