Basic functionality is now working.

FossilOrigin-Name: aa129c51ecf5c917cfac30be330886f8a10f49e1
This commit is contained in:
drh 2015-11-17 02:23:09 +00:00
parent eb8e7adb16
commit a87cc18948
3 changed files with 15 additions and 16 deletions

View File

@ -75,7 +75,7 @@ static int lsm1Connect(
rc = SQLITE_ERROR;
goto connect_failed;
}
rc = lsm_open(pNew->pDb, argv[0]);
rc = lsm_open(pNew->pDb, argv[3]);
if( rc ){
*pzErr = sqlite3_mprintf("lsm_open failed with %d", rc);
rc = SQLITE_ERROR;
@ -187,7 +187,7 @@ static int lsm1Column(
case LSM1_COLUMN_KEY: {
const void *pVal;
int nVal;
if( lsm_csr_value(pCur->pLsmCur, (const void**)&pVal, &nVal)==LSM_OK ){
if( lsm_csr_key(pCur->pLsmCur, (const void**)&pVal, &nVal)==LSM_OK ){
sqlite3_result_blob(ctx, pVal, nVal, SQLITE_TRANSIENT);
}
break;
@ -249,26 +249,25 @@ static int lsm1Filter(
int argc, sqlite3_value **argv
){
lsm1_cursor *pCur = (lsm1_cursor *)pVtabCursor;
int rc;
int rc = LSM_OK;
pCur->atEof = 1;
if( idxNum==1 ){
assert( argc==1 );
pCur->isDesc = 0;
pCur->bUnique = 1;
pCur->atEof = 1;
if( sqlite3_value_type(argv[0])==SQLITE_BLOB ){
const void *pVal = sqlite3_value_blob(argv[0]);
int nVal = sqlite3_value_bytes(argv[0]);
rc = lsm_csr_seek(pCur->pLsmCur, pVal, nVal, LSM_SEEK_EQ);
if( rc==LSM_OK && lsm_csr_valid(pCur->pLsmCur)!=0 ){
pCur->atEof = 0;
}
}
}else{
rc = lsm_csr_first(pCur->pLsmCur);
pCur->atEof = 0;
pCur->isDesc = 0;
pCur->bUnique = 0;
}
if( rc==LSM_OK && lsm_csr_valid(pCur->pLsmCur)!=0 ){
pCur->atEof = 0;
}
return rc==LSM_OK ? SQLITE_OK : SQLITE_ERROR;
}
@ -398,7 +397,7 @@ int lsm1Update(
}else{
*(double*)&x = sqlite3_value_double(pValue);
}
for(i=9; i>=1; i--){
for(i=8; i>=1; i--){
aVal[i] = x & 0xff;
x >>= 8;
}

View File

@ -1,5 +1,5 @@
C The\svirtual\stable\scompiles\sbut\sdoes\snot\swork\sand\sis\smissing\smany\sfeatures.\nThis\sis\san\sincremental\scheck-in.
D 2015-11-17T00:15:21.503
C Basic\sfunctionality\sis\snow\sworking.
D 2015-11-17T02:23:09.421
F Makefile.in d828db6afa6c1fa060d01e33e4674408df1942a1
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc e928e68168df69b353300ac87c10105206653a03
@ -205,7 +205,7 @@ F ext/lsm1/lsm_str.c 77ebdd5040ddf267a6f724d4c83132d2dce8a226
F ext/lsm1/lsm_tree.c 5d9fb2bc58a1a70c75126bd8d7198f7b627e165b
F ext/lsm1/lsm_unix.c fcaf5b6738713f1229dc0e1a90393ecf24f787f2
F ext/lsm1/lsm_varint.c b19ae9bd26b5a1e8402fb8a564b25d9542338a41
F ext/lsm1/lsm_vtab.c a0c0b73c5ba4208282fe37acc4da3f490e823d4d
F ext/lsm1/lsm_vtab.c 1ffcc9bfbf4fc46ba8c6b3734309781a35c7d1e9
F ext/misc/amatch.c a1a8f66c29d40bd71b075546ddeddb477b17a2bb
F ext/misc/closure.c 0d2a038df8fbae7f19de42e7c7d71f2e4dc88704
F ext/misc/compress.c 122faa92d25033d6c3f07c39231de074ab3d2e83
@ -1419,7 +1419,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 3d930501a2acb7f20932cfeb4e3fe308b4569cd6
R a12c72fec91515b78f9b7786ff4fed28
P a32849d6bf66462d1f511714a00f24519d7b7079
R cc1cce61ea394db14460eb0001eb1ea8
U drh
Z 0ef63f102801971372945e050120c775
Z 05fa355531114cffc58ad422946d5107

View File

@ -1 +1 @@
a32849d6bf66462d1f511714a00f24519d7b7079
aa129c51ecf5c917cfac30be330886f8a10f49e1