[sqlite] pthreadMutex

2009-12-08 Thread Luiz Gustavo P Tonello
Hello guy's!


I'm a newbie in SQLite, and I need to compile an code C with SQlite.
Well,  when I try compile my code, SQLite return this error:

/tmp/ccJJZKFA.o: In function `pthreadMutexAlloc':
sqlite3.c:(.text+0x2f9c): undefined reference to `pthread_mutexattr_init'
sqlite3.c:(.text+0x2faf): undefined reference to `pthread_mutexattr_settype'
sqlite3.c:(.text+0x2fcc): undefined reference to `pthread_mutexattr_destroy'
/tmp/ccJJZKFA.o: In function `pthreadMutexTry':
sqlite3.c:(.text+0x308e): undefined reference to `pthread_mutex_trylock'
/tmp/ccJJZKFA.o: In function `testThreadLockingBehavior':
sqlite3.c:(.text+0x85ef): undefined reference to `pthread_create'
sqlite3.c:(.text+0x8606): undefined reference to `pthread_join'
/tmp/ccJJZKFA.o: In function `unixDlOpen':
sqlite3.c:(.text+0xa6ac): undefined reference to `dlopen'
/tmp/ccJJZKFA.o: In function `unixDlError':
sqlite3.c:(.text+0xa6be): undefined reference to `dlerror'
/tmp/ccJJZKFA.o: In function `unixDlSym':
sqlite3.c:(.text+0xa6fc): undefined reference to `dlsym'
/tmp/ccJJZKFA.o: In function `unixDlClose':
sqlite3.c:(.text+0xa721): undefined reference to `dlclose'
collect2: ld returned 1 exit status

I search at Google and olders topics of this list, but I don't found a solution.
I've tried define sqlite3_config with singlethread, or multithread. I haven't 
had success.
Run: SQLite 3.6.21 and Debian Lenny

Can I help me?
--
Luiz Gustavo P Tonello.




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] question on sqlite

2009-12-08 Thread Igor Tandetnik
Patnaik, Anjela 
wrote: 
> I need to run the following query on a table. How would i formulate
> this in SQLite as it appears that SQLite doesn't do PL/SQL? 
> 
> I can use the tcl SQLite API or do this via SQLiteSPY, but SQLitespy
> doesn't understand the constructs. 
> 
> Thanks
> 
> DECLARE
>   TYPE OpList IS TABLE OF VARCHAR2(100);
>   lcount NUMBER;
>   names OpList ;
>   BEGIN
> 
>  select distinct operation BULK COLLECT INTO names from MYTAB where
> ocrelease  like '10.0.0'; 
> 
>  for indx in names.first..names.last loop
>   select count(*) into lcount from MYTAB where release like
>   '10.0.0' and  operation like names(indx);
>  dbms_output.put_line(names(indx)||' = '||lcount); end loop;
> 
> END;

select t1.operation, count(*)
from MYTAB t1 join MYTAB t2 on (t1.operation = t2.operation)
where t1.ocrelease  = '10.0.0' and t2.release = '10.0.0'
group by t1.operation;

Igor Tandetnik

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] question on sqlite

2009-12-08 Thread Patnaik, Anjela
Hello all,

I need to run the following query on a table. How would i formulate this in 
SQLite as it appears that SQLite doesn't do PL/SQL?

I can use the tcl SQLite API or do this via SQLiteSPY, but SQLitespy doesn't 
understand the constructs.

Thanks

DECLARE
   TYPE OpList IS TABLE OF VARCHAR2(100);
   lcount NUMBER;
   names OpList ;
   BEGIN
  
  select distinct operation BULK COLLECT INTO names from MYTAB where ocrelease  
like '10.0.0';
  
  for indx in names.first..names.last loop
   select count(*) into lcount from MYTAB where release like '10.0.0' and  
operation like names(indx);
   dbms_output.put_line(names(indx)||' = '||lcount);
  end loop;

END;
/



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Commit failing due to DB locked.

2009-12-08 Thread John Clayton
Hi

I've got two processes opening up two sqlite databases.  Assuming the  
databases are called A and B respectively, then both processes do this:
using A, BEGIN IMMEDIATE
using B, BEGIN IMMEDIATE
... do some stuff possibly involving A&B ...
using B, COMMIT
using A, COMMIT

In a couple of cases, I've seen one of the processes get an exception  
on COMMIT, the error is 'DB is locked'.  I had thought that BEGIN  
IMMEDIATE resulted in a write lock being taken out on the DB, and  
therefore it should be possible to get a locking error on commit.

Has anyone seen this kind of locking error or have suggestions as to  
how I could track it down?

Thanks
--
John Clayton
Skype: johncclayton




___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] USING bug

2009-12-08 Thread Wiktor Adamski
SQLite version 3.6.21
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> create table t1(a int);
sqlite> create table t2(a int);
sqlite> create table t3(a int, b int);
sqlite> insert into t1 values(1);
sqlite> insert into t3 values(1, 1);
sqlite> select * from t1 left join t2 using(a) left join t3 using(a);
1|
sqlite> select * from (t1 left join t2 using(a)) left join t3 using(a);
1|

I think that correct result should be
1|1
MySQL and PostgreSQL agree with me.

--
Kup wlasne mieszkanie za 72 tys. zl.
Sprawdz najlepsze oferty >>> http://link.interia.pl/f24ce

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread Andreas Schwab
"D. Richard Hipp"  writes:

> For proof, could you please indicate where, exactly, we  are violating C
> aliasing rules?

See the patch.  You are storing a value of type void* in an object of
type Mem*.  This is a classical example of an obvious aliasing
violation.
 
> And what compiler are you using that is sensitive to these violations
> yet generates no warnings?

It's the very nature of undefined behaviour that it does not require a
warning.  Welcome to the world of C.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Where is CASE documented ?

2009-12-08 Thread Simon Slavin

On 8 Dec 2009, at 10:36pm, Pavel Ivanov wrote:

> In brief, when you give optional expression then CASE works like
> 'switch ... case ... case ... default' construction in C, when
> optional expression is not given it works like series of 'if ... else
> if ... else' constructions in C.

Thanks Pavel and Jay for an easy-to-understand explanation.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Where is CASE documented ?

2009-12-08 Thread Jay A. Kreibich
On Tue, Dec 08, 2009 at 10:23:46PM +, Simon Slavin scratched on the wall:
> My Google-fu appears to be weak.  SQLite apparently supports a
> CASE ... WHEN construction.  Where on www.sqlite.org is the
> meaning defined ?  I can see CASE mentioned in diagrams on

  I'm not sure it is.  I thought it was a fairly standard SQL expression.

> but I don't understand the use of the optional expression immediately
> after the CASE token.

  With the optional expression, the "when" sub-expressions become an
  "equal to" condition, kind of like a "select" in C/C++:

sqlite> SELECT   CASE 3   WHEN 4 THEN 'four' WHEN 3 THEN 'three' END;
three

  Without the optional expression, the "when" sub-expressions become an
  "is true" condition, kind of like a chain of if/else-if/else-if
  expressions in C/C++:

sqlite> SELECT   CASEWHEN NULL THEN 'null' WHEN 0 THEN 'zero'
   ...>   WHEN 1 THEN 'one' WHEN 2 THEN 'two' END;
one


   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
 a protractor."   "I'll go home and see if I can scrounge up a ruler
 and a piece of string."  --from Anathem by Neal Stephenson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Where is CASE documented ?

2009-12-08 Thread Pavel Ivanov
Apparently document writer assumed that it's pretty obvious how CASE
works because it works the same way in all DBMSes. :)
You can read any documentation Google gives, e.g. this:
http://msdn.microsoft.com/en-us/library/ms181765.aspx.

In brief, when you give optional expression then CASE works like
'switch ... case ... case ... default' construction in C, when
optional expression is not given it works like series of 'if ... else
if ... else' constructions in C.


Pavel

On Tue, Dec 8, 2009 at 5:23 PM, Simon Slavin  wrote:
> My Google-fu appears to be weak.  SQLite apparently supports a CASE ... WHEN 
> construction.  Where on www.sqlite.org is the meaning defined ?  I can see 
> CASE mentioned in diagrams on
>
> http://www.sqlite.org/lang_expr.html
> http://www.sqlite.org/syntaxdiagrams.html
>
> but I don't understand the use of the optional expression immediately after 
> the CASE token.
>
> Simon.
> ___
> 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] Where is CASE documented ?

2009-12-08 Thread Simon Slavin
My Google-fu appears to be weak.  SQLite apparently supports a CASE ... WHEN 
construction.  Where on www.sqlite.org is the meaning defined ?  I can see CASE 
mentioned in diagrams on

http://www.sqlite.org/lang_expr.html
http://www.sqlite.org/syntaxdiagrams.html

but I don't understand the use of the optional expression immediately after the 
CASE token.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] NULL vs ''

2009-12-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ted Rolle, Jr. wrote:
> When I .import a file into a table, || results in a value of '' for the
> data item.
> How can I get a NULL value stored?

The SQLite shell cannot read your mind to determine if a zero length string
should be a zero length string or null.

> This also happens when the item is at the end (EOL) of the row.

Yes, a zero length string is a zero length string.  Each row has a number of
columns and the import code is column based.  The position of a column (eg
end of row) makes no difference.

> Currently, I:
> UPDATE table SET value=NULL where value='';

What is wrong with that?  You cam also use more complicated expressions in
the where and set clauses.  With CASE you can get really creative.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksetxAACgkQmOOfHg372QQIsgCgopjIfP+90n0yFnKM09+Vm8JT
EBgAoLewVDulprTL757sp1jtMrNZX3eY
=HXHu
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Implementing Regular Expression Support...?

2009-12-08 Thread li...@mgreg.com
On Dec 8, 2009, at 12:24 PM, J. King wrote:

> On Tue, 08 Dec 2009 12:11:13 -0500, li...@mgreg.com   
> wrote:
> 
>> Hi All,
>> 
>> I'm currently using SQLITE in a few production apps.  I'm using various  
>> languages such as Ruby, PERL, RB, etc.  I have need to use regular  
>> expressions in some of my queries, but I'm not sure how to implement  
>> "user defined functionality".  Where are the hooks?  Is there a  
>> particular mechanism/language I must use to create them?  Is this  
>> something I'm required to recompile SQLITE for?
> 
> You do so by defining a user function called 'regexp'.  The means by which  
> one defines a user function depends on the language.  See, for instance,  
> [1] for Ruby.  For a 'regexp' function you would specify two arguments,  
> pattern and string to match against.
> 
> [1]  
> 
> 
> -- 
> J. King


What if you're making calls to SQLITE directly, and not via the language's API? 
 Is there any way to make the support "native"?  Can I drop a script of some 
sort that SQLITE will call (no matter what language I'm using to perform the 
call)?  I guess I'm looking for a more abstract understanding of the hows and 
whys first.

Thanks,
Michael
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Implementing Regular Expression Support...?

2009-12-08 Thread J. King
On Tue, 08 Dec 2009 12:11:13 -0500, li...@mgreg.com   
wrote:

> Hi All,
>
> I'm currently using SQLITE in a few production apps.  I'm using various  
> languages such as Ruby, PERL, RB, etc.  I have need to use regular  
> expressions in some of my queries, but I'm not sure how to implement  
> "user defined functionality".  Where are the hooks?  Is there a  
> particular mechanism/language I must use to create them?  Is this  
> something I'm required to recompile SQLITE for?

You do so by defining a user function called 'regexp'.  The means by which  
one defines a user function depends on the language.  See, for instance,  
[1] for Ruby.  For a 'regexp' function you would specify two arguments,  
pattern and string to match against.

[1]  


-- 
J. King
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Implementing Regular Expression Support...?

2009-12-08 Thread li...@mgreg.com
Hi All,

I'm currently using SQLITE in a few production apps.  I'm using various 
languages such as Ruby, PERL, RB, etc.  I have need to use regular expressions 
in some of my queries, but I'm not sure how to implement "user defined 
functionality".  Where are the hooks?  Is there a particular mechanism/language 
I must use to create them?  Is this something I'm required to recompile SQLITE 
for?

Best,
Michael
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread Andreas Schwab
"D. Richard Hipp"  writes:

> On Dec 7, 2009, at 8:41 PM, Andreas Schwab wrote:
>
>> D. Richard Hipp writes:
>>
>>> As always, please let us know if you encounter any difficulties with
>>> this or any other SQLite release.
>>
>> It's still crashing due to undefined behaviour.
>>
>> $ ./sqlite3 :memory: 'create table test(integer)'
>> Segmentation fault
>>
>
>
> I am unable to reproduce this behavior.  The example above works fine
> here.  I also ran your command using valgrind and it reports no  problems.

That's the very nature of undefined behaviour.  You are violating the C
aliasing rules, and the compiler has all freedom to wreck havoc of your
code.  QED.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread D. Richard Hipp

On Dec 8, 2009, at 9:51 AM, Andreas Schwab wrote:

> "D. Richard Hipp"  writes:
>
>> On Dec 7, 2009, at 8:41 PM, Andreas Schwab wrote:
>>
>>> D. Richard Hipp writes:
>>>
 As always, please let us know if you encounter any difficulties  
 with
 this or any other SQLite release.
>>>
>>> It's still crashing due to undefined behaviour.
>>>
>>> $ ./sqlite3 :memory: 'create table test(integer)'
>>> Segmentation fault
>>>
>>
>>
>> I am unable to reproduce this behavior.  The example above works fine
>> here.  I also ran your command using valgrind and it reports no   
>> problems.
>
> That's the very nature of undefined behaviour.  You are violating  
> the C
> aliasing rules, and the compiler has all freedom to wreck havoc of  
> your
> code.  QED.


No, you have not proven your thesis, you have merely stated a  
conjecture.  For proof, could you please indicate where, exactly, we  
are violating C aliasing rules?  And what compiler are you using that  
is sensitive to these violations yet generates no warnings?

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] NULL vs ''

2009-12-08 Thread Ted Rolle, Jr.
When I .import a file into a table, || results in a value of '' for the
data item.
How can I get a NULL value stored?
This also happens when the item is at the end (EOL) of the row.
Currently, I:
UPDATE table SET value=NULL where value='';

Ted

---

3.14159265358979323846264338327950  Let the spirit of pi spread
2884197169399375105820974944592307  all around the world!
8164062862089986280348253421170679  http://pi314.at PI VOBISCUM!

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] fsync/fdatasync problem on UBIFS

2009-12-08 Thread Ronny Dierckx
>
>Using "PRAGMA journal_mode=truncate" made no difference, the journal
>reappeared with file size > 0.
>
>But "PRAGMA journal_mode=persist" fixes the problem, the database is no
>longer rolled back after a power cut.
>

FYI, 

The problem turned out to be a bug in the UBIFS backport we are using. With
this fixed everything works fine even with default journal mode.

Ronny

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread D. Richard Hipp

On Dec 7, 2009, at 8:41 PM, Andreas Schwab wrote:

> D. Richard Hipp writes:
>
>> As always, please let us know if you encounter any difficulties with
>> this or any other SQLite release.
>
> It's still crashing due to undefined behaviour.
>
> $ ./sqlite3 :memory: 'create table test(integer)'
> Segmentation fault
>


I am unable to reproduce this behavior.  The example above works fine  
here.  I also ran your command using valgrind and it reports no  
problems.

Please tell us how you generated the ./sqlite3 executable.


D. Richard Hipp
d...@hwaci.com



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite version 3.6.21

2009-12-08 Thread Andreas Schwab
D. Richard Hipp writes:

> As always, please let us know if you encounter any difficulties with  
> this or any other SQLite release.

It's still crashing due to undefined behaviour.

$ ./sqlite3 :memory: 'create table test(integer)'
Segmentation fault

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--- sqlite-3.6.21/src/vdbeaux.c.orig2009-12-01 17:08:35.0 +0100
+++ sqlite-3.6.21/src/vdbeaux.c 2009-12-08 02:27:22.0 +0100
@@ -1270,17 +1270,17 @@ void sqlite3VdbeIOTraceSql(Vdbe *p){
 ** request, then increment *pnByte by the amount of the request.
 */
 static void allocSpace(
-  char *pp,/* IN/OUT: Set *pp to point to allocated buffer */
+  void **pp,   /* IN/OUT: Set *pp to point to allocated buffer */
   int nByte,   /* Number of bytes to allocate */
   u8 **ppFrom, /* IN/OUT: Allocate from *ppFrom */
   u8 *pEnd,/* Pointer to 1 byte past the end of *ppFrom buffer */
   int *pnByte  /* If allocation cannot be made, increment *pnByte */
 ){
   assert( EIGHT_BYTE_ALIGNMENT(*ppFrom) );
-  if( (*(void**)pp)==0 ){
+  if( (*pp)==0 ){
 nByte = ROUND8(nByte);
 if( &(*ppFrom)[nByte] <= pEnd ){
-  *(void**)pp = (void *)*ppFrom;
+  *pp = (void *)*ppFrom;
   *ppFrom += nByte;
 }else{
   *pnByte += nByte;
@@ -1357,14 +1357,25 @@ void sqlite3VdbeMakeReady(
 assert( EIGHT_BYTE_ALIGNMENT(zCsr) );
 
 do {
+  void *pp;
   nByte = 0;
-  allocSpace((char*)&p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
-  allocSpace((char*)&p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
-  allocSpace((char*)&p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
-  allocSpace((char*)&p->azVar, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
-  allocSpace((char*)&p->apCsr, 
+  pp = p->aMem;
+  allocSpace(&pp, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
+  p->aMem = pp;
+  pp = p->aVar;
+  allocSpace(&pp, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
+  p->aVar = pp;
+  pp = p->apArg;
+  allocSpace(&pp, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
+  p->apArg = pp;
+  pp = p->azVar;
+  allocSpace(&pp, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
+  p->azVar = pp;
+  pp = p->apCsr;
+  allocSpace(&pp, 
  nCursor*sizeof(VdbeCursor*), &zCsr, zEnd, &nByte
   );
+  p->apCsr = pp;
   if( nByte ){
 p->pFree = sqlite3DbMallocZero(db, nByte);
   }
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] missing dot command

2009-12-08 Thread Roger Binns
Oliver Peters wrote:
> because of curiosity I checked the "Improvements to "dot-command" handling in 
> the Command Line Interface." (http://www.sqlite.org/releaselog/3_6_21.html)

The dot command fixes were mostly in 3.6.20.  You can see the list of
fixed shell bugs at
http://www.sqlite.org/src/login?anon=1&g=/src/rptview?rn=6

Remaining open shell issues are listed at
http://www.sqlite.org/src/rptview?rn=5

>  there should be a hint in the documentation that this dot command is "off by 
> default".

What happened is that a SQLite developer copy and pasted from their
shell to make the web page.  (They do care about the low level I/O which
is why it was compiled into their library and shell.)

Roger
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] missing dot command

2009-12-08 Thread Oliver Peters
Hello,


[...]

> 
> Oliver Peters wrote:
> > despite documentation there is no ".iotrace FILE" in 3.6.21
> 
> You have to compile the shell *and* the SQLite library with
> - -DSQLITE_ENABLE_IOTRACE.  It is off by default.

I didn't compile it but simply took the Windows-Version from the site and 
because of curiosity I checked the "Improvements to "dot-command" handling in 
the Command Line Interface." (http://www.sqlite.org/releaselog/3_6_21.html)

> 
> I doubt it would be of much help to you unless you are debugging low level
> SQLite internals in which case you would already know how to enable it :-)
> Look in sqlite3.c for IOTRACE to see what it emits.

I'm not a programmer but I've an idea about the things you mention but for 
clarification there should be a hint in the documentation that this dot command 
is "off by default". If there's already a hint I'm sorry for this thread but I 
couldn't find such a hint

greetings
Oliver
___
Preisknaller: WEB.DE DSL Flatrate für nur 16,99 Euro/mtl.! 
http://produkte.web.de/go/02/

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite bug report - large databases only - 'database or disk is full'

2009-12-08 Thread Filip Navara
On Mon, Dec 7, 2009 at 10:21 PM,   wrote:
>
> SQLite bug report
>
> Summary:
> --
>
> error message:
>
>       Error: near line 2: database or disk is full
>
> It happens with plenty of disk space available and with 'unlimited' database 
> size.
> It does not happen on all systems. It does not happen on small databases.
>
>
> Details:
> --
>
>
> The error occurs on
> - windows server 2003 SP2 64bit, windows server 2009 64bit
> - windows vista, windows 7 rc1, windows 7 - all 64-bit
>
> The error does _not_ occur on
> - windows server 2003 SP2 32bit, windows xp sp3 32 bit

Just a short note, we experience very similar problem with our program
and the symptoms match exactly. So far we were unable to reproduce it
reliably on our systems, but we have plenty of bug reports from
production systems. I will post more details soon.

Our database files have page size 4Kb and all of the affected systems
are running Windows. We use incremental vacuum mode and the file sizes
are commonly over 1 Gb large, file system is NTFS (afaik).

Best regards,
Filip Navara
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] missing dot command

2009-12-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Oliver Peters wrote:
> despite documentation there is no ".iotrace FILE" in 3.6.21

You have to compile the shell *and* the SQLite library with
- -DSQLITE_ENABLE_IOTRACE.  It is off by default.

I doubt it would be of much help to you unless you are debugging low level
SQLite internals in which case you would already know how to enable it :-)
Look in sqlite3.c for IOTRACE to see what it emits.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkseG8kACgkQmOOfHg372QRkFgCfcjlLU+3bJh4JLEMk01gBQkYz
Q+EAoL9JFegjxMacSF0t9GhulbDJZ6j9
=x9qD
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] [bug+patch] crash when commit transaction between file db and temp db

2009-12-08 Thread Makoto SAITO
I found the crash bug when using transaction between filedb and temp db.
To reproduce bug, execute follow sequence.

> sqlite3.exe db1;

sqlite3 > ATTACH DATABASE "" AS tempdb;
sqlite3 > BEGIN;
sqlite3 > CREATE TABLE tbl1 (c0);
sqlite3 > CREATE TABLE tempdb.tbl2 (d0);
sqlite3 > END;

version:
  v3.6.20
  v3.6.21
 (I tryied only 2 versions)

crash occurs at vdbeaux.c: vdbeCommit() line1712 (v3.6.21)

I applied the following patch and this bug seemed to be fixed.

--

1712c1712
< if( zFile[0]==0 ) continue;  /* Ignore :memory: databases */
---
> if( zFile == NULL || zFile[0]==0 ) continue;  /* Ignore :memory: 
> databases */

--
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] missing dot command

2009-12-08 Thread Oliver Peters
despite documentation there is no ".iotrace FILE" in 3.6.21

greetings
oliver
___
Preisknaller: WEB.DE DSL Flatrate für nur 16,99 Euro/mtl.! 
http://produkte.web.de/go/02/

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users