diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2006-05-29 13:51:23 +0000 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2006-05-29 13:51:23 +0000 |
commit | 21e343da35779c622a71fd798d740c4af1d1d915 (patch) | |
tree | 2dbe7b40c807ac09015ca96b0c4e0317010f0bc5 /src | |
parent | b32000eda4c4193d60af1b5a5bb3c0c6dd4d7194 (diff) | |
download | postgresql-21e343da35779c622a71fd798d740c4af1d1d915.tar.gz postgresql-21e343da35779c622a71fd798d740c4af1d1d915.zip |
Make plperl's $_TD trigger data a global rather than a lexical variable,
with a fresh local value for each invocation, to avoid unexpected sharing
violations. Per recent -hackers discussion.
Diffstat (limited to 'src')
-rw-r--r-- | src/pl/plperl/plperl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index b0ca84b1886..9b03834d408 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -1,7 +1,7 @@ /********************************************************************** * plperl.c - perl as a procedural language for PostgreSQL * - * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.109 2006/05/26 17:34:16 adunstan Exp $ + * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.110 2006/05/29 13:51:23 adunstan Exp $ * **********************************************************************/ @@ -771,7 +771,7 @@ plperl_create_sub(char *s, bool trusted) ENTER; SAVETMPS; PUSHMARK(SP); - XPUSHs(sv_2mortal(newSVpv("my $_TD=$_[0]; shift;", 0))); + XPUSHs(sv_2mortal(newSVpv("our $_TD; local $_TD=$_[0]; shift;", 0))); XPUSHs(sv_2mortal(newSVpv(s, 0))); PUTBACK; |