Re: [sqlite] Continuous recovery of journal

2017-04-01 Thread J Decker
On Sat, Apr 1, 2017 at 6:42 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 2 Apr 2017, at 2:16am, J Decker <d3c...@gmail.com> wrote: > > > there's no corruption. > > There was corruption. The message you reported: > > > Sqlite3 Err: (283) recovere

Re: [sqlite] Continuous recovery of journal

2017-04-01 Thread J Decker
On Sat, Apr 1, 2017 at 3:53 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 1 Apr 2017, at 8:11pm, J Decker <d3c...@gmail.com> wrote: > > > It finally hit its crash point and restarted > > > > 11:02:30.850|~Sqlite3 Err: (283) recovered 6942

Re: [sqlite] Continuous recovery of journal

2017-04-01 Thread J Decker
On Sat, Apr 1, 2017 at 9:54 AM, J Decker <d3c...@gmail.com> wrote: > > On Fri, Mar 31, 2017 at 11:32 PM, Simon Slavin <slav...@bigfraud.org> > wrote: > >> >> On 1 Apr 2017, at 5:04am, J Decker <d3c...@gmail.com> wrote: >> >> > Sqlite3 Err

Re: [sqlite] Continuous recovery of journal

2017-04-01 Thread J Decker
On Sat, Apr 1, 2017 at 9:59 AM, Richard Hipp <d...@sqlite.org> wrote: > On 4/1/17, J Decker <d3c...@gmail.com> wrote: > > > > So really - after frames are recovered, can't they be cleared? > > Is see. You want a "checkpoint". That will happen au

Re: [sqlite] Continuous recovery of journal

2017-04-01 Thread J Decker
On Sat, Apr 1, 2017 at 9:54 AM, J Decker <d3c...@gmail.com> wrote: > > On Fri, Mar 31, 2017 at 11:32 PM, Simon Slavin <slav...@bigfraud.org> > wrote: > >> >> On 1 Apr 2017, at 5:04am, J Decker <d3c...@gmail.com> wrote: >> >> > Sqlite3 Err

Re: [sqlite] Continuous recovery of journal

2017-04-01 Thread J Decker
On Fri, Mar 31, 2017 at 11:32 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 1 Apr 2017, at 5:04am, J Decker <d3c...@gmail.com> wrote: > > > Sqlite3 Err: (283) recovered 6942 frames from WAL file > > C:\eQube-Tools\flashboard\server\option.db-wal > &g

Re: [sqlite] Continuous recovery of journal

2017-04-01 Thread J Decker
On Sat, Apr 1, 2017 at 2:38 AM, Richard Hipp <d...@sqlite.org> wrote: > On 4/1/17, J Decker <d3c...@gmail.com> wrote: > > I get this ... from sqlite error log callback > > > > Sqlite3 Err: (283) recovered 6942 frames from WAL file > > C:\eQube-Tools\flashbo

[sqlite] Continuous recovery of journal

2017-03-31 Thread J Decker
I get this ... from sqlite error log callback Sqlite3 Err: (283) recovered 6942 frames from WAL file C:\eQube-Tools\flashboard\server\option.db-wal pretty much every time I restart the program now (espcially if it segfaults). There are no frames to recover... really... I mean it should have

Re: [sqlite] QUERY: Usage of malloc and free in SQLite

2017-03-23 Thread J Decker
On Thu, Mar 23, 2017 at 9:01 AM, Dan Kennedy wrote: > On 03/23/2017 10:00 PM, Subramaniyan, Ganesan (G.) wrote: > >> Hi, >> We are facing dynamic memory pool corruption issue while using SQLite. >> Based on our investigation we suspect SQLite freeing memory bypassing the

Re: [sqlite] confused getting started

2017-03-06 Thread J Decker
On Mon, Mar 6, 2017 at 8:40 PM, Jens Alfke <j...@mooseyard.com> wrote: > > > On Mar 6, 2017, at 7:57 PM, J Decker <d3c...@gmail.com> wrote: > > > > Pretty silly since it is sqlite, and a mmap'ed database is pretty much > > sync > > Not really. T

Re: [sqlite] confused getting started

2017-03-06 Thread J Decker
If Python is appealing then Node.js + sqlite adapter makes sqlite very easy. I have my own https://www.npmjs.com/package/sack.vfs Needs better docs on the Sqlite output I guess A more proper package that's all promises and async stuff... https://www.npmjs.com/package/sqlite Pretty

Re: [sqlite] Massively multithreaded SQLite queries

2017-03-04 Thread J Decker
in my curiosity since any spin should be scheduled until something wake it; I wondered what __raw_spin_lock was and if sqlite could use it differently... it appears to be a linux kernel thing, wrapped around read/write accesses to devices probably the bottleneck is actually IO rather than

Re: [sqlite] Can sqlite3_blob_write be done through SQL?

2017-03-04 Thread J Decker
On Fri, Mar 3, 2017 at 3:58 PM, Yuri wrote: > On 03/01/2017 23:41, Clemens Ladisch wrote: > > It would certainly be possible to add your own user-defined SQL function >> to call sqlite3_blob_write(). >> > > > I think this should be added to sqlite itself. Writing a portion of

Re: [sqlite] UNION

2017-02-28 Thread J Decker
On Tue, Feb 28, 2017 at 5:40 PM, wrote: > # SELECT * FROM processors UNION SELECT * FROM storage; > Error: SELECTs to the left and right do not have the same number of > result columns. > > All tables that I created in my database have differing column names, > values, and

Re: [sqlite] foreign key cardinality

2017-02-28 Thread J Decker
On Tue, Feb 28, 2017 at 6:01 PM, J Decker <d3c...@gmail.com> wrote: > > > On Tue, Feb 28, 2017 at 1:41 PM, James K. Lowden <jklow...@schemamania.org > > wrote: > >> On Tue, 28 Feb 2017 17:13:30 + >> Hick Gunter <h...@scigames.at> wrote: >>

Re: [sqlite] foreign key cardinality

2017-02-28 Thread J Decker
On Tue, Feb 28, 2017 at 1:41 PM, James K. Lowden wrote: > On Tue, 28 Feb 2017 17:13:30 + > Hick Gunter wrote: > > > Let's assume you have a parent table P (color, shape, style, ...) > > that is unique on the three named fields. Let's assume you

[sqlite] 'misuse at line...' sqlite3_config

2017-02-16 Thread J Decker
I have this bit of code I've had around forever, I recently enabled SQLITE_CONFIG_LOG and have been getting a misuse because I'm calling sqlite3_config after initialization. The one I'm calling is SQLITE_CONFIG_GETMALLOC which should read the internal routines already in use; I then override some

Re: [sqlite] FOREIGN KEY question

2017-02-08 Thread J Decker
On Wed, Feb 8, 2017 at 12:24 AM, Clemens Ladisch wrote: > Igor Korot wrote: > > Does SQLite supports the FK name? > > If yes, what is the proper syntax? > > CREATE TABLE t ( > x PRIMARY KEY, > y, > CONSTRAINT this_is_the_name FOREIGN KEY (y) REFERENCES t(x) >

Re: [sqlite] Retrieve INTEGER PRIMARY KEY

2017-02-05 Thread J Decker
http://data.sqlite.org/c3ref/last_insert_rowid.html there is an api call to get it; or you can use select and get it the .net library has it as a connection property LastInsertRowId

Re: [sqlite] Foreign key error...

2017-01-08 Thread J Decker
as an alternative you can use the same ID - nessecitating prefiixing the primary id with the table name... but then natural join can work. (Although common words like 'name' should also be table-name prefixed). Having a 'id' as the primary key disallows the using() shorthand also. If all column

Re: [sqlite] Anybody know why mono SQLite uses SqliteConnection but Windows uses SQLiteConnection?

2016-11-18 Thread J Decker
mono install.exe often works. On Fri, Nov 18, 2016 at 9:16 PM, Jim Henderson wrote: > Thanks for the suggestion, Bill. > > Will this run on a Linux system? The zip file has Install.exe and Test.exe > inside it. > > Jim > > > On 18-Nov-2016 7:44 AM, Drago, William @

Re: [sqlite] Changing ID's to UUID

2016-11-17 Thread J Decker
Re Integer shorness... UUID does seem wasteful - to have to ccompare such a long value. But the string compare will often fail within the first 4 bytes, or less, making many comparisons less 'work' than an integer of the same... since sqlite stores everything as text if you are in 123,000,000..

Re: [sqlite] Changing ID's to UUID

2016-11-17 Thread J Decker
https://en.wikipedia.org/wiki/Birthday_problem In probability theory , the *birthday problem* or *birthday paradox *[1] concerns the probability

Re: [sqlite] WAL pragma question

2016-10-28 Thread J Decker
Also if you have any connections open, the journal may exist, so it doesn't have to constantly open and close it. On Fri, Oct 28, 2016 at 2:21 AM, Dan Kennedy wrote: > On 10/28/2016 03:16 AM, David Raymond wrote: > >> I'm playing around with WAL mode here for the first

Re: [sqlite] Inserting a new record (anywhere) into a table of ordered records that have an integer auto-increment primary key

2016-10-15 Thread J Decker
On Sat, Oct 15, 2016 at 11:58 AM, Keith Medcalf wrote: > > I'd just sort the data into the order I wanted the result set presented in > using an ORDER BY clause on the SELECT which retrieves the data ... > One other thought I saw someone else propose a while ago... treat

Re: [sqlite] Inserting a new record (anywhere) into a table of ordered records that have an integer auto-increment primary key

2016-10-15 Thread J Decker
On Sat, Oct 15, 2016 at 10:18 AM, Stephen Chrzanowski wrote: > What you want to do is called using a linked list. Each record knows what > its previous record is. > > SQLite doesn't exactly have that capability directly. No SQL engine that I > know of has the capability.

Re: [sqlite] how is "pragma threads = 4" working

2016-09-16 Thread J Decker
that is a single sql statement though ; it doesn't spread itself amongst threads, the compile option says 'limits number of threads' so if you had an application (not sqlite shell) that had threads it could have a limit? On Fri, Sep 16, 2016 at 5:13 AM, Adam Devita wrote:

Re: [sqlite] WHERE col IN tab

2016-09-16 Thread J Decker
IN is for sets, not another table. I'm surprised sqlite didn't thrown an error but probably what you mean is... SELECT * FROM t1 join T2 on x=y; SELECT * FROM t1 join (select y from t2) on x=y select * from table where colName in (1,2,3,4) /// woud return rows where some column has a

Re: [sqlite] SpeedTest1 Comparison of 32 vs 64 bit on Windows 10 13483.15

2016-08-24 Thread J Decker
CPU Core at 100% for entire test, x64 code is ~10% faster than x32 code. So; IO bound things 32/64 doesn't matter so much; but compute bound, through data already in memory gets significant improvments because of addtional general purpose registers and optimal calling conventions for things of

Re: [sqlite] CREATE FUNCTION

2016-08-22 Thread J Decker
And every other scripting language you might suggest for the question 'if It did allow creating a function, what flavor of scripting would you like it to be?' has hooks for sqlite ... well except maybe TSQL. (could I script all my database access to a sqlite3 db from SQL Server? Or as the

Re: [sqlite] Will the next release include support for VS 2015 Update 3?

2016-08-19 Thread J Decker
On Thu, Aug 18, 2016 at 12:37 PM, Brian Fairservice < brianfairserv...@gmail.com> wrote: > Greetings, > > I need to work with a project that uses SQLite as an ADO data source. I > have visual studio 2015 Update 3. I see the binaries on >

Re: [sqlite] 64-bit SQLite3.exe

2016-08-13 Thread J Decker
If you use cygwin (which noone ever should) make sure you to specify -mno-cygwin or any output is significantly slower than any other build. (oh, I see that was deprecated several years ago, apparently now you just get the slow code automatically in static format.) (for instance one cause of

Re: [sqlite] 64-bit SQLite3.exe

2016-08-10 Thread J Decker
I'm actually kind of surprised more people aren't like 'ya, why isn't 64 bit just available?' ( *pounds on tables* "We Want 64 Bit!", no? ) being fairly low level developers I'd think many of you would know 64 bit mode has more general purpose registers to carry values and the default calling ABI

Re: [sqlite] 64-bit SQLite3.exe

2016-08-10 Thread J Decker
On Tue, Aug 9, 2016 at 10:08 PM, David Empson wrote: > > > On 10/08/2016, at 3:30 PM, Rousselot, Richard A centurylink.com> wrote: > > > > As I said, I am not a software engineer. I could spend a few hours > figuring this out and be fine but it

Re: [sqlite] Query question: order by ascending, return the two largest values in ascending order

2016-07-11 Thread J Decker
SELECT DISTINCT date_time_stamp FROM general ORDER BY date_time_stamp DESC LIMIT 2 isn't it simply to use DISTINCT? On Mon, Jul 11, 2016 at 4:25 PM, Keith Christian wrote: > A table has a column of dates and times that look like this: > > 2015-10-02 07:55:02 >

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-09 Thread J Decker
Okay if this should change, I would recommand a new standard for all libraries; and since standards are so important maybe make them know about it too... do ... ORG_DOMAIN_APPLICATION_LIBRARY_MODULE_SOURCE_INCLUDED where each piece becomes unqiqe so there's no collision. I'd expect compilers

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-09 Thread J Decker
On Fri, Jul 8, 2016 at 4:56 PM, Daniel Seither wrote: > Using clang 3.8 with -Wreserved-id-macro (enabled by -Weverything), I > just noticed that SQLite uses include guards with a leading underscore, > for example _SQLITE3_H_ in the amalgamation. According to the C > standard,

Re: [sqlite] Currency & SQLite

2016-07-05 Thread J Decker
On Tue, Jul 5, 2016 at 5:14 PM, Darren Duncan wrote: > Ertan, > > You should read https://www.sqlite.org/datatype3.html#section_2 if you > haven't already. > > SQLite has exactly 1 floating-point type, which is what you get no matter > if you say float/double/etc, and it

Re: [sqlite] Question about C# with SQLite

2016-07-04 Thread J Decker
if it was built with debug mode; probably the debug runtime doesn't exist there. Otherwise it's because the visual studio runtime required isn't available. On Mon, Jul 4, 2016 at 6:52 AM, Shouwei Li wrote: > Hi there, > > I have a project developed with .net 2015 and C#. I

Re: [sqlite] UNIQUE constraint violation

2016-06-28 Thread J Decker
Duplication can also result as part of the - in process - moving of rows. To change the order of [1,2,3,4] to [1,3,2,4] there is(can be) a state that is [1,2,2,4] before the second part that sets three back into 2. This is a point where NULL can be useful to make the transition [1,2,NULL,4]

Re: [sqlite] Order of applying subquery in SELECT statement

2016-06-20 Thread J Decker
On Mon, Jun 20, 2016 at 5:18 PM, Keith Medcalf wrote: > > You have all ill-phrased correlated subquery. Only by putting c.id in > the select list and adding c.id to the group go do you have a properly > phrased correlated subquery. > > However, > > The projection (join)

Re: [sqlite] Order of applying subquery in SELECT statement

2016-06-20 Thread J Decker
On Mon, Jun 20, 2016 at 8:37 AM, Harmen de Jong - CoachR Group B.V. < har...@coachr.com> wrote: > I have a query with a subquery (using an aggregate function) in the SELECT > statement. Will this subquery be executed before or after the GROUP BY? > For example: > SELECT a.id, (SELECT max(orderno)

Re: [sqlite] Managing SQLite indices.

2016-06-14 Thread J Decker
sqlite supports 'natural join' which allows you to omit the on clause for well structured databases. My database model is really a C# DataSet ( which contains DataTable, which contain DataColumn and DataRow, (and this is superfluous, but row has a reference to it's table and therefore the columns

[sqlite] Podcast with Dr Hipp: SQLite history, success and funding

2016-05-18 Thread J Decker
On Wed, May 18, 2016 at 2:39 AM, Cecil Westerhof wrote: > I would be interested what you find wrong about Git and is better in your > version control system. > git blows; monotone forever! > -- > Cecil Westerhof > ___ > sqlite-users mailing list >

[sqlite] Sqlite incompatibility with Postgres

2016-05-15 Thread J Decker
On Sun, May 15, 2016 at 10:02 PM, Darren Duncan wrote: > On 2016-05-15 9:56 PM, J Decker wrote: >> >> On Sun, May 15, 2016 at 9:29 PM, Darren Duncan >> wrote: >>> >>> On 2016-05-15 12:35 AM, Simon Slavin wrote: >>>> >>>> >

[sqlite] Sqlite incompatibility with Postgres

2016-05-15 Thread J Decker
On Sun, May 15, 2016 at 9:29 PM, Darren Duncan wrote: > On 2016-05-15 12:35 AM, Simon Slavin wrote: >> >> On 15 May 2016, at 6:04am, Darren Duncan wrote: >> >>> You seem to be forgetting the fact that LIMIT/OFFSET is not its own >>> clause, rather it is an extension to the ORDER BY clause and

[sqlite] Sqlite incompatibility with Postgres

2016-05-14 Thread J Decker
Someone should wake the SQL standard committee and nominate sqlite being the broadest used so should fill some gaps in specification with it. :) and conversely blame the others for their incompatibility :)

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread J Decker
sorry that is LISTDLLS no ' or space ... and not singular. On Tue, May 10, 2016 at 7:02 PM, J Decker wrote: > In general... > > while sqlite tool in question is running one could run listdll's in an > admin console window and see... listdll takes a executable name to >

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread J Decker
In general... while sqlite tool in question is running one could run listdll's in an admin console window and see... listdll takes a executable name to filter its list... maybe you have another compatible one in the path it's finding? Because it's not Any CPU.

[sqlite] 64bit DLL vs 32bit

2016-05-10 Thread J Decker
On Tue, May 10, 2016 at 2:23 AM, Jeremy Nicoll wrote: > On Mon, 9 May 2016, at 15:48, jicman at barrioinvi.net wrote: > >> Well, I can not use the SQLite 64bit DLL in a 64bit environment with a >> 32bit application. > > I was under the impression that I'm using the 64-bit DLL on a W8.1 > 64-bit

[sqlite] 64bit DLL vs 32bit

2016-05-07 Thread J Decker
There are reasons for 64bit to be faster - more registers to work with. (from https://en.wikipedia.org/wiki/X86-64 ) In addition to increasing the size of the general-purpose registers, the number of named general-purpose registers is increased from eight (i.e. eax, ebx, ecx, edx, ebp, esp, esi,

[sqlite] Fastest way to backup/copy database?

2016-05-05 Thread J Decker
would like to chip in, please do so. > > Our intention now is to take a more recent and representative database, run > a days and a weeks set of database transactions through it which is easy > enough, though takes time, and see how that compares. > > Thanks for the suggestion, > >

[sqlite] Fastest way to backup/copy database?

2016-05-05 Thread J Decker
Instead of cp, rsync might help it is able to send delta changes. On Wed, May 4, 2016 at 10:55 AM, Rob Willett wrote: > Scott, > > OK, We can see how to do this (I think). Our app is written in Perl and we?d > just need to capture the command we write down. The only issue I can think > of is the

[sqlite] Illegal SQL not rejected

2016-04-29 Thread J Decker
On Fri, Apr 29, 2016 at 10:00 AM, Jann Roder wrote: > Hi, > It seems like a too obvious omission to not be intentional. But I wonder why > a query like > > SELECT SUM(A) > FROM TABLE > GROUP BY B > HAVING A <> 0 > > Is not rejected. MS SQL server gives you this error message in this case: > >

[sqlite] How to register System.Data.SQLite as a data source?

2016-04-27 Thread J Decker
Those look like the ODBC provider list... http://www.ch-werner.de/sqliteodbc/ On Wed, Apr 27, 2016 at 3:55 PM, Joe Mistachkin wrote: > > Drago, William wrote: >> >> I did look at Installer.cs, but I'm not knowledgeable enough to >> understand what it's doing. >> > > It modifies the registry

[sqlite] sqlite3 command line, read-only

2016-04-27 Thread J Decker
On Tue, Apr 26, 2016 at 10:56 PM, J Decker wrote: > https://www.sqlite.org/wal.html > > "5. It is not possible to open read-only WAL databases. The opening > process must have write privileges for "-shm" wal-index shared memory > file associated with the database

[sqlite] sqlite3 command line, read-only

2016-04-26 Thread J Decker
https://www.sqlite.org/wal.html "5. It is not possible to open read-only WAL databases. The opening process must have write privileges for "-shm" wal-index shared memory file associated with the database, if that file exists, or else write access on the directory containing the database file if

[sqlite] Is it possible that dropping a big table takes very long

2016-04-20 Thread J Decker
If you upload a file to google drive and later try to replace it with a different version google drive often corrupts it. Always delete and upload a new version. On Wed, Apr 20, 2016 at 4:04 PM, jungle Boogie wrote: > On 20 April 2016 at 14:55, Cecil Westerhof wrote: >> This one I download,

[sqlite] Primary key values can be NULL

2016-04-14 Thread J Decker
I would total expect any column I created without NOT NULL (double negative) to allow NULL whether INDEX or UNIQUE or PRIMARY is applied additionallywhat database does otherwise? MSSQL? On Thu, Apr 14, 2016 at 2:56 PM, R Smith wrote: > > > On 2016/04/14 10:23 PM, Cecil Westerhof wrote: >>

[sqlite] autoincrement

2016-04-13 Thread J Decker
Yes, you can get the create statement from sqlite_master table On Wed, Apr 13, 2016 at 4:54 AM, Igor Korot wrote: > Hi, > Is it possible to get whether the column is set to autoincrement or not? > > PRAGMA table_info() does not give such info... > > Thank you. >

[sqlite] Compiling SQLite dll 64 bits in MSVS

2016-04-05 Thread J Decker
ll > -out:SQLite3_StdCall.dll > > add SQLITE_API=__declspec(dllexport) from like line 12... http://pavel.cernohorsky.name/blog/2015/09/sqlite_64-bit_binaries_for_windows_and_how_to_build_them_with_visual_studio_2015.php You missed the important part :) > RBS > > On Tue, Apr 5, 2016 at 10:05 PM, J Deck

[sqlite] Compiling SQLite dll 64 bits in MSVS

2016-04-05 Thread J Decker
def files are obsolete. the instructions include setting SQLITE_API to __declspec(dllexport) which should do the job... unless there was a typeo On Tue, Apr 5, 2016 at 2:03 PM, GB wrote: > Strange. Runs fine here (also Win 7 Pro x64). But version 2.1 may have > problems with post-XP OS. Try V2.2

[sqlite] Article about pointer abuse in SQLite

2016-03-22 Thread J Decker
ix >> the error. >> >> Compilers only set the code to initialize the variable at declaration, not >> actually use the values during compile. If it was declared as a constant >> using a compiler directive such as #define, then the compiler would use the >> value in the logi

[sqlite] Article about pointer abuse in SQLite

2016-03-22 Thread J Decker
d. There is no cause for warning or error in either of these cases. There is NEVER a time when it will be used and be unassigned. See - it's too complex for even human minds to reason through how could a dumb tool have any hope? > > On 03/21/2016 21:31, J Decker wrote: >> >&

[sqlite] Article about pointer abuse in SQLite

2016-03-21 Thread J Decker
checkers > > > Scott Doctor > scott at scottdoctor.com > -- > > > On 3/21/2016 5:21 PM, J Decker wrote: >> >> So far I just see analysis tools fail for the same sorts of valid code... >> >> this is a bit of C# but the

[sqlite] Article about pointer abuse in SQLite

2016-03-21 Thread J Decker
So far I just see analysis tools fail for the same sorts of valid code... this is a bit of C# but the same idea causes the same warnings and there's nothign tecniclally wrong with this. class test { struct large_struct { public int x; } bool arbitrary_true_false = true; void method()

[sqlite] SQLite Pronunciation

2016-03-16 Thread J Decker
more like sequel-ite On Wed, Mar 16, 2016 at 11:38 AM, wrote: > Hello, > > Please grant me some leeway here since as someone who has > not been in an academic school for years and is mainly self > taught. I have Mainly deriving information from reading > manuals and occasionally viewing some

[sqlite] hexadecimal conversion on select query

2016-03-12 Thread J Decker
maybe ? https://www.sqlite.org/lang_corefunc.html hex(X)The hex() function interprets its argument as a BLOB and returns a string which is the upper-case hexadecimal rendering of the content of that blob. On Sat, Mar 12, 2016 at 12:18 PM, jungle Boogie wrote: > Hello All, > > I'm curious to

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 8:00 PM, Igor Tandetnik wrote: > On 2/12/2016 10:44 PM, J Decker wrote: >> >> On Fri, Feb 12, 2016 at 7:37 PM, Igor Tandetnik >> wrote: >>> >>> It performs the conversion it is documented to perform. It indeed doesn't >>&

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 8:00 PM, Igor Tandetnik wrote: > On 2/12/2016 10:44 PM, J Decker wrote: >> >> On Fri, Feb 12, 2016 at 7:37 PM, Igor Tandetnik >> wrote: >>> >>> It performs the conversion it is documented to perform. It indeed doesn't >>&

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 7:37 PM, Igor Tandetnik wrote: > On 2/12/2016 10:14 PM, J Decker wrote: >> >> mbstowcs( out, utf8, 5 ); > > > mbstowcs expects the string in the codepage of the current locale - which is > never UTF-8. > >> for( n = 0; n < 5; n++ ) &

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 7:05 PM, Warren Young wrote: > On Feb 12, 2016, at 4:42 PM, Scott Robison wrote: >> >> I find it kind of interesting that Microsoft takes a lot >> of (deserved) flack for not adhering to standards, yet UTF-8 came about >> specifically because some didn't want to use UCS-2

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 5:32 PM, Igor Tandetnik wrote: > On 2/12/2016 7:24 PM, J Decker wrote: >> > What character in what ANSI codepage ends up converted by mbstowcs to an > unpaired surrogate? > > What character in what ANSI codepage requires a surrog

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
016 at 4:05 PM, J Decker wrote: > >> windows W is wide-char not utf-16. >> as much as A is ansi and isn't utf-8 >> > > Has Windows ever supported a wide character set that was not UCS-2 or > UTF-16? I've always understood Microsoft embraced UCS-2 specifically so

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
windows W is wide-char not utf-16. as much as A is ansi and isn't utf-8 On Fri, Feb 12, 2016 at 1:07 PM, Warren Young wrote: > On Feb 12, 2016, at 1:49 PM, Clemens Ladisch wrote: >> >> Olivier Mascia wrote: >>> Are there Windows platforms, supported by SQLite source code of course, >>> where

[sqlite] What's the reason for alias names not being visible in subqueries?

2016-02-08 Thread J Decker
On Mon, Feb 8, 2016 at 3:38 AM, Paul wrote: > I see, thank you for pointing out. > > I wanted to use it on table with conditional relations with 3 different child > tables. > Though I could use a trick and fit data selection into one query, efficiently. > Alas I am forced to stick to 2 queries.

[sqlite] What's the reason for alias names not being visible in subqueries?

2016-02-08 Thread J Decker
On Mon, Feb 8, 2016 at 12:47 AM, Paul wrote: > Hello! > > I am curious what is a particular reason that aliased columns in a query not > visible to sub-queries? > > CREATE TABLE foo( > id INTEGER, > bar INTEGER > ); > > INSERT INTO foo VALUES(1, 2), (3, 4); > > SELECT 1 as super_id,

[sqlite] json_group_array

2016-02-05 Thread J Decker
I think maybe it would be more appropriate to return a blank element. It would fill an index point, but be skipped and unused in cases of iterating the loop... http://www.2ality.com/2013/07/array-iteration-holes.html Was thinking that javascript forEach et al. methods skipped null (or undefined

[sqlite] Find out how many times does SQLite hit the disk?

2016-01-30 Thread J Decker
On Sat, Jan 30, 2016 at 8:09 PM, J Decker wrote: > could use a tool like ProcMon and filter to disk activity on a > specified file to see... > https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx?f=255=-2147217396 Might not actually be useful though; if the file is memo

[sqlite] Find out how many times does SQLite hit the disk?

2016-01-30 Thread J Decker
could use a tool like ProcMon and filter to disk activity on a specified file to see... https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx?f=255=-2147217396 On Sat, Jan 30, 2016 at 3:21 PM, Simon Slavin wrote: > > On 30 Jan 2016, at 9:31pm, dpb wrote: > >> On windows, is there

[sqlite] Recover corrupt database

2016-01-27 Thread J Decker
n another database, but rather a encrypted vfs. I assume it happened while debugging and stopping at a breakpoint and aborting the process; in general use I don't expect this to happen. *sigh* guess I get to implement the 'hard' way then. > https://www.sqlite.org/howtocorrupt.html > > -j >

[sqlite] Recover corrupt database

2016-01-27 Thread J Decker
I was wondering if the backup api (sqlite3_backup_init, et al. ) will help to recover a corrupt DB? All the other mechanisms are an export and re-import into a new DB... The database exists in a encrypted database that it's really difficult to get the keys outside of the program and I don't look

[sqlite] sqldiff.c : 2 benign warnings in 64 bits builds

2016-01-26 Thread J Decker
should be (size_t) instead of (int) though... since size_t will retain the precision... and then back propagate the change to the function return type and the things receiving the return... then you don't need the cast anyway. On Tue, Jan 26, 2016 at 3:37 AM, Richard Hipp wrote: > On 1/26/16,

[sqlite] SQLite crashing

2016-01-25 Thread J Decker
On Mon, Jan 25, 2016 at 8:31 AM, Teg wrote: > Hello Igor, > > extern "C" __declspec(dllexport) void DestroyObject(Database *db) > { > delete db; > } > > It was my impression that each DLL got it's own heap so, memory > allocated inside the DLL needs to be free'd inside the DLL. I use >

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread J Decker
Yes when I free'd memory I shouldn't have and kept a reference to it in other places... or that after freeing I had modified memory. But not from sqlite itself. On Thu, Dec 24, 2015 at 2:02 AM, santosh dasimanth wrote: > Hi All, > I am working on Sqlite in multi threaded environment on ARM v7

[sqlite] No Sqlite.dll for VS 2015 C# console application

2015-12-18 Thread J Decker
you'll need system.data.sqlite.dll not just sqlite3.dll. I prefer to use the static version so system.data.sqlite.dll contains the sqlite3.lib so it's standalone other than the runtime used. (I've sometimes had to copy msvc*d.dll (debug version) because I'm sometimes lazy and know that it has

[sqlite] Obscure peculiarity with 3.9.2

2015-12-09 Thread J Decker
Once upon a time, journals would delete when all statements were closed. I find now to get all journals to delete you must also close all connections(opens). Figure at some point someone decided it was more optimal to leave journals around instead of recreating them on every statement (which it

[sqlite] sqlite3_errmsg and wide char

2015-11-27 Thread J Decker
On Fri, Nov 27, 2015 at 12:17 AM, Scott Robison wrote: > On Thu, Nov 26, 2015 at 11:42 PM, Igor Korot wrote: > >> Hi, Scott, >> >> On Fri, Nov 27, 2015 at 1:01 AM, Scott Robison >> wrote: >> > On Thu, Nov 26, 2015 at 10:13 PM, Igor Korot wrote: >> >> >> >> Hi, >> >> Is there any way to have

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread J Decker
> So something like "select value from option_map_view where path is set type>"? > A path name like '/system/device/com port/1' is used as an array of names > here. Only the indexing with intst and substr is laborious. Maybe some > future SQLite version includes a group_split function to make

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread J Decker
,option4_values,11,NULL (index on option_id) On Thu, Nov 12, 2015 at 8:35 AM, J Decker wrote: > On Thu, Nov 12, 2015 at 7:16 AM, E.Pasma wrote: >> 12 nov 2015, om 07:02, J Decker: >> >> >>> So I've used CTE to solve a simple problem... I'm tempted to use it to >>>

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread J Decker
On Thu, Nov 12, 2015 at 7:16 AM, E.Pasma wrote: > 12 nov 2015, om 07:02, J Decker: > > >> So I've used CTE to solve a simple problem... I'm tempted to use it to >> fix more problems... but I'm wondering how to select different values >> at different levels. I know

[sqlite] Array or set type or some other indexable data?

2015-11-11 Thread J Decker
So I've used CTE to solve a simple problem... I'm tempted to use it to fix more problems... but I'm wondering how to select different values at different levels. I know there's like 'select * from table where column in ( set,of,things) ' but can I index into the set? is there some sort of way I

[sqlite] Select after update get new or old values

2015-09-10 Thread J Decker
which values does it have? By definition it should be old values. On Thu, Sep 10, 2015 at 9:05 AM, Nguyen Dang Quang wrote: > Dear all, > > I am using System.Data.SQLite for my .Net 2.0 application. > > In the app, I always run a sequence like that: > > 1. Open connection to sqlite and

[sqlite] journal files not always removed

2015-09-10 Thread J Decker
Okay let's restart... maybe I misunderstood that Richard was able to reproduce this. I have figured out a simple script that with 3.8.11.1 windows (using binary download sqlite3.exe) causes the problem. running just 'sqlite3.exe' --- script --- .open test.db pragma journal_mode=wal; .open

[sqlite] journal files not always removed

2015-09-01 Thread J Decker
On Sat, Aug 15, 2015 at 1:59 PM, Richard Hipp wrote: > On 8/15/15, Ashwin Hirschi wrote: >> >>> But I also see that behavior dates back to 3.7.6 and maybe earlier. It >>> isn't something new. >>> (Testing on Ubuntu). >> >> Also, are you sure you testing things right? I thought URI support was >>

[sqlite] order by not working in combination with random()

2015-08-26 Thread J Decker
On Wed, Aug 26, 2015 at 2:47 AM, Graham Holden wrote: > And while "SELECT random() AS rr ORDER BY rr" is slightly contrived, the > example from J Decker: > contrived? cause I copied it from the original poster's first message? it was used in MySQL as a way to shuffle a deck o

[sqlite] order by not working in combination with random()

2015-08-26 Thread J Decker
On Tue, Aug 25, 2015 at 7:16 PM, Stephen Chrzanowski wrote: > Somewhat of a devils advocate here, but I'm not sure one can order based on > JUST data. Take the DATE function, for example. If, by your words, ORDER > BY should only act on the data, consider this kind of query: > > select

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-21 Thread J Decker
On Fri, Aug 21, 2015 at 10:04 AM, sqlite-mail wrote: > Then do you think this is a bug ? >> Fri Aug 21 2015 18:57:33 CEST from "Simon Slavin" >>Subject: Re: [sqlite] Is this a bug ? How to rename a table and all >>dependencies ? while it may be considered a nice thing; it's not common practice

[sqlite] changed time zone

2015-07-23 Thread J Decker
select time( 'now', 'localtime' ) does to something to trigger reading tzres.dll (windows library for timezone stuff?), but does not change the time updated after a timezone change. but I have a function to mimic sqlite now() function which returns localtime... this function works and is based on

[sqlite] Doc page revision request

2015-07-21 Thread J Decker
On Tue, Jul 21, 2015 at 3:51 PM, Bernardo Sulzbach < mafagafogigante at gmail.com> wrote: > Just to add some to the list of silly filters and silly silliness: at > home I can access everything, my school blocks wikipedia. I am not > kidding. > and wikipedia blocks knowledge of bosnian pyramids

<    1   2   3   4   >