From: dan Date: Thu, 7 Jan 2010 11:27:30 +0000 (+0000) Subject: Changes to test code so that testfixture compiles when OMIT_SHARED_CACHE and OMIT_UTF... X-Git-Tag: version-3.7.2~657 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93a696f61bce669693fb0eb9cdb7fef7f4b9a57d;p=thirdparty%2Fsqlite.git Changes to test code so that testfixture compiles when OMIT_SHARED_CACHE and OMIT_UTF16 are defined. FossilOrigin-Name: d6ee5ff6c815e3aadd92d331560b529394eae661 --- diff --git a/manifest b/manifest index 26957b9f36..87782cf36c 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fixes\sto\sproblems\sin\sFTS3\ssnippet()\sfunction\sfound\sby\sth3\stests. -D 2010-01-07T10:54:29 +C Changes\sto\stest\scode\sso\sthat\stestfixture\scompiles\swhen\sOMIT_SHARED_CACHE\sand\sOMIT_UTF16\sare\sdefined. +D 2010-01-07T11:27:31 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in c5827ead754ab32b9585487177c93bb00b9497b3 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -173,7 +173,7 @@ F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e F src/tclsqlite.c bad6570a005b234ea670b9f7b48256da19a032d3 F src/test1.c db4d8fd2849ab9aca0f27fd3773b8d68d078cf86 F src/test2.c b6b43413d495addd039a88b87d65c839f86b18cb -F src/test3.c f17eeaf8114205844d76f4e69bab27ea341087af +F src/test3.c 4c21700c73a890a47fc685c1097bfb661346ac94 F src/test4.c ad03bb987ddedce928f4258c1e7fa4109a73497d F src/test5.c cc55900118fa4add8ec9cf69fc4225a4662f76b1 F src/test6.c a8ece4284d0e34477f349ac05655db73c48e0926 @@ -186,7 +186,7 @@ F src/test_backup.c c129c91127e9b46e335715ae2e75756e25ba27de F src/test_btree.c 47cd771250f09cdc6e12dda5bc71bc0b3abc96e2 F src/test_config.c 220a67047af393756f55760fdf442d935d0d88f3 F src/test_devsym.c de3c9af2bb9a8b1e44525c449e4ec3f88e3d4110 -F src/test_func.c 1c94388a23d4a9e7cd62ec79d612d1bae2451fa2 +F src/test_func.c 13b582345fb1185a93e46c53310fae8547dcce20 F src/test_hexio.c 1237f000ec7a491009b1233f5c626ea71bce1ea2 F src/test_init.c 5d624ffd0409d424cf9adbfe1f056b200270077c F src/test_intarray.c d879bbf8e4ce085ab966d1f3c896a7c8b4f5fc99 @@ -784,7 +784,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P e22c090f35b3a2bac64781d33aa1123ed765dbbf -R c4c872b237c2eb5c969c1e58ad74f097 +P 3b5ccd2682176929f4da8a3f39a7e8f58b179f18 +R af20b3790ea978fec44add9031dd631c U dan -Z 9b608ddefd032d66f262f5c7928a6a08 +Z 0fa44c75cc7974ccbaf267c317a458e5 diff --git a/manifest.uuid b/manifest.uuid index 316f7be6c5..70cfccf4d0 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3b5ccd2682176929f4da8a3f39a7e8f58b179f18 \ No newline at end of file +d6ee5ff6c815e3aadd92d331560b529394eae661 \ No newline at end of file diff --git a/src/test3.c b/src/test3.c index 06222f5f21..68f5648a4f 100644 --- a/src/test3.c +++ b/src/test3.c @@ -219,7 +219,7 @@ static int btree_cursor( Btree *pBt; int iTable; BtCursor *pCur; - int rc; + int rc = SQLITE_OK; int wrFlag; char zBuf[30]; @@ -234,7 +234,9 @@ static int btree_cursor( pCur = (BtCursor *)ckalloc(sqlite3BtreeCursorSize()); memset(pCur, 0, sqlite3BtreeCursorSize()); sqlite3BtreeEnter(pBt); +#ifndef SQLITE_OMIT_SHARED_CACHE rc = sqlite3BtreeLockTable(pBt, iTable, wrFlag); +#endif if( rc==SQLITE_OK ){ rc = sqlite3BtreeCursor(pBt, iTable, wrFlag, 0, pCur); } diff --git a/src/test_func.c b/src/test_func.c index 00c45d0344..c3277a06ca 100644 --- a/src/test_func.c +++ b/src/test_func.c @@ -341,6 +341,7 @@ static void testHexToBin(const char *zIn, char *zOut){ ** Convert the input string from HEX into binary. Then return the ** result using sqlite3_result_text16le(). */ +#ifndef SQLITE_OMIT_UTF16 static void testHexToUtf16be( sqlite3_context *pCtx, int nArg, @@ -360,6 +361,7 @@ static void testHexToUtf16be( sqlite3_result_text16be(pCtx, zOut, n/2, sqlite3_free); } } +#endif /* ** hex_to_utf8(HEX) @@ -393,6 +395,7 @@ static void testHexToUtf8( ** Convert the input string from HEX into binary. Then return the ** result using sqlite3_result_text16le(). */ +#ifndef SQLITE_OMIT_UTF16 static void testHexToUtf16le( sqlite3_context *pCtx, int nArg, @@ -412,6 +415,7 @@ static void testHexToUtf16le( sqlite3_result_text16le(pCtx, zOut, n/2, sqlite3_free); } } +#endif static int registerTestFunctions(sqlite3 *db){ static const struct {