Re: [sqlite] C++ sqlite_version()

2017-08-25 Thread Keith Medcalf
https://sqlite.org/c3ref/libversion.html --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Papa >Sent:

Re: [sqlite] C++ sqlite_version()

2017-08-25 Thread Keith Medcalf
sqlite3_version is not a function. it is the "location" of the version string. The definition of sqlite3_version is: char sqlite3_version[]; equivalent to char *sqlite3_version; not a function that returns a pointer. It is a pointer to a zero terminated string (or rather the address of the

[sqlite] C++ sqlite_version()

2017-08-25 Thread Papa
In my C++ program, I'd like to display the SQLite3 version. To do so, this is what I have done. class SQLite3_RDB {     private:     sqlite3* db; //!< Data Base         std::string tmp;    public:     SQLite3_RDB(){}     ~SQLite3_RDB(){sqlite3_close(db); }     const std::string&

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Keith Medcalf
Interesting. That would indicate that the code where you commented out the extra ResultRow OP is still being executed. Which it cannot be if you re-compiled the code and generated a new executable/dll/so with those instructions commented out. So I think somehow your compiler is not actually

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Bart Smissaert
Tried with the latest 3.20.1, but same result. My explain output is like this: addr opcode p1 p2 p3 p4 p5 comment 0 Init 0 1 0 00 Start at 1 1 String8 0 1 0 application_id 00 r[1]='application_id' 2 ResultRow 1 1 0 00 output=r[1] 3 ResultRow 1 1 0 00 output=r[1] 4 String8 0 1 0 auto_vacuum 00

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread Richard Damon
On 8/25/17 2:15 PM, Keith Medcalf wrote: When the included file is in " " then the file is expected to be located relative to the current directory. If the included file is in < > then it is relative to one of the directories specified in the "include search path". This search may or may not

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Keith Medcalf
Doesn't help a lot. Works for me though with the standard 3.20.0 release though ... SQLite version 3.20.0 2017-08-01 13:24:15 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .eqp full sqlite> select

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Bart Smissaert
The standard 3.20.0, second down on this page: https://www.sqlite.org/download.html Noticed though there is a new version and will try that one. RBS On Fri, Aug 25, 2017 at 9:48 PM, Keith Medcalf wrote: > > Which amalgamation? > > > > --- > The fact that there's a Highway

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Keith Medcalf
Which amalgamation? --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Bart Smissaert >Sent: Friday, 25

Re: [sqlite] Date time functions not working

2017-08-25 Thread Jens Alfke
> On Aug 25, 2017, at 10:35 AM, Keith Medcalf wrote: > > Which "localtime"? The "localtime" according to Schroedingers' Cat or the > "localtime" of the observer? Or the "localtime" at which the cat-boxer put > the cat in the box -- and is that by the reckoning of the

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Bart Smissaert
I copied the exact code block as in http://www.sqlite.org/src/info/b79cc8dc88c8ae03 compiled in MSVS, no errors and dll works fine, but still duplicate output. This is in Windows 8. I compiled the edited amalgation. I checked in Notepad that sqlite3.c had indeed the needed changes and it had, so

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Keith Medcalf
Thanks Dan. That works for me ... --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Dan Kennedy >Sent:

Re: [sqlite] Date time functions not working

2017-08-25 Thread Keith Medcalf
>This is why ISO8601 format was invented and why it should be used. >The "instant time offset" from UT1 (which is not the timezone) should >only ever be excluded if the datetime expressed is already in UT1. The caveat here of course being that UT1 times with offsets (stored as ISO8601 strings)

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread Keith Medcalf
When the included file is in " " then the file is expected to be located relative to the current directory. If the included file is in < > then it is relative to one of the directories specified in the "include search path". This search may or may not include the "current directory" but to

Re: [sqlite] Date time functions not working

2017-08-25 Thread Keith Medcalf
I should also mention that the concept of localized time is subject to the whim of politicians and the crap implementations of localtime conversions in much software. Usually software knows when "now" is in UT1 (even if expressed with the currently known offset from UT1), it is still a UT1

Re: [sqlite] Date time functions not working

2017-08-25 Thread Keith Medcalf
On Friday, 25 August, 2017 10:46, Jens Alfke said: >> On Aug 24, 2017, at 6:28 PM, Keith Medcalf wrote: >> Timezone is something that is applied and removed at the User >Interface level and should never exist below the presentation level. >There are

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread curmudgeon
Thanks Keith, the config info is most welcome. I wasn't sure if I was supposed to download zlib.h the fact it was inside <> instead of "" but understand now. Is the include in csv.c not a bug though, or is it again down to my compiler? -- View this message in context:

Re: [sqlite] Date time functions not working

2017-08-25 Thread Jens Alfke
> On Aug 24, 2017, at 6:28 PM, Keith Medcalf wrote: > > Timezone is something that is applied and removed at the User Interface level > and should never exist below the presentation level. There are cases where the timezone needs to be preserved in the data model

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread Keith Medcalf
stmt.c is already included, so you do not need to include it again. To "turn on" the builtin stmt_vtab you need to add the preprocessor define: SQLITE_ENABLE_STMTVTAB There are a bunch of extensions and modules already included in the amalgamation sqlite3.c that you just need to "turn on"

Re: [sqlite] Why is Sqlite mediatype not registered at iana

2017-08-25 Thread R Smith
On 2017/08/25 4:57 PM, BRUCE KAPITO wrote: please take me of your list anything about me wishing to be a member is fraudulent Did someone subscribe poor Bruce as a prank? I find it hard to fathom a less awful prank than a subscription to this list... Either way, Bruce, there is a link at

Re: [sqlite] Why is Sqlite mediatype not registered at iana

2017-08-25 Thread BRUCE KAPITO
please take me of your list anything about me wishing to be a member is fraudulent On Friday, August 25, 2017, 4:52:32 AM EDT, Clemens Ladisch wrote: Paul Van Genuchten wrote: > Why does sqlite not have an official mediatype, eg. Application/vnd.sqlite, > and why is it not

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-25 Thread curmudgeon
While testing I appended the following code to the end of sqlite3.c. #include "csv.c" #include "stmt.c" #include "compress.c" #include "eval.c" #include "carray.c" int core_init(const char* dummy) { int nErr = 0; nErr += sqlite3_auto_extension((void(*)())sqlite3_compress_init);

Re: [sqlite] GROUP_CONCAT separator and DISTINCT

2017-08-25 Thread Don V Nielsen
I think David Blake is suggesting that GROUP_CONCAT intuitively suggests it should take the separator argument, regardless of DISTINCT being present. It is logical that it should, given GROUP_CONCAT takes two arguments, not one. The second argument defaults to a comma when omitted. The presence of

Re: [sqlite] Date time functions not working

2017-08-25 Thread David Raymond
As with most things, "it depends on what you're using it for." Anything where you're gonna be looking at the raw data (using the CLI or whatever) benefits from human readable format. Any slowdown of your computer parsing a timestring instead of a single number is nothing compared to the

Re: [sqlite] Reverse Engineering Project - Download Old Versions

2017-08-25 Thread Richard Hipp
On 8/25/17, Matt Brooks wrote: > Hello, > > I'm working on a project to aid in reversing binaries that contain various > versions of the sqlite DLL statically-linked. I'm trying to find a way to > download the precompiled Windows binaries for all 3.* versions. I've >

[sqlite] Reverse Engineering Project - Download Old Versions

2017-08-25 Thread Matt Brooks
Hello, I'm working on a project to aid in reversing binaries that contain various versions of the sqlite DLL statically-linked. I'm trying to find a way to download the precompiled Windows binaries for all 3.* versions. I've scripted a test to see that some are hosted at the URI

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Bart Smissaert
I applied this fix, but still get the duplicate output. RBS On Fri, Aug 25, 2017 at 10:45 AM, Dan Kennedy wrote: > On 08/25/2017 06:41 AM, Keith Medcalf wrote: > >> If you search sqlite3.c for the SQLITE3_INTROSPECTION_PRAGMAS you will >> see in pragma.c (or in

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Dan Kennedy
On 08/25/2017 06:41 AM, Keith Medcalf wrote: If you search sqlite3.c for the SQLITE3_INTROSPECTION_PRAGMAS you will see in pragma.c (or in sqlite3.c) the following code: Thanks for looking into this. Now fixed here: http://www.sqlite.org/src/info/b79cc8dc88c8ae03 Dan.

Re: [sqlite] Why is Sqlite mediatype not registered at iana

2017-08-25 Thread Clemens Ladisch
Paul Van Genuchten wrote: > Why does sqlite not have an official mediatype, eg. Application/vnd.sqlite, > and why is it not registered at iana Because nobody has bothered to register it. Are you volunteering? Please note that SQLite is often used as a platform, i.e., knowing that the content is

Re: [sqlite] FIX FOR:: Duplicate output with pragma_list, function_list, module_list

2017-08-25 Thread Bart Smissaert
I removed (commented out) all the lines with sqlite3VdbeAddOp2 in that mentioned code block, so that is 4 code lines. Still I get the duplicate output. I am using the the 3.20.0 amalgation. RBS On Fri, Aug 25, 2017 at 12:41 AM, Keith Medcalf wrote: > > If you

Re: [sqlite] GROUP_CONCAT separator and DISTINCT

2017-08-25 Thread Clemens Ladisch
Dave Blake wrote: > It seems that it is not possible to specify the concatenation separator > when using GROUP_CONCAT with DISTINCT. The documentation says: | In any aggregate function that takes a single argument, that argument | can be preceded by the

[sqlite] GROUP_CONCAT separator and DISTINCT

2017-08-25 Thread Dave Blake
It seems that it is not possible to specify the concatenation separator when using GROUP_CONCAT with DISTINCT. For example while this works SELECT pub_id, GROUP_CONCAT(cate_id, " - ") FROM book_mast GROUP BY pub_id; and this works SELECT pub_id, GROUP_CONCAT(DISTINCT cate_id) FROM book_mast