Re: [sqlite] SQLite lets selecting a column that is not inthe Group by clause

2010-06-11 Thread Alexey Pechnikov
2010/6/11 Igor Tandetnik : > Well, many SQL engines, as well as SQL-92 standard, do prohibit such a > syntax. According to the standard, in a statement using GROUP BY, any column > reference that appears in SELECT clause must also appear in GROUP BY clause > or be part of

[sqlite] "Using SQLite" at Southeast Linuxfest. Was: Avoiding Database Is Locked Error

2010-06-11 Thread Richard Hipp
On Fri, Jun 11, 2010 at 12:12 PM, Simon Slavin wrote: > > On 11 Jun 2010, at 4:33pm, Jay A. Kreibich wrote: > > > For what it is worth, "Using SQLite" has four or five pages > > specifically dealing with SQLITE_BUSY errors-- both how to avoid them > > and how to

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-11 Thread Simon Slavin
On 11 Jun 2010, at 4:33pm, Jay A. Kreibich wrote: > For what it is worth, "Using SQLite" has four or five pages > specifically dealing with SQLITE_BUSY errors-- both how to avoid them > and how to correctly handle them. Well, that somewhat increased the chances that I'll check out that book.

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-11 Thread Jay A. Kreibich
On Fri, Jun 11, 2010 at 04:04:59PM +0100, Simon Slavin scratched on the wall: > > On 11 Jun 2010, at 2:50pm, Odekirk, Shawn wrote: > > > Also, are there any code examples that demonstrate SQLite best > > practices, including how to correctly handle error conditions, such as > > the database is

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-11 Thread Pavel Ivanov
>> Also, are there any code examples that demonstrate SQLite best >> practices, including how to correctly handle error conditions, such as >> the database is locked condition? I have been unable to find complete >> code examples. > > Can I point out that this is yet another person asking for the

Re: [sqlite] Avoiding Database Is Locked Error

2010-06-11 Thread Simon Slavin
On 11 Jun 2010, at 2:50pm, Odekirk, Shawn wrote: > Also, are there any code examples that demonstrate SQLite best > practices, including how to correctly handle error conditions, such as > the database is locked condition? I have been unable to find complete > code examples. Can I point out

Re: [sqlite] bug report: unhelpful error message whendirectorypermissions are wrong

2010-06-11 Thread Black, Michael (IS)
Yup -- that duplicates the problem. Is there any reason why strerror() results can't be added to the error messages when file i/o errors occur like this? It's used elsewhere in the code but not for any error messages in the api. I added this in sqlite3ErrStr (I've got a snapshot of 3.7.0

Re: [sqlite] SQLite lets selecting a column that is not inthe Group by clause

2010-06-11 Thread Igor Tandetnik
Jay A. Kreibich wrote: > On Fri, Jun 11, 2010 at 11:30:43AM +0200, Benoit Mortgat scratched on the > wall: > >> select col1, col2 from foo group by col1; >> >> As you can see, that last query does not result in any error, however >> col2 should not be selectable if not in the

Re: [sqlite] SQLite lets selecting a column that is not in the Group by clause

2010-06-11 Thread Jay A. Kreibich
On Fri, Jun 11, 2010 at 11:30:43AM +0200, Benoit Mortgat scratched on the wall: > select col1, col2 from foo group by col1; > > As you can see, that last query does not result in any error, however > col2 should not be selectable if not in the group by clause?A > > Is this a feature, a known

Re: [sqlite] bug report: unhelpful error message when directorypermissions are wrong

2010-06-11 Thread Pavel Ivanov
> What's different about your setup?  Different permissions on the directory or > file? Try to make file -rw-rw-rw-. Pavel On Fri, Jun 11, 2010 at 9:50 AM, Black, Michael (IS) wrote: > I did the following...so what kind of permissions do you have that are > different

Re: [sqlite] bug report: unhelpful error message when directorypermissions are wrong

2010-06-11 Thread Black, Michael (IS)
I did the following...so what kind of permissions do you have that are different from this? drwxr-xr-x 2 root root 4096 Jun 11 08:40 ./ -rw-r--r-- 1 root root 2048 Jun 11 08:40 test.db As a normal user I did this: sqlite3 test.db SQLite version 3.3.6 Enter ".help" for instructions

[sqlite] Avoiding Database Is Locked Error

2010-06-11 Thread Odekirk, Shawn
I have recently upgraded an old system that managed its data in a dynamically allocated linked list to use SQLite instead. I have been extremely pleased with SQLite. Most operations have been greatly simplified and I am much more confident in the stability of the system and the integrity of the

Re: [sqlite] SQLite lets selecting a column that is not in the Group by clause

2010-06-11 Thread Pavel Ivanov
> As you can see, that last query does not result in any error, however > col2 should not be selectable if not in the group by clause? > > Is this a feature, a known bug or an unknown one? If this is a > feature, is there a pragma to forbid such a syntax? It's sort of a "feature" of SQLite. It's

Re: [sqlite] bug report: unhelpful error message when directory permissions are wrong

2010-06-11 Thread Pavel Ivanov
> Finally I found that in > order to write to the database, Sqlite for some reason needs to have > write permissions to the _folder_ the file resides in. "Some reason" here is a necessity to create a journal file at the same directory to be able to restore the database in case of crash or power

Re: [sqlite] bug report: unhelpful error message when directory permissions are wrong

2010-06-11 Thread Artur Reilin
> Hello, > > You website states that bugs reports should be sent to this list > (http://www.sqlite.org/src/wiki?name=Bug+Reports). > > ** > Bug report: unhelpful error message when directory permissions are wrong > > Steps to reproduce: > 1. Make new database in the directory /var/database/ with

[sqlite] bug report: unhelpful error message when directory permissions are wrong

2010-06-11 Thread Otto Kekäläinen
Hello, You website states that bugs reports should be sent to this list (http://www.sqlite.org/src/wiki?name=Bug+Reports). ** Bug report: unhelpful error message when directory permissions are wrong Steps to reproduce: 1. Make new database in the directory /var/database/ with root

Re: [sqlite] Slow deletion

2010-06-11 Thread Eduardo
On Fri, 11 Jun 2010 12:38:55 +0200 Eduardo wrote: Opsss, hit send too early > You can also index the blobtable by dirty colum for faster searches, > don't know if index helps on deletes if you use the f1) way. You can use the dirty colum with integers if you need more than

Re: [sqlite] Slow deletion

2010-06-11 Thread Eduardo
On Fri, 11 Jun 2010 00:49:47 -0700 (PDT) durumdara wrote: > Hi! > > I have an app that transform the input images to later somebody can . > I increased the size of pages, but only a little changes I see. > > May this caused by index? Because this is a primary key, I

[sqlite] SQLite lets selecting a column that is not in the Group by clause

2010-06-11 Thread Benoit Mortgat
Hello I am running the last version on SQLite (precompiled 3.6.23.1 binary release for Windows as found on http://www.sqlite.org/sqlite-3_6_23_1.zip) command line. Here is the input: create temporary table foo(col1 text, col2 text); insert into foo values('a','b'); insert into foo

[sqlite] Slow deletion

2010-06-11 Thread durumdara
Hi! I have an app that transform the input images to later somebody can choose the final version. I stored them in an SQLite blob table: create table blobs( filename varchar(255) not null, ext varchar(3) not null, size integer not null, primary key(filename, ext, size)) In the prior version of