[sqlite] Joel Spolsky on what makes an acceptable software question

2018-04-24 Thread Simon Slavin
_Stack Overflow_ is a little like this list, and Joel Spolsky, CEO of _Stack 
Overflow_, considers what makes an acceptable question for _Stack Overflow_ 
here:





Just for fun I'm listing ten common types of question I see here.  I've messed 
with them a little to give the essence without poking fun at any specific 
individual.

1) I've found a bug in SQLite and here is my SQL which triggers it.  The code 
posted has syntax errors so will not actually run.  Enough syntax errors that 
it's not obvious what it's meant to be.

2) I've created one index for each column in each table of my database. I now 
have 74 indexes.  Yet my SELECT still runs slowly.  Why ?  (Poster hasn't 
noticed that each INSERT now takes a lifetime and database filesize is huge.)

3) Here is my problem, which obviously requires procedural programming or at 
least scripting and can't be done entirely within SQL.  How can I solve my 
problem ?  PS: I only know Excel macros so please do it in Excel.

4) Do my CS205 homework for me.  Bonus points if the question is obviously 
taken directly from a Computer Science textbook.

5) I've accepted a programming job involving data.  The web pages say that 
SQLite handles data.  How do I use SQLite to my job ?  My poorly-conceived 
database design, with single-letter entity names which I didn't explain and 
will forget in a month, is attached to this post.  Followed-up 24 hours later 
with "bump".

6) Polite question on an ambiguity in SQLite documentation, clearly phrased and 
illustrated with neat comparisons with MS Server and MySQL.  Poster is 
concerned that future versions of SQLite might interpret the point differently 
and wants assurance that the developer team understands the ambiguity and has 
intentionally picked the way SQLite does it.  Bonus points if OP is Chinese and 
writes better English than English people do.

7) Well-phrased and clear question by someone making a bad assumption about 
SQL, for example that SELECT without ORDER BY should return rows in the order 
in which they were inserted.

8) Reasonable question about a tricky aspect of SQL, e.g. an obscure 
interaction between triggers and foreign keys, which is answered in the SQLite 
documentation but only if you find the right section of the right web page.

(9) Reasonable question about SQL which is answered by all the following: (A) 
The obvious page in the documentation (B) the SQLite FAQ (C) The top three 
answers on Google (D) the top three answers when searching _Stack Overflow_.

(10) Question about SQLite's file handle management which could concern only 
someone writing C code which accesses SQLite internals.  Can be answered only 
by someone who understands SQLite's conventions and source code very well, i.e. 
a member of the development team.

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


Re: [sqlite] Are you getting spam when you post to sqlite-users ?

2018-04-24 Thread Efe Burak
me too

On Thu, Apr 19, 2018 at 2:53 PM, Keith Medcalf  wrote:

>
> Richard,
>
> The ARIN PPML has the same spammer harvesting their list to get subscriber
> email addresses and replying with the same type of "spam" ...
>
>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
> >-Original Message-
> >From: sqlite-users [mailto:sqlite-users-
> >boun...@mailinglists.sqlite.org] On Behalf Of Richard Hipp
> >Sent: Wednesday, 18 April, 2018 12:11
> >To: SQLite mailing list
> >Subject: Re: [sqlite] Are you getting spam when you post to sqlite-
> >users ?
> >
> >On 4/18/18, Dennis Clarke  wrote:
> >>
> >>> "Banishing" means configuring IP filters on the server to silently
> >>> discard any and all IP packets that originate from the targeted
> >range
> >>> of IP addresses.
> >>
> >> This is the best method that I have ever used and I can tell you
> >that
> >> your ipfilter rules can get quite long using this approach.  In
> >truth
> >> I banish ALL registered subnets from certain areas of the world
> >> and then life goes on.  Entire continents blocked.
> >>
> >
> >This technique works to prevent me from getting the spam, because all
> >my email goes through the machine doing the blocking - sqlite.org.
> >Unfortunately, the email for the other 2000+ people on this mail list
> >goes through different servers which are not blocking the misbehaving
> >IP address, and so they are still seeing the spam.
> >--
> >D. Richard Hipp
> >d...@sqlite.org
> >___
> >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-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


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

2018-04-24 Thread Richard Hipp
Fixed now on trunk.  Thanks for the bug report.

On 4/24/18, Ralf Junker  wrote:
> 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 csv_reader_reset() if the file was opened successfully
> and the file handle is assigned:
>
>http://localhost:8081/artifact?name=1a009b93650732e2=102-106
>
> Hence no file open, no file handle, no buffer freed, memory leak.
>
> Ralf
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


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


[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 csv_reader_reset() if the file was opened successfully 
and the file handle is assigned:


  http://localhost:8081/artifact?name=1a009b93650732e2=102-106

Hence no file open, no file handle, no buffer freed, memory leak.

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