On Apr 16, 2009, at 2:40 PM, Christopher Bare wrote:

> Hi,
>
> Here's a head's up on an obscure error I ran into. Maybe documenting
> it will help the developers or a future victim:

Thanks.  But this has already been documented at ticket #3530 
(http://www.sqlite.org/cvstrac/tktview?tn=3530 
) and fixed by check-in [5998] (http://www.sqlite.org/cvstrac/chngview?cn=5998 
).  The fix was first available in 3.6.7.

Shane first found the problem late one night while working on  
sqllogictest and we had it fixed before breakfast the following morning.

Segfaults are never acceptable, even for malformed SQL.  So please do  
report them whenever you see them.  Tnx.

>
>
> I have a couple tables like this:
>
> sqlite> .schema tracks
> CREATE TABLE tracks (
>       uuid text primary key not null,
>       name text not null,
>       type text not null,
>       table_name text not null);
>
> sqlite> .schema attributes
> CREATE TABLE attributes (
>       uuid NOT NULL,
>       key text NOT NULL,
>       value);
>
> Tracks represent graphical objects and one of their (optional)
> attributes is z-order. So, I wanted a query that would give me back
> the tracks ordered by z-order. What I wanted was this, which actually
> works fine:
>
> select t.name, ifnull(a.value,-1) as zorder from tracks as t left join
> (select * from attributes where key='z-order') as a on t.uuid=a.uuid
> order by zorder;
>
> A little muddled thinking on my part led to this totally bass-ackwards
> attempted query:
>
> sqlite> select * from tracks left join (select * from attributes where
> tracks.uuid=attributes.uuid and key='z-order');
> Bus error
>
> I know my query is bogus, but Bus error is probably not the desired
> feedback. Although, I can't say it's not deserved.
>
> $ /opt/local/bin/sqlite3 -version
> 3.6.3
>
> running on OS X 10.5.6
>
> Sqlite rocks. Thanks,
>
> -chris
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

D. Richard Hipp
[email protected]



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to