Skip to content

Commit 2849204

Browse files
authored
Merge branch 'master' into ci
2 parents 0070135 + 6ca647d commit 2849204

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

ibm_statement.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,12 @@ static int stmt_bind_column(pdo_stmt_t *stmt, int colno)
10841084
case SQL_NUMERIC:
10851085
default:
10861086
in_length = col_res->data_size + in_length;
1087+
#ifdef PASE
1088+
/* this includes null terminator, so a bit sloppy */
1089+
if (PDO_IBM_G(i5_dbcs_alloc)) {
1090+
in_length *= 6;
1091+
}
1092+
#endif
10871093
col_res->data.str_val = (char *) emalloc(in_length+1);
10881094
check_stmt_allocation(col_res->data.str_val,
10891095
"stmt_bind_column",

pdo_ibm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ ZEND_GET_MODULE(pdo_ibm)
8787
PHP_INI_BEGIN()
8888
STD_PHP_INI_ENTRY("pdo_ibm.i5_override_ccsid", "0", PHP_INI_SYSTEM, OnUpdateLong,
8989
i5_override_ccsid, zend_pdo_ibm_globals, pdo_ibm_globals)
90+
STD_PHP_INI_ENTRY("pdo_ibm.i5_dbcs_alloc", "0", PHP_INI_SYSTEM, OnUpdateLong,
91+
i5_dbcs_alloc, zend_pdo_ibm_globals, pdo_ibm_globals)
9092
PHP_INI_END()
9193
#endif /* PASE */
9294

php_pdo_ibm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ PHP_MINFO_FUNCTION(pdo_ibm);
5151
ZEND_BEGIN_MODULE_GLOBALS(pdo_ibm)
5252
long i5_ignore_userid; /* blank userid, possible no qsqsrvr */
5353
long i5_override_ccsid; /* prior any CLI routine override ascii ccsid */
54+
long i5_dbcs_alloc; /* if to overallocate buffers for unpredictable conversions */
5455
ZEND_END_MODULE_GLOBALS(pdo_ibm)
5556
#endif /* PASE */
5657

0 commit comments

Comments
 (0)