aboutsummaryrefslogtreecommitdiff
path: root/tests/sqlite
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-09-12 17:59:20 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-09-12 17:59:20 -0700
commitef124013a59d1a9727aa057d48e0e3cbea0d2de9 (patch)
treead30f95697c2d6d07e9c47a6b0f8c89b6b9e16b4 /tests/sqlite
parent7143eab384be3f42ae75f7595d6f047a68f0f481 (diff)
fix sqlite porting bug
Diffstat (limited to 'tests/sqlite')
-rw-r--r--tests/sqlite/benchmark.c2
-rw-r--r--tests/sqlite/sqlite3.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/sqlite/benchmark.c b/tests/sqlite/benchmark.c
index 5618d388..f33c7c2f 100644
--- a/tests/sqlite/benchmark.c
+++ b/tests/sqlite/benchmark.c
@@ -81,7 +81,7 @@ int main(){
RUN("BEGIN;");
// 25000 INSERTs in a transaction
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 78; i++) {
RUN("INSERT INTO t1 VALUES(1,12345,'one 1 one 1 one 1');");
RUN("INSERT INTO t1 VALUES(2,23422,'two two two two');");
RUN("INSERT INTO t1 VALUES(3,31233,'three three 33333333333 three');");
diff --git a/tests/sqlite/sqlite3.c b/tests/sqlite/sqlite3.c
index 2d6633ea..bcbb7cdd 100644
--- a/tests/sqlite/sqlite3.c
+++ b/tests/sqlite/sqlite3.c
@@ -52942,7 +52942,12 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
endPtr = &data[pPage->cellOffset + 2*pPage->nCell - 2];
assert( (SQLITE_PTR_TO_INT(ptr)&1)==0 ); /* ptr is always 2-byte aligned */
while( ptr<endPtr ){
+#ifdef EMSCRIPTEN
+ ptr[0] = ptr[2];
+ ptr[1] = ptr[3];
+#else
*(u16*)ptr = *(u16*)&ptr[2];
+#endif
ptr += 2;
}
pPage->nCell--;