Skip to content

Commit a8cf7a6

Browse files
committed
Instruct FB to convert INT128 and DECFLOAT to VARCHAR
1 parent 0e02565 commit a8cf7a6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

interbase.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,13 @@ int _php_ibase_attach_db(char **args, size_t *len, zend_long *largs, isc_db_hand
884884
dpb += dpb_len;
885885
buf_len -= dpb_len;
886886
}
887+
888+
// Do not handle directly INT128 or DECFLOAT, convert to VARCHAR at server instead
889+
const char *compat = "int128 to varchar;decfloat to varchar";
890+
dpb_len = slprintf(dpb, buf_len, "%c%c%s", isc_dpb_set_bind, strlen(compat), compat);
891+
dpb += dpb_len;
892+
buf_len -= dpb_len;
893+
887894
if (isc_attach_database(IB_STATUS, (short)len[DB], args[DB], db, (short)(dpb-dpb_buffer), dpb_buffer)) {
888895
_php_ibase_error();
889896
return FAILURE;

0 commit comments

Comments
 (0)