Re: !!! Bad Subquery == Delete ALL !!!
Posted in 1995
In article <43mepj$dp8@hazel.Read.TASC.COM>
amiller@tasc.com "Andrew Miller" writes:
> Hi there-
>
> I recently executed the following query on my Informix database:
>
> delete from BLOBtable where PageNumber in
> (select PageNumber from DocumentTable where DocumentID=66272)>
>
> Now as it turns out, there is no PageNumber field in my DocumentTable table, so
> the subquery failed. Instead of returning an error, the Informix engine DELETED> ALL THE BLOBS IN MY BLOB TABLE (imaging my surprise when instead of seeing "11
> rows deleted" I saw "1700 rows deleted")!!!!!
I think surprise is probably not *quite the right word! :)
> Is this a bug, or what?
Well, it certainly doesn't sound like expected behaviour. Send some more
(like platform/OS/versions/etc.) and we'll have a look.
Cheers,
Spokey the Wheeler-------------------------------------------------------------
"Billy Boy" - das aufregend andere kondom!
Carter - the Unstoppable Sex Machine / Wheeler - the Unstoppable Mail Machine!