[sqlite] Patch that add ".dumpdata" and "BEGIN TRANSACTION; " command to shell.c

2015-08-11 Thread sqlite-mail
Hello again ! After sending the first patch I also realized that when sqlite3 dumps ".schema" or ".fullschema" it doesn't surround the dump with a transaction and that takes longer and makes the hard disk work hard. So I also surrounded ".schema" and ".fullschema" with a transaction with this ex

[sqlite] I don't know how to cast ‘const unsigned char*’ to a 'const std::string'

2015-08-11 Thread Nicolas Jäger
I may found a solution by using 'reinterpret_cast'. Not sure that is a good solution... nicolas

[sqlite] I don't know how to cast ‘const unsigned char*’ to a 'const std::string'

2015-08-11 Thread Nicolas Jäger
hi John, actualy what you suggest it's the common solution. You missed the fact that here, there is an unsigned... in > http://stackoverflow.com/questions/1195675/convert-a-char-to-stdstring you can read : "It has taken me so long to realize that this constructor absolute refuses to match wit

[sqlite] I don't know how to cast ‘const unsigned char*’ to a 'const std::string'

2015-08-11 Thread Nicolas Jäger
Hi, I have some basic problem, but I didn't found the solution so far... maybe some people are using C++ and already deal with that problem : conversion from ?const unsigned char*? to non-scalar type ?std::string I got the `const unsigned char*` from `sqlite3_column_text()` and I want to pass the

[sqlite] I don't know how to cast ‘const unsigned char*’ to a 'const std::string'

2015-08-11 Thread Nicolas Jäger
Hi, I have some basic problem, but I didn't found the solution so far... maybe some people are using C++ and already deal with that problem : conversion from ?const unsigned char*? to non-scalar type ?std::string I got the `const unsigned char*` from `sqlite3_column_text()` and I want to pass the

[sqlite] SQLite crash

2015-08-11 Thread Robert Weiss
It will take a little while to compile with MSVC. ?In the meantime I removed -DSQLITE_DEFAULT_WORKER_THREADS=4 from the compilation flags and the index was created successfully. ?Haste makes waste? Thanks, everyone.Bob Weiss On Tuesday, August 11, 2015 1:55 PM, Joe Mistachkin wrote: R

[sqlite] Patch that add ".dumpdata" command to shell.c

2015-08-11 Thread no...@null.net
> This command should behave exactly like ".dump" but without the > database schema. I would occasionally find that command useful. > Here is a small patch that adds ".dumpdata" for "shell.c" in sqlite3. This mailing list does not accept attachments. Perhaps you can post a link? -- Mark La

[sqlite] I don't know how to cast ‘const unsigned char*’ to a 'const std::string'

2015-08-11 Thread John McKown
Perhaps this will help: http://stackoverflow.com/questions/1195675/convert-a-char-to-stdstring IIRC, something ike std::string return_string(pointer_to_const_unsigned_char_var); return_string is an std::string initialized to the value pointed to my the variable in the initializer. If you want th

[sqlite] Fwd: Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread Teg
Hello ch, I'd say yes it'll block. As to whether this is a problem I guess it depends on how much writing you do. I break my writing down into sections so, there's time in between transactions for readers to get in and read. WAL mode should work. It used to work for me a number of versions back.

[sqlite] SQLite crash

2015-08-11 Thread Robert Weiss
[continuing from previous gdb output]:(gdb) thread apply all where 15 Thread 6 (Thread 12300.0xa64):#0 ?0x74d66d61 in sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1 ?0x in ?? () Thread 5 (Thread 12300.0x389c):#0 ?0x77791f92 in ntdll!ZwWaitForWorkViaWorkerFactory ()

[sqlite] Site unavailable.

2015-08-11 Thread Richard Hipp
On 8/11/15, ??? ??? wrote: > In Russia when I'm trying to visit sqlite.org site, I'm getting conection > timeout. > > Also, sqlite.org doesn't pinged. There was a transient issue at the datacenter, for a few minutes of either side of 22:00 UTC. If you ever have problems with www.sqli

[sqlite] Patch that add ".dumpdata" command to shell.c

2015-08-11 Thread sqlite-mail
Hello ! Here is a small patch that adds ".dumpdata" for "shell.c" in sqlite3. This command should behave exactly like ".dump" but without the database schema. I 'm giving it with the same license as sqlite. Cheers !

[sqlite] Site unavailable.

2015-08-11 Thread Donald Griggs
(No problem as of this writing from southeastern usa.) You might want to try a traceroute. There are two additional mirrors you can try. http://www.sqlite.org/cgi/src (Dallas) http://www2.sqlite.org/cgi/src (Newark) http://www3.sqlite.org/cgi/src (Fremont) On Tue, Aug 11, 2015 at 7:51 PM, Rog

[sqlite] SQLite crash

2015-08-11 Thread Robert Weiss
The bug seems to be repeatable. ?At least, it happened again today. I haven't used gdb in a long time. ?Here's my first crack at it; what else should I do? $ gdb sqliteGNU gdb (GDB) 7.8Copyright (C) 2014 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later

[sqlite] setup C code with cppunit using test db

2015-08-11 Thread Richard Hipp
On 8/11/15, Adam Devita wrote: > > I get an error stating that MREMAP_MAYMOVE is undeclared. (line 29874) > I don't see in the source or .h file where it would be defined. > It's defined in /usr/include/linux/mman.h on my LTS14.04 box. And that file is included from /usr/include/mmap.h which is

[sqlite] SQLite crash

2015-08-11 Thread Jan Nijtmans
Op 11 aug. 2015 17:06 schreef "Robert Weiss" het volgende: > > In the meantime I removed -DSQLITE_DEFAULT_WORKER_THREADS=4 from the compilation flags and the index was created successfully. Haste makes waste? > Thanks, everyone.Bob Weiss That explains it! Your build of sqlite starts win32 thread

[sqlite] setup C code with cppunit using test db

2015-08-11 Thread Adam Devita
Good day, I'd like to test some C code using the cpputest package. The code is a simple transaction where 1 prepared update statement gets various parameters bound and stepped in a loop. I'd like to make a test db so I can ensure that the code will work (and there are no syntax errors in the sql

[sqlite] Site unavailable.

2015-08-11 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/11/2015 04:18 PM, ??? ??? wrote: > In Russia when I'm trying to visit sqlite.org site, I'm getting > conection timeout. Use down for everyone or just me to check sites: http://www.downforeveryoneorjustme.com/sqlite.org In this ca

[sqlite] Lawyers, encryption, and RC4

2015-08-11 Thread Rob Willett
Eric, The humorous side of me would argue that RC4 isn?t encryption anymore than ROT13 is these days. The serious side of me says that exportation of encryption stuff has changed significantly and is full of weird and vagueness. Since you don?t state your country of origin its difficult to kno

[sqlite] SQLite crash

2015-08-11 Thread Dan Kennedy
On 08/11/2015 12:23 AM, Robert Weiss wrote: > Dan Kennedy-- > What address, precisely, should I use to send the database to you? When I > "reply" to your message I get the whole SQLite discussion group, which is > what I want to avoid (no offense intended, guys and gals). > BTW, the problem does

[sqlite] Lawyers, encryption, and RC4

2015-08-11 Thread Simon Slavin
On 11 Aug 2015, at 3:11pm, Richard Hipp wrote: > The RC4 encryption algorithm consists of three subcomponents: > > (1) Key management logic > (2) The pseudo-random number generator (PRNG) > (3) The encoder/decoder > > SQLite only implements (2). It omits (1) and (3). And hence, the RC4 > ker

[sqlite] Lawyers, encryption, and RC4

2015-08-11 Thread Simon Slavin
On 11 Aug 2015, at 1:30pm, Eric Hill wrote: > We're getting some pushback from our lawyers suggesting that SQLite's use of > RC4 even just to generate random numbers is, in their minds, encryption for > export purposes. Now, this makes absolutely no sense to me, I can assure > you, and I am

[sqlite] SQLite crash

2015-08-11 Thread Joe Mistachkin
Robert Weiss wrote: > > [continuing from previous gdb output]:(gdb) thread apply all where 15 > Thread 6 (Thread 12300.0xa64):#0 ?0x74d66d61 in sysfer!FirstHookFunc () > from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1 ?0x in ?? () > Anyhow, the cause of this appears to be the "sysfer.dll"

[sqlite] Lawyers, encryption, and RC4

2015-08-11 Thread Neville Dastur
I think answer 27 of the FAQ https://www.sqlite.org/faq.html#q27 might help you. > On 11 Aug 2015, at 13:30, Eric Hill wrote: > > Sorry to bother folks with this. > > We're getting some pushback from our lawyers suggesting that SQLite's use of > RC4 even

[sqlite] Lawyers, encryption, and RC4

2015-08-11 Thread Eric Hill
Sorry to bother folks with this. We're getting some pushback from our lawyers suggesting that SQLite's use of RC4 even just to generate random numbers is, in their minds, encryption for export purposes. Now, this makes absolutely no sense to me, I can assure you, and I am not finding anything

[sqlite] Regarding root in transitive closure extension of SQLite

2015-08-11 Thread Sairam Gaddam
> Hello ! > > Look this comment on ext/misc/closure.c: > > -- > > ** When it is created, the new transitive_closure table may be supplied > ** with default values for the name of a table T and columns T.X and T.P. > ** *The T.X and T.P columns must contain integers*. The ideal case is > for >

[sqlite] Regarding root in transitive closure extension of SQLite

2015-08-11 Thread Sairam Gaddam
> > Given that SQLite supports CTE's now, why use that extension? > > AFAIK, it was to add hierarchical query capability to SQLite, which CTE > does builtin now. --DD But will that solve my problem of having the data type of groupId other than Integer primary key like Text???

[sqlite] what is typical pattern for test double of sqlite c api

2015-08-11 Thread Adam Devita
Good day, I'm about to implement TDD for an existing c project that uses sqlite, using CPPUnit. Sqlite would be a dependency from the point of view of the routines making calls to it. Is is typical to just write a link time stub to substitute commonly used parts of the interface (exec, open, pre

[sqlite] Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread Rowan Worth
On 11 August 2015 at 06:22, Simon Slavin wrote: > If you did set a timeout then SQLite wais a very short time (a millisecond > ?) before it tries again, then it waits a little longer, then a little > longer still, etc.. It gradually increases the time until the total time > reaches the time you

[sqlite] Lawyers, encryption, and RC4

2015-08-11 Thread Richard Hipp
On 8/11/15, Eric Hill wrote: > > We're getting some pushback from our lawyers suggesting that SQLite's use of > RC4 even just to generate random numbers is, in their minds, encryption for > export purposes. No. The RC4 encryption algorithm consists of three subcomponents: (1) Key management log

[sqlite] Fwd: Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread ch
Hi, I have similar problems. We have multiple connections to write to the database and the updates are surrounded by create&release savepoints. The issue is when two updates from different connections try to modify the database, the second operation gonna fail and it either returned database is

[sqlite] Lawyers, encryption, and RC4

2015-08-11 Thread Brian Willner
Have you found yourself in an ITAR mess? https://en.wikipedia.org/wiki/Export_of_cryptography_from_the_United_States The length of the keys is usually the determining factor for EAR. I'm not an expert, but I'm guessing that is why they are concerned. -Original Message- From: sqlite-users

[sqlite] Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread Дмитрий Чепуровский
Thank you for answers, but I have already solved this problem. I set busy timeout for both connections. ???, 11 ??? 2015 ?. Simon Slavin ???: > > On 11 Aug 2015, at 2:28am, ch > > wrote: > > > Is this because we don't create and handle savepoints correct? > > Have you set

[sqlite] Fwd: Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread Simon Slavin
On 11 Aug 2015, at 2:28am, ch wrote: > Is this because we don't create and handle savepoints correct? Have you set a timeout value using the routine I pointed to earlier ? If not, do so. Simon.

[sqlite] Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread Дмитрий Чепуровский
Thank you for help and explain WAL mode. 2015-08-11 1:22 GMT+03:00 Simon Slavin : > > On 10 Aug 2015, at 11:12pm, ??? ??? wrote: > > > But what is minimum period? > > The minimum period doesn't matter. > > The number you set the timeout to is the /maximum/ period. SQLite will > cont

[sqlite] Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread Дмитрий Чепуровский
But what is minimum period? 2015-08-11 0:56 GMT+03:00 Simon Slavin : > > On 10 Aug 2015, at 10:49pm, ??? ??? wrote: > > > When I set timeout to 12 ms (2 minutes). It starts work. But as I > > understand from reading SQLite C interface, when DB in WAL journal mode > it > > should

[sqlite] Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread Дмитрий Чепуровский
When I set timeout to 12 ms (2 minutes). It starts work. But as I understand from reading SQLite C interface, when DB in WAL journal mode it should work without busytimeout. Can it work without busy timeout? 2015-08-10 17:11 GMT+03:00 Simon Slavin : > > On 9 Aug 2015, at 10:37pm, ??? ???

[sqlite] Fwd: Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread Teg
Hello ch, I ran into a similar problem when I was trying to use WAL mode. I ended up just turning it off. It seemed that once there was contention for the file it never recovered. This was in windows. I didn't look into it any deeper than this. The same code works fine in journal mode

[sqlite] Problem with SQLite in C++. DB is BUSY (Multithread)

2015-08-11 Thread R.Smith
On 2015-08-10 11:49 PM, ??? ??? wrote: > When I set timeout to 12 ms (2 minutes). It starts work. But as I > understand from reading SQLite C interface, when DB in WAL journal mode it > should work without busytimeout. > > Can it work without busy timeout? It can work without Tim