InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: select madness, part II


Carsten

It looks like you've stumbled across a rather nasty little bug. This should
be fixed in 3.23 (due sometime this week).

Regards

Pete

--

Peter Hearty                         peter.hearty@lutris.com
Lutris Technologies (UK)        http://www.lutris.com
----- Original Message -----
From: "Carsten Vosshenrich" <Carsten.Vosshenrich@Pdb.SBS.de>
To: <instantdb@enhydra.org>
Sent: Monday, October 09, 2000 8:14 AM
Subject: InstantDB: select madness, part II


> With much interest I followed the Thread 'select madness' on this
> mailing list. I thought it would also solve a problem I have. But no. So
> I decided to ask for:
>
> ( I am using V3.21 with Sun's JDK 1.3 on Windows 2000)
>
> Relevant to the problem are two tables (which are "linked" together by
> bet.from_oid = gambler2season.oid. So from_oid could be defined as
> foreign key, but I started using InstantDB with V3.13 and do not use
> this feature of the new version (yet)):
>
> e CREATE TABLE gambler2season (
>     oid char(16) PRIMARY KEY,
>     object_version integer,
>     total int,
>     gambler_oid char(16) NOT NULL,
>     season_oid char(16) NOT NULL
> );
> e CREATE UNIQUE INDEX gambler2season_oid ON gambler2season (oid);
> e CREATE INDEX gambler2season_gambler ON gambler2season (gambler_oid);
> e CREATE INDEX gambler2season_season ON gambler2season (season_oid);
>
>
> e CREATE TABLE bet (
>     oid char(16) PRIMARY KEY,
>     object_version integer,
>     value integer,
>     arrival timestamp,
>     hscore integer,
>     ascore integer,
>     from_oid char(16) NOT NULL,
>     game_oid char(16) NOT NULL
> );
> e CREATE UNIQUE INDEX bet_oid ON bet (oid);
> e CREATE INDEX bet_from ON bet (from_oid);
> e CREATE INDEX bet_game ON bet (game_oid);
>
>
> They are filled with some sample data (I provide a zipped file with the
> DB in a seperate mail). To show the problem I do a series of queries:
>
> 1. SELECT COUNT(*) FROM gambler2season
> Result: 3
>
> 2. SELECT COUNT(*) FROM gambler2season WHERE season_oid =
> '________1___1__1'
> Result: 3
>
> These two queries show, that the condition (which is used later on) is
> met by each record in the table.
>
> 3. SELECT COUNT(*) FROM gambler2season g2s, bet b WHERE g2s.oid =
> b.from_oid
> Result: 27
>
> This join works fine.
>
> 4. SELECT COUNT(*) FROM gambler2season g2s, bet b WHERE g2s.season_oid =
> '________1___1__1' AND g2s.oid = b.from_oid
> Result: 3
>
> Now, simply by adding above condition I get the false result. And when I
> try to check which 3 of 27 results InstantDB found, I even get an
> exception (which is useless to me).
>
> 5. SELECT * FROM gambler2season g2s, bet b WHERE g2s.season_oid =
> '________1___1__1' AND g2s.oid = b.from_oid
> Exception:
> java.sql.SQLException: java.lang.String
>         at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:276)
>         at
> org.enhydra.instantdb.jdbc.idbStatement.execute(idbStatement.java:235)
>         at org.enhydra.instantdb.JDBCAppl.action(JDBCAppl.java:85)
>         at java.awt.Component.handleEvent(Component.java:3906)
>         at org.enhydra.instantdb.JDBCAppl.handleEvent(JDBCAppl.java:212)
>
>         at java.awt.Component.postEvent(Component.java:2790)
>         at java.awt.Component.postEvent(Component.java:2800)
>         at java.awt.Component.postEvent(Component.java:2800)
>         at java.awt.Component.postEvent(Component.java:2800)
>         at java.awt.Component.dispatchEventImpl(Component.java:2607)
>         at java.awt.Component.dispatchEvent(Component.java:2499)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
>         at
> java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
>         at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
>         at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
>
>
>
> After reading the 'select madness' thread I happily tried setting
> 'strictLiterals=1'. But still the same result.
>
> Do you have any explanation on this?
>
> Thanks
>
> Carsten Vosshenrich
>
>
> --------------------------------------------------------------------------
---
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>

-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.