Lines Matching refs:P

182 			pdo_odbc_param *P;  in odbc_stmt_execute()  local
185 P = (pdo_odbc_param*)param->driver_data; in odbc_stmt_execute()
196 switch (pdo_odbc_utf82ucs2(stmt, P->is_unicode, in odbc_stmt_execute()
289 pdo_odbc_param *P; in odbc_stmt_param_hook() local
303 P = param->driver_data; in odbc_stmt_param_hook()
304 if (P) { in odbc_stmt_param_hook()
305 efree(P); in odbc_stmt_param_hook()
344 P = emalloc(sizeof(*P)); in odbc_stmt_param_hook()
345 param->driver_data = P; in odbc_stmt_param_hook()
347 P->len = 0; /* is re-populated each EXEC_PRE */ in odbc_stmt_param_hook()
348 P->outbuf = NULL; in odbc_stmt_param_hook()
350 P->is_unicode = pdo_odbc_sqltype_is_unicode(S, sqltype); in odbc_stmt_param_hook()
351 if (P->is_unicode) { in odbc_stmt_param_hook()
357 P->paramtype = SQL_PARAM_INPUT_OUTPUT; in odbc_stmt_param_hook()
359 P->paramtype = SQL_PARAM_INPUT; in odbc_stmt_param_hook()
361 P->paramtype = SQL_PARAM_OUTPUT; in odbc_stmt_param_hook()
364 if (P->paramtype != SQL_PARAM_INPUT) { in odbc_stmt_param_hook()
367 P->len = param->max_value_len > 0 ? param->max_value_len : precision; in odbc_stmt_param_hook()
368 if (P->is_unicode) { in odbc_stmt_param_hook()
369 P->len *= 2; in odbc_stmt_param_hook()
371 P->outbuf = emalloc(P->len + (P->is_unicode ? 2:1)); in odbc_stmt_param_hook()
375 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB && P->paramtype != SQL_PARAM_INPUT) { in odbc_stmt_param_hook()
381 P->paramtype, ctype, sqltype, precision, scale, in odbc_stmt_param_hook()
382 P->paramtype == SQL_PARAM_INPUT ? in odbc_stmt_param_hook()
384 P->outbuf, in odbc_stmt_param_hook()
385 P->len, in odbc_stmt_param_hook()
386 &P->len in odbc_stmt_param_hook()
397 P = param->driver_data; in odbc_stmt_param_hook()
416 if (P->outbuf) { in odbc_stmt_param_hook()
418 char *ptr = P->outbuf; in odbc_stmt_param_hook()
419 char *end = P->outbuf + P->len; in odbc_stmt_param_hook()
421 P->len = 0; in odbc_stmt_param_hook()
434 P->len += len; in odbc_stmt_param_hook()
438 P->len = SQL_LEN_DATA_AT_EXEC(sb.sb.st_size); in odbc_stmt_param_hook()
441 if (P->outbuf) { in odbc_stmt_param_hook()
442 P->len = 0; in odbc_stmt_param_hook()
444 P->len = SQL_LEN_DATA_AT_EXEC(0); in odbc_stmt_param_hook()
449 if (P->outbuf) { in odbc_stmt_param_hook()
450 P->len = Z_STRLEN_P(parameter); in odbc_stmt_param_hook()
451 memcpy(P->outbuf, Z_STRVAL_P(parameter), P->len); in odbc_stmt_param_hook()
453 P->len = SQL_LEN_DATA_AT_EXEC(Z_STRLEN_P(parameter)); in odbc_stmt_param_hook()
457 P->len = SQL_NULL_DATA; in odbc_stmt_param_hook()
460 if (P->outbuf) { in odbc_stmt_param_hook()
462 switch (pdo_odbc_utf82ucs2(stmt, P->is_unicode, in odbc_stmt_param_hook()
468 P->len = Z_STRLEN_P(parameter); in odbc_stmt_param_hook()
469 memcpy(P->outbuf, Z_STRVAL_P(parameter), P->len); in odbc_stmt_param_hook()
472 P->len = ulen; in odbc_stmt_param_hook()
473 memcpy(P->outbuf, S->convbuf, P->len); in odbc_stmt_param_hook()
477 P->len = SQL_LEN_DATA_AT_EXEC(Z_STRLEN_P(parameter)); in odbc_stmt_param_hook()
483 P = param->driver_data; in odbc_stmt_param_hook()
485 if (P->outbuf) { in odbc_stmt_param_hook()
498 switch (P->len) { in odbc_stmt_param_hook()
502 switch (pdo_odbc_ucs22utf8(stmt, P->is_unicode, P->outbuf, P->len, &ulen)) { in odbc_stmt_param_hook()
506 srcbuf = P->outbuf; in odbc_stmt_param_hook()
507 srclen = P->len; in odbc_stmt_param_hook()