[sqlite] urifuncs.c access violation & crash

2020-01-14 Thread Ralf Junker
With the urifuncs extension enabled, the each of following SQL queries causes an access violation & crash: select sqlite3_filename_database(''); select sqlite3_filename_journal(''); select sqlite3_filename_wal(''); Ralf ___ sqlite-users mailing

[sqlite] zipfile.c memory leak

2019-12-23 Thread Ralf Junker
Checkin f5ee3042 introduces a memory leak in zipfile.c. It is still present on trunk, tested with 0b1dbd60. Cause: zipfileDeflate() calls deflateInit2() twice and allocates zlib stream memory twice in certain situations. Also, deflateEnd(); may not be called if aOut is not allocated after an

Re: [sqlite] RBU fails as of checkin f84a1539 - fixed

2019-12-23 Thread Ralf Junker
On 22.12.2019 17:23, Keith Medcalf wrote: I get: RBU error: near ")": syntax error ERROR 1, expected 101 Done - Press ENTER to exit. with the current trunk ... Thanks for following up on this. I spotted a typo in the test code. Corrected version below. With that, Dan's fix works for me on

[sqlite] RBU fails as of checkin f84a1539 - fixed

2019-12-22 Thread Ralf Junker
Replying to myself just to confirm that https://www.sqlite.org/src/info/0b9d8a1202c4220f fixes the problem. Thank you, Dan! Ralf On 20.12.2019 17:48, Ralf Junker wrote: As of Fossil checkin f84a1539, the RBU code in the following C example is no longer executed to completion. Instead

[sqlite] RBU fails as of checkin f84a1539

2019-12-20 Thread Ralf Junker
As of Fossil checkin f84a1539, the RBU code in the following C example is no longer executed to completion. Instead, an error message is generated and the result database is not correctly written. The code works fine with Fossil checkin 28091a48. It generates no error messages and produces the

[sqlite] fossildelta.c memory leak

2019-05-27 Thread Ralf Junker
I experience a memory leak in fossildelta.c using the delta_parse() table-valued function. Given this schema: CREATE TABLE t (x, y, d); INSERT INTO t VALUES (' + X'112233445566778899AABBCCDDEEFF', X'112233445566778899AABBCCDDEE11', Null);' + UPDATE t SET d = delta_create(x,

[sqlite] blobio.c error message typo

2019-05-27 Thread Ralf Junker
This readblob() error message "BLOB write failed" is misleading: https://www.sqlite.org/src/artifact?ln=79=085bbfa57ea58bb1 To me, "BLOB read failed" would make more sense in the readblob() context. Ralf ___ sqlite-users mailing list

Re: [sqlite] RBU conflicts with SQLITE_UNTESTABLE

2018-08-27 Thread Ralf Junker
On 8/25/2018 4:53 PM, Richard Hipp wrote: There are lots of similar situations, where omitting features from SQLite will break extensions that depend on those features. For example SQLITE_OMIT_VIRTUALTABLE will break FTS3, FTS4, FTS5, and RTREE, all of which depend on virtual tables.

[sqlite] RBU conflicts with SQLITE_UNTESTABLE

2018-08-25 Thread Ralf Junker
I am aware that the use of SQLITE_UNTESTABLE is discouraged. Still I want to point developers to the fact that SQLITE_UNTESTABLE breaks RBU. In particular, RBU relies on SQLITE_TESTCTRL_IMPOSTER to be fully working. With SQLITE_UNTESTABLE defined, this is not the case. RBU functions return

[sqlite] Memory leak in csv.c virtual table module

2018-04-24 Thread Ralf Junker
This SQL causes a memory leak in the csv.c virtual table module: CREATE VIRTUAL TABLE if not exists t1 USING csv(filename='FileDoesNotExists.csv'); Cause is that the zIn buffer which is allocated here: http://localhost:8081/artifact?name=1a009b93650732e2=128 is only freed in

Re: [sqlite] printf() problem padding multi-byte UTF-8 code points

2018-02-24 Thread Ralf Junker
On 18.02.2018 00:36, Richard Hipp wrote: So I'm not sure whether or not this is something that ought to be "fixed". I want to send a big Thank You! for your efforts to enhance the printf() string formatter: http://www.sqlite.org/src/info/c883c4d33f4cd722 I saw the check-in just now as I

Re: [sqlite] printf() problem padding multi-byte UTF-8 code points

2018-02-19 Thread Ralf Junker
On 19.02.2018 09:50, Rowan Worth wrote: What is your expected answer for: select length(printf ('%4s', 'です')) 'です' are 2 codepoints according to http://www.fontspace.com/unicode/analyzer/?q=%E3%81%A7%E3%81%99 The requested overall width is 4, so I would expect expect two added spaces

Re: [sqlite] printf() problem padding multi-byte UTF-8 code points

2018-02-19 Thread Ralf Junker
On 18.02.2018 00:36, Richard Hipp wrote: The current behavior of the printf() function in SQLite, goofy though it may be, exactly mirrors the behavior of the printf() C function in the standard library in this regard. SQLite3 is not C. SQLite3 text storage is always Unicode. Thus SQL text

[sqlite] printf() problem padding multi-byte UTF-8 code points

2018-02-17 Thread Ralf Junker
Example SQL: select length(printf ('%4s', 'abc')), length(printf ('%4s', 'äöü')), length(printf ('%-4s', 'abc')), length(printf ('%-4s', 'äöü')) Output is 4, 3, 4, 3. Padding seems to take into account UTF-8 bytes instead of UTF-8 code points. Should padding not work on code points

Re: [sqlite] sqlite 3.21.0 bug? SELECT CAST ('9223372036854775807 ' AS NUMERIC);

2018-01-23 Thread Ralf Junker
On 23.01.2018 15:31, Richard Hipp wrote: I'm still unable to reproduce this problem. sqlite3.exe from this ZIP: https://www.sqlite.org/2018/sqlite-tools-win32-x86-322.zip Running on Windows 7: SQLite version 3.22.0 2018-01-22 18:45:57 Enter ".help" for usage hints. Connected to a

[sqlite] zipfile.c: crc32 not calculated for uncompressed files - extraction fails

2018-01-16 Thread Ralf Junker
zipfile.c fails to calculate the CRC32 value if the compression method is explicitly set to 0. Example SQL: INSERT INTO zz(name, mode, mtime, data, method) VALUES('f.txt', '-rw-r--r--', 10, 'abcde', 0); As a result, a CRC32 value of 0 is written to the file. Some archive managers

Re: [sqlite] SELECT result different after ANALYZE

2017-11-21 Thread Ralf Junker
On 21.11.2017 15:36, Richard Hipp wrote: I'll be working on some other solution for you. Many thanks, but this is not necessary. I can rebuild from Fossil. Ralf ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] SELECT result different after ANALYZE

2017-11-20 Thread Ralf Junker
I am presenting a scenario where a SELECT produces a different result after running ANALYZE. To reproduce, download this database file (5.6MB, SHA1 12d1295d06327ee19ed2453517b0dd83233c6829, available for two days from now):

[sqlite] Closing parenthesis missing from doc comment

2017-07-28 Thread Ralf Junker
I believe, a closing parenthesis should be before the final comma in this line: http://www.sqlite.org/src/artifact/0e2603c23f0747c5?ln=4202 Ralf ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] json_valid() crash on Windows - was: json() number value parsing

2017-04-11 Thread Ralf Junker
SQLite on Windows crashes when running this test: n_structure_10_opening_arrays.json The crash results from a stack overflow because json_valid() is implemented using a recursive parser. All versions of json1.c up to current trunk are affected. Here is a small SQL snippet that also

[sqlite] json_patch(): null not removed with 2nd beta for SQLite 3.18.0.

2017-03-24 Thread Ralf Junker
On 24.03.2017 00:50, Richard Hipp wrote: This second beta adds a new SQL function: json_patch(). See https://www.sqlite.org/draft/json1.html#jpatch for details. json_patch() fails to produce the expected result for the last example in https://tools.ietf.org/html/rfc7396#appendix-A

Re: [sqlite] SQLITE_OMIT_BUILTIN_TEST renders fix for ticket [da784137] useless

2016-12-07 Thread Ralf Junker
On 07.12.2016 14:21, Richard Hipp wrote: Side note: I notice that the SQLite binaries (Windows, at least) are not compiled with SQLITE_OMIT_BUILTIN_TEST and not affected by the problem. Is there a reason to omit SQLITE_OMIT_BUILTIN_TEST from the builds, as it adds at least some overhead? >

[sqlite] SQLITE_OMIT_BUILTIN_TEST renders fix for ticket [da784137] useless

2016-12-07 Thread Ralf Junker
Alarming side effect of SQLITE_OMIT_BUILTIN_TEST: It renders the fix [005d5b87] for ticket [da784137] useless. Ticket: http://www.sqlite.org/src/info/da7841375186386c Fix, trunk: http://www.sqlite.org/src/info/005d5b870625d175 Fix, 3.15.2: http://www.sqlite.org/src/info/27438fb43db4eae9

Re: [sqlite] VACUUM causes Out of memory error

2016-11-02 Thread Ralf Junker
I am the author of the DISQLite3 Delphi wrapper. Assurance to all DISQLite3 users: The leak is not DISQLite3 specific. DISQLite3 5.15.0 behaves exactly like the official SQLite 3.15.0 release. The problem can reliably be reproduced using the official sqlite3.exe 3.15.0 binary on Win32.

[sqlite] Session documentation: Invalid link for sqlite3_changegroup

2016-09-16 Thread Ralf Junker
The invalid link is in red font. Reference: https://www.sqlite.org/sessionintro.html#extended_functionality Ralf ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] No messages from this list since outage

2016-08-03 Thread Ralf Junker
Since the previous mailing list outage, I was able to post to this list http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/msg98671.html http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/msg98672.html but I have not received any messages since. I have

[sqlite] #include - angle brackets instead of quotation marks

2016-08-01 Thread Ralf Junker
The files csv.c and vfsstat.c use #include with angle brackets http://www.sqlite.org/src/artifact/816a3715356e4210?ln=42 http://www.sqlite.org/src/artifact/bf10ef0bc51e1ad6?ln=17 where quotation marks are otherwise used throughout SQLite, i.e.

[sqlite] csv.c - Unicode filename failure (Windows, at least)

2016-08-01 Thread Ralf Junker
At current, the csv extension fails to open Unicode file names like CREATE VIRTUAL TABLE t1 USING csv( filename = "äöü.csv"); because internally the filename is passed to fopen() as UTF-8: http://www.sqlite.org/src/artifact/816a3715356e4210?ln=131 However, fopen() does not honor

Re: [sqlite] sqlite3_scrub_backup() -> database disk image is malformed

2016-07-28 Thread Ralf Junker
On 26.07.2016 12:53, Dan Kennedy wrote: The corrupt database thing is unexpected, of course. It might be fixed here: http://sqlite.org/src/info/483994a54dee3c7a Please let us know if you get the chance to try the fix above with your databases. I confirm that the fix solves the problem

[sqlite] sqlite3_scrub_backup() -> database disk image is malformed

2016-07-26 Thread Ralf Junker
I use the following C code to test sqlite3_scrub_backup() [1]. Unfortunately, it results in a malformed database disk image. Also, I am surprised that VACUUMing the original database produces a smaller file than sqlite3_scrub_backup(). Should they not be the same size? Is this a problem with

Re: [sqlite] sqlite3_scrub_backup() not mentioned in 3.14 release log

2016-07-24 Thread Ralf Junker
Absolutely, thanks for the catch! This link might be even better as it always points to the latest version on trunk: https://www.sqlite.org/src/artifact?ci=trunk=ext/misc/scrub.c Ralf On 24.07.2016 15:19, Simon Slavin wrote: By which you mean, of course,

[sqlite] sqlite3_scrub_backup() not mentioned in 3.14 release log

2016-07-24 Thread Ralf Junker
On 23.07.2016 17:16, Richard Hipp wrote: Look over the changes. Speak up loudly and quickly if you have any issues. http://127.0.0.1:8080/artifact/ea0903701e3ac02b sqlite3_scrub_backub() is not mentioned in the 3.14 draft release log nor documentation. * Will it be part of the next

Re: [sqlite] Conversion failure

2016-06-23 Thread Ralf Junker
If you are on Windows, you can use SQLiteSpy to correct such wrongly entered ANSI text to Unicode throughout an entire database: http://yunqa.de/delphi/products/sqlitespy/index Open the database and from the menu pick Execute -> Text to Unicode Convertsion ... A dialog opens where you

[sqlite] Debugging variable left in fts5_index.c?

2016-03-30 Thread Ralf Junker
These 2 lines seem to serve no purpose. Also, they are not indented like the reset of the code. This makes me think they might have been left in from debugging: http://www.sqlite.org/src/artifact/b271b19dd28d3501?ln=3819-3820 Ralf

[sqlite] FTS5 returns "corrupt" plus trailing zero

2015-09-21 Thread Ralf Junker
My implementation of http://www.sqlite.org/src/artifact/400384798349d658?ln=94-96 returns "corrupt" plus a trailing zero, that is 8 characters in total. Maybe this line http://www.sqlite.org/src/artifact/4fdbc0a321e3a1d7?ln=5364 should be corrected to sqlite3Fts5BufferSet(, , 7,

[sqlite] json1.c: isalnum(), isspace(), and isdigit() usage

2015-09-17 Thread Ralf Junker
On 17.09.2015 20:14, Scott Hess wrote: > The problem is that there are LOCALE settings where tolower() does things C > programmers don't expect. I think tr_TR was one case, the handling of 'I' > (Google "tr_tr locale bug" and you'll see lots of people hitting the same > general problem). It

[sqlite] json1.c: isalnum(), isspace(), and isdigit() usage

2015-08-26 Thread Ralf Junker
ext/misc/json1.c uses the following functions from the C library: isalnum(): http://www.sqlite.org/src/artifact/541004e47235cefc?ln=564 isspace(): http://www.sqlite.org/src/artifact/541004e47235cefc?ln=635 isdigit(): http://www.sqlite.org/src/artifact/541004e47235cefc?ln=829 Existing source code

[sqlite] queryplanner.html invalid links

2015-08-03 Thread Ralf Junker
https://www.sqlite.org/queryplanner.html contains the text "The process is illustrated by figure 2 below." where the "figure 2" part links to https://www.sqlite.org/queryplanner.html#fig2 DocSrc: https://www.sqlite.org/docsrc/artifact/ce9ee7160e98d868?ln=100 The link to the image does not

[sqlite] FTS5 Porter extra arguments not passed through

2015-07-30 Thread Ralf Junker
As per the documentation, extra arguments to the Porter stemmer are handed on to the underlying tokenizer: http://www.sqlite.org/docsrc/artifact/9eca0ea509ae3e4d?ln=544-546 Example syntax a few lines below: http://www.sqlite.org/docsrc/artifact/9eca0ea509ae3e4d?ln=556 However, the code

[sqlite] Access Violation in fts5_expr()

2015-07-29 Thread Ralf Junker
This SQL SELECT fts5_expr(); results in an AV here: https://sqlite.org/src/artifact/56dcbcbdc9029dd7?ln=145 Reason is that fts5ExprFunction() does not check for at least one argument to fts5_expr() here: http://sqlite.org/src/artifact/56dcbcbdc9029dd7?ln=1886 Ralf

[sqlite] FTS5 xColumnSize() documentation

2015-07-29 Thread Ralf Junker
From fts5aux.test 2.3 I conclude that the FTS5 xColumnSize() function accepts negative column values and returns the total token size of all columns from the current row: https://www.sqlite.org/src/artifact/8c687c948cc98e9a?ln=64-66 Indeed, this is also in source:

[sqlite] sqlite3rbu: void function returns value

2015-07-24 Thread Ralf Junker
Warning: sqlite3rbu.c 3528: void functions may not return a value in function rbuVfsDlClose. http://www.sqlite.org/src/artifact/d37e1ca2d13e439c?ln=3526-3529 Looks like the return value is not needed. Ralf

[sqlite] sqlite3rbu.c: ANSI C incomatible variable delcaration

2015-07-24 Thread Ralf Junker
sqlite3rbu.c intermingles variable declaration and code, which is not with ANSI C here: http://www.sqlite.org/src/artifact/d37e1ca2d13e439c?ln=623-624 Declaring zSql before calling va_start() solves the problem for me: char *zSql; va_start(ap, zFmt); zSql = sqlite3_vmprintf(zFmt, ap);

[sqlite] sqlite3rbu.c: Replace sprintf() with sqlite3_mprintf()

2015-07-24 Thread Ralf Junker
sqlite3rbu.c uses sprintf(), which SQLite3 uses nowhere else: http://www.sqlite.org/src/artifact/d37e1ca2d13e439c?ln=2643 Could you replace this with sqlite3_mprintf(), just like one function above? http://www.sqlite.org/src/artifact/d37e1ca2d13e439c?ln=2625-2628 Ralf

Re: [sqlite] 64 bits Dll

2014-05-09 Thread Ralf Junker
On 09.05.2014 13:50, Carlos Ferreira wrote: XE6 itself seems to native have access to both... FireDAC only, and outdated by 2 months at the day of release. Delphi XE5 SQLite is still at 3.7.17, almost one year behind. DISQLite3 has always been up to date for years and Delphi versions back

Re: [sqlite] 64 bits Dll

2014-05-09 Thread Ralf Junker
On 09.05.2014 12:36, Carlos Ferreira wrote: I am using a win32 DLL built "sqlite-dll-win32-x86-3071700" . the DLL is from 20-5-2013. I am using it with Delphi, and it works fine for what I need. I need however a 64 bits version of the DLL. SQLite3 for Delphi, both Win32 and Win64, with many

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-24 Thread Ralf Junker
On 24.01.2014 10:06, Max Vlasov wrote: BCC 5.5 (freely downloadable) compiles any version of sqlite3 to object files linkable to Delphi 5 and later, the only drawback I noticed is that for memory-intensive operations (memory databases) the performance is twice as worst comparing to the dll on

Re: [sqlite] latest sqlite 3 with Delphi 5 professional

2014-01-23 Thread Ralf Junker
On 23.01.2014 11:28, dean gwilliam wrote: More specifically...is there the equivalent of that powerbasic include file for D5 i.e. that enables you to access the dll's function calls unchanged? Failing that...anything that will let me work with the latest sqlite 3 dll The meaner and leaner...the

[sqlite] SQLITE_OMIT_FLAG_PRAGMAS issue: sqlite3_busy_timeout() called for all flag pragmas

2013-10-21 Thread Ralf Junker
SQLite 3.8.1 compiled with SQLITE_OMIT_FLAG_PRAGMAS #defined calls sqlite3_busy_timeout() for all flag pragmas. Example: PRAGMA legacy_file_format=100; should do nothing but sets sqlite3_busy_timeout(db, 100); The change was introduced here:

Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-10 Thread Ralf Junker
On 10.10.2013 03:53, Richard Hipp wrote: I think that http://www.sqlite.org/src/info/e97d7d3044 fixes this issue. Works well for me. Please correct me if I've missed something. You committed to the "row-size-est" branch. I guess this will be merged into "trunk" for 3.8.1? Ralf

Re: [sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-09 Thread Ralf Junker
On 09.10.2013 15:50, Eric Minbiole wrote: With this change, tests pass again: #if sizeof(p->nRow) == sizeof(long long) sqlite3_snprintf(24, zRet, "%lld", p->nRow); #elseif sizeof(p->Row) = sizeof(long) sqlite3_snprintf(24, zRet, "%ld", p->nRow); #else

[sqlite] Bug: analyze.c does not honor SQLITE_64BIT_STATS

2013-10-09 Thread Ralf Junker
analyze.c always prints 32-bit variables as 64-bit here: http://www.sqlite.org/src/artifact/d322972af09e3f8debb45f420dfe3ded142b108b?ln=746 http://www.sqlite.org/src/artifact/d322972af09e3f8debb45f420dfe3ded142b108b?ln=792 This can cause wrong sqlite_statX tables which I have experienced

Re: [sqlite] Hints for the query planner

2013-09-11 Thread Ralf Junker
On 11.09.2013 16:07, Ryan Johnson wrote: Perhaps you meant "demote" rather than "degrade" ? That would be a better fit (an external action that does not necessarily make the object worse or less useful), and less vague, but it still carries a negative connotation. "demote" sounds fine to me,

Re: [sqlite] Hints for the query planner

2013-09-11 Thread Ralf Junker
I suggest a verb to express what the function is actually doing, namely to reduce its argument in rank or degree for the query planner: DEGRADE 1. to reduce in worth, character, etc; disgrace; 2. to reduce in rank, status, or degree; remove from office; 3. to reduce in strength, quality,

Re: [sqlite] A few questions about SQLite Encryption Extension

2013-07-19 Thread Ralf Junker
On 19.07.2013 15:27, Sqlite Dog wrote: >> * Statically link SQLite to your Delphi application. My DISQLite3 >> enables you to do just that and has numerous extensions: One is a >> custom encryption algorithm. This is not compatible with SEE, >> but if you like I can replace it with your

Re: [sqlite] A few questions about SQLite Encryption Extension

2013-07-19 Thread Ralf Junker
On 19.07.2013 09:21, Sqlite Dog wrote: > Our database manager is developed using Delphi (Pascal). Thus it is > not possible to statically link SQLite library, SQLite.dll is used. > Is there some other way to support SEE in our project? You have two options: * Create your own sqlite.dll and

Re: [sqlite] False Error 'no such collation sequence'

2013-06-20 Thread Ralf Junker
On 21.06.2013 05:10, Tom Holden wrote: > Ralf Junker ralfjunker at gmx.de Thu Jun 20 18:44:15 EDT 2013 wrote: > > On 19.06.2013 17:18, Tom Holden wrote: > >> I use the SQLiteSpy compilation of SQLite3 which recently upgraded >> from pre SQLite 3.7.8 to pre 4.2.0. &

Re: [sqlite] False Error 'no such collation sequence'

2013-06-20 Thread Ralf Junker
On 19.06.2013 17:18, Tom Holden wrote: > I use the SQLiteSpy compilation of SQLite3 which recently upgraded > from pre SQLite 3.7.8 to pre 4.2.0. You must be mistaken. As the author of SQLiteSpy, I can clearly say that there is no SQLiteSpy version 3.7.8 nor 4.2.0. The current version is

[sqlite] Security concern with new fts3tokenize virtual table

2013-05-07 Thread Ralf Junker
The new fts3tokenize virtual table calls the fts3_tokenizer() SQL function internally to retrieve the pointer to the tokenizer implementation for a FTS table: http://www.sqlite.org/src/artifact/a29f126b9e6c6a6f1021a8f7440bf125e68af1f9?ln=74-100 However, this call is rejected if, for security

[sqlite] amatch extension

2013-05-02 Thread Ralf Junker
I am unsure about how the amatch extension works. According to the documentation, I believe that the SQL below should return at least one record, but it does not. No errors are reported either. I compiled the shell executable with the 201304290917 draft amalgamation and today's amatch.c from

Re: [sqlite] Version 3.7.17 Preview

2013-05-02 Thread Ralf Junker
Current trunk still does not compile with SQLITE_OMIT_WAL #defined. Details here: http://www.mail-archive.com/sqlite-users@sqlite.org/msg76672.html Ralf On 26.04.2013 17:34, Richard Hipp wrote: > Please visit http://www.sqlite.org/draft/releaselog/3_7_17.html to see the > proposed

[sqlite] pager.c does not compile with SQLITE_OMIT_WAL

2013-04-25 Thread Ralf Junker
The current SQLite Fossil snapshot does not compile with SQLITE_OMIT_WAL defined. Reason: The Pager->pWal element is compiled out in pager.c here: http://www.sqlite.org/src/artifact/6c3a8a5d665498b0344395a2c9f82d5abc4cc771?ln=691-694 but still accessed here:

[sqlite] Link pragma.html#pragma_user_version invalid

2012-12-10 Thread Ralf Junker
In the list of PRAGMAs in pragma.html the "PRAGMA user_version" documentation link to http://www.sqlite.org/pragma.html#pragma_user_version is invalid. It should point to http://www.sqlite.org/pragma.html#pragma_schema_version instead. This is also present in today's documentation

[sqlite] AsyncIO fails with current 3.7.15 trunk

2012-12-06 Thread Ralf Junker
I know that AsyncIO is now superseded by WAL [1], but according to Richard it should still work for existing applications [2]. However, I experience the opposite. The small C application below runs well when linked against SQLite 3.7.14. With SQLite 3.7.15, it mysteriously fails. I see two types

Re: [sqlite] Async IO in SQLite 3.7.15

2012-12-04 Thread Ralf Junker
On 04.12.2012 22:25, Richard Hipp wrote: >> My question is if existing applications which Async IO should continue >> to work with SQLite 3.7.15? Or has something in the SQLite core changed >> so that you'd expect Async IO failures in 3.7.15, or later versions? > > They should continue to work,

Re: [sqlite] Async IO in SQLite 3.7.15

2012-12-04 Thread Ralf Junker
On 04.12.2012 22:14, Richard Hipp wrote: >> Does this also mean that it will no longer be working with SQLite >> 3.7.15? Is it just deprecated for new development? Or has something else >> changed that I should take care of? > > That means that we are not willing to devote large amounts of time

[sqlite] Async IO in SQLite 3.7.15

2012-12-04 Thread Ralf Junker
I experience problems with Async IO testing the latest 3.7.15 trunk. Simple statements like CREATE TABLE fail with SQLITE_IOERR. I read the note in the Async IO README.txt that Async IO is now superceded by WAL mode and no longer maintained. Does this also mean that it will no longer be working

Re: [sqlite] How to restore from backup or alter db in multi-user envionment?

2012-12-02 Thread Ralf Junker
On 02.12.2012 04:37, Simon Slavin wrote: >> I'm using DISQLite and the online api in delphi, not the command >> line thing. > > I have seen some bad drivers which assume that underlying schema will > not be changed by another user while they have a database connection > open. I have no reason to

Re: [sqlite] Detecting when a table is created

2012-06-26 Thread Ralf Junker
On 26.06.2012 14:33, Vivien Malerba wrote: > The code is some SQL entered by the user, I have no control over it. There > is effectively the possibility to parse the SQL entered, detect the CREATE > table statement and act accordingly, but I would like to see if SQLite has > some kind of builtin

[sqlite] SQLITE_OPEN_CREATE required by named memory database?

2012-05-30 Thread Ralf Junker
Testing SQLite Fossil [0abdc2903d], sqlite_open_v2() returns SQLITE_PERM when trying to open a named memory database if the flag SQLITE_OPEN_CREATE is not passed. This is in contrast to unnamed memory databases. Is this intentional? Basic C code below demonstrates the issue. Ralf

[sqlite] Documentation glitch: Repeated "or" ...

2012-05-29 Thread Ralf Junker
... at both end and beginning of these lines: http://www.sqlite.org/src/artifact/45a846045ddb8c4318f2919f3a70f011df5ca783?ln=2584-2585 Ralf ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Details on New Features

2012-05-04 Thread Ralf Junker
On 04.05.2012 16:39, Richard Hipp wrote: > If a single min() or max() aggregate function appears in a query, then any > other columns that are not contained within aggregate functions and that > are not elements of the GROUP BY will take values from one of the same rows > that satisfied the one

Re: [sqlite] SQLITE3 64-bit version

2012-04-27 Thread Ralf Junker
On 27.04.2012 15:08, Gabriel Corneanu wrote: > With the amalgamation, it's also quite easy to compile to one obj and > link directly in Delphi (similar to jpeg; that's probably what you also > do). No pun intended, why should I pay for it? - DISQLite3 Personal edition if free! - DISQLite3 is

Re: [sqlite] SQLITE3 64-bit version

2012-04-27 Thread Ralf Junker
On 27.04.2012 11:38, Gabriel Corneanu wrote: > There is one more reason to use DLLs, I'm surprised noone mentioned it. > What if you don't use C??? (I use myself Delphi with a header conversion). DISQLite3 compiles right into your Delphi application. Both 32-bit and 64-bit supported:

Re: [sqlite] What do people think of SQLite Root?

2012-03-05 Thread Ralf Junker
On 05.03.2012 18:45, Rob Richardson wrote: > I can't get to www.yunqa.de now. I tried in IE8 and FireFox. Most strange. Luckily, search engines find plenty of SQLiteSpy download alternatives. Here is one of the more well known ones:

Re: [sqlite] What do people think of SQLite Root?

2012-03-05 Thread Ralf Junker
On 05.03.2012 16:11, Rob Richardson wrote: > With the latest version, I think you can. SQLiteSpy grid editing has been around for years, it is available since version 1.6.0., 7 Feb 2007. > But I haven't been able to get the latest version. The link you > provided does not work for me. Do you

Re: [sqlite] What do people think of SQLite Root?

2012-03-05 Thread Ralf Junker
On 05.03.2012 14:50, Rob Richardson wrote: > I keep hoping to find something better, because SQLiteSpy does not > offer the ability to edit a table inside a grid. Not quite true. SQLiteSpy can edit table cells inside a grid. Double-click the table-icon in the schema treeview to display the

Re: [sqlite] multiple rows of VALUES in an INSERT incompatible with SQLITE_OMIT_COMPOUND_SELECT

2012-02-13 Thread Ralf Junker
On 13.02.2012 10:18, Dan Kennedy wrote: > On 02/10/2012 11:06 PM, Ralf Junker wrote: >> >>> The new feature to insert multiple rows of VALUES in a single INSERT >>> >>>http://www.sqlite.org/src/info/eb3b6a0ceb >>>

Re: [sqlite] multiple rows of VALUES in an INSERT incompatible with SQLITE_OMIT_COMPOUND_SELECT

2012-02-10 Thread Ralf Junker
On 07.02.2012 12:28, Ralf Junker wrote: > The new feature to insert multiple rows of VALUES in a single INSERT > > http://www.sqlite.org/src/info/eb3b6a0ceb > > gives wrong results if SQLite is compiled with SQLITE_OMIT_COMPOUND_SELECT. Has the team seen this or has it been ov

[sqlite] multiple rows of VALUES in an INSERT incompatible with SQLITE_OMIT_COMPOUND_SELECT

2012-02-07 Thread Ralf Junker
The new feature to insert multiple rows of VALUES in a single INSERT http://www.sqlite.org/src/info/eb3b6a0ceb gives wrong results if SQLite is compiled with SQLITE_OMIT_COMPOUND_SELECT. Example: CREATE TABLE t10(a,b,c); INSERT INTO t10 VALUES(1,2,3), (4,5,6), (7,8,9); SELECT * FROM

[sqlite] sqlite3_db_release_memory(): Return value undocumented.

2012-01-16 Thread Ralf Junker
Reading the sources, sqlite3_db_release_memory() always returns SQLITE_OK. Will it stay this way or will it some day return another value like the amount of memory released? Ralf ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] sqlite3_uri_int64() doc error

2012-01-16 Thread Ralf Junker
The sqlite3_uri_int64() doc reads: "If the value of P is something other than an integer, then zero is returned." I found this to be not true. Instead, it returned default. Ralf ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Multiplex VACUUM fails to delete chunks on Windows

2011-07-23 Thread Ralf Junker
VACUUM with multiplex does not delete chunks on Windows (fossil [8ce2b74a82]). It seems this is because the file handle(s) are still held open by the multiplex layer when xDelete is triggered. Since Windows can not delete open files, they are kept. I have not investigated this in depth, but

[sqlite] test/exists.test 2.$tn.1 fails if both DBs are in WAL mode

2011-04-10 Thread Ralf Junker
For me, this test from test/exists.test fails if both database connections are opened in WAL mode, that is if "PRAGMA journal_mode=WAL" is issued right after each DB is opened. # TABLE objects. # do_test{ sql1 { DROP TABLE IF EXISTS t1 } sql2 { CREATE TABLE t1(x) } sql1

Re: [sqlite] test/exists.test 2.$tn.1 fails if both DBs are in WAL mode

2011-04-10 Thread Ralf Junker
The test passes well if I recreate the database file anew just prior to running it so it acts upon an empty database. If this is what is intended, I apologize for the false alarm. Ralf On 10.04.2011 10:28, Ralf Junker wrote: > For me, this test from test/exists.test fails if both datab

[sqlite] test/exists.test 2.$tn.1 fails if both DBs are in WAL mode

2011-04-10 Thread Ralf Junker
For me, this test from test/exists.test fails if both database connections are opened in WAL mode, that is if "PRAGMA journal_mode=WAL" is issued right after each DB is opened. # TABLE objects. # do_test{ sql1 { DROP TABLE IF EXISTS t1 } sql2 { CREATE TABLE t1(x) } sql1

Re: [sqlite] Extremely large values error

2011-03-29 Thread Ralf Junker
internal (*.obj) and extenal (*.dll). Visit the DISQLite3 Internet site for latest information and updates: http://www.yunqa.de/delphi/ Copyright (c) 2011 Ralf Junker, Delphi Inspiration <del...@yunqa.de> ---

[sqlite] Doc errors: Too many "checked out." in Status Parameters for database connections

2011-02-01 Thread Ralf Junker
There are far too many "checked out." in the following docs, probably left-overs from copy-paste operations: ** ^(SQLITE_DBSTATUS_LOOKASIDE_HIT ** This parameter returns the number malloc attempts that were ** satisfied using lookaside memory. Only the high-water value is meaningful; ** the

[sqlite] Bug? 3.7.5 RC2 FTS4 division by zero exception

2011-01-31 Thread Ralf Junker
This SQL: drop table if exists t11; CREATE VIRTUAL TABLE t11 USING fts4; INSERT INTO t11 VALUES('quitealongstringoftext'); INSERT INTO t11 VALUES('anotherquitealongstringoftext'); UPDATE t11_stat SET value = X''; SELECT matchinfo(t11, 'nxa') FROM t11 WHERE t11 MATCH 'a*'; leads

[sqlite] FTS3 + SQLITE_OMIT_PAGER_PRAGMAS causes division by zero exception

2010-12-22 Thread Ralf Junker
Recent changes to FTS3 apparently require that SQLite must be compiled with pager pragmas, otherwise FTS3 will cause a division by zero exception as I have experienced right now. This means that the FTS3 extension can crash an application if the core SQLite library is compiled with

[sqlite] Check-in [876845661a] incomplete

2010-09-17 Thread Ralf Junker
Check-in [876845661a] (http://www.sqlite.org/src/info/876845661a) is incomplete: fts2_tokenizer.c still contains calls to isalnum() and tolower() for FTS2. FTS1 also #includes , just in case you care to remove it from SQLite completely. The changes are just like for FTS2. Ralf

Re: [sqlite] is there a program that converts sqlite database from windows-1252 to utf-8 ?

2010-09-13 Thread Ralf Junker
On 11.09.2010 20:42, Stef Mientki wrote: > is there a program that converts sqlite database from windows-1252 to utf-8? Yes, SQLiteSpy does this: * Open database file * Menu Execute -> Text to Unicode Conversion. * Select tables and columns to convert. * Choose database codepage. * Press OK to

Re: [sqlite] rollback to savepoint regression / bug with journal_mode=off and locking_mode=exclusive

2010-08-27 Thread Ralf Junker
On 27.08.2010 18:58, Noah Hart wrote: > http://www.sqlite.org/pragma.html#pragma_journal_mode states > > The OFF journaling mode disables the atomic commit and rollback capabilities > of SQLite. The ROLLBACK command no longer works; it behaves in an undefined > way. Applications must avoid using

[sqlite] rollback to savepoint regression / bug with journal_mode=off and locking_mode=exclusive

2010-08-27 Thread Ralf Junker
SQLite 3.7.2 has a regression with journal_mode=off and locking_mode=exclusive. Here is the SQL reproduce: drop table if exists t1; PRAGMA locking_mode=exclusive; pragma locking_mode; CREATE TABLE t1(a PRIMARY KEY, b); PRAGMA journal_mode = off; BEGIN; INSERT INTO t1 VALUES(13,

[sqlite] Different error message after sqlite3_reset() or sqlite3_finalize()

2010-06-01 Thread Ralf Junker
Related to constraint violations, an error message returned by sqlite3_errmsg() changes to the better after calling sqlite3_reset() or sqlite3_finalize(). Example code is below, here is the output: sqlite3_step: 19 constraint failed sqlite3_reset:19 t.c may not be NULL

[sqlite] UPDATE VIEW ... LIMIT 1; -- apparently no effect?

2010-05-27 Thread Ralf Junker
This is SQLite 3.6.23.1 compiled with SQLITE_ENABLE_UPDATE_DELETE_LIMIT (plus a few others, which should not matter to the problem). The UPDATE ... LIMIT clause works fine when applied to tables, but suppresses any updates when applied to a view with an update trigger. Here is some example

[sqlite] SUBSTR overload and ALTER TABLE

2010-04-10 Thread Ralf Junker
We just experienced the hard way that overloading certain built-in SQL function can interfere with core SQL commands if the overloaded function behaves differently from the built-in function. Not surprising, after looking at the sources: * ALTER TABLE - alter.c uses SUBSTR and LIKE. * VACUUM

Re: [sqlite] FTS3 bug with MATCH plus OR

2010-03-04 Thread Ralf Junker
Thanks to both Scott and Dan for your answers! Ralf ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] FTS3 bug with MATCH plus OR

2010-03-03 Thread Ralf Junker
The recent changes to FTS3 fixed a long standing problem with MATCH and AND operators combined. Take this schema: drop table if exists myfts; create virtual table myfts using fts3 (a); insert into myfts values ('one'); insert into myfts values ('two'); This following query produced an "unable

[sqlite] sqlite3BtreeSetPageSize() compile error with SQLITE_OMIT_PAGER_PRAGMAS and SQLITE_OMIT_VACUUM

2010-03-02 Thread Ralf Junker
The current Fossil trunk [dd4962aa34] does not compile with both * SQLITE_OMIT_PAGER_PRAGMAS * SQLITE_OMIT_VACUUM enabled. These defines exclude btree.c sqlite3BtreeSetPageSize(), but it is still referenced from build.c. The problem was introduced by Check-in [5dcfb0c9e4]: "Make the TEMP file

  1   2   3   >