ILIKE + OR fault - propably a memory leak

Started by Michał Pasternakover 24 years ago3 messagesbugs
Jump to latest
#1Michał Pasternak
doc@lublin.t1.pl

Hello,

this is very severe condition. I hope, that PostgreSQL team can correct it.
I can provide any additional information you need, including whole database
or a shell account for testing on my host.

It appears to work on 7.1.2 and 7.1.3 on FreeBSD 4.3-STABLE. It is fully
repeatable bug.

This is our base query:
SELECT bib.id,tytul_or,title,new_zrodlo,new_zrodlo_src,
szczegoly,uwagi,zapisani,zrodla.skrot as zsk
FROM BIB,zrodla,ztable
WHERE bib.id=ztable.id and bib.new_zrodlo=zrodla.id and ...

Those work:
TITLE ILIKE 'Ocena%';
TYTUL_OR ILIKE 'Ocena%';
TITLE LIKE 'Ocena%';
TYTUL_OR LIKE 'Ocena%';

But this doesn't (and I need it to work):

TYTUL_OR ILIKE 'Ocena%' OR TITLE LIKE 'Ocena%';
TYTUL_OR LIKE 'Ocena%' or TITLE LIKE 'Ocena%';

Please, authors of PostgreSQL - contact me on my private mailbox if you want
me to send you additional information, as stated above.

I think, it's a severe bug in PostgreSQL. Please, review it carefully -
you're my only hope...
--
[ Michal Pasternak doc@lublin.t1.pl +48606570000 ]
[ sklepy internetowe, bazy danych, programy na zam�wienie ]
[ . .. ..- .- . .. http://lublin.t1.pl . .-. .--.. . . .- ]

#2Michał Pasternak
doc@lublin.t1.pl
In reply to: Michał Pasternak (#1)
Re: ILIKE + OR fault - propably a memory leak

Michaďż˝ Pasternak [Thu, Sep 06, 2001 at 12:25:24PM +0200]:

But this doesn't (and I need it to work):

TYTUL_OR ILIKE 'Ocena%' OR TITLE LIKE 'Ocena%';
TYTUL_OR LIKE 'Ocena%' or TITLE LIKE 'Ocena%';

Uh, I forgot: server starts to output something, which looks like a one row,
one-field result with infinite length. It contains trashed values of normal
output columns.

Hope this helps.
--
[ Michal Pasternak doc@lublin.t1.pl +48606570000 ]
[ sklepy internetowe, bazy danych, programy na zam�wienie ]
[ . .. ..- .- . .. http://lublin.t1.pl . .-. .--.. . . .- ]

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michał Pasternak (#2)
Re: ILIKE + OR fault - propably a memory leak

=?iso-8859-2?Q?Micha=B3?= Pasternak <doc@lublin.t1.pl> writes:

Micha� Pasternak [Thu, Sep 06, 2001 at 12:25:24PM +0200]:

But this doesn't (and I need it to work):

TYTUL_OR ILIKE 'Ocena%' OR TITLE LIKE 'Ocena%';
TYTUL_OR LIKE 'Ocena%' or TITLE LIKE 'Ocena%';

Uh, I forgot: server starts to output something, which looks like a one row,
one-field result with infinite length. It contains trashed values of normal
output columns.

I don't see any such problem here, and I really doubt that the LIKE has
anything to do with it. Possibly you've got corrupted data in a row
of that table that is selected by this query and not other queries?

regards, tom lane