[sqlite] FaceBook reduced Messenger size partly through increased use of SQLite

2020-03-03 Thread Shane Harrelson
FaceBook significantly reduced the size of its Messenger app partly by relying on SQLite to do more of the heavy lifting: "Project LightSpeed: How Facebook shrunk Messenger down by 75%" https://www.fastcompany.com/90470219/project-lightspeed-how-facebook-shrunk-messenger-down-by-75 "With

Re: [sqlite] Index on expressions

2014-09-03 Thread Shane Harrelson
Use a trigger to populate your index column. http://www.sqlite.org/lang_createtrigger.html On Wed, Sep 3, 2014 at 9:01 AM, Dominique Devienne wrote: > On Wed, Sep 3, 2014 at 2:52 PM, Richard Hipp wrote: > > > SQLite does not (yet) support indexes on

Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-03 Thread Shane Harrelson
Neither of these are your problem, but I noticed the following in your posted code: PRAGMA auto_vacuum=NONE; has no affect after your tables are created. You should move this setting earlier in your code. http://www.sqlite.org/pragma.html#pragma_auto_vacuum PRAGMA count_changes=OFF is

Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-02 Thread Shane Harrelson
I had a few suggestions and questions earlier in this thread that I don't think have been responded to. And yes, without seeing the source it will be difficult to make more suggestions. On Apr 2, 2014 4:57 PM, "Kevin Xu" wrote: > The app seems to use between 60-80% CPU while

Re: [sqlite] Improving Bulk Insert Speed (C/C++)

2014-04-02 Thread Shane Harrelson
What is your page size? Make sure it matches the sector size of your device. SSDs can be picky about write sizes. As an experiment, you might try using larger page sizes that are multiples of the sector size. Try to reduce the size of the records you are writing. Ie. can you map any string

[sqlite] sqlite3_close() documentation inconsistency

2013-03-12 Thread Shane Harrelson
Documentation for sqlite3_close() on http://www.sqlite.org/c3ref/close.html has two conflicting statements: "If the database connection is associated with unfinalized prepared statements or unfinished sqlite3_backup objects then sqlite3_close() will leave the database connection open and return

Re: [sqlite] SQLite3.dll for Win 64

2011-07-25 Thread Shane Harrelson
The makefile builds lemon.exe from lemon.c as part of the build process, so make sure it was generated correctly as well. "lemon -x" should print a version number. "lemon -?" should print an error and help message. Again, HTH. -Shane On Mon, Jul 25, 2011 at 5:51

Re: [sqlite] SQLite3.dll for Win 64

2011-07-25 Thread Shane Harrelson
The TK_* identifiers are all defined in parse.h which is generated by lemon.exe from parse.y. parse.h is "included" in the amalgamation file, sqlite3.c. Try deleting your parse.c and parse.h and sqlite3.c and re-running your make. Check that parse.h was generated correctly and subsequently

Re: [sqlite] Support for .Net CE 3.5

2011-06-02 Thread Shane Harrelson
You'll have to go back to one of the "legacy versions" from http://sqlite.phxsoftware.com . Compact framework support was one of the features that had to be temporarily dropped when maintenance was moved to http://www.sqlite.org . Restoring compact framework is currently one of our top priorities.

Re: [sqlite] Discussing and contributing to new System.Data.SQLite project

2011-05-27 Thread Shane Harrelson
Hi- The SDS project is currently being maintained by the same people who maintain SQLite. We're currently also using the same mailing list (this one, sqlite-users) for discussions of SDS. Contributions are always welcome, but please note we will need a "contributor agreement" on file:

Re: [sqlite] .NET4 is available?

2011-05-27 Thread Shane Harrelson
The latest versions are available at http://system.data.sqlite.org On Thu, May 26, 2011 at 11:54 AM, Massimo Savazzi wrote: > I'm using the "old": 1.0.66.1 .NET4 > > http://sqlite.phxsoftware.com/tags/.NET+4/default.aspx > > > > Do we have an updated version? > > >

Re: [sqlite] Interop DLL question

2011-05-20 Thread Shane Harrelson
Switching to a "single format" greatly simplified things from an "administrative" point of view - giving us a consistent single "packaging" format across all platforms (Windows, Mono, Compact, ARM, etc.) - a support customer even specifically pointed out this made things much easier for them as

Re: [sqlite] Unable to load dll "SQLite.Interop.dll"

2011-05-20 Thread Shane Harrelson
The setup packages available from here: http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki are suppose to check if the MSVC runtimes are installed or not and install them. It's the main reason the packages are as large as they are. How did you install the SDS DLLs? Thanks.

Re: [sqlite] System.Data.SQLite Status

2011-05-13 Thread Shane Harrelson
On Fri, May 13, 2011 at 3:24 AM, Clay Fowler wrote: > The downloads at > http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wikiappear > broken in various ways: > > The precompiled binaries fail to work on desktop from Mono on OS X or on > Microsoft's CLR

Re: [sqlite] Building managed only System.Data.SQLite

2011-04-20 Thread Shane Harrelson
teresting but I do not know > > if that is right for me at this moment. > > > > Shane: > > > > I will try what you recommend tomorrow, thank you. > > > > -- > > Rich > > > > On Tue, Apr 19, 2011 at 4:47 PM, Shane Harrelson > > <

Re: [sqlite] Building managed only System.Data.SQLite

2011-04-19 Thread Shane Harrelson
The target build settings can be controlled from SQLite.NET.Settings.targets - in particular, you should probably look at UseInteropDll and UseSqliteStandard. To override the USE_INTEROP_DLL setting, try copying SQLite.NET.Settings.targets to SQLite.NET.Settings.targets.user and make the settings

Re: [sqlite] BUG: mutex_w32.c; diagnostic message needs to be clearer

2011-03-14 Thread Shane Harrelson
I updated the debug statement here: http://www.sqlite.org/src/info/def98fd23e Thanks for the report. -Shane On Mon, Mar 14, 2011 at 7:54 PM, Noah Hart wrote: > > In the routine winMutexTry at line 284 > > -    printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace,

Re: [sqlite] Source code for system.data.sqlite

2011-03-02 Thread Shane Harrelson
Thanks for the feedback. We're currently trying to work out a Contributor License Agreement for System.Data.SQLite - probably something along the lines of http://www.fossil-scm.org/fossil/doc/trunk/www/copyright-release.html used for Fossil. You need to login to the Fossil site, even if only as

Re: [sqlite] Problem with VACUUM feature

2011-02-23 Thread Shane Harrelson
Hi- On Windows, SQLite uses the FILE_FLAG_DELETE_ON_CLOSE flag to have temporary files automatically deleted after they are closed. WINCE doesn't support this flag, so you will see special logic in os_win.c, wrapped in #ifdef SQLITE_OS_WINCE, for handling the deletion of these files. You

Re: [sqlite] UPDATE/INSERTing 1-2k rows slower than expected

2011-02-16 Thread Shane Harrelson
On Mon, Feb 14, 2011 at 6:04 PM, Simon Slavin wrote: > > If the data is backed up when SQLite has the files closed, things are fine.   > The really hard part of this comes when you're working with systems that must > be live at all times.  Which is why you'll never see a

Re: [sqlite] BUG: test script exclusive2.test needs do_not_use_codec

2011-02-15 Thread Shane Harrelson
Thanks. I think I got all the changes. On Mon, Feb 14, 2011 at 7:47 PM, Noah Hart wrote: > > exclusive2.test reads directly from the database using binary read > > It needs the following changes: > > -source $testdir/tester.tcl > +source $testdir/tester.tcl > + > +# Do not

Re: [sqlite] BUG: capi3e.test when compiled with SQLITE_OMIT_UTF16

2011-02-13 Thread Shane Harrelson
Thanks.Hopefully corrected here: http://www.sqlite.org/src/info/b04304b967 -Shane On Fri, Feb 11, 2011 at 4:59 PM, Noah Hart wrote: > > capi3e.test needs >      ifcapable utf16 logic before capi3e-2.1.$i > to properly pass tests when compiled with SQLITE_OMIT_UTF16 > >

Re: [sqlite] Outer query returning results not found in subquery

2011-02-10 Thread Shane Harrelson
On Thu, Feb 10, 2011 at 2:29 PM, Igor Tandetnik wrote: > On 2/10/2011 2:17 PM, Dan Kubb wrote: >> Database setup: >> >>      CREATE TABLE "test" ("letter" VARCHAR(1) PRIMARY KEY, "number" INTEGER >> NOT NULL); >> >>      INSERT INTO "test" ("letter", "number") VALUES('b',

Re: [sqlite] Windows performance problems associated with malloc()

2010-12-17 Thread Shane Harrelson
I believe the Windows default is to use the LFH on Vista and newer versions of Windows. The suggestion by Marcus Grimm to use _set_sbh_threshold() to enable use of the SBH (small block heap) may help under some usage scenarios on those platforms. -Shane On Fri, Dec 17, 2010 at 6:29 PM, Doug

Re: [sqlite] WAL locking problem on Windows CE

2010-12-10 Thread Shane Harrelson
On Fri, Dec 10, 2010 at 9:06 AM, Richard Hipp wrote: > On Fri, Dec 10, 2010 at 4:02 AM, Nicklas Larsson > wrote: > >> Hi, >> >> we have been running SQLite (3.6.21) successfully on Windows CE for a >> while. >> When upgrading to version 3.7.3 our intent

Re: [sqlite] SQLite in WinCE Emulator - Disk I/O Error and change of pragma don´t work

2010-12-08 Thread Shane Harrelson
According to the MSDN support sites, there are a couple of known issues with the Windows Mobile Emulator, when using emulated storage cards. With an emulated storage card, SetEndOfFile() (which we use for truncating a file) and FlushFileBuffers() (which we use for syncing) will fail. They do not

Re: [sqlite] Some floats of 15 digits or less do not round-trip

2010-11-29 Thread Shane Harrelson
In Visual C, a "long double" and a "double" are the same, and only offer 53 bits of precision. On GCC, a "long double" has 80 bits of precision. Unfortunately, I don't think there's a way to have Visual C use more precision. Because of this, round off error will always differ between the two

Re: [sqlite] SQLite3.7.3_for_Pocket_PC_2003_can't_compile

2010-10-22 Thread Shane Harrelson
You need to compile with SQLITE_OMIT_WAL for now. On Thu, Oct 21, 2010 at 10:09 PM, 祝久文 wrote: > Hello, > When compiling for Pocket PC 2003(VS2005),it gives out two errors as follows: > .\os_win.c(1350) : error C2065: 'LOCKFILE_EXCLUSIVE_LOCK' : undeclared > identifier >

Re: [sqlite] Porting SQLite 3.7.2 to vxWorks 6.7

2010-10-11 Thread Shane Harrelson
See: http://www.sqlite.org/src/info/d1ed743b6e for changes for SQLITE_OMIT_WAL. 3.7.3 should be available from the downloads page: http://www.sqlite.org/download.html as of October 8, 2010. You might need to refresh your browser cache. Direct link to the amalgamation is:

Re: [sqlite] Compiling dll 3.7.3 issue was [BUG] JOIN subquery in FROM with FTS3 table

2010-10-08 Thread Shane Harrelson
You'll get this if your .DEF file includes any APIs that are not compiled into your build. A few sources are: SQLITE_OMIT_LOAD_EXTENSION=1 SQLITE_ENABLE_COLUMN_METADATA=1 SQLITE_ENABLE_STAT2=1 SQLITE_ENABLE_FTS3=1 SQLITE_ENABLE_RTREE=1 Depending on how you're compiling, you have a couple of

Re: [sqlite] Breakpoints uncorrelated on MSVC amalgamation build

2010-09-23 Thread Shane Harrelson
This limitation has been around for a while in the MS Visual debuggers... I can't find the MSDN article that discusses it, but once you exceed 64k lines, all bets are off. Work arounds include using the canonical source to build and debug, or stripping comment lines, white space etc. from the

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-10 Thread Shane Harrelson
I tried to reproduce this, and could not. There are some questions inline below.Additionally, I want to verify that you've tried this with a version of SQLite containing the previously linked fix. -Shane On Fri, Sep 10, 2010 at 12:54 AM, Max Vlasov wrote: >> But as a

Re: [sqlite] memory wasted shm mapped file (3.7.2)

2010-09-09 Thread Shane Harrelson
Michele- I've looked at trying to reproduce your issue on an 32-bit Windows XP system using the latest code, and could not. Even assuming the "worst case" of a 512 byte page size, starting with a 1.2gb DB file, deleting all the records would result in a WAL file of roughly the same size

Re: [sqlite] SQLite fails to build for WinCE 4.2 (WM 2003)

2010-08-24 Thread Shane Harrelson
On Windows CE, you need to compile with SQLITE_OMIT_WAL. SQLite currently doesn't support the WAL journaling mode on CE. On Tue, Aug 24, 2010 at 6:32 AM, Aleksandr Jr. wrote: > Hi. > > I got a problem when compiling SQLte 3.7.2 for Windows CE 4.2 (Windows > Mobile

Re: [sqlite] poor insert performance with 3.7/Windows

2010-07-26 Thread Shane Harrelson
I've not seen the performance degradation you've reported here in my testing. If you could provide any more details that would help in reproducing this, it would be appreciated. And yes, you can safely modify the SQLITE_FCNTL_SIZE_HINT in os_win.c to be a "no-op" in the same way as os_unix.c.

Re: [sqlite] Regression with sqlite-snapshot-201007091257

2010-07-13 Thread Shane Harrelson
I tried to reproduce the issue with the latest version, as well as with the referenced snapshot, and could not. I ran two instances of the sqlite CLI as you indicated without issue. C:\work\sqlite\win32\Debug>sqlite_snapshot test.db SQLite version 3.7.0 Enter ".help" for instructions Enter SQL

Re: [sqlite] [csv extension] Error while reading long lines

2010-04-19 Thread Shane Harrelson
Thanks for the report. The extension is still very a much a work-in-progress and any feedback is greatly appreciated. -Shane On Sun, Apr 18, 2010 at 12:51 PM, gwenn wrote: > Hello, > There is a little bug/typo in the csv extension when lines exceed 100 > characters: >

Re: [sqlite] Index and GLOB

2010-04-15 Thread Shane Harrelson
On Thu, Apr 15, 2010 at 9:51 AM, Mike Goins wrote: > > > sqlite> explain query plan SELECT tb_file_key, basename, extension, > > > path FROM tb_file WHERE basename GLOB 'a' AND extension GLOB 'b' AND > > > path GLOB '*'; > > > 0|0|TABLE tb_file WITH INDEX

Re: [sqlite] SIGSEGV on INSERT DEFAULT VALUES with triggers

2010-04-13 Thread Shane Harrelson
On Tue, Apr 13, 2010 at 12:30 PM, Tomasz Ł. Nowak < tomasz.no...@man.poznan.pl> wrote: > Shane, you wrote: > > I could not reproduce this on the current or 3.6.23 build: > > > > >./sqlite3 -version > > 3.6.23 > > > > >cat script.sql > > CREATE TABLE current(x,y,z); > > INSERT INTO current DEFAULT

Re: [sqlite] Index and GLOB

2010-04-12 Thread Shane Harrelson
On Mon, Apr 12, 2010 at 9:14 AM, Igor Tandetnik wrote: > Mike Goins wrote: > > sqlite> explain query plan SELECT tb_file_key, basename, extension, > > path FROM tb_file WHERE basename GLOB 'a' AND extension GLOB 'b' AND > > path GLOB '*'; > > 0|0|TABLE tb_file WITH INDEX

Re: [sqlite] Android database corruption

2010-03-26 Thread Shane Harrelson
On Fri, Mar 26, 2010 at 11:38 AM, cliff 2 wrote: > > Hi, > > Hopefully someone here can help where the android guys haven't been able > to. > We are having an issue with our sqlite database running on the android > platform. We are accessing the db from the sdcard on

Re: [sqlite] "out of memory" in ANALYZE with SQLITE_ENABLE_STAT2

2010-03-25 Thread Shane Harrelson
On Thu, Mar 25, 2010 at 10:22 AM, Martin Wilck wrote: > Hello, > > with sqlite 3.6.23 with SQLITE_ENABLE_STAT2, I get > an "out of memory" error running the following simple SQL code: > > CREATE TABLE dist_T ( > d_row INTEGER PRIMARY KEY, > dist TEXT

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread Shane Harrelson
On Thu, Mar 25, 2010 at 7:24 PM, P Kishor <punk.k...@gmail.com> wrote: > On Thu, Mar 25, 2010 at 6:22 PM, P Kishor <punk.k...@gmail.com> wrote: > > On Thu, Mar 25, 2010 at 6:19 PM, Shane Harrelson <sh...@sqlite.org> > wrote: > >> > >> > &

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread Shane Harrelson
On Thu, Mar 25, 2010 at 7:22 PM, P Kishor <punk.k...@gmail.com> wrote: > On Thu, Mar 25, 2010 at 6:19 PM, Shane Harrelson <sh...@sqlite.org> wrote: > > > > > > On Thu, Mar 25, 2010 at 7:06 PM, P Kishor <punk.k...@gmail.com> wrote: > >> > >

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread Shane Harrelson
On Thu, Mar 25, 2010 at 7:06 PM, P Kishor <punk.k...@gmail.com> wrote: > On Thu, Mar 25, 2010 at 5:59 PM, Shane Harrelson <sh...@sqlite.org> wrote: > > I added a psuedo-BNF renderer for the bubble syntax graph data at > > > > http://www.sqlite.org/docsrc/artifa

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-25 Thread Shane Harrelson
I added a psuedo-BNF renderer for the bubble syntax graph data at http://www.sqlite.org/docsrc/artifact/873cf35adf to go along with the text based bubble graph at http://www.sqlite.org/docsrc/artifact/645054606c These are not meant to replace the official syntax specification at

Re: [sqlite] SIGSEGV on INSERT DEFAULT VALUES with triggers

2010-03-24 Thread Shane Harrelson
Can you provide more details? What options are you using? What version of the source? Amalgamation? Preprocessed? Complete package? I could not reproduce this on the current or 3.6.23 build: >./sqlite3 -version 3.6.23 >cat script.sql CREATE TABLE current(x,y,z); INSERT INTO current DEFAULT

Re: [sqlite] corruption problem with attached macintosh database

2010-03-24 Thread Shane Harrelson
On Wed, Mar 24, 2010 at 7:20 PM, Dave Dyer wrote: > > > > >Could you help us by adding any of the following details ? > > > >What OS is the Mac running ? > > OSX 10.4.11 for me, but also snow leopard. > > >What OS is the PC running ? > > Windows 2003 server for me, but

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-23 Thread Shane Harrelson
More updates for Chrome support. http://www.sqlite.org/docsrc/artifact/981f61a5e4 On Tue, Mar 23, 2010 at 11:50 PM, Shane Harrelson <sh...@sqlite.org> wrote: > I knocked out a quick TCl script that uses *exactly* the same syntax graph > specification as bubble-generator.tcl

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-23 Thread Shane Harrelson
I knocked out a quick TCl script that uses *exactly* the same syntax graph specification as bubble-generator.tcl but attempts to render the graphs without GIFs. You can see the script here: http://www.sqlite.org/docsrc/finfo?name=art/syntax/bubble-generator-text.tcl You can view the output

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-26 Thread Shane Harrelson
On Fri, Feb 26, 2010 at 1:49 AM, 4eanlss <4ean...@engineer.com> wrote: > > Shane, > > I apologize for my quick snap response. > I have debugged the code and have identified what is happening. > The calculation in my environment results in 0 (zero) for this: > static const sqlite3_int64

Re: [sqlite] Bug in porter stemmer

2010-02-24 Thread Shane Harrelson
Additionally, your algorithm reference for step1c is from the "Snowball English (Porter2)" algorithm. The implementation used in SQLite is for the original "Porter" algorithm discussed here: http://tartarus.org/~martin/PorterStemmer/ HTH. -SHane On Wed, Feb 24, 2010 at 10:05 AM, D. Richard

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-23 Thread Shane Harrelson
On Tue, Feb 23, 2010 at 1:56 AM, 4eanlss <4ean...@engineer.com> wrote: > Shane Harrelson <shane.harrel...@...> writes: > > > > > I was unable to duplicate your error with the CLI and 3.6.22 (compiled > with > > cygwin\gcc or msvc): > Ok, so Borland

Re: [sqlite] Writing and reading a csv using sqlite3

2010-02-15 Thread Shane Harrelson
On Mon, Feb 15, 2010 at 4:31 PM, Simon Slavin wrote: > > On 15 Feb 2010, at 9:28pm, Roger Binns wrote: > > > Simon Slavin wrote: > >> It uses one when it outputs, but it won't accept the same format when it > inputs. So the program is itself inconsistent: however you

Re: [sqlite] round problem?

2010-02-15 Thread Shane Harrelson
On Mon, Feb 15, 2010 at 12:52 PM, Phil Hibbs wrote: > Shane Harelson: > > Under the covers, when the second term to ROUND(X,y) is omitted, SQLite > adds > > 0.5 and then truncates.Because of floating point precision, some > numbers > > can not be represented exactly...

Re: [sqlite] round problem?

2010-02-15 Thread Shane Harrelson
On Mon, Feb 15, 2010 at 12:52 PM, Phil Hibbs wrote: > Shane Harelson: > > Under the covers, when the second term to ROUND(X,y) is omitted, SQLite > adds > > 0.5 and then truncates.Because of floating point precision, some > numbers > > can not be represented exactly...

Re: [sqlite] round problem?

2010-02-15 Thread Shane Harrelson
http://www.sqlite.org/lang_corefunc.html#round Under the covers, when the second term to ROUND(X,y) is omitted, SQLite adds 0.5 and then truncates.Because of floating point precision, some numbers can not be represented exactly... causing the odd rounding you saw in your examples. I'll see

Re: [sqlite] any command to find last rowid in a table

2010-02-08 Thread Shane Harrelson
Assuming you have a table with the following schema: CREATE TABLE t1 ( id INTEGER PRIMARY KEY AUTOINCREMENT, col2 REAL, col3 TEXT ); your C code *could* look something like the following: sqlite3_exec(db, "INSERT INTO t1 (col2,col3) VALUES (1.0,'row one');", 0, 0, 0);

Re: [sqlite] system.data.sqlite & encryption

2010-02-08 Thread Shane Harrelson
int...@gmail.com > wrote: > I already recompiled it, but integrating the encryption extension is again > another step. > how to be sure of that before to buy the extension ($2'000) ? > > Sylvain > > On Sat, Feb 6, 2010 at 1:44 AM, Shane Harrelson <sh...@sqlite.org> wro

Re: [sqlite] system.data.sqlite & encryption

2010-02-08 Thread Shane Harrelson
int...@gmail.com > wrote: > I already recompiled it, but integrating the encryption extension is again > another step. > how to be sure of that before to buy the extension ($2'000) ? > > Sylvain > > On Sat, Feb 6, 2010 at 1:44 AM, Shane Harrelson <sh...@sqlite.org> wro

Re: [sqlite] system.data.sqlite & encryption

2010-02-05 Thread Shane Harrelson
n integrate the encrypted sqlite lib, that I will buy, into > system.data.sqlite. > > I would just like to have a bit of guidance... > > Best regards, > Sylvain > > On Mon, Feb 1, 2010 at 4:41 PM, Shane Harrelson <sh...@sqlite.org> wrote: > > > I think you sh

Re: [sqlite] any command to find last rowid in a table

2010-02-05 Thread Shane Harrelson
As stated before, in general, you should not specify the ROWID on inserts, but instead, let the database engine choose it for you. This is true of most/all database engines. The syntax you're trying below is not supported. Indeed, even it were, max(ROWID) is the maximum ROWID *in use*. Trying

Re: [sqlite] Bug Report: DateTime incorrect for Windows

2010-02-05 Thread Shane Harrelson
I was unable to duplicate your error with the CLI and 3.6.22 (compiled with cygwin\gcc or msvc): SQLite version 3.6.22 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> SELECT datetime('now') as NOW; 2010-02-05 16:33:50 sqlite> SELECT datetime('now','utc') as UTC;

Re: [sqlite] journal files

2010-02-02 Thread Shane Harrelson
Actually, I believe the entire 28 byte header is zeroed, not just the first 4 bytes. See the zeroJournalHdr() function in pager.c for details. -Shane On Tue, Feb 2, 2010 at 7:09 AM, Pavel Ivanov wrote: > What do you want to see in journal files? You can execute 'PRAGMA >

Re: [sqlite] system.data.sqlite & encryption

2010-02-01 Thread Shane Harrelson
I think you should probably ask this question on the System.data.sqlite support forums at http://sqlite.phxsoftware.com/forums I'm not familiar with enough with their ADO .NET implementation to answer your question. -Shane On Sun, Jan 31, 2010 at 11:54 AM, Sylvain Pointeau <

Re: [sqlite] grabbing row contents?

2010-01-22 Thread Shane Harrelson
Instead of using sqlite3_exec() and a callback, use sqlite3_prepare_v2() on your statement and then run it with sqlite3_step() in a loop (there will be one iteration be row of the result set). sqlite3_step() will return something other than SQLITE_ROW when it's done. When it returns SQLITE_ROW,

Re: [sqlite] SQL Crash with sqlite 3.6.22 commandline

2010-01-22 Thread Shane Harrelson
Can you verify that changes for ticket http://www.sqlite.org/src/info/1258875e07 checked-in yesterday resolve your issue? Thanks. -Shane On Fri, Jan 22, 2010 at 9:51 AM, ve3meo wrote: > I just discovered that attachments can be sent through this newsgroup so I >

Re: [sqlite] BUG: .echo ON in command line tool doesn't echo all statements

2010-01-18 Thread Shane Harrelson
On Fri, Jan 8, 2010 at 5:17 AM, Kees Nuyt wrote: > > (Repeated with the proper BUG: subject) > > On Mon, 04 Jan 2010 19:55:13 +0100, Kees Nuyt > wrote: > > > Between versions 3.6.19 and 3.6.20 something has changed > > which causes the command line tool to

Re: [sqlite] BUG Report -- schema.test does not check for authorization in build

2009-12-31 Thread Shane Harrelson
Thanks for the reports on the TCL test cases. I think http://www.sqlite.org/src/vinfo/97f8a886b6 should correct everything you reported. On Tue, Dec 29, 2009 at 1:02 PM, Noah Hart wrote: > Test schema-13.1 fails with > Error: {authorization not available in this build} > >

Re: [sqlite] sqlite3_complete always returning 1?

2009-12-17 Thread Shane Harrelson
Thanks for the report. You're right that it was indeed inconsistent with the stated requirements. I've checked in a fix here: http://www.sqlite.org/src/vinfo/76eca7295cf7df4bef013af6c8c37251300cd383 We're still evaluating whether to keep the code change or fall back to editing the requirement,

Re: [sqlite] Putting images into SQLite.

2009-12-07 Thread Shane Harrelson
As others have said, there are lots of ways to store the image data directly in the DB with BLOBs, encoding, etc. Alternatively, you could store the pics separate from the DB and just store the path to the pic file in the DB. -Shane On Sun, Dec 6, 2009 at 8:35 PM, Ted Rolle, Jr.

Re: [sqlite] substr in sqlite3 3.6.20

2009-11-20 Thread Shane Harrelson
On Fri, Nov 20, 2009 at 2:30 PM, priimak wrote: > Hi. > > What happened to substr function. I upgraded from 3.6.7 to 3.6.20 and > found following difference. > > in 3.6.7 > > $ sqlite3 a.db > sqlite> create table X ( v text not null ); > sqlite> insert into X ( v ) values (

Re: [sqlite] bad data in a database file or bug?

2009-11-17 Thread Shane Harrelson
in one case you do: select count(*) from feeds where _id = '0'; in the other you do: select count(*) from feeds where _id = 0; <--- note the missing quotes this shouldn't make a difference (since SQLite is typeless), but I wonder if it is in this case. what is the type of _id? can you run

Re: [sqlite] Why does LIKE operator affect order of query plan?

2009-11-15 Thread Shane Harrelson
On Sun, Nov 15, 2009 at 11:41 AM, P Kishor wrote: > On Sun, Nov 15, 2009 at 10:39 AM, Tim Romano wrote: >> I have a query with joined inline views that runs in about 100ms against >> a 4 million row table joined to a 275,000 row table.  Not bad, SQLite

Re: [sqlite] Fwd: SQLite 3.6.20 problem

2009-11-10 Thread Shane Harrelson
Fixed in check-in http://www.sqlite.org/src/info/8097c64acf On Mon, Nov 9, 2009 at 10:52 AM, D. Richard Hipp wrote: > > > Begin forwarded message: > >> From: Ken Zalewski >> Date: November 9, 2009 9:45:22 AM EST >> To: d...@hwaci.com >> Subject: SQLite

Re: [sqlite] Conflict with SQLite ODBC Driver and MS Office 2007 ?

2009-10-15 Thread Shane Harrelson
I know of no conflicts. I regularly test against SQL Server 2005, MySQL, OracleXE, and SQLite all via ODBC interfaces (specifically Christian Werner's ODBC interface for SQLite). The various ODBC interfaces all play happily. HTH -Shane On Wed, Oct 14, 2009 at 4:15 PM, Jack Ort

Re: [sqlite] Sqlite testing

2009-09-28 Thread Shane Harrelson
, ydlu <yudian...@gmail.com> wrote: > I create the "Windows CE 6.0" OS image, so the Console command windows was > included. I try to build "SQLite3.exe" but failed! So how to test SQLite3 on > WIndows CE environment on every build? > > Thanks > > On We

Re: [sqlite] Sqlite testing

2009-09-28 Thread Shane Harrelson
, ydlu <yudian...@gmail.com> wrote: > I create the "Windows CE 6.0" OS image, so the Console command windows was > included. I try to build "SQLite3.exe" but failed! So how to test SQLite3 on > WIndows CE environment on every build? > > Thanks > > On We

Re: [sqlite] Sqlite testing

2009-09-23 Thread Shane Harrelson
On Wed, Sep 23, 2009 at 12:22 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > ydlu wrote: >> I am Windows CE software developer, so I am really, really want to learn how >> you built and test "sqlite3.exe" in Windows CE platform. so I can run a

Re: [sqlite] sqlite3_exec fails on arm

2009-09-09 Thread Shane Harrelson
I wasn't able to duplicate this with my ARM system. Can you provide more details? or was the issue DRH pointed out above your problem? On Wed, Sep 9, 2009 at 7:02 AM, gprand wrote: > > Hi, > > I can confirm this behavoir. Now, after 2 days debugging and unsuccessful > searching

Re: [sqlite] SQLite Windows Mobile 6 Edition

2009-09-05 Thread Shane Harrelson
What compiler and compile time options are you using? On Fri, Sep 4, 2009 at 2:00 PM, Dominique Jann wrote: > Good night. > > I have a question about SQLite, very interesting project, how > compiling SQLite sources for Windows Mobile 6. > I couldn't compile project for

Re: [sqlite] AIX test failures for 3.6.17

2009-08-18 Thread Shane Harrelson
On Tue, Aug 18, 2009 at 3:28 PM, Ken wrote: > Running make test resulted in the following failures on aix 5.3 > Note that the CFLAGS=-DSQLITE_DISABLE_DIRSYNC was set for the make. > > 14 errors out of 40926 tests > Failures on these tests: backup2-10 io-4.1 io-4.2.3

Re: [sqlite] Does PRAGMA synchronous=OFF ensure that no synching is done for the entire session?

2009-08-17 Thread Shane Harrelson
On Mon, Aug 17, 2009 at 11:53 AM, D. Richard Hipp wrote: > > On Aug 17, 2009, at 11:41 AM, Matt Sergeant wrote: > > > > Kernels will fflush when a file handle is closed > > Not according to Ted Ts'o (creator of the Ext2/3/4 filesystems). See, > for example, the extensive

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-17 Thread Shane Harrelson
On Mon, Aug 17, 2009 at 3:15 AM, Dan Kennedy wrote: > >> The INDEXED BY feature was introduced to address concerns that SQLite > >> might > >> suddenly start using a different plan for a query in the field than > >> it > >> did > >> in the office during testing. Either

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Shane Harrelson
INDEXED BY doesn't allow you to specify which index to use. It just causes the query to fail if SQLite thinks it should use an index different then the one specified by the INDEXED BY clause. On Sun, Aug 16, 2009 at 7:59 PM, His Nerdship wrote: > > Hi Pavel, > > > Does

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Shane Harrelson
No. It only collects/updates stats when you explicitly call the ANALYZE. On Sat, Aug 15, 2009 at 2:48 AM, Jim Showalter wrote: > It doesn't collect those statistics automatically, as part of query > plan optimization? > > - Original Message - > From: "Dan Kennedy"

Re: [sqlite] DELETE ststement not working as expected

2009-07-30 Thread Shane Harrelson
I believe sqlite3_bind_int64() takes a signed int for the value to bind. You state you are passing it a large unsigned int. If the unsigned value is large enough, it will appear to be a negative signed int. HTH. -Shane ___ sqlite-users mailing list

Re: [sqlite] Topics 1 - Re: sqllogictest tool - please help :-)

2009-06-10 Thread Shane Harrelson
What have you been able to do so far? Have you been able to build sqllogictest (SLT)? Were you able to retrieve some of the test files for SLT? Have you gotten MySQL installed? Are you able to use MySQL via an ODBC interface? (SLT uses an ODBC interface to non-SQLite databases.) On Wed, Jun

Re: [sqlite] SQLite Version 2.1

2009-06-08 Thread Shane Harrelson
a non empty database... > > Marcus Haßmann > > Shane Harrelson schrieb: >> http://www.sqlite.org/sqlite-2.8.17.tar.gz  I think is the oldest >> version still available from the SQLite website. >> >> BTW, I'm not certain what kind of forensic evidence you

Re: [sqlite] SQLite Version 2.1

2009-06-07 Thread Shane Harrelson
http://www.sqlite.org/sqlite-2.8.17.tar.gz I think is the oldest version still available from the SQLite website. BTW, I'm not certain what kind of forensic evidence you can get from your db if it's empty as you say. HTH. -Shane On Sun, Jun 7, 2009 at 5:12 PM, Marcus

Re: [sqlite] most efficient way to get 1st row

2009-05-20 Thread Shane Harrelson
f > effective data management. > > Shane Harrelson wrote: > > Additionally, it's important to note that the LIMIT/OFFSET clause is not > > standard SQL, and although it is supported by SQLite, and many other SQL > > engines, there are some that do NOT support it, most no

Re: [sqlite] most efficient way to get 1st row

2009-05-20 Thread Shane Harrelson
Additionally, it's important to note that the LIMIT/OFFSET clause is not standard SQL, and although it is supported by SQLite, and many other SQL engines, there are some that do NOT support it, most notably Microsoft SQL Server. HTH. -Shane On Tue, May 19, 2009 at 2:23 PM, Sam Carleton

Re: [sqlite] SQLite crashing on iPhone (or so says Apple)

2009-04-21 Thread Shane Harrelson
Version 3.6.13 fixed some potential alignment issues that could occur on SPARC (and potentially other) architectures. I don't know how you or Apple are testing your app, but if you (or they) are using a device emulator for the testing, the emulator might not be testing alignment conditions the

Re: [sqlite] select the first 2 rows

2009-04-02 Thread Shane Harrelson
Remember, the order of rows returned from a SELECT, even one with a LIMIT clause, is undefined, so the "first 2 rows" may not be consistently the same. If you are dependent upon the rows being returned in a particular order (say by "rowid"), you should include an ORDER BY clause on your SELECT

Re: [sqlite] SQLite Transaction Rate and speed...

2009-03-09 Thread Shane Harrelson
Already there: http://www.sqlite.org/faq.html#q19 On Sun, Mar 8, 2009 at 8:15 AM, Alexey Pechnikov wrote: > Hello! > > On Saturday 07 March 2009 01:59:13 Roger Binns wrote: >> A transaction requires two syncs (ie requesting the drive write the data >> to the metal and

Re: [sqlite] Visual Studio 2005 Linker Problems - SQLite v3.6.3

2009-02-17 Thread Shane Harrelson
Ian > > > Ian Thomas wrote: >> Hi Shane, >> >> Thanks very much for the suggestion. I excluded the 'rtree.c' source >> file from my build configuration and it now links fine (release and debug). >> >> I guess there's still an underlying issue but as I don't

Re: [sqlite] Visual Studio 2005 Linker Problems - SQLite v3.6.3

2009-02-16 Thread Shane Harrelson
rtree support is an extension to SQLite and is not needed to use the core functionality. Try leaving the rtree source files out of your builds to see if this corrects your problem. You might also consider using the SQLITE_OMIT_LOAD_EXTENSION option as well. http://www.sqlite.org/compile.html

Re: [sqlite] INVALID COMMAND NAME sqlite3_soft_heap_limit

2008-12-22 Thread Shane Harrelson
If you use the supplied makefile, "make fulltest" should build the testfixture and run the all.test set. The testfixture is similar to the sqlite3 CLI except that it includes a TCL interpreter as well as an extensive set of test harnesses for virtually every part of the SQLite core. On Mon, Dec

Re: [sqlite] self test for sqlite-amalgamation-3.6.5

2008-11-24 Thread Shane Harrelson
Can you provide more details? What platform (Windows, Linux, etc.)? What version of TCL? What compilation options did you use for the testfixture? On Mon, Nov 24, 2008 at 1:30 AM, Avinash Mittal <[EMAIL PROTECTED]>wrote: > Hi, > > I tried to execute the test for sqlite-amalgamation-3.6.5

Re: [sqlite] sqlite crash with "WHERE x in ()" query

2008-11-24 Thread Shane Harrelson
Thanks for the report. The current test suite has many cases testing queries of the form you mention. I added one specifically for the query you suggested to in4.test. Everything passes for the current version. If you could test with the latest version of SQLite, it might help show where the

  1   2   >