postgresql/src
Tom Lane d8d5a00b18 Fix EvalPlanQual bug when query contains both locked and not-locked rels.
In commit afb9249d06, we (probably I) made ExecLockRows assign
null test tuples to all relations of the query while setting up to do an
EvalPlanQual recheck for a newly-updated locked row.  This was sheerest
brain fade: we should only set test tuples for relations that are lockable
by the LockRows node, and in particular empty test tuples are only sensible
for inheritance child relations that weren't the source of the current
tuple from their inheritance tree.  Setting a null test tuple for an
unrelated table causes it to return NULLs when it should not, as exhibited
in bug #14034 from Bronislav Houdek.  To add insult to injury, doing it the
wrong way required two loops where one would suffice; so the corrected code
is even a bit shorter and faster.

Add a regression test case based on his example, and back-patch to 9.5
where the bug was introduced.
2016-03-22 17:56:06 -04:00
..
backend Fix EvalPlanQual bug when query contains both locked and not-locked rels. 2016-03-22 17:56:06 -04:00
bin Fix "pg_bench -C -M prepared". 2016-03-16 23:18:07 -04:00
common pgindent run for 9.5 2015-05-23 21:35:49 -04:00
include Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>. 2016-03-15 13:19:57 -04:00
interfaces Stamp 9.5.1. 2016-02-08 16:12:28 -05:00
makefiles Link $(WIN32RES) into single-file modules only when PGFILEDESC is set. 2015-08-05 20:45:21 -04:00
pl plperl: Correctly handle empty arrays in plperl_ref_from_pg_array. 2016-03-08 13:42:58 -08:00
port Stamp 9.5.1. 2016-02-08 16:12:28 -05:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:01:29 -04:00
test Fix EvalPlanQual bug when query contains both locked and not-locked rels. 2016-03-22 17:56:06 -04:00
timezone Update time zone data files to tzdata release 2016a. 2016-02-05 10:59:21 -05:00
tools Remove dependency on psed for MSVC builds. 2016-03-19 18:44:04 -04:00
tutorial Remove no-longer-required function declarations. 2015-05-24 12:20:23 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Back-patch fixes to make TAP tests work on Windows. 2015-11-17 14:10:24 -05:00
Makefile.shlib AIX: Link TRANSFORM modules with their dependencies. 2015-07-15 21:00:30 -04:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00