Re: [sqlite] sqlite3 question
Thanks Larry. I had always been under the impression that forward slashes weren't acceptable in Windows path names so I'm glad to hear they are. The project I'm working on has to run on Macs as well as Windows and the forward slash is acceptable on both platforms. Pete On Tue, Jan 31, 2012 at 9:00 AM, wrote: > Message: 16 > Date: Mon, 30 Jan 2012 21:12:59 -0800 > From: Larry Brasfield > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] sqlite3 question > Message-ID: <4f27785b.7030...@iinet.com> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > If you look at shell.c in the code implementing > sqlite3.exe, you will find a procedure named > resolve_backslashes(char *z) which performs a > substitution of '\'-escaped characters that is > similar to the C/C++ interpretation of string > literals. That is what has sucked up those > backslashes. > > Getting to what you should do: I advise using > plain '/' as the path separator, unless you are > fond of using '\\'. The OS is perfectly willing > to accept '/'. (I curse IBM's insistence that > the backwards convention started in CPM had to > be prolonged into MS-DOS. There are fewer and > fewer contexts where programs are silly enough > to insist on seeing '\' rather than the '/' the > rest of the world has settled upon. > > Cheers, > -- > Larry Brasfield > -- Pete Molly's Revenge <http://www.mollysrevenge.com> ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3 question
If you look at shell.c in the code implementing sqlite3.exe, you will find a procedure named resolve_backslashes(char *z) which performs a substitution of '\'-escaped characters that is similar to the C/C++ interpretation of string literals. That is what has sucked up those backslashes. Getting to what you should do: I advise using plain '/' as the path separator, unless you are fond of using '\\'. The OS is perfectly willing to accept '/'. (I curse IBM's insistence that the backwards convention started in CPM had to be prolonged into MS-DOS. There are fewer and fewer contexts where programs are silly enough to insist on seeing '\' rather than the '/' the rest of the world has settled upon. Cheers, -- Larry Brasfield ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite3 question
I'm not sure if this is an sqlite3 question or WIndows. I am trying to use the .output command to send the output from a SELECT statement to a file on WIndows 7. The .output command looks like: .output C:\Users\Pete\AppData\Local\Temp\sqlite3out.txt When the SELECT statement is executed the output ends up in a file named UsersPeteAppDataLocalTempsqlite3out.txt in whatever directory I am running in. The file name gets all the \ chars stripped out and the result used as a local filename. Unqualified filenames work as expected. I have run the same statements on a Mac (with the appropriate temp directory and forward slashes instead of backslashes) and the file ends up in the correct directory. Not being a Windows expert, I am at a loss to explain this. -- Pete ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3 question
Also what's your journal_mode and synchronous setting? ( http://www.sqlite.org/pragma.html#pragma_synchronous) Depending on how these are set, if your application terminates early, or system crashes, you will likely corrupt your DB. 2010/10/30 Martin Engelschalk > Hello Lizhe, > > in order for the members in this list to help you, please provide more > details. > First, the most probable cause for this error is that the database file > is in fact corrupted in some way or is not a sqlite database file. > What step/steps leads to corruption? > What sqlite function returns the error? > does the error occur always, or only with a certain statement? > Can you access the file with the sqlite command line utility? > How was the file created? Do you have a file which is ok? > > Martin > > Am 30.10.2010 09:21, schrieb lizhe: > > 您好: > > 我们使用的SQLITE3 > 数据库版本为3.6.23.1版本,在红帽编译器下运行,运行的硬件系统为LINUX(2.6版本),现在出现了一个问题,长时间运行后会出现查询数据库返回"The > database disk image is malformed", > > 请问这是什么原因造成的.如何解决,使用最新版本3.7.2是否会避免出现这个问题? > > > > > > Dear Sir: > > > > I am writing to enquire about a bug we found. Now the SQLITE3 > database we use is version 3.6.23.1, which running in the red hat compiler > and the hardware system is Linux(version 2.6).We have a problem that for > select database(SQL),return "The database disk image is malformed" ,How to > solve my trouble? Is use version 3.7.2 ? Do you have any idea about this? I > would like get support for SQLite ? > > Wish you happiness ! > > > > > Yours sincerely, > > > Lizhe > > > > ___ > > 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] sqlite3 question
Hello Lizhe, in order for the members in this list to help you, please provide more details. First, the most probable cause for this error is that the database file is in fact corrupted in some way or is not a sqlite database file. What step/steps leads to corruption? What sqlite function returns the error? does the error occur always, or only with a certain statement? Can you access the file with the sqlite command line utility? How was the file created? Do you have a file which is ok? Martin Am 30.10.2010 09:21, schrieb lizhe: > 您好: > 我们使用的SQLITE3 > 数据库版本为3.6.23.1版本,在红帽编译器下运行,运行的硬件系统为LINUX(2.6版本),现在出现了一个问题,长时间运行后会出现查询数据库返回"The > database disk image is malformed", > 请问这是什么原因造成的.如何解决,使用最新版本3.7.2是否会避免出现这个问题? > > > Dear Sir: > > I am writing to enquire about a bug we found. Now the SQLITE3 database we > use is version 3.6.23.1, which running in the red hat compiler and the > hardware system is Linux(version 2.6).We have a problem that for select > database(SQL),return "The database disk image is malformed" ,How to solve my > trouble? Is use version 3.7.2 ? Do you have any idea about this? I would like > get support for SQLite ? > Wish you happiness ! > > > Yours sincerely, > > Lizhe > > ___ > 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 question
您好: 我们使用的SQLITE3 数据库版本为3.6.23.1版本,在红帽编译器下运行,运行的硬件系统为LINUX(2.6版本),现在出现了一个问题,长时间运行后会出现查询数据库返回"The database disk image is malformed", 请问这是什么原因造成的.如何解决,使用最新版本3.7.2是否会避免出现这个问题? Dear Sir: I am writing to enquire about a bug we found. Now the SQLITE3 database we use is version 3.6.23.1, which running in the red hat compiler and the hardware system is Linux(version 2.6).We have a problem that for select database(SQL),return "The database disk image is malformed" ,How to solve my trouble? Is use version 3.7.2 ? Do you have any idea about this? I would like get support for SQLite ? Wish you happiness ! Yours sincerely, Lizhe ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite3 question
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 lizhe wrote: > I am writing to enquire about a bug we found. http://www.beiww.com/doc/oss/smart-questions.html Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktrfUMACgkQmOOfHg372QRpngCeMF5O+xBQcA2FyMItjIrC3T+W QQcAn2ArgAeksiAn0rwD4CY5+k7Bdj06 =mEdA -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite3 question
您好: 我们使用的SQLITE3 数据库版本为3.6版本,在红帽编译器下运行,运行的硬件系统为LINUX(2.6版本),现在出现了一个问题,对有些板子,发现如果连续插入数据库会造成LINUX系统的崩溃,有的时候会造成FLASH的丢失,使用调试口测试,发现是堆栈益出,但是在有些板子上却很正常,可以连续插入几万条记录,请问这是什么原因造成的. Dear Sir: I am writing to enquire about a bug we found. Now the SQLITE3 database we use is version 3.6, which running in the red hat compiler and the hardware system is Linux(version 2.6).We have a problem that for some broads, if inserting the records into database continuously will make the Linux system breakdown, and sometimes lose Flash too. Using debugcom to test, it comes out "stack overflow ". But for some broads are not, we can insert tens of thousands of records into it. Do you have any idea about this? Wish you happiness ! Yours sincerely, Lizhe ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 question
Hi Richard, Thank you for quick reply. Actually I am reading from that file only, but I didn't get the concept of 'Cell' that is mentioned as... " The payload for an entry and the preceding pointer are combined to form a "Cell". Can you please help me to clarify this. Actually I got some bug in sqlite-3.5.9 for NFS pages (disk image malformed) so I was debugging the same, and came across this. The bug is as follow, which I posted in 'sqlite-...@sqlite.org', awaiting reply... === sqlite-3.5.9 bug === I using sqlite-3.5.9 and observing a 'disk image malformed' error after executing several sql statements. After debugging found that the in sqlite3BtreeInitPage() it returns with SQLITE_CORRUPT_BKPT based on some condition (see below)... SQLITE_PRIVATE int sqlite3BtreeInitPage( MemPage *pPage,/* The page to be initialized */ MemPage *pParent /* The parent. Might be NULL */ ){ ... if( pPage->nCell==0 && pParent!=0 && pParent->pgno!=1 ){ /* All pages must have at least one cell, except for root pages */ return SQLITE_CORRUPT_BKPT; } ... } So I some doubts, is this condition required? if required what does it checks? Also if you have any workaround, please let me know. Please let me know from which version of sqlite this bug has been resolved. === sqlite-3.5.9 bug === I appreciate you help to understand this bug. Thank you. -Hiral -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of D. Richard Hipp Sent: Thursday, May 28, 2009 6:23 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] SQLite3 question On May 28, 2009, at 8:43 AM, Oza, Hiral_Dineshbhai wrote: > > Can you please let me know meaning of 'Cell' in Btrees used in > sqlite3. See line 43 of the btreeInt.h source file for the definition. You will want to read the previous 42 lines of that same file for context. D. Richard Hipp d...@hwaci.com ___ 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] SQLite3 question
On 28/05/2009 10:53 PM, Igor Tandetnik wrote: > "Oza, Hiral_Dineshbhai" > wrote in > message > news:24ea477c0c5854409ba742169a5d71c406bd4...@mailhyd2.hyd.deshaw.com >> Can you please let me know meaning of 'Cell' in Btrees used in >> sqlite3. > > Can you point to the text where you saw sqlite3, B-trees and the word > "Cell" mentioned together? Possibly here: http://www.sqlite.org/fileformat.html ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 question
"Oza, Hiral_Dineshbhai" wrote in message news:24ea477c0c5854409ba742169a5d71c406bd4...@mailhyd2.hyd.deshaw.com > Can you please let me know meaning of 'Cell' in Btrees used in > sqlite3. Can you point to the text where you saw sqlite3, B-trees and the word "Cell" mentioned together? Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite3 question
On May 28, 2009, at 8:43 AM, Oza, Hiral_Dineshbhai wrote: > > Can you please let me know meaning of 'Cell' in Btrees used in > sqlite3. See line 43 of the btreeInt.h source file for the definition. You will want to read the previous 42 lines of that same file for context. D. Richard Hipp d...@hwaci.com ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite3 question
Hi, I am new to this list, so I am not sure whether this is the right forum to get this information... Can you please let me know meaning of 'Cell' in Btrees used in sqlite3. Thank you. -Hiral ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users