Re: [sqlite] savepoint
Many thanks, it would help. Csaba 2012/1/16 Vivien Malerba vmale...@gmail.com 2012/1/16 Csaba Jeney csje...@genoid.hu Is there any way to query the valid savepoints? At least their names? Many thanks. AFAIK, the only way to do this is to keep track of each begin, rollback, add savepoint, ... executed, to always know where you are. (Anyway this is what's done in Libgda). Regards, Vivien ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Yours sincerely Csaba Jeney Head of RD GenoID Ltd. GenoID Molekulárbiológiai Laboratórium 1528, Budapest, Szanatórium utca 19. Phone.: +36 1 465 0124 Mobil: +36 70 454 3223 Fax: +36 1 465 0127 Email: csje...@genoid.hu http://www.genoid.hu , http://www.hpvteszt.hu This message is intended to be confidential and may be privileged. If you are not the intended recipient, please delete this e-mail from your system immediately and notify us of the erroneous transmission to you. Any unauthorized disclosure, use, copying, or distribution of this E-mail is prohibited. Please consider your environmental responsibility before printing this e-mail. Ez az üzenet és bármely melléklete kizárólag a címzettnek szól. Tartalmazhat bizalmas, szellemi tulajdonnak minősülő illetve más jogvédett információkat vagy egyéb módon lehet védve jogszabályok által. Ha nem Ön a szándékozott címzettje, nem használhatja fel,nem hozhatja nyilvánosságra és nem másolhatja ezt az üzenetet, annak mellékletét vagy bármely részét, és nem cselekedhet az üzenet tartalmában bízva. Ebben az esetben kérjük, értesítse a feladót haladéktalanul, és törölje ezt az üzenetet és minden mellékletét rendszerébõl. A levél és tartalmának, felhatalmazás nélküli, másolása, arhíválása jogellenes. A levél nyomtatásakor, kérjük, vegye figyelembe a környezetünk védelmét. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite-users Digest, Vol 49, Issue 16
how to add average value replace the ? to the end of line of this following database: ID namesex match chinese english phy chemtotal CY001 credmale104 112 101 85 99 697 CY002 rosefemale 87 105 98 119 101 693 CY003 helen male120 98 68 80 75 623 CY004 jackfemale 98 68 115 91 85 642 CY005 tonny male96 88 111 87 68 624 cy00a aav mmm ? ? ? ? ? ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] memory fault in sqlite3_open_v2()
Hello. I'm using SQLite in my project that compiles by MSVC 6.0 in Windows XP. I've upgraded SQLite library from 3.7.8 to 3.7.10 and got a problem. Builds went fine, but when I was launching my application, I got memory fault. Application faulted on first call of sqlite3_open_v2() function. I tracked it down and found, that fault caused by call of osGetFullPathNameW() in winFullPathname(). By some reason pointer, that must point to GetFullPathNameW() was NULL. As I understand it is because SQLITE_OS_WINNT was defined as 0, because I haven't defined _WIN32_WINNT. I think that SQLite realizedthatthereis no wide char support (SQLITE_WIN32_HAS_WIDE was not defined). I wonder is this correct? MSDN says, that GetFullPathNameW() is present since Windows 95, so i thought function GetFullPathNameW() can be used when _WIN32_WINNT is not defined. For now I've just defined _WIN32_WINNT as 0x500, but not sure is it correct, and will my application works if it will be launched under Windows 9X. Test case for reproducing problem is included. Just put sqlite3.c and sqlite3.h in same directory as included files test.c and makefile.vc and run nmake -f makefile.vc. After that just run test.exe. OS Windows XP SP3, Compiler Microsoft Visual Studio 6.0 SP5, SQLite sources http://www.sqlite.org/sqlite-amalgamation-3071000.zip PS.Sorry for my bad English. -- WBR, darkelf mailto:dark...@ukr.net___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite-users Digest, Vol 49, Issue 16
Am 17.01.2012 10:50, schrieb YAN HONG YE: how to add average value replace the ? to the end of line of this following database: ID namesex match chinese english phy chemtotal CY001 credmale104 112 101 85 99 697 CY002 rosefemale 87 105 98 119 101 693 CY003 helen male120 98 68 80 75 623 CY004 jackfemale 98 68 115 91 85 642 CY005 tonny male96 88 111 87 68 624 cy00a aav mmm ? ? ? ? ? ? SELECT ID,name,sex,match,chinese,english,phy,chem,total FROM table UNION ALL SELECT cy00a,aav,mmm,AVG(match),AVG(chinese),AVG(english),AVG(phy),AVG(chem),AVG(total) FROM table ; Oliver ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite-users Digest, Vol 49, Issue 16
Am 17.01.2012 11:20, schrieb Oliver Peters: Am 17.01.2012 10:50, schrieb YAN HONG YE: how to add average value replace the ? to the end of line of this following database: ID name sex match chinese english phy chem total CY001 cred male 104 112 101 85 99 697 CY002 rose female 87 105 98 119 101 693 CY003 helen male 120 98 68 80 75 623 CY004 jack female 98 68 115 91 85 642 CY005 tonny male 96 88 111 87 68 624 cy00a aav mmm ? ? ? ? ? ? SELECT ID,name,sex,match,chinese,english,phy,chem,total FROM table UNION ALL SELECT cy00a,aav,mmm,AVG(match),AVG(chinese),AVG(english),AVG(phy),AVG(chem),AVG(total) FROM table ; Oliver Sorry I forgot the 's SELECT ID,name,sex,match,chinese,english,phy,chem,total FROM table UNION ALL SELECT 'cy00a','aav','mmm',AVG(match),AVG(chinese),AVG(english),AVG(phy),AVG(chem),AVG(total) FROM table ; Oliver ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] memory fault in sqlite3_open_v2()
Hello. I'm using SQLite in my project that compiles by MSVC 6.0 in Windows XP. I've upgraded SQLite library from 3.7.8 to 3.7.10 and got a problem. Builds went fine, but when I was launching my application, I got memory fault. Application faulted on first call of sqlite3_open_v2() function. I tracked it down and found, that fault caused by call of osGetFullPathNameW() in winFullPathname(). By some reason pointer, that must point to GetFullPathNameW() was NULL. As I understand it is because SQLITE_OS_WINNT was defined as 0, because I haven't defined _WIN32_WINNT. I think that SQLite realizedthatthereis no wide char support (SQLITE_WIN32_HAS_WIDE was not defined). I wonder is this correct? MSDN says, that GetFullPathNameW() is present since Windows 95, so i thought function GetFullPathNameW() can be used when _WIN32_WINNT is not defined. For now I've just defined _WIN32_WINNT as 0x500, but not sure is it correct, and will my application works if it will be launched under Windows 9X. Test case for reproducing problem is included. Just put sqlite3.c and sqlite3.h in same directory as included files test.c and makefile.vc and run nmake -f makefile.vc. After that just run test.exe. Looks like attaches are not supported in this mailing list, so I'm including files in message body: makefile.vc: ;---X8 CC=cl CFLAGS=/MD /DWIN32 /nologo /GX /GA /O2 /W3 /GF BIN=test.exe OBJ=test.obj sqlite3.obj RM=del RFLAGS= all: $(BIN) $(BIN): $(OBJ) $(CC) $(CFLAGS) $(OBJ) /Fe$(BIN) %.obj: %.c $(CC) $(CFLAGS) /c $ clean: -$(RM) $(RFLAGS) $(BIN) 2nul -$(RM) $(RFLAGS) $(OBJ) 2nul ;---X8 test.c: ;---X8 #include stdio.h #include sqlite3.h int main(int argc, char* argv[]) { int rez = 0; sqlite3* ss_pdb = NULL; rez = sqlite3_open_v2(base, ss_pdb, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); return rez; } ;---X8 -- WBR, darkelf mailto:dark...@ukr.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] memory fault in sqlite3_open_v2()
darkelf wrote: MSDN says, that GetFullPathNameW() is present since Windows 95, so i thought function GetFullPathNameW() can be used when _WIN32_WINNT is not defined. I'm unable to locate the MSDN documentation that indicates this. For now I've just defined _WIN32_WINNT as 0x500, but not sure is it correct, and will my application works if it will be launched under Windows 9X. This is the correct fix. Also, most modern Windows projects already have the _WIN32_WINNT define set to something (e.g. 0x400, 0x500, etc). -- Joe Mistachkin ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] R*Tree virtual table question
I've working on a location aware application that uses GUIDs as the primary key for related tables. The SQLite R*Tree module is the natural choice for indexing the image location data but there the issue of the integer primary key type. Is it possible to change the primary key type? Is it possible to add an additional column to the virtual table and retrieve its value in a query? Thanks. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] R*Tree virtual table question
On 17 Jan 2012, at 11:01am, g...@novadsp.com wrote: I've working on a location aware application that uses GUIDs as the primary key for related tables. The SQLite R*Tree module is the natural choice for indexing the image location data but there the issue of the integer primary key type. Is it possible to change the primary key type? Is it possible to add an additional column to the virtual table and retrieve its value in a query? Neither of those things are simple. Rather than hack an existing library, I recommend that you allow the R*Tree module to maintain its integer keys and make another (normal, not R*Tree) table in the same SQLite database to keep the list of GUIDs vs. integer keys. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] R*Tree virtual table question
Thanks Simon, Neither of those things are simple. Rather than hack an existing library, I recommend that you allow the R*Tree module to maintain its integer keys and make another (normal, not R*Tree) table in the same SQLite database to keep the list of GUIDs vs. integer keys. Ouch :) ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] memory fault in sqlite3_open_v2()
Hello, Joe. Thanks for your reply. MSDN says, that GetFullPathNameW() is present since Windows 95, so i thought function GetFullPathNameW() can be used when _WIN32_WINNT is not defined. I'm unable to locate the MSDN documentation that indicates this. I can't find it in WWW, seems like Microsoft don't published old documentation anymore. I have offline documentation (MSDN July 2001) that says: ;-X8 Platform SDK: Files and I/O GetFullPathName The GetFullPathName function retrieves the full path and file name of a specified file. DWORD GetFullPathName( LPCTSTR lpFileName, // file name DWORD nBufferLength, // size of path buffer LPTSTR lpBuffer, // path buffer LPTSTR *lpFilePart // address of file name in path ); Parameters lpFileName [in] Pointer to a null-terminated string that specifies a valid file name. This string can use either short (the 8.3 form) or long file names. nBufferLength [in] Specifies the size, in TCHARs, of the buffer for the drive and path. lpBuffer [out] Pointer to a buffer that receives the null-terminated string for the name of the drive and path. lpFilePart [out] Pointer to a buffer that receives the address (in lpBuffer) of the final file name component in the path. Return Values If the function succeeds, the return value is the length, in TCHARs, of the string copied to lpBuffer, not including the terminating null character. If the lpBuffer buffer is too small to contain the path, the return value is the size of the buffer, in TCHARs, required to hold the path. Therefore, if the return value is greater than nBufferLength, call the function again with a buffer that is large enough to hold the path. If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastError. Remarks GetFullPathName merges the name of the current drive and directory with the specified file name to determine the full path and file name of the specified file. It also calculates the address of the file name portion of the full path and file name. This function does not verify that the resulting path and file name are valid or that they refer to an existing file on the associated volume. GetFullPathName does no conversion of the specified file name, lpFileName. If the specified file name exists, you can use GetLongPathName and GetShortPathName to convert to long and short path names, respectively. MAPI: For more information, see Syntax and Limitations for Win32 Functions Useful in MAPI Development. Requirements Windows NT/2000 or later: Requires Windows NT 3.1 or later. Windows 95/98/Me: Requires Windows 95 or later. Header: Declared in Winbase.h; include Windows.h. Library: Use Kernel32.lib. Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000. See Also File I/O Overview, File I/O Functions, GetLongPathName, GetShortPathName, GetTempPath, SearchPath ;-X8 MSDN from April 2003 also said that there is support in Windows 9X/ME, but it required Microsoft Unicode Layer libraries to be installed. For now I've just defined _WIN32_WINNT as 0x500, but not sure is it correct, and will my application works if it will be launched under Windows 9X. This is the correct fix. Also, most modern Windows projects already have the _WIN32_WINNT define set to something (e.g. 0x400, 0x500, etc). Thanks for your help. -- WBR, darkelf mailto:dark...@ukr.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Open source projects using sqlite
Mainly grouping sqlite applications in the embedded environment, hopefully generating some reusable methods of accessing the sqlite internals. One example might be a reusable method for storing BSON objects, so differing BSON applications share a common table/column view of BSON. On Mon, Jan 16, 2012 at 11:58 PM, Roger Binns rog...@rogerbinns.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 16/01/12 21:46, Matt Young wrote: Group projects, collected together because sqlite is the common foundation. Would be nice? You'll need to use longer sentences. What exactly do you want to achieve and who do you want to do the work of grouping projects? There is a list of well known users at this page although parts are dated: http://www.sqlite.org/famous.html You can find numerous open source projects using SQLite by searching at Github, Bitbucket, Google Code and SourceForge. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8VKh0ACgkQmOOfHg372QS9egCdElHp77YiBI+2BjxtvjmtqLem Z9UAoMkmbxTgve0za1tUFJwv74E2w4kq =t+i9 -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Bug report: shell only supports dumping a single table at a time
Hi, In the documentation for the .dump command for the sqlite3 shell (http://www.sqlite.org/sqlite.html) there is an ellipsis after the name of the table, implying that it is possible to specify multiple tables and have more than one table dumped at once. However in the shell.c source code, the line that checks for the dump command also requires less than 3 arguments, preventing multiple tables from being dumped: if( c=='d' strncmp(azArg[0], dump, n)==0 nArg3 ){ If this line was modified to be: if( c=='d' strncmp(azArg[0], dump, n)==0 ){ then it appears that the following of the code would already support dumping multiple tables at once. Regards, Chris. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Pager Sub-system
Dear sir, Is there a way to turn off the Pager subsystem of SQLIte application - that is, not have to deal with declarations and definitions of the functions ** that make up the Pager sub-system API? uo+ As examples: /* Open and close a Pager connection. */ SQLITE_PRIVATE int sqlite3PagerOpen( sqlite3_vfs*, Pager **ppPager, const char*, int, int, int, void(*)(DbPage*) ); SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager); SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*); /* Functions used to configure a Pager object. */ SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(Pager*, int(*)(void *), void *); SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int); SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager*, int); SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int); SQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(Pager*,int,int); SQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *, int); SQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *, int); SQLITE_PRIVATE int sqlite3PagerGetJournalMode(Pager*); SQLITE_PRIVATE int sqlite3PagerOkToChangeJournalMode(Pager*); SQLITE_PRIVATE i64 sqlite3PagerJournalSizeLimit(Pager *, i64); SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager*); /* Functions used to obtain and release page references. */ SQLITE_PRIVATE int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag); #define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0) SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno); SQLITE_PRIVATE void sqlite3PagerRef(DbPage*); SQLITE_PRIVATE void sqlite3PagerUnref(DbPage*); /* Operations on page references. */ SQLITE_PRIVATE int sqlite3PagerWrite(DbPage*); SQLITE_PRIVATE void sqlite3PagerDontWrite(DbPage*); SQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int); SQLITE_PRIVATE int sqlite3PagerPageRefcount(DbPage*); SQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *); SQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *); /* Functions used to manage pager transactions and savepoints. */ SQLITE_PRIVATE void sqlite3PagerPagecount(Pager*, int*); SQLITE_PRIVATE int sqlite3PagerBegin(Pager*, int exFlag, int); SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int); SQLITE_PRIVATE int sqlite3PagerExclusiveLock(Pager*); SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager); SQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager*); SQLITE_PRIVATE int sqlite3PagerRollback(Pager*); SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int n); SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint); SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager); SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager); SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager); SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager); SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen); SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager); /* Functions used to query pager state and configuration. */ SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager*); SQLITE_PRIVATE int sqlite3PagerRefcount(Pager*); SQLITE_PRIVATE int sqlite3PagerMemUsed(Pager*); SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*); SQLITE_PRIVATE const sqlite3_vfs *sqlite3PagerVfs(Pager*); SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager*); SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*); SQLITE_PRIVATE int sqlite3PagerNosync(Pager*); SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*); SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*); /* Functions used to truncate the database file. */ SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno); #if defined(SQLITE_HAS_CODEC) !defined(SQLITE_OMIT_WAL) SQLITE_PRIVATE void *sqlite3PagerCodec(DbPage *); #endif /* Functions to support testing and debugging. */ #if !defined(NDEBUG) || defined(SQLITE_TEST) SQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage*); SQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage*); #endif #ifdef SQLITE_TEST SQLITE_PRIVATE int *sqlite3PagerStats(Pager*); SQLITE_PRIVATE void sqlite3PagerRefdump(Pager*); void disable_simulated_io_errors(void); void enable_simulated_io_errors(void); #else # define disable_simulated_io_errors() # define enable_simulated_io_errors() #endif #endif /* _PAGER_H_ */ . ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] PENDING Lock / Sqlite .NET
Hi I have a question on how to enable PENDING LOCK before issuing an INSERT statement from the C# code. Do let me know if you can point me to some resources where I can find the answer or provide me the response. Regards Ajay Solanki +91 98192 54465 tel:%2B91%2098192%2054465 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Some pieces of the puzzle are coming together
On Mon, Jan 16, 2012 at 11:47 PM, Max Vlasov max.vla...@gmail.com wrote: On Tue, Jan 17, 2012 at 5:05 AM, John Elrick john.elr...@fenestra.com wrote: I can try that approach with BCC. I was concerned that the IDE would be getting inaccurate information from the .OBJ. Crossing into a pre-complied library can be tricky. As I recall,I could not make debug information compiled by bcc visible in Delphi IDE, but everything will be ok if you make your code compatible with fpc/lazarus. Besides the fact that you will be able to walk inside sqlite c code and inspect the data (gdb is used), you will probably make your software cross-platform. Besides, there is a library for lazarus/fpc (developed by Ludo Brands and me) for inspecting stack calling paths with whose memory blocks are allocated (similar to Valgrind tool). By the way, Ludo did a great job with stack unwinding since I remember false positives like ones mentioned here when calling chains were very strange and he had to implement a sophisticated stack analysis for many real world examples Unfortunately getting our project (circa 500,000 lines including 3rd party) would require a massive conversion effort to compile under Lazarus. I've investigated it. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] memory fault in sqlite3_open_v2()
darkelf dark...@ukr.net wrote: MSDN says, that GetFullPathNameW() is present since Windows 95, so i thought function GetFullPathNameW() can be used when _WIN32_WINNT is not defined. I'm unable to locate the MSDN documentation that indicates this. I can't find it in WWW, seems like Microsoft don't published old documentation anymore. I have offline documentation (MSDN July 2001) that says: Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000. This is the key part. Unicode flavor of the function is only implemented on WinNT family. Win95/98/Millennium only implements GetFullPathNameA, taking ANSI strings. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Some pieces of the puzzle are coming together
On Mon, Jan 16, 2012 at 5:36 PM, Richard Hipp d...@sqlite.org wrote: On Mon, Jan 16, 2012 at 5:31 PM, John Elrick john.elr...@fenestra.com wrote: SNIP This is very curious and perhaps a useful clue. SQLite does call SNIP It is a clue that I need a break. While updating the counters to allow for nil pointers, I noticed I had done something stupid in the accumulators for realloc. Fixed below: Application: Surveyor.exe Sqlite version:3.7.9 Date/Time: 01/17/2012 08:17:22 Memory Used: 7,905,536 (max 8,582,104) bytes Page Cache Used: 0 (max 0) pages Page Cache Overflow: 6,910,576 (max 6,911,600) bytes Number of Scratch Allocations Used:0 (max 0) Scratch Overflow: 0 (max 24,880) bytes Largest Allocation:500,042 bytes Parser Stack: 0 Largest Pcache Allocation: 4,232 bytes Largest Scratch Allocation:24,880 bytes Number of Outstanding Allocations: 5,835 (max 6,499) Lookaside Slots Used: 500 (max 500) Pager Heap Usage: 6,873,408 bytes Schema Heap Usage: 39,560 bytes Statement Heap/Lookaside Usage:806,592 bytes Successful lookaside attempts: 4,888 Lookaside failures due to size:3,782,307 Lookaside failures due to OOM: 4,090,019 Page cache hits: 2,585,425 Page cache misses: 0 Cumulative Allocated Memory: 932,315,928 Count of _malloc Calls:69,859,114 Cumulative Reallocated Memory: 226,385,120 Cumulative Reallocated Memory where nil: 0 Count of _realloc Calls: 776,372 Count of _realloc Calls where nil: 0 Count of _free Calls: 69,857,292 Cumulative _mallocs by size = 1kb:1,118,058,528 bytes (63,640,300 count) 1kb to 4kb:3,836,490,296 bytes (6,197,060 count) 4bk to 8kb:47,800,672 bytes (11,571 count) 8bk to 16kb: 597,016 bytes (46 count) 16bk to 32kb: 224,272,704 bytes (10,136 count) 32bk to 64kb: 64,008 bytes (1 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb:0 bytes (0 count) 256kb to 512kb:0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) 1mb: 0 bytes (0 count) Cumulative _reallocs by size = 1kb:189,468,416 bytes (759,348 count) 1kb to 4kb:36,904,328 bytes (17,022 count) 4bk to 8kb:12,376 bytes (2 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb:0 bytes (0 count) 256kb to 512kb:0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) 1mb: 0 bytes (0 count) Cumulative _reallocs of nil pointers by size = 1kb:0 bytes (0 count) 1kb to 4kb:0 bytes (0 count) 4bk to 8kb:0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb:0 bytes (0 count) 256kb to 512kb:0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) 1mb: 0 bytes (0 count) ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PENDING Lock / Sqlite .NET
On 17 Jan 2012, at 6:47am, Solanki, Ajay (GE Energy) wrote: I have a question on how to enable PENDING LOCK before issuing an INSERT statement from the C# code. What do you want SQLite to do instead of a pending lock ? If you want to disable the locking entirely, you can do it with PRAGMAs. Start by looking at PRAGMA synchronous. (Note: this will lead to corruption of your database if you try to do any multi-access with it.) If you want to do an immediate lock instead of a pending lock then surround your operations with BEGIN IMMEDIATE TRANSACTION; INSERT ... ... other operations ... END TRANSACTION; This is is a perfectly normal way of doing things in SQLite and will not lead to corruption. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] PENDING Lock / Sqlite .NET
Solanki, Ajay (GE Energy) ajay.sola...@ge.com wrote: I have a question on how to enable PENDING LOCK before issuing an INSERT statement from the C# code. What do you mean, enable PENDING LOCK? It's not something you can enable or disable. SQLite will acquire a pending lock on the database automatically as necessary. For details, see http://www.sqlite.org/lockingv3.html What are you trying to achieve? Explain your original problem, not your proposed solution. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Pager Sub-system
u okafor uo07...@yahoo.com wrote: Is there a way to turn off the Pager subsystem of SQLIte application - that is, not have to deal with declarations and definitions of the functions ** that make up the Pager sub-system API? In what way do you feel you are forced to deal with those declarations? What exactly seems to be the problem with them? Pager subsystem is what reads and writes data to disk. Without a way of doing that, SQLite wouldn't be much of a data-base, would it? No, you cannot turn off pager subsystem. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Some pieces of the puzzle are coming together
On Mon, Jan 16, 2012 at 8:05 PM, John Elrick john.elr...@fenestra.comwrote: On Mon, Jan 16, 2012 at 5:31 PM, Richard Hipp d...@sqlite.org wrote: On Mon, Jan 16, 2012 at 5:13 PM, John Elrick john.elr...@fenestra.com wrote: I did this trace through the Delphi IDE and hand copied the call stack. Unfortunately, I can't give you line numbers, although I could go back and give you hex offsets from the start of the procedures. These are literally the first seven call stacks from _malloc after I initiate the trace. I'm noticing a pattern. Hopefully 1) the information from the IDE is accurate and 2) this helps. The trace reads from bottom to top. I do not think the information below is correct. For example, at no point does sqlite3_db_status() ever call malloc(). Similarly, sqlite3_free() never calls sqlite3_db_status(). And really - why would sqlite3_free() ever call malloc() - that makes no sense. I'm thinking the Delphi IDE is not giving you good information here, which is too bad since we could have really used the information if it had been good. Are there any options to Delphi that can give you better diagnostics? Do you need to recompile SQLite without optimization and including the -g option? I can try that approach with BCC. I was concerned that the IDE would be getting inaccurate information from the .OBJ. Crossing into a pre-complied library can be tricky. I attempted all of the above and the call stacks do not change. That leads me to one of two conclusions: 1. The call stacks are inaccurate 2. There is some side effect which is causing malloc to be called inside of a procedure which should not be calling malloc. I've posted an update to my mistaken realloc listing. I may have to take a break to see if I can think of another approach to the problem. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] memory fault in sqlite3_open_v2()
Hello, Igor. MSDN says, that GetFullPathNameW() is present since Windows 95, so i thought function GetFullPathNameW() can be used when _WIN32_WINNT is not defined. I'm unable to locate the MSDN documentation that indicates this. I can't find it in WWW, seems like Microsoft don't published old documentation anymore. I have offline documentation (MSDN July 2001) that says: Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000. This is the key part. Unicode flavor of the function is only implemented on WinNT family. Win95/98/Millennium only implements GetFullPathNameA, taking ANSI strings. Thank you for explanation. -- WBR, darkelf mailto:dark...@ukr.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] msize in 3.7.10
Hi, I'm using static linking with Delphi and a new function required binding in 3.7.10 - msize (__msize). The problem here is that there's no official way to query the size of a memory block in Delphi memory manager, at least I'm not aware of one. Should I solve this anyway (for example by keeping my own list of blocks and their sizes) or is there some other solution (enabled/disable some define)? Thanks, Max ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Some pieces of the puzzle are coming together
I attempted all of the above and the call stacks do not change. That leads me to one of two conclusions: 1. The call stacks are inaccurate 2. There is some side effect which is causing malloc to be called inside of a procedure which should not be calling malloc. I've posted an update to my mistaken realloc listing. I may have to take a break to see if I can think of another approach to the problem. Maybe you should try to get stack traces from different debugger? E.g. try WinDbg or even Visual Studio. I believe IDE don't have to be able to understand source code in order to understand debugging information included into binary and show you stack traces. BTW you can try gdb although I'm not sure there's pre-compiled version of gdb for Windows. Pavel ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Some pieces of the puzzle are coming together
Pavel Ivanov wrote, On 1/17/2012 9:42 AM: I attempted all of the above and the call stacks do not change. That leads me to one of two conclusions: 1. The call stacks are inaccurate 2. There is some side effect which is causing malloc to be called inside of a procedure which should not be calling malloc. I've posted an update to my mistaken realloc listing. I may have to take a break to see if I can think of another approach to the problem. Maybe you should try to get stack traces from different debugger? E.g. try WinDbg or even Visual Studio. I believe IDE don't have to be able to understand source code in order to understand debugging information included into binary and show you stack traces. BTW you can try gdb although I'm not sure there's pre-compiled version of gdb for Windows. Cygwin has gdb. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Wanted - a straightforward 'grid' data entry tool for sqlite
I'm after an application which will allow me to enter data into a sqlite database using a 'grid' layout of the data. I.e. I want the existing contents of the database displayed as a table and I want to be able to click on a field in a row and just edit the data in place. In addition I want to be able to use the TAB key to move from field to field (another key would be OK, just not the mouse). There should be an empty row at the bottom for entering a new row. I'm happy to use a design tool of some sort to do this although a ready made application would be easier/quicker of course. I don't want to code the whole thing from scratch though. What I want is what MS Access calls a tabular form in its design wizard and is also what it presents you with by default if you open a table directly. I need this to run under Linux as a desktop application or alternatively a web application would be fine, I have apache2 with PHP etc. running on my desktop machine here. I've searched around quite a lot for something that can do this for me but haven't found anything yet. There are lots of database management programs (such as sqlitebrowser and sqliteman) but while they do a good job of managing a database they're really not built for entering data. I just want an executable I can run with database name and table name as parameters, e.g.:- myDataEditor somedatabase.db tablexyz ... and it fires up a window with the rows/columns in a grid and allows me to edit. I don't want to have to navigate through menus and options to get there. Any ideas or suggestions would be very welcome. -- Chris Green ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Open source projects using sqlite
Another example is reusing parts of fossil code in a group ware application. The two projects might generate a common table view of what a user is, hence generating some common code to manage user id tables. Then you have folks doing something completely unrelated, but still using sqlite and still needing a self contained user id management. So, import the standard user id function from the sqlite repositories and be done with it. On Tue, Jan 17, 2012 at 5:01 AM, Matt Young youngsan...@gmail.com wrote: Mainly grouping sqlite applications in the embedded environment, hopefully generating some reusable methods of accessing the sqlite internals. One example might be a reusable method for storing BSON objects, so differing BSON applications share a common table/column view of BSON. On Mon, Jan 16, 2012 at 11:58 PM, Roger Binns rog...@rogerbinns.comwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 16/01/12 21:46, Matt Young wrote: Group projects, collected together because sqlite is the common foundation. Would be nice? You'll need to use longer sentences. What exactly do you want to achieve and who do you want to do the work of grouping projects? There is a list of well known users at this page although parts are dated: http://www.sqlite.org/famous.html You can find numerous open source projects using SQLite by searching at Github, Bitbucket, Google Code and SourceForge. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8VKh0ACgkQmOOfHg372QS9egCdElHp77YiBI+2BjxtvjmtqLem Z9UAoMkmbxTgve0za1tUFJwv74E2w4kq =t+i9 -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Wanted - a straightforward 'grid' data entry tool for sqlite
http://javascriptsource.com/forms/dynamic-table.html Looks great if you operate from a browser. Can we still get sqlite embedded into the browser, or do we have to plug it in? On Tue, Jan 17, 2012 at 8:05 AM, Chris Green c...@isbd.net wrote: I'm after an application which will allow me to enter data into a sqlite database using a 'grid' layout of the data. I.e. I want the existing contents of the database displayed as a table and I want to be able to click on a field in a row and just edit the data in place. In addition I want to be able to use the TAB key to move from field to field (another key would be OK, just not the mouse). There should be an empty row at the bottom for entering a new row. I'm happy to use a design tool of some sort to do this although a ready made application would be easier/quicker of course. I don't want to code the whole thing from scratch though. What I want is what MS Access calls a tabular form in its design wizard and is also what it presents you with by default if you open a table directly. I need this to run under Linux as a desktop application or alternatively a web application would be fine, I have apache2 with PHP etc. running on my desktop machine here. I've searched around quite a lot for something that can do this for me but haven't found anything yet. There are lots of database management programs (such as sqlitebrowser and sqliteman) but while they do a good job of managing a database they're really not built for entering data. I just want an executable I can run with database name and table name as parameters, e.g.:- myDataEditor somedatabase.db tablexyz ... and it fires up a window with the rows/columns in a grid and allows me to edit. I don't want to have to navigate through menus and options to get there. Any ideas or suggestions would be very welcome. -- Chris Green ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite3_close() necessary?
What happens if my application fails to call sqlite3_close() before it exits? Does it leave the db in some unknown state or open to corruption? If I have a daemon type program, will I need to catch signals that try to close/kill the program and call sqlite3_close() before exiting? Thanks!! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_close() necessary?
On Tue, Jan 17, 2012 at 11:51 AM, Bill McCormick wpmccorm...@gmail.comwrote: What happens if my application fails to call sqlite3_close() before it exits? Does it leave the db in some unknown state or open to corruption? If I have a daemon type program, will I need to catch signals that try to close/kill the program and call sqlite3_close() before exiting? Failure to call sqlite3_close() results in memory and file-descriptor leaks if your process keeps running. But as those resources are cleaned up automatically when the process exits, failure to call sqlite3_close() prior to exit is harmless. If you are using WAL mode, failure to call sqlite3_close() might leave -wal and -shm lingering on your disk. But the next process to open the database file will clean them up automatically, so no harm done. Thanks!! __**_ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**usershttp://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Wanted - a straightforward 'grid' data entry tool for sqlite
On Tue, Jan 17, 2012 at 08:36:11AM -0800, Matt Young wrote: http://javascriptsource.com/forms/dynamic-table.html Looks great if you operate from a browser. Can we still get sqlite embedded into the browser, or do we have to plug it in? That doesn't really do it for me, it doesn't edit in situ. To edit a row you have to click on the row and then move up to the row at the top and change the values there. ... and *then* you have to click on the Update Table button to put the values back into the table. On Tue, Jan 17, 2012 at 8:05 AM, Chris Green c...@isbd.net wrote: I'm after an application which will allow me to enter data into a sqlite database using a 'grid' layout of the data. I.e. I want the existing contents of the database displayed as a table and I want to be able to click on a field in a row and just edit the data in place. In addition I want to be able to use the TAB key to move from field to field (another key would be OK, just not the mouse). There should be an empty row at the bottom for entering a new row. I'm happy to use a design tool of some sort to do this although a ready made application would be easier/quicker of course. I don't want to code the whole thing from scratch though. What I want is what MS Access calls a tabular form in its design wizard and is also what it presents you with by default if you open a table directly. I need this to run under Linux as a desktop application or alternatively a web application would be fine, I have apache2 with PHP etc. running on my desktop machine here. I've searched around quite a lot for something that can do this for me but haven't found anything yet. There are lots of database management programs (such as sqlitebrowser and sqliteman) but while they do a good job of managing a database they're really not built for entering data. I just want an executable I can run with database name and table name as parameters, e.g.:- myDataEditor somedatabase.db tablexyz ... and it fires up a window with the rows/columns in a grid and allows me to edit. I don't want to have to navigate through menus and options to get there. Any ideas or suggestions would be very welcome. -- Chris Green ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Chris Green ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Wanted - a straightforward 'grid' data entry tool for sqlite
Le 17/01/2012 18:15, Chris Green a écrit : Hello Chris, You should look at Dojo javascript library, I think they have the widget you are looking for. Of course you still need the back-end plumbing (PHP I suppose). Best wishes Noël On Tue, Jan 17, 2012 at 08:36:11AM -0800, Matt Young wrote: http://javascriptsource.com/forms/dynamic-table.html Looks great if you operate from a browser. Can we still get sqlite embedded into the browser, or do we have to plug it in? That doesn't really do it for me, it doesn't edit in situ. To edit a row you have to click on the row and then move up to the row at the top and change the values there. ... and *then* you have to click on the Update Table button to put the values back into the table. On Tue, Jan 17, 2012 at 8:05 AM, Chris Greenc...@isbd.net wrote: I'm after an application which will allow me to enter data into a sqlite database using a 'grid' layout of the data. I.e. I want the existing contents of the database displayed as a table and I want to be able to click on a field in a row and just edit the data in place. In addition I want to be able to use the TAB key to move from field to field (another key would be OK, just not the mouse). There should be an empty row at the bottom for entering a new row. I'm happy to use a design tool of some sort to do this although a ready made application would be easier/quicker of course. I don't want to code the whole thing from scratch though. What I want is what MS Access calls a tabular form in its design wizard and is also what it presents you with by default if you open a table directly. I need this to run under Linux as a desktop application or alternatively a web application would be fine, I have apache2 with PHP etc. running on my desktop machine here. I've searched around quite a lot for something that can do this for me but haven't found anything yet. There are lots of database management programs (such as sqlitebrowser and sqliteman) but while they do a good job of managing a database they're really not built for entering data. I just want an executable I can run with database name and table name as parameters, e.g.:- myDataEditor somedatabase.db tablexyz ... and it fires up a window with the rows/columns in a grid and allows me to edit. I don't want to have to navigate through menus and options to get there. Any ideas or suggestions would be very welcome. -- Chris Green ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Wanted - a straightforward 'grid' data entry tool for sqlite
On Tue, Jan 17, 2012 at 06:21:48PM +0100, noel.frankinet wrote: Le 17/01/2012 18:15, Chris Green a écrit : Hello Chris, You should look at Dojo javascript library, I think they have the widget you are looking for. Of course you still need the back-end plumbing (PHP I suppose). That seems rather a long way (in terms of the amount of programming that would be involved) from where I want to be. Dojo appears to be an excellent general purpose Javascript framework but doesn't really address my requirement directly. Note that while I *could* use a web application that isn't a requirement, a native Linux application running on my desktop is all I actually need. Best wishes Noël On Tue, Jan 17, 2012 at 08:36:11AM -0800, Matt Young wrote: http://javascriptsource.com/forms/dynamic-table.html Looks great if you operate from a browser. Can we still get sqlite embedded into the browser, or do we have to plug it in? That doesn't really do it for me, it doesn't edit in situ. To edit a row you have to click on the row and then move up to the row at the top and change the values there. ... and *then* you have to click on the Update Table button to put the values back into the table. On Tue, Jan 17, 2012 at 8:05 AM, Chris Greenc...@isbd.net wrote: I'm after an application which will allow me to enter data into a sqlite database using a 'grid' layout of the data. I.e. I want the existing contents of the database displayed as a table and I want to be able to click on a field in a row and just edit the data in place. In addition I want to be able to use the TAB key to move from field to field (another key would be OK, just not the mouse). There should be an empty row at the bottom for entering a new row. I'm happy to use a design tool of some sort to do this although a ready made application would be easier/quicker of course. I don't want to code the whole thing from scratch though. What I want is what MS Access calls a tabular form in its design wizard and is also what it presents you with by default if you open a table directly. I need this to run under Linux as a desktop application or alternatively a web application would be fine, I have apache2 with PHP etc. running on my desktop machine here. I've searched around quite a lot for something that can do this for me but haven't found anything yet. There are lots of database management programs (such as sqlitebrowser and sqliteman) but while they do a good job of managing a database they're really not built for entering data. I just want an executable I can run with database name and table name as parameters, e.g.:- myDataEditor somedatabase.db tablexyz ... and it fires up a window with the rows/columns in a grid and allows me to edit. I don't want to have to navigate through menus and options to get there. Any ideas or suggestions would be very welcome. -- Chris Green ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Chris Green ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] R*Tree virtual table question
On Tue, 17 Jan 2012 11:35:58 +, g...@novadsp.com g...@novadsp.com wrote: Thanks Simon, Neither of those things are simple. Rather than hack an existing library, I recommend that you allow the R*Tree module to maintain its integer keys and make another (normal, not R*Tree) table in the same SQLite database to keep the list of GUIDs vs. integer keys. Ouch :) If the GUID can be represented as a 64 bit signed integer you can use it as the INTEGER PRIMARY KEY of the RTree table by itself. Real GUIDs are 128 bit though, so it will only work if you have a static prefix or suffix part of sufficiently large size that you don't have to store in each and every row. -- Regards, Kees Nuyt ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Open source projects using sqlite
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 17/01/12 05:01, Matt Young wrote: Mainly grouping sqlite applications in the embedded environment, hopefully generating some reusable methods of accessing the sqlite internals. I'm still totally confused about what you are trying to achieve. There is exactly one way of accessing SQLite internals - start here: http://www.sqlite.org/c3ref/intro.html There are lots of wrappers for other programming languages, but in an embedded environment you are far more aware of your constraints (ram, cpu, response times, caching, programming languages, library versions etc) and will need to adjust to your circumstances. One example might be a reusable method for storing BSON objects, so differing BSON applications share a common table/column view of BSON. Huh? The only BSON I have used and can find any mention of is the binary JSON representation introduced by MongoDB. That style of data representation and the relational model used by SQL do not mix except for the most superficial cases. Another example is reusing parts of fossil code in a group ware application. The two projects might generate a common table view of what a user is, hence generating some common code to manage user id tables. Then you have folks doing something completely unrelated, but still using sqlite and still needing a self contained user id management. So, import the standard user id function from the sqlite repositories and be done with it. That sounds like you want published standard schemas. But even something like a user is going to depend on the platform and usage. The admin user for a router only needs a username and password stored. A user that is allowed data storage will need username, password, a home directory, possibly a quota and platform specific id. A more complicated one would also require group membership information. Yet another may need to store users preferred language. A user that has to work across machines would need to plug into existing Active Directory or LDAP schemas. It still isn't clear what you want as your messages have been all over the place mentioning API abstractions, unrelated serialization formats, schemas, open source and embedded without showing what problem you want to solve. In any event if you want someone else to do the work to produce a catalog of whatever it is you want, then you'll need to provide a reason why they would do that for your benefit. If you want to do itself then go ahead and just do it. You can use a search engine to find the underlying data and a wiki or similar as a place to collate it. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk8VxjUACgkQmOOfHg372QR4ewCgzI5IPciF8juhfY7j5FDyu80a BJYAnjKeEt4aY4mY8W1z26DUxjJoOISU =g/LF -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3_set_auxdata invalid pointer
I guess that sqlite3_set_auxdata cannot be called by the xStep implementation of an aggregate function. The doc says: The following two functions may be used by scalar SQL functions to associate metadata with argument values. I will try with sqlite3_aggregate_context. Sorry for the disturbance. On Sat, Jan 14, 2012 at 10:36 PM, gwenn gwenn.k...@gmail.com wrote: Hello, I am trying to add custom aggregation function support in a golang driver (scalar functions are ok). While testing, I got this: *** glibc detected *** ./6.out: realloc(): invalid pointer: 0x02daa1c5 *** === Backtrace: = /lib/x86_64-linux-gnu/libc.so.6(+0x72656)[0x2b9a7b5da656] /lib/x86_64-linux-gnu/libc.so.6(realloc+0x312)[0x2b9a7b5e0762] /home/gwen/Test/sqlite-autoconf-3070900/.libs/libsqlite3.so.0(+0x30387)[0x2b9a7b2ec387] /home/gwen/Test/sqlite-autoconf-3070900/.libs/libsqlite3.so.0(+0x16a5b)[0x2b9a7b2d2a5b] /home/gwen/Test/sqlite-autoconf-3070900/.libs/libsqlite3.so.0(+0x234da)[0x2b9a7b2df4da] /home/gwen/Test/sqlite-autoconf-3070900/.libs/libsqlite3.so.0(sqlite3_set_auxdata+0xb6)[0x2b9a7b2e2d86] I just have enough skills to debug with gdb and to find this line: 62056: pVdbeFunc = sqlite3DbRealloc(pCtx-s.db, pVdbeFunc, nMalloc); Could you please help me find what I am doing wrong? I just call sqlite3_set_auxdata in my xStep function. Thanks. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Bin parameters by name - generic function
I'm trying to write a function with a sig like this: int BindParameter(sqlite3_stmt* stmt, int sqlType, const char* pname, char* value); Somewhere before the call(s) to BindParameter, I'll have a string that looks like this: (FOO=some text value, BAR=3.141, ZIP=45, TIMESTAMP1=01/17/12 17:54:00, TIMESTAMP2=542312453423) My parameter values will always be input from a char string (as above), but the data types in the table are INTEGER, TEXT, REAL and NUMERIC. I was thinking that there must already be some easy way of getting to the correct bind call. In the end, I would like to have something like this inside the BindParameter function: case INTEGER: sqlite3_bind_int(stmt, sqlite3_bind_parameter_index(stmt, pname), data); case REAL: sqlite3_bind_double(stmt, sqlite3_bind_parameter_index(stmt, pname), data); case TEXT: sqlite3_bind_text(stmt, sqlite3_bind_parameter_index(stmt, pname), value); case NUMERIC: ??? I don't see a bind This seems like something somebody would have come across before, so I'd rather not re-invent. My questions are: 1. Is there already some other way of doing what I want? Or am I already on the right track? 2. If, is there already some enum or #define that would work for sqlType? (SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_BLOB, SQLITE_NULL, SQLITE_TEXT don't seem to cover every DT) 3. What is the correct bind call for a NUMERIC parameter? Thanks!!! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bin parameters by name - generic function
I believe the secret is: don't bother. sqlite does type conversion as needed, so you can just pass the strings you've parsed out of your larger string to sqlite3_bind_text(). If the issue is that you need to decode your TIMESTAMP1 column to get the same format as TIMESTAMP2, and you want to use the datatype listed on the column as a hint, then I can't help you. --David Garfield On Tue, Jan 17, 2012 at 19:32, Bill McCormick wpmccorm...@gmail.com wrote: I'm trying to write a function with a sig like this: int BindParameter(sqlite3_stmt* stmt, int sqlType, const char* pname, char* value); Somewhere before the call(s) to BindParameter, I'll have a string that looks like this: (FOO=some text value, BAR=3.141, ZIP=45, TIMESTAMP1=01/17/12 17:54:00, TIMESTAMP2=542312453423) My parameter values will always be input from a char string (as above), but the data types in the table are INTEGER, TEXT, REAL and NUMERIC. I was thinking that there must already be some easy way of getting to the correct bind call. In the end, I would like to have something like this inside the BindParameter function: case INTEGER: sqlite3_bind_int(stmt, sqlite3_bind_parameter_index(**stmt, pname), data); case REAL: sqlite3_bind_double(stmt, sqlite3_bind_parameter_index(**stmt, pname), data); case TEXT: sqlite3_bind_text(stmt, sqlite3_bind_parameter_index(**stmt, pname), value); case NUMERIC: ??? I don't see a bind This seems like something somebody would have come across before, so I'd rather not re-invent. My questions are: 1. Is there already some other way of doing what I want? Or am I already on the right track? 2. If, is there already some enum or #define that would work for sqlType? (SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_BLOB, SQLITE_NULL, SQLITE_TEXT don't seem to cover every DT) 3. What is the correct bind call for a NUMERIC parameter? Thanks!!! __**_ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**usershttp://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bin parameters by name - generic function
http://www.c-sharpcorner.com/UploadFile/prasad_1/RegExpressionSample72005040853AM/RegExpressionSample1.aspx At that site they parse your string using regex in c#, though I did't see a time stamp test, and their is the equivalent regex functions, many, in a c libs. On Tue, Jan 17, 2012 at 4:32 PM, Bill McCormick wpmccorm...@gmail.comwrote: I'm trying to write a function with a sig like this: int BindParameter(sqlite3_stmt* stmt, int sqlType, const char* pname, char* value); Somewhere before the call(s) to BindParameter, I'll have a string that looks like this: (FOO=some text value, BAR=3.141, ZIP=45, TIMESTAMP1=01/17/12 17:54:00, TIMESTAMP2=542312453423) My parameter values will always be input from a char string (as above), but the data types in the table are INTEGER, TEXT, REAL and NUMERIC. I was thinking that there must already be some easy way of getting to the correct bind call. In the end, I would like to have something like this inside the BindParameter function: case INTEGER: sqlite3_bind_int(stmt, sqlite3_bind_parameter_index(**stmt, pname), data); case REAL: sqlite3_bind_double(stmt, sqlite3_bind_parameter_index(**stmt, pname), data); case TEXT: sqlite3_bind_text(stmt, sqlite3_bind_parameter_index(**stmt, pname), value); case NUMERIC: ??? I don't see a bind This seems like something somebody would have come across before, so I'd rather not re-invent. My questions are: 1. Is there already some other way of doing what I want? Or am I already on the right track? 2. If, is there already some enum or #define that would work for sqlType? (SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_BLOB, SQLITE_NULL, SQLITE_TEXT don't seem to cover every DT) 3. What is the correct bind call for a NUMERIC parameter? Thanks!!! __**_ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**usershttp://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] How to get column datatype
Hi All, Does SQLite support any SQL command to get column datatype of table like varchar, INTEGER? Please share example of such command. It would be helpful for me. Thanking you. -- Regards, - Tarun Thakur ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] diacritic insensitive search
Hi, I have ICU integrated with SQLITE. How do I specify a diacritic insensitive search ?. ex:- when I search for all strings that begin with 'e', the result set should return all strings that begin with 'e' as well as the accentuated 'e'. -Sreekumar ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Bin parameters by name - generic function
David Garfield wrote, On 1/17/2012 7:05 PM: I believe the secret is: don't bother. sqlite does type conversion as needed, so you can just pass the strings you've parsed out of your larger string to sqlite3_bind_text(). Excellent! Exactly what I was looking for. If the issue is that you need to decode your TIMESTAMP1 column to get the same format as TIMESTAMP2, and you want to use the datatype listed on the column as a hint, then I can't help you. Yes, that might be a challenge. Maybe something here?: http://www.sqlite.org/lang_datefunc.html Compute the date and time given a unix timestamp 1092941466. SELECT datetime(1092941466, 'unixepoch'); --David Garfield On Tue, Jan 17, 2012 at 19:32, Bill McCormickwpmccorm...@gmail.com wrote: I'm trying to write a function with a sig like this: int BindParameter(sqlite3_stmt* stmt, int sqlType, const char* pname, char* value); Somewhere before the call(s) to BindParameter, I'll have a string that looks like this: (FOO=some text value, BAR=3.141, ZIP=45, TIMESTAMP1=01/17/12 17:54:00, TIMESTAMP2=542312453423) My parameter values will always be input from a char string (as above), but the data types in the table are INTEGER, TEXT, REAL and NUMERIC. I was thinking that there must already be some easy way of getting to the correct bind call. In the end, I would like to have something like this inside the BindParameter function: case INTEGER: sqlite3_bind_int(stmt, sqlite3_bind_parameter_index(**stmt, pname), data); case REAL: sqlite3_bind_double(stmt, sqlite3_bind_parameter_index(**stmt, pname), data); case TEXT: sqlite3_bind_text(stmt, sqlite3_bind_parameter_index(**stmt, pname), value); case NUMERIC: ??? I don't see a bind This seems like something somebody would have come across before, so I'd rather not re-invent. My questions are: 1. Is there already some other way of doing what I want? Or am I already on the right track? 2. If, is there already some enum or #define that would work for sqlType? (SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_BLOB, SQLITE_NULL, SQLITE_TEXT don't seem to cover every DT) 3. What is the correct bind call for a NUMERIC parameter? Thanks!!! __**_ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**usershttp://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] How to get column datatype
Well, to begin with, SQLite doesn't exactly have column data types like most other DBMS, rather, columns have affinities, which might be looked at as sort of preferences. See http://www.sqlite.org/different.html#typing and http://www.sqlite.org/datatype3.html#affinity However, this command (http://www.sqlite.org/pragma.html#pragma_table_info) will list the type with which the column was declared: Pragma table_info (table_name); it just may not mean what you think it might. Best regards, Peter -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf Of Tarun Sent: Tuesday, January 17, 2012 8:51 PM To: sqlite-users@sqlite.org Subject: [sqlite] How to get column datatype Hi All, Does SQLite support any SQL command to get column datatype of table like varchar, INTEGER? Please share example of such command. It would be helpful for me. Thanking you. -- Regards, - Tarun Thakur ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] memory fault in sqlite3_open_v2()
Hello, Joe. You wrote Tuesday, January 17, 2012, 12:50:35: For now I've just defined _WIN32_WINNT as 0x500, but not sure is it correct, and will my application works if it will be launched under Windows 9X. This is the correct fix. Also, most modern Windows projects already have the _WIN32_WINNT define set to something (e.g. 0x400, 0x500, etc). I have been thinking about what you said and decided, that there is inconsistency between checks that runs in compilation time and in runtime. As I understand if I'm not defining _WIN32_WINNT, I'm compiling for Windows 9X, so compilationcheckdecidesthatthereisno GetFullPathNameW() and set pointer for osGetFullPathNameW() to NULL. But when I run that executable in Windows XP, runtime check isNT() found that it is Windows NT based system, so it tried to call osGetFullPathNameW() instead osGetFullPathNameA(). I think that calling check IsNT() is not enough, there is need to check if osGetFullPathNameW() is valid pointer, and if it is not there fall back to !isNT() branch where osGetFullPathNameA() will be called. -- WBR, darkelf mailto:dark...@ukr.net ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Minimum RAM requirements
I asked this question on the sql_dev list which Richard Hipp told me that this list was the proper place. I asked whether it is possible to execute SQLite in 80K of RAM. Well, I can now tell you that you can, just about. My environment has no malloc so I used the MEMSYS5 method of internal malloc, but any SQL query failed with Out Of Memory. When I changed to MEMSYS3, I was able to create a table, insert rows and do select. How much more I can do needs to be seen. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users