Fix GET DIAGNOSTICS for case of assignment to function's first variable.
Fix GET DIAGNOSTICS for case of assignment to function's first variable.

An incorrect and entirely unnecessary "safety check" in exec_stmt_getdiag()
caused the code to treat an assignment to a variable with dno zero as a
no-op.  Unfortunately, that's a perfectly valid dno.  This has been broken
since GET DIAGNOSTICS was invented.  It's not terribly surprising that the
bug went unnoticed for so long, since in most cases you probably wouldn't
use the function's first-created variable (normally its first parameter)
as a GET DIAGNOSTICS target.  Nonetheless, it's broken.  Per bug #6551
from Adam Buraczewski.

Quikling/gpdb,Quikling/gpdb,xinzweb/gpdb,Quikling/gpdb,rvs/gpdb,CraigHarris/gpdb,royc1/gpdb,zaksoup/gpdb,royc1/gpdb,xinzweb/gpdb,greenplum-db/gpdb,Chibin/gpdb,chrishajas/gpdb,ashwinstar/gpdb,xinzweb/gpdb,CraigHarris/gpdb,lintzc/gpdb,edespino/gpdb,adam8157/gpdb,royc1/gpdb,0x0FFF/gpdb,royc1/gpdb,ashwinstar/gpdb,chrishajas/gpdb,xinzweb/gpdb,ahachete/gpdb,lisakowen/gpdb,janebeckman/gpdb,greenplum-db/gpdb,xinzweb/gpdb,adam8157/gpdb,kaknikhil/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,janebeckman/gpdb,ahachete/gpdb,lisakowen/gpdb,ahachete/gpdb,adam8157/gpdb,xuegang/gpdb,cjcjameson/gpdb,Quikling/gpdb,chrishajas/gpdb,Quikling/gpdb,yuanzhao/gpdb,50wu/gpdb,rvs/gpdb,lisakowen/gpdb,Chibin/gpdb,greenplum-db/gpdb,janebeckman/gpdb,edespino/gpdb,janebeckman/gpdb,greenplum-db/gpdb,chrishajas/gpdb,zaksoup/gpdb,adam8157/gpdb,edespino/gpdb,0x0FFF/gpdb,xuegang/gpdb,Chibin/gpdb,kaknikhil/gpdb,royc1/gpdb,50wu/gpdb,janebeckman/gpdb,greenplum-db/gpdb,rvs/gpdb,Quikling/gpdb,Chibin/gpdb,zaksoup/gpdb,ahachete/gpdb,xuegang/gpdb,lintzc/gpdb,0x0FFF/gpdb,CraigHarris/gpdb,50wu/gpdb,kaknikhil/gpdb,Quikling/gpdb,cjcjameson/gpdb,rvs/gpdb,kaknikhil/gpdb,janebeckman/gpdb,Quikling/gpdb,50wu/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,royc1/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,0x0FFF/gpdb,0x0FFF/gpdb,ahachete/gpdb,edespino/gpdb,chrishajas/gpdb,yuanzhao/gpdb,zaksoup/gpdb,50wu/gpdb,edespino/gpdb,royc1/gpdb,edespino/gpdb,adam8157/gpdb,janebeckman/gpdb,kaknikhil/gpdb,zaksoup/gpdb,edespino/gpdb,yuanzhao/gpdb,xuegang/gpdb,Chibin/gpdb,Chibin/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,lintzc/gpdb,xinzweb/gpdb,CraigHarris/gpdb,zaksoup/gpdb,jmcatamney/gpdb,adam8157/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,jmcatamney/gpdb,Chibin/gpdb,lisakowen/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,edespino/gpdb,xuegang/gpdb,janebeckman/gpdb,jmcatamney/gpdb,lisakowen/gpdb,cjcjameson/gpdb,jmcatamney/gpdb,rvs/gpdb,CraigHarris/gpdb,lisakowen/gpdb,rvs/gpdb,xuegang/gpdb,50wu/gpdb,yuanzhao/gpdb,ahachete/gpdb,cjcjameson/gpdb,rvs/gpdb,0x0FFF/gpdb,ashwinstar/gpdb,rvs/gpdb,Quikling/gpdb,0x0FFF/gpdb,edespino/gpdb,jmcatamney/gpdb,royc1/gpdb,Chibin/gpdb,yuanzhao/gpdb,xinzweb/gpdb,lintzc/gpdb,xuegang/gpdb,chrishajas/gpdb,lintzc/gpdb,rvs/gpdb,zaksoup/gpdb,janebeckman/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,chrishajas/gpdb,ahachete/gpdb,edespino/gpdb,lisakowen/gpdb,lintzc/gpdb,cjcjameson/gpdb,chrishajas/gpdb,xuegang/gpdb,xinzweb/gpdb,rvs/gpdb,50wu/gpdb,xuegang/gpdb,ashwinstar/gpdb,adam8157/gpdb,lisakowen/gpdb,cjcjameson/gpdb,cjcjameson/gpdb,ahachete/gpdb,Chibin/gpdb,yuanzhao/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,jmcatamney/gpdb,zaksoup/gpdb,yuanzhao/gpdb,lintzc/gpdb,lintzc/gpdb,adam8157/gpdb,CraigHarris/gpdb,Quikling/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,Chibin/gpdb,0x0FFF/gpdb,50wu/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,janebeckman/gpdb,CraigHarris/gpdb,lintzc/gpdb