/* figure out what we're doing */
switch (PDO_PARAM_TYPE(param->param_type)) {
- case PDO_PARAM_LOB:
case PDO_PARAM_STMT:
return 0;
+ case PDO_PARAM_LOB:
+ /* fake lobs for now */
+ if (Z_TYPE_P(param->parameter) == IS_RESOURCE) {
+ php_stream *stm;
+ php_stream_from_zval_no_verify(stm, ¶m->parameter);
+ if (stm) {
+ SEPARATE_ZVAL_IF_NOT_REF(¶m->parameter);
+ Z_TYPE_P(param->parameter) = IS_STRING;
+ Z_STRLEN_P(param->parameter) = php_stream_copy_to_mem(stm,
+ &Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0);
+ } else {
+ pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource");
+ return 0;
+ }
+ }
+ /* fall through */
+
case PDO_PARAM_STR:
default:
P->oci_type = SQLT_CHR;