| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Kurt Roeckx <Q(at)ping(dot)be> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Bounds error in LockMethodInit(). |
| Date: | 2003-08-15 19:18:23 |
| Message-ID: | 20231.1060975103@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Kurt Roeckx <Q(at)ping(dot)be> writes:
> I have no idea what that numModes++ line is doing there.
I think the notion is that the lock modes are counted in 1-based
numbering; the copy loop starts at 0 so it needs an extra iteration.
Look at the uses of numLockModes for evidence. (Note the extra zero
at the start of LockConflicts[]. Why it's bothering to copy that,
I dunno.)
I agree the call from lmgr.c is bogus though --- should be doing
something involving lengthof(LockConflicts), probably. The existing
coding would fail to raise a flag if someone added a few more lock
modes without increasing MAX_LOCKMODES.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruno Wolff III | 2003-08-15 20:15:03 | Re: best way to retreive the next record in a multi column index |
| Previous Message | Andreas Pflug | 2003-08-15 19:13:49 | Re: [GENERAL] 7.4Beta |