Subject: | [PATCH] Fix assertion when binding array columns on debug perls >= 5.16 |
sv_replace clobbers the flags on the destination SV, including
lexicals' PADMY, which causes an assertion failure on debug perls
since 5.16. Use the gentler sv_setsv instead.
Subject: | 0001-Fix-assertion-when-binding-array-columns-on-debug-pe.patch |
From 19b03bce230049ff2f48ff5e48267424313984d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"D.=20Ilmari=20Manns=C3=A5ker"?=
<ilmari.mannsaker@net-a-porter.com>
Date: Tue, 1 Oct 2013 13:06:35 +0100
Subject: [PATCH] Fix assertion when binding array columns on debug perls >=
5.16
sv_replace clobbers the flags on the destination SV, including
lexicals' PADMY, which causes an assertion failure on debug perls
since 5.16. Use the gentler sv_setsv instead.
---
Changes | 2 ++
dbdimp.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Changes b/Changes
index 4b320ab..cd91871 100644
--- a/Changes
+++ b/Changes
@@ -44,6 +44,8 @@ Version 3.0.0?
- Use correct SQL_BIGINT constant for int8
[Dagfinn Ilmari Mannsåker]
+ - Fix assertion when binding array columns on debug perls >= 5.16
+ [Dagfinn Ilmari Mannsåker]
Version 2.19.3 Released August 21, 2012 (git commit be018f10fdaf4163f98affcb7244046e8f47420d)
diff --git a/dbdimp.c b/dbdimp.c
index b94d259..3fa6a42 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -3492,7 +3492,7 @@ AV * dbd_st_fetch (SV * sth, imp_sth_t * imp_sth)
if (type_info
&& 0 == strncmp(type_info->arrayout, "array", 5)
&& imp_dbh->expand_array) {
- sv_replace(sv, pg_destringify_array(aTHX_ imp_dbh, value, type_info));
+ sv_setsv(sv, pg_destringify_array(aTHX_ imp_dbh, value, type_info));
}
else {
if (type_info) {
--
1.7.9.5