[sqlite] How can custom tokenizer tell it's parsing a search string?

2018-12-11 Thread Jens Alfke
Is there any way for a custom FTS4 tokenizer to know when it’s tokenizing a 
search string (the argument of a MATCH expression), as opposed to text to be 
indexed?

Here’s my problem: I’ve implemented a custom tokenizer that skips “stop words” 
(noise words, like “the” and “a” in English.) It works well. But I’ve just 
gotten a bug report that some search strings with wild-cards don’t work. For 
example, “mo* AND the*” would be expected to match text containing the words 
“Moog” and “theremin”, but instead the query fails with the SQLite error 
"malformed MATCH expression: [mo* AND the*]”.

The reason for the error is that when the query runs, FTS4 uses my tokenizer to 
break the search string into words. My tokenizer skips “the” because it’s a 
stop word, so the sequence of tokens FTS4 gets is “mo”, “*”, “AND”, “*” … which 
is invalid since there’s no prefix before the second “*”.

I can fix this by preserving stop-words when the tokenizer is being used to 
scan the search string. But I can’t find any way for the tokenizer to tell the 
difference! It’s the same tokenizer instance used for indexing, and the SQLite 
function getNextToken opens it in the normal way and calls its xNext function.

The best workaround I can think of is to make the tokenizer preserve a 
stop-word when it’s followed by a “*” … but there are contexts where this can 
happen in regular text being indexed, when the “*” is a footnote marker or the 
end of a Markdown emphasis sequence.

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


Re: [sqlite] Allow inclusion of generate_series function

2018-12-11 Thread sub sk79
Hi,

I think both your requirements and Dr Hipp's point-of-view are valid if we
continue to see SQLite as just a tool. Yes, SQLite is an amazing tool for
all the things it does and especially for a great design which almost never
stands in the way of user customization and extension.
However, SQLite's user base has grown so much that it should not be seen
just as a tool but also as a business with multiple use-cases to which it
is applied.

The question of which features to enable by default to please everyone is
not answerable if one continues to see it as a tool.
However, if seen as a business, there may be a solution possible. The
canonical way businesses approach this is to rely on its ecosystem  -
partners, resellers, app-stores etc. Such an approach is a win-win-win for
core-tool-builder (by helping keep focus on key-features), customers
(getting niche features without breaking a sweat) and partners. But this
approach needs a willingness to nurture the ecosystem by providing , as
needed, tech support, access to paying customer lists with niche
requirements, funding, guidance etc - possibly in exchange for a cut and
strong control over ecosystem tool's testing, metrics etc - in short, a
Partner Program.

I built one such SQLite ecosystem solution called StepSqlite - an advanced
PL/SQL compiler  which is backward compatible with subset of Oracle-TM
PL/SQL. It is full of features which will blow your mind - one of the
features, relevant here, is automatic detection and setting of SQLite
pragmas and extensions  based on user code. You simply write PL/SQL-like
code for DB access and StepSqlite customizes a SQLite library baked with
your code(translated to C++) and make it available to you as a shared
library for download which can be used in your app(s) - which in turn can
be written in any major client language and for any major OS without any
bridge-layer (No JDBC-ODBC etc needed). I designed it specifically to
target requirements like your's:

> Without risk of bringing malware from other downloads.
> Without the hassle of rebuilding it every time I need a new version.
> Without having to remember one or two years later upon ...
> Consistent across machines...
>

There are several such power features in StepSqlite (Pls. see this Google
doc link for a list of StepSqlite features:
https://docs.google.com/document/d/1037VTdEhuGYi8D6vVQ2KOD86fn9-qt4WVYVos9lpBqE/edit?usp=sharing)
- I even  added window-functions one year before SQLite core - and IMHO, is
still a better value than core-version (because it works on older SQLite
versions using just CTE , does not add complexity to core, has more
included window-functions and is dead-easy to write custom ones. for ex,

FUNCTION MyAvg(val float) RETURN float
ANALYTIC is sum(val)/count(val);

Needless to say, IMO, StepSqlite has a great value proposition but I am
having a hard time funding it myself and reaching a critical mass of
customers.
If SQLite had a partner program I could bring it to market much faster and
it would be a win-win-win instead of loose-loose-loose (SQLite core gets
bulky loosing its key USP)-(users get upset because the required features
take a lot of hand-customization)-(well-wishing potential partners like me
languish).

And I am just one such ecosystem solution of many: there are other great
ones: for ex, bedrockdb, litereplica etc which would probably benefit from
a well defined SQLite partner program.

In any case, that would be my go-to solution for the issue at hand: SQLite
partner program.

Best Regards,
S Kashikar



On Tue, Dec 11, 2018 at 6:47 AM Digital Dog  wrote:

> On Thu, Dec 6, 2018 at 8:06 PM Keith Medcalf  wrote:
>
> The issue is not limited to generate_series (although that one seems to be
> pain point for many users). ... Projects using these platforms require
> custom builds of sqlite
> anyway.
>
> The ability to download and immediately start working with a really
> capable shell.
> Without risk of bringing malware from other downloads.
> Without the hassle of rebuilding it every time I need a new version.
> Without having to remember one or two years later upon returning to a
> stuff that
> need changes that there was a custom built sqlite shell there.
> Consistent across machines, because it was just downloaded from official
> download site.
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE gives incorrect results for 'NOT IN' query if partial index exists

2018-12-11 Thread Luuk


On 11-12-2018 10:09, Wout Mertens wrote:

Hi Luuk,

Not sure if you realize this, but your email comes over as very aggressive,
and if there's one person on this mailing list that doesn't deserve that,
it's dr Hipp.

In particular, the quotes around forgot seem to imply that it was forgotten
on purpose.

Personally, I would have worded it as "I looked at the test and I wonder if
this test case is addressed". Email communication is easy to misconstrue…

Cheers,

Wout.



Sorry, again sorry,

it must have been an interlingual misphrased wording of /me  ;)

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


Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Hick Gunter
Diagnosis is quite straightforward: If you can reproduce the problem by running 
your statements in the SQLite shell, then there is a problem in SQLite. If not, 
then it is caused by the wrapper.

The wrapper having a commit method is a strong indication that it has an 
internal model of SQLite transactions and you cannot tell when it is calling 
which of the SQLite interface functions.

As you are running Linux, you should have a debugger available (gdb perhaps) so 
you can connect to your process in the hung state and dump a backtrace. If you 
can compile your own SQLite image for debugging, you may even be able to tell 
which source code line the process is hanging at.

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Aydin Ozgur Yagmur
Gesendet: Dienstag, 11. Dezember 2018 15:14
An: SQLite mailing list 
Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up

I have already been upgrading sqlite version. After this If I encounter with 
the same problem I will inform you..
For Hick Gunter
I'm sorry for the inconveinence.
I have been using C++.
I have been using some kind of wrapper : yes.
Operating system (cat /proc/version): Linux version 
3.17.0-xilinx-00016-g9d68a4a-dirty
I cannot reproduce the problem as I already said I have encountered such an 
error for the first time. But i'm sure that the wrapper cannot cause such a 
problem.

For Simon Slavin
Ok, if i encounter with same problem, I will use command shell, enter pragma 
command and after that I will execute analyze command.


If you have any idea which may cause to this problem please let me know.
Thank you very much for your help.
Best regards




On Tue, Dec 11, 2018 at 4:39 PM Hick Gunter  wrote:

> Obviously you are using some kind of wrapper and a currently
> undisclosed programming language running under some OS you have
> neglected to name to call SQLite.
>
> Without the aid of a debugger, it will not even be possible to discern
> if the problem is in SQLite itself or the wrapper code you are using.
>
> Can you provide a simple schema and a query that exhibits the problem?
> Can you reproduce the problem by running the statements from the SQLite shell?
>
> In 5 posts so far, you have volunteered practically no information at
> all, which severely limits the amount of help you can be provided with.
>
> -Ursprüngliche Nachricht-
> Von: sqlite-users
> [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Aydin Ozgur Yagmur
> Gesendet: Dienstag, 11. Dezember 2018 14:20
> An: SQLite mailing list 
> Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
>
> *Ist hat always the same location or is it maybe running in a loop? Is
> it always the same statement that "hangs"? *
> >>>
> I use sqlite for more than 3 years, i encouter such an error for the
> first time. That is, no.
> *Can you check what the thread is doing with a debugger? *
> >>>
> I have been logging the situation.
> log--> before commit
>   sqlitetx->commit();
> log--> after commit
> i can see "before commit" log but cannot see "after commit" log.
>
>
>
> On Tue, Dec 11, 2018 at 3:48 PM Hick Gunter  wrote:
>
> > That answers question 2. What about the thread? Can you check what
> > the thread is doing with a debugger? Ist hat always the same
> > location or is it maybe running in a loop? Is it always the same
> > statement that
> "hangs"?
> >
> > -Ursprüngliche Nachricht-
> > Von: sqlite-users
> > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > Im Auftrag von Aydin Ozgur Yagmur
> > Gesendet: Dienstag, 11. Dezember 2018 13:43
> > An: SQLite mailing list 
> > Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
> >
> > I am trying to edit the database using command shell.
> > for instance i try to execute analyze commad i get "database is locked"
> > message
> >
> > On Tue, Dec 11, 2018 at 1:36 PM Hick Gunter  wrote:
> >
> > > If you have only one thread accessing the database, how do you
> > > determine that it is hanging and that the database is locked?
> > >
> > > -Ursprüngliche Nachricht-
> > > Von: sqlite-users
> > > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > > Im Auftrag von Aydin Ozgur Yagmur
> > > Gesendet: Dienstag, 11. Dezember 2018 11:31
> > > An: SQLite mailing list 
> > > Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
> > >
> > > I set busy-timeout 1000 ms. I have been using threads but only one
> > > thread can access to database.
> > > I will upgrade sqlite version as soon as possible. Could this lead
> > > to that problem?
> > >
> > > On Tue, Dec 11, 2018 at 12:11 PM Hick Gunter  wrote:
> > >
> > > > You are leaving out a lot of necessary detail. Are you using threads?
> > > > Does each thread have it's own connection or are you sharing
> > > > connections? Did you set a busy timeout?
> > > >
> > > > BTW: Your Version of SQLiteis quite old.
> > > >
> > > > -Ursprüngliche Nachricht-
> > 

Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Aydin Ozgur Yagmur
I have already been upgrading sqlite version. After this If I encounter
with the same problem I will inform you..
For Hick Gunter
I'm sorry for the inconveinence.
I have been using C++.
I have been using some kind of wrapper : yes.
Operating system (cat /proc/version): Linux version
3.17.0-xilinx-00016-g9d68a4a-dirty
I cannot reproduce the problem as I already said I have encountered such an
error for the first time. But i'm sure that the wrapper cannot cause such a
problem.

For Simon Slavin
Ok, if i encounter with same problem, I will use command shell, enter
pragma command and after that I will execute analyze command.


If you have any idea which may cause to this problem please let me know.
Thank you very much for your help.
Best regards




On Tue, Dec 11, 2018 at 4:39 PM Hick Gunter  wrote:

> Obviously you are using some kind of wrapper and a currently undisclosed
> programming language running under some OS you have neglected to name to
> call SQLite.
>
> Without the aid of a debugger, it will not even be possible to discern if
> the problem is in SQLite itself or the wrapper code you are using.
>
> Can you provide a simple schema and a query that exhibits the problem? Can
> you reproduce the problem by running the statements from the SQLite shell?
>
> In 5 posts so far, you have volunteered practically no information at all,
> which severely limits the amount of help you can be provided with.
>
> -Ursprüngliche Nachricht-
> Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Aydin Ozgur Yagmur
> Gesendet: Dienstag, 11. Dezember 2018 14:20
> An: SQLite mailing list 
> Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
>
> *Ist hat always the same location or is it maybe running in a loop? Is it
> always the same statement that "hangs"? *
> >>>
> I use sqlite for more than 3 years, i encouter such an error for the first
> time. That is, no.
> *Can you check what the thread is doing with a debugger? *
> >>>
> I have been logging the situation.
> log--> before commit
>   sqlitetx->commit();
> log--> after commit
> i can see "before commit" log but cannot see "after commit" log.
>
>
>
> On Tue, Dec 11, 2018 at 3:48 PM Hick Gunter  wrote:
>
> > That answers question 2. What about the thread? Can you check what the
> > thread is doing with a debugger? Ist hat always the same location or
> > is it maybe running in a loop? Is it always the same statement that
> "hangs"?
> >
> > -Ursprüngliche Nachricht-
> > Von: sqlite-users
> > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > Im Auftrag von Aydin Ozgur Yagmur
> > Gesendet: Dienstag, 11. Dezember 2018 13:43
> > An: SQLite mailing list 
> > Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
> >
> > I am trying to edit the database using command shell.
> > for instance i try to execute analyze commad i get "database is locked"
> > message
> >
> > On Tue, Dec 11, 2018 at 1:36 PM Hick Gunter  wrote:
> >
> > > If you have only one thread accessing the database, how do you
> > > determine that it is hanging and that the database is locked?
> > >
> > > -Ursprüngliche Nachricht-
> > > Von: sqlite-users
> > > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > > Im Auftrag von Aydin Ozgur Yagmur
> > > Gesendet: Dienstag, 11. Dezember 2018 11:31
> > > An: SQLite mailing list 
> > > Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
> > >
> > > I set busy-timeout 1000 ms. I have been using threads but only one
> > > thread can access to database.
> > > I will upgrade sqlite version as soon as possible. Could this lead
> > > to that problem?
> > >
> > > On Tue, Dec 11, 2018 at 12:11 PM Hick Gunter  wrote:
> > >
> > > > You are leaving out a lot of necessary detail. Are you using threads?
> > > > Does each thread have it's own connection or are you sharing
> > > > connections? Did you set a busy timeout?
> > > >
> > > > BTW: Your Version of SQLiteis quite old.
> > > >
> > > > -Ursprüngliche Nachricht-
> > > > Von: sqlite-users
> > > > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > > > Im Auftrag von Aydin Ozgur Yagmur
> > > > Gesendet: Dienstag, 11. Dezember 2018 09:53
> > > > An: SQLite mailing list 
> > > > Betreff: [EXTERNAL] [sqlite] Transaction commits hangs up
> > > >
> > > > I have been using sqlite3.8.11 on fat32 file system. Sometimes,
> > > > while committing a transaction commit process hangs up and
> > > > database became locked. I am trying to find a cause or a solution
> > > > for this
> > problem.
> > > > Does anyone encounter with similar problem before? Do you have any
> > > > suggestion or any idea for this problem?
> > > >
> > > > Thank you,
> > > > yagmur
> > > > ___
> > > > sqlite-users mailing list
> > > > sqlite-users@mailinglists.sqlite.org
> > > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-use
> > > > rs
> > > >
> > > >
> > > > 

Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Simon Slavin
On 11 Dec 2018, at 1:21pm, Aydin Ozgur Yagmur  wrote:

> No, I did not use it.

Then use it.  By default, timeout is not set.  If you do not set a timeout, any 
clash will cause the error you are seeing.



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


Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Hick Gunter
Obviously you are using some kind of wrapper and a currently undisclosed 
programming language running under some OS you have neglected to name to call 
SQLite.

Without the aid of a debugger, it will not even be possible to discern if the 
problem is in SQLite itself or the wrapper code you are using.

Can you provide a simple schema and a query that exhibits the problem? Can you 
reproduce the problem by running the statements from the SQLite shell?

In 5 posts so far, you have volunteered practically no information at all, 
which severely limits the amount of help you can be provided with.

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Aydin Ozgur Yagmur
Gesendet: Dienstag, 11. Dezember 2018 14:20
An: SQLite mailing list 
Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up

*Ist hat always the same location or is it maybe running in a loop? Is it 
always the same statement that "hangs"? *
>>>
I use sqlite for more than 3 years, i encouter such an error for the first 
time. That is, no.
*Can you check what the thread is doing with a debugger? *
>>>
I have been logging the situation.
log--> before commit
  sqlitetx->commit();
log--> after commit
i can see "before commit" log but cannot see "after commit" log.



On Tue, Dec 11, 2018 at 3:48 PM Hick Gunter  wrote:

> That answers question 2. What about the thread? Can you check what the
> thread is doing with a debugger? Ist hat always the same location or
> is it maybe running in a loop? Is it always the same statement that "hangs"?
>
> -Ursprüngliche Nachricht-
> Von: sqlite-users
> [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Aydin Ozgur Yagmur
> Gesendet: Dienstag, 11. Dezember 2018 13:43
> An: SQLite mailing list 
> Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
>
> I am trying to edit the database using command shell.
> for instance i try to execute analyze commad i get "database is locked"
> message
>
> On Tue, Dec 11, 2018 at 1:36 PM Hick Gunter  wrote:
>
> > If you have only one thread accessing the database, how do you
> > determine that it is hanging and that the database is locked?
> >
> > -Ursprüngliche Nachricht-
> > Von: sqlite-users
> > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > Im Auftrag von Aydin Ozgur Yagmur
> > Gesendet: Dienstag, 11. Dezember 2018 11:31
> > An: SQLite mailing list 
> > Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
> >
> > I set busy-timeout 1000 ms. I have been using threads but only one
> > thread can access to database.
> > I will upgrade sqlite version as soon as possible. Could this lead
> > to that problem?
> >
> > On Tue, Dec 11, 2018 at 12:11 PM Hick Gunter  wrote:
> >
> > > You are leaving out a lot of necessary detail. Are you using threads?
> > > Does each thread have it's own connection or are you sharing
> > > connections? Did you set a busy timeout?
> > >
> > > BTW: Your Version of SQLiteis quite old.
> > >
> > > -Ursprüngliche Nachricht-
> > > Von: sqlite-users
> > > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > > Im Auftrag von Aydin Ozgur Yagmur
> > > Gesendet: Dienstag, 11. Dezember 2018 09:53
> > > An: SQLite mailing list 
> > > Betreff: [EXTERNAL] [sqlite] Transaction commits hangs up
> > >
> > > I have been using sqlite3.8.11 on fat32 file system. Sometimes,
> > > while committing a transaction commit process hangs up and
> > > database became locked. I am trying to find a cause or a solution
> > > for this
> problem.
> > > Does anyone encounter with similar problem before? Do you have any
> > > suggestion or any idea for this problem?
> > >
> > > Thank you,
> > > yagmur
> > > ___
> > > sqlite-users mailing list
> > > sqlite-users@mailinglists.sqlite.org
> > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-use
> > > rs
> > >
> > >
> > > ___
> > >  Gunter Hick | Software Engineer | Scientific Games International
> > > GmbH
> > > | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR:
> > > | 0430013
> > > | (O)
> > > +43 1 80100 - 0
> > >
> > > May be privileged. May be confidential. Please delete if not the
> > addressee.
> > > ___
> > > sqlite-users mailing list
> > > sqlite-users@mailinglists.sqlite.org
> > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-use
> > > rs
> > >
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
> > ___
> >  Gunter Hick | Software Engineer | Scientific Games International
> > GmbH
> > | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR:
> > | 0430013
> > | (O)
> > +43 1 80100 - 0
> >
> > May be privileged. May be 

Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Aydin Ozgur Yagmur
No, I did not use it.


On Tue, Dec 11, 2018 at 3:59 PM Simon Slavin  wrote:

> On 11 Dec 2018, at 12:42pm, Aydin Ozgur Yagmur 
> wrote:
>
> > I am trying to edit the database using command shell.
> > for instance i try to execute analyze commad i get "database is locked"
> > message
>
> Have you used the timeout PRAGMA inside the command shell ?  If not, it's
> not retrying.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Aydin Ozgur Yagmur
*Ist hat always the same location or is it maybe running in a loop? Is it
always the same statement that "hangs"? *
>>>
I use sqlite for more than 3 years, i encouter such an error for the first
time. That is, no.
*Can you check what the thread is doing with a debugger? *
>>>
I have been logging the situation.
log--> before commit
  sqlitetx->commit();
log--> after commit
i can see "before commit" log but cannot see "after commit" log.



On Tue, Dec 11, 2018 at 3:48 PM Hick Gunter  wrote:

> That answers question 2. What about the thread? Can you check what the
> thread is doing with a debugger? Ist hat always the same location or is it
> maybe running in a loop? Is it always the same statement that "hangs"?
>
> -Ursprüngliche Nachricht-
> Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Aydin Ozgur Yagmur
> Gesendet: Dienstag, 11. Dezember 2018 13:43
> An: SQLite mailing list 
> Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
>
> I am trying to edit the database using command shell.
> for instance i try to execute analyze commad i get "database is locked"
> message
>
> On Tue, Dec 11, 2018 at 1:36 PM Hick Gunter  wrote:
>
> > If you have only one thread accessing the database, how do you
> > determine that it is hanging and that the database is locked?
> >
> > -Ursprüngliche Nachricht-
> > Von: sqlite-users
> > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > Im Auftrag von Aydin Ozgur Yagmur
> > Gesendet: Dienstag, 11. Dezember 2018 11:31
> > An: SQLite mailing list 
> > Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
> >
> > I set busy-timeout 1000 ms. I have been using threads but only one
> > thread can access to database.
> > I will upgrade sqlite version as soon as possible. Could this lead to
> > that problem?
> >
> > On Tue, Dec 11, 2018 at 12:11 PM Hick Gunter  wrote:
> >
> > > You are leaving out a lot of necessary detail. Are you using threads?
> > > Does each thread have it's own connection or are you sharing
> > > connections? Did you set a busy timeout?
> > >
> > > BTW: Your Version of SQLiteis quite old.
> > >
> > > -Ursprüngliche Nachricht-
> > > Von: sqlite-users
> > > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > > Im Auftrag von Aydin Ozgur Yagmur
> > > Gesendet: Dienstag, 11. Dezember 2018 09:53
> > > An: SQLite mailing list 
> > > Betreff: [EXTERNAL] [sqlite] Transaction commits hangs up
> > >
> > > I have been using sqlite3.8.11 on fat32 file system. Sometimes,
> > > while committing a transaction commit process hangs up and database
> > > became locked. I am trying to find a cause or a solution for this
> problem.
> > > Does anyone encounter with similar problem before? Do you have any
> > > suggestion or any idea for this problem?
> > >
> > > Thank you,
> > > yagmur
> > > ___
> > > sqlite-users mailing list
> > > sqlite-users@mailinglists.sqlite.org
> > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> > >
> > >
> > > ___
> > >  Gunter Hick | Software Engineer | Scientific Games International
> > > GmbH
> > > | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR:
> > > | 0430013
> > > | (O)
> > > +43 1 80100 - 0
> > >
> > > May be privileged. May be confidential. Please delete if not the
> > addressee.
> > > ___
> > > sqlite-users mailing list
> > > sqlite-users@mailinglists.sqlite.org
> > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> > >
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
> > ___
> >  Gunter Hick | Software Engineer | Scientific Games International GmbH
> > | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013
> > | (O)
> > +43 1 80100 - 0
> >
> > May be privileged. May be confidential. Please delete if not the
> addressee.
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___
>  Gunter Hick | Software Engineer | Scientific Games International GmbH |
> Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O)
> +43 1 80100 - 0
>
> May be privileged. May be confidential. Please delete if not the addressee.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> 

Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Simon Slavin
On 11 Dec 2018, at 12:42pm, Aydin Ozgur Yagmur  wrote:

> I am trying to edit the database using command shell.
> for instance i try to execute analyze commad i get "database is locked"
> message

Have you used the timeout PRAGMA inside the command shell ?  If not, it's not 
retrying.

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


Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Hick Gunter
That answers question 2. What about the thread? Can you check what the thread 
is doing with a debugger? Ist hat always the same location or is it maybe 
running in a loop? Is it always the same statement that "hangs"?

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Aydin Ozgur Yagmur
Gesendet: Dienstag, 11. Dezember 2018 13:43
An: SQLite mailing list 
Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up

I am trying to edit the database using command shell.
for instance i try to execute analyze commad i get "database is locked"
message

On Tue, Dec 11, 2018 at 1:36 PM Hick Gunter  wrote:

> If you have only one thread accessing the database, how do you
> determine that it is hanging and that the database is locked?
>
> -Ursprüngliche Nachricht-
> Von: sqlite-users
> [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Aydin Ozgur Yagmur
> Gesendet: Dienstag, 11. Dezember 2018 11:31
> An: SQLite mailing list 
> Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
>
> I set busy-timeout 1000 ms. I have been using threads but only one
> thread can access to database.
> I will upgrade sqlite version as soon as possible. Could this lead to
> that problem?
>
> On Tue, Dec 11, 2018 at 12:11 PM Hick Gunter  wrote:
>
> > You are leaving out a lot of necessary detail. Are you using threads?
> > Does each thread have it's own connection or are you sharing
> > connections? Did you set a busy timeout?
> >
> > BTW: Your Version of SQLiteis quite old.
> >
> > -Ursprüngliche Nachricht-
> > Von: sqlite-users
> > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > Im Auftrag von Aydin Ozgur Yagmur
> > Gesendet: Dienstag, 11. Dezember 2018 09:53
> > An: SQLite mailing list 
> > Betreff: [EXTERNAL] [sqlite] Transaction commits hangs up
> >
> > I have been using sqlite3.8.11 on fat32 file system. Sometimes,
> > while committing a transaction commit process hangs up and database
> > became locked. I am trying to find a cause or a solution for this problem.
> > Does anyone encounter with similar problem before? Do you have any
> > suggestion or any idea for this problem?
> >
> > Thank you,
> > yagmur
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
> > ___
> >  Gunter Hick | Software Engineer | Scientific Games International
> > GmbH
> > | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR:
> > | 0430013
> > | (O)
> > +43 1 80100 - 0
> >
> > May be privileged. May be confidential. Please delete if not the
> addressee.
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___
>  Gunter Hick | Software Engineer | Scientific Games International GmbH
> | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013
> | (O)
> +43 1 80100 - 0
>
> May be privileged. May be confidential. Please delete if not the addressee.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Aydin Ozgur Yagmur
I am trying to edit the database using command shell.
for instance i try to execute analyze commad i get "database is locked"
message

On Tue, Dec 11, 2018 at 1:36 PM Hick Gunter  wrote:

> If you have only one thread accessing the database, how do you determine
> that it is hanging and that the database is locked?
>
> -Ursprüngliche Nachricht-
> Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Aydin Ozgur Yagmur
> Gesendet: Dienstag, 11. Dezember 2018 11:31
> An: SQLite mailing list 
> Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up
>
> I set busy-timeout 1000 ms. I have been using threads but only one thread
> can access to database.
> I will upgrade sqlite version as soon as possible. Could this lead to that
> problem?
>
> On Tue, Dec 11, 2018 at 12:11 PM Hick Gunter  wrote:
>
> > You are leaving out a lot of necessary detail. Are you using threads?
> > Does each thread have it's own connection or are you sharing
> > connections? Did you set a busy timeout?
> >
> > BTW: Your Version of SQLiteis quite old.
> >
> > -Ursprüngliche Nachricht-
> > Von: sqlite-users
> > [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> > Im Auftrag von Aydin Ozgur Yagmur
> > Gesendet: Dienstag, 11. Dezember 2018 09:53
> > An: SQLite mailing list 
> > Betreff: [EXTERNAL] [sqlite] Transaction commits hangs up
> >
> > I have been using sqlite3.8.11 on fat32 file system. Sometimes, while
> > committing a transaction commit process hangs up and database became
> > locked. I am trying to find a cause or a solution for this problem.
> > Does anyone encounter with similar problem before? Do you have any
> > suggestion or any idea for this problem?
> >
> > Thank you,
> > yagmur
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> >
> > ___
> >  Gunter Hick | Software Engineer | Scientific Games International GmbH
> > | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013
> > | (O)
> > +43 1 80100 - 0
> >
> > May be privileged. May be confidential. Please delete if not the
> addressee.
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___
>  Gunter Hick | Software Engineer | Scientific Games International GmbH |
> Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O)
> +43 1 80100 - 0
>
> May be privileged. May be confidential. Please delete if not the addressee.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Allow inclusion of generate_series function

2018-12-11 Thread Digital Dog
On Thu, Dec 6, 2018 at 8:06 PM Keith Medcalf  wrote:

>
> Why one would want a particular capability available in the shell that is
> not available when compiling the amalgamation code directly is beyond my
> ken.


The issue is not limited to generate_series (although that one seems to be
pain point for many users). The issue is that all sqlite downloads offered
on the project's home page could contain more extensions by default,
because they target capable platforms. Only some platforms these days are
restricted. Projects using these platforms require custom builds of sqlite
anyway.

Why I want fully-fledged sqlite shell? To be able to easily juggle data
straight from the OS shell, using one-liners, pipelines or bash scripts
without having to compile/enable/whatever my own sqlite shell. To just be
able to download sqlite3 executable and start working.

By offering sqlite shell with most (or all) extensions enabled, the authors
would increase out-of-the-box data processing abilities for all users who
decide to download and just use the shell command. The ability to download
and immediately start working with a really capable shell. Without risk of
bringing malware from other downloads. Without the hassle of rebuilding it
every time I need a new version. Without having to remember one or two
years later upon returning to a stuff that need changes that there was a
custom built sqlite shell there. Consistent across machines, because it was
just downloaded from official download site.

Yes, this is one of possible ways of thinking about consistency. I could
reverse your deduction - why should I want the feature parity between
sqlite embedded in an industrial device and sqlite running in Linux shell
script that gathers data from such devices, processes them differently than
the devices, aggregates them, compresses them and sends somewhere - that's
beyond my ken.


> I realize that consistency is the hobgobblin of little minds, but why
> would one not want the same extensions available when compiling the
> amalgamation into "some other" application but have that extension built
> into the shell (which is merely yet another application)?
>

I will not comment on that one. It's not the level of discussion this
mailing list expects.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite EBCDIC glitch?

2018-12-11 Thread Mario Bezzi
Hello, I have been working on making SQLite usable on IBM z/OS. Apart 
from a different compile process, I think there is a glitch in sqlite's 
management of EBCDIC which should be fixed.


It is about newline character management. Below my analysis of the problem:

- Routine local_getline in shell.c uses fgets to read stdin. By design 
fgets (at least on z/OS) returns the newline character if read.


- The newline character is at code point 0x15 in all EBCDIC code pages 
(see https://en.wikipedia.org/wiki/Category:EBCDIC_code_pages).


- The EBCDIC version of table aiClass in sqlite3.c defines code point 
0x15 as CC_ILLEGAL, this causes the shell to treat NL as illegal and 
reject any input as invalid.



The solution simply consists in changing the definition of code point 
0x15 from CC_ILLEGAL (27) to CC_SPACE (07).


Below one line the patch generated for SQLite 3.26.0

--- sqlite3.c    2018-12-01 14:38:26.0 +0100
+++ sqlite3.c.mbz    2018-12-11 12:13:09.827955214 +0100
@@ -151296,7 +151296,7 @@
 #ifdef SQLITE_EBCDIC
 /* x0  x1  x2  x3  x4  x5  x6  x7  x8  x9  xa xb xc  xd  xe  xf */
 /* 0x */   27, 27, 27, 27, 27,  7, 27, 27, 27, 27, 27, 27,  7,  7, 27, 27,
-/* 1x */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+/* 1x */   27, 27, 27, 27, 27,  7, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
 /* 2x */   27, 27, 27, 27, 27,  7, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
 /* 3x */   27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
 /* 4x */    7, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 26, 12, 17, 20, 10,


The above change has been working for me for several sqlite releases 
now. I would like to have it incorporated in the official source code as 
this would allow to compile and run official SQLite releases on z/OS 
unchanged.


Thank you,

mario


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


Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Hick Gunter
If you have only one thread accessing the database, how do you determine that 
it is hanging and that the database is locked?

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Aydin Ozgur Yagmur
Gesendet: Dienstag, 11. Dezember 2018 11:31
An: SQLite mailing list 
Betreff: Re: [sqlite] [EXTERNAL] Transaction commits hangs up

I set busy-timeout 1000 ms. I have been using threads but only one thread can 
access to database.
I will upgrade sqlite version as soon as possible. Could this lead to that 
problem?

On Tue, Dec 11, 2018 at 12:11 PM Hick Gunter  wrote:

> You are leaving out a lot of necessary detail. Are you using threads?
> Does each thread have it's own connection or are you sharing
> connections? Did you set a busy timeout?
>
> BTW: Your Version of SQLiteis quite old.
>
> -Ursprüngliche Nachricht-
> Von: sqlite-users
> [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Aydin Ozgur Yagmur
> Gesendet: Dienstag, 11. Dezember 2018 09:53
> An: SQLite mailing list 
> Betreff: [EXTERNAL] [sqlite] Transaction commits hangs up
>
> I have been using sqlite3.8.11 on fat32 file system. Sometimes, while
> committing a transaction commit process hangs up and database became
> locked. I am trying to find a cause or a solution for this problem.
> Does anyone encounter with similar problem before? Do you have any
> suggestion or any idea for this problem?
>
> Thank you,
> yagmur
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___
>  Gunter Hick | Software Engineer | Scientific Games International GmbH
> | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013
> | (O)
> +43 1 80100 - 0
>
> May be privileged. May be confidential. Please delete if not the addressee.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Aydin Ozgur Yagmur
I set busy-timeout 1000 ms. I have been using threads but only one thread
can access to database.
I will upgrade sqlite version as soon as possible. Could this lead to that
problem?

On Tue, Dec 11, 2018 at 12:11 PM Hick Gunter  wrote:

> You are leaving out a lot of necessary detail. Are you using threads? Does
> each thread have it's own connection or are you sharing connections? Did
> you set a busy timeout?
>
> BTW: Your Version of SQLiteis quite old.
>
> -Ursprüngliche Nachricht-
> Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Aydin Ozgur Yagmur
> Gesendet: Dienstag, 11. Dezember 2018 09:53
> An: SQLite mailing list 
> Betreff: [EXTERNAL] [sqlite] Transaction commits hangs up
>
> I have been using sqlite3.8.11 on fat32 file system. Sometimes, while
> committing a transaction commit process hangs up and database became
> locked. I am trying to find a cause or a solution for this problem. Does
> anyone encounter with similar problem before? Do you have any suggestion or
> any idea for this problem?
>
> Thank you,
> yagmur
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
> ___
>  Gunter Hick | Software Engineer | Scientific Games International GmbH |
> Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O)
> +43 1 80100 - 0
>
> May be privileged. May be confidential. Please delete if not the addressee.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Transaction commits hangs up

2018-12-11 Thread Shawn Wagner
Do you still have the issue with a current version of the library?

On Tue, Dec 11, 2018, 12:53 AM Aydin Ozgur Yagmur  I have been using sqlite3.8.11 on fat32 file system. Sometimes, while
> committing a transaction commit process hangs up and database became
> locked. I am trying to find a cause or a solution for this problem. Does
> anyone encounter with similar problem before? Do you have any suggestion or
> any idea for this problem?
>
> Thank you,
> yagmur
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [EXTERNAL] Transaction commits hangs up

2018-12-11 Thread Hick Gunter
You are leaving out a lot of necessary detail. Are you using threads? Does each 
thread have it's own connection or are you sharing connections? Did you set a 
busy timeout?

BTW: Your Version of SQLiteis quite old.

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Aydin Ozgur Yagmur
Gesendet: Dienstag, 11. Dezember 2018 09:53
An: SQLite mailing list 
Betreff: [EXTERNAL] [sqlite] Transaction commits hangs up

I have been using sqlite3.8.11 on fat32 file system. Sometimes, while 
committing a transaction commit process hangs up and database became locked. I 
am trying to find a cause or a solution for this problem. Does anyone encounter 
with similar problem before? Do you have any suggestion or any idea for this 
problem?

Thank you,
yagmur
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE gives incorrect results for 'NOT IN' query if partial index exists

2018-12-11 Thread Wout Mertens
Hi Luuk,

Not sure if you realize this, but your email comes over as very aggressive,
and if there's one person on this mailing list that doesn't deserve that,
it's dr Hipp.

In particular, the quotes around forgot seem to imply that it was forgotten
on purpose.

Personally, I would have worded it as "I looked at the test and I wonder if
this test case is addressed". Email communication is easy to misconstrue…

Cheers,

Wout.


-- Forwarded message -
From: Luuk 
Date: Sun, Dec 9, 2018 at 7:42 PM
Subject: Re: [sqlite] SQLITE gives incorrect results for 'NOT IN' query if
partial index exists
To: 



On 8-12-2018 23:47, Richard Hipp wrote:
> On 12/8/18, Deon Brewis  wrote:
>> I'm curious how that test that you added works?  i.e. What causes the
test
>> to fail if the results are wrong?
> The particular test case you are referring to is written in in the TCL
> language.  The TCL tests are the oldest set of tests for SQLite since
> SQLite is really a TCL-extension that escaped into the wild.
>
> Everything in TCL is a command followed by zero or more arguments.  In
> this sense, TCL is very much like Bourne shell.  COMMAND ARG1 ARG2
> ARG3   Where TCL excels is in how it quotes the arguments.  Curly
> braces {...} are quoting characters that nest.   Take, for example,
> the "if" command in TCL:
>
>  if {$a<0} {
>set a [expr {-$a}]
>  } else {
>set a [expr {$a+10}]
>  }
>
> In this case, the "if" command has four arguments
>
>   if EXPR SCRIPT else SCRIPT
>
> When the "if" command runs, it evaluates its first argument EXPR.  If
> EXPR is true, then the if command runs the SCRIPT given in the second
> argument.  Otherwise it runs the SCRIPT in the fourth argument.  The
> magic, you see, is in the use of nested curly braces for quoting.
>
> The test command you refer to is this:
>
> do_execsql_test index6-12.1 {
>DROP TABLE IF EXISTS t1;
>DROP TABLE IF EXISTS t2;
>CREATE TABLE t1(a,b);
>INSERT INTO t1 VALUES(1,1);
>INSERT INTO t1 VALUES(2,2);
>CREATE TABLE t2(x);
>INSERT INTO t2 VALUES(1);
>INSERT INTO t2 VALUES(2);
>SELECT 'one', * FROM t2 WHERE x NOT IN (SELECT a FROM t1);
>CREATE INDEX t1a ON t1(a) WHERE b=1;
>SELECT 'two', * FROM t2 WHERE x NOT IN (SELECT a FROM t1);
> } {}
>
> The name of the command is "do_execsql_test".  That command takes
> three arguments:
>
>  do_execsql_test   TESTNAME   SQL-SCRIPT   EXPECTED-RESULT
>
> This command simply runs the SQL found in its second argument and
> accumulates the results.  The accumulated result should exactly match
> the third argument.  If it does not match, then it prints an error
> message and increments the error counter.
>
> If you start with the canonical SQL source code, you can generate the
> appropriate TCL interpreter by typing
>
>  ./configure; make testfixture
>
> Or on windows:
>
>   nmake /f Makefile.msc testfixture.exe
>
> Then you say "./testfixture test/index6.test" to run that particular test
file.


You 'forgot' to add the example that Olivier Mascia gave?:

select * from bar WHERE x IN (SELECT y from foo); -- this will wrongly
return 1.





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


[sqlite] Transaction commits hangs up

2018-12-11 Thread Aydin Ozgur Yagmur
I have been using sqlite3.8.11 on fat32 file system. Sometimes, while
committing a transaction commit process hangs up and database became
locked. I am trying to find a cause or a solution for this problem. Does
anyone encounter with similar problem before? Do you have any suggestion or
any idea for this problem?

Thank you,
yagmur
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users