Board index » delphi » !!BDE-Bug using SQL (System hangs)!!

!!BDE-Bug using SQL (System hangs)!!

Hello,

i found a Bug when using a simple sql-statement with Delphi/Paradox5/7/8
or the Database-Explorer of Delphi. Because the Bug appears in all
Borland (or Inprise or Corel) products i suppose that it is a
BDE/Paradox-Bug! I have the  following simple constellation:
1) an arbitrary paradox table called 'test' with two fields: the first
one is the primary index called 'id' and is of the type longint. the
second one is called 'mark' and is of the type smallint. it is importent
that the id is defined as primary index otherwise the bug doesn't
appear!

2) the table consitst for example of 5 rows (id 1 to 5); mark is empty:
id    mark
1
2
3
4
5

Now the BUG:
3) try the following sql-statement:
update test set mark = 1 where id in (1,2,3)

when executing this sql-statement the system (Delphi, Paradox,
Databse-Explorer) hangs. you have the same result when using this
statement:
update test set mark = 1 where id = 1 or id = 2 or id = 3.

Note:
the bug appears only if id is a primary index and there is more then one
hit in the table. if you want to mark the rows with the ids 1,7,8 and 9;
and only one id is available in the table (one hit) then the bug doesn't
appear.

with interbase sql-server there is no problem! it seems to be a
bde/paradox problem!

Yildiray Ogurol.
Email: yildi...@zait.uni-bremen.de

 

Re:!!BDE-Bug using SQL (System hangs)!!


Quote
Yildiray Ogurol wrote in message <35ADF89A.3537...@zait.uni-bremen.de>...
>Now the BUG:
>3) try the following sql-statement:
>update test set mark = 1 where id in (1,2,3)

Ok, I duplicated your bug. However, I then experimented with different names
for the fields. Suddenly the bug disappeared. Even when I changed the field
names back to Id and Mark, the bug was gone! Maybe I did something specific
that caused the bug to appear the first time that I haven't duplicated
since? Very strange!

Re:!!BDE-Bug using SQL (System hangs)!!


Hello Ed,
i tried your example but without success!
Maybe you removed the primary-index setting of the field 'id'.
The first field (or the field you use in the where-statement) must be a primary
index! Only then the bug appears!

Greetings, Yildiray.

Quote
Ed Buffey wrote:
> Yildiray Ogurol wrote in message <35ADF89A.3537...@zait.uni-bremen.de>...
> >Now the BUG:
> >3) try the following sql-statement:
> >update test set mark = 1 where id in (1,2,3)

> Ok, I duplicated your bug. However, I then experimented with different names
> for the fields. Suddenly the bug disappeared. Even when I changed the field
> names back to Id and Mark, the bug was gone! Maybe I did something specific
> that caused the bug to appear the first time that I haven't duplicated
> since? Very strange!

Re:!!BDE-Bug using SQL (System hangs)!!


Quote
Yildiray Ogurol wrote in message <35AE264E.1E11B...@zait.uni-bremen.de>...
>i tried your example but without success!
>Maybe you removed the primary-index setting of the field 'id'.
>The first field (or the field you use in the where-statement) must be a
primary
>index! Only then the bug appears!

Ok, now I can't duplicate what I did... unfortunately I deleted the table
that was working! Maybe I did forget to make the first field the primary
index! Sorry to get your hopes up!

Ed "LeReveur" Buffey
May all your dreams be sweet! =)

Other Threads