Lines Matching refs:P

181 			pdo_odbc_param *P;  in odbc_stmt_execute()  local
184 P = (pdo_odbc_param*)param->driver_data; in odbc_stmt_execute()
195 switch (pdo_odbc_utf82ucs2(stmt, P->is_unicode, in odbc_stmt_execute()
288 pdo_odbc_param *P; in odbc_stmt_param_hook() local
302 P = param->driver_data; in odbc_stmt_param_hook()
303 if (P) { in odbc_stmt_param_hook()
304 efree(P); in odbc_stmt_param_hook()
343 P = emalloc(sizeof(*P)); in odbc_stmt_param_hook()
344 param->driver_data = P; in odbc_stmt_param_hook()
346 P->len = 0; /* is re-populated each EXEC_PRE */ in odbc_stmt_param_hook()
347 P->outbuf = NULL; in odbc_stmt_param_hook()
349 P->is_unicode = pdo_odbc_sqltype_is_unicode(S, sqltype); in odbc_stmt_param_hook()
350 if (P->is_unicode) { in odbc_stmt_param_hook()
356 P->paramtype = SQL_PARAM_INPUT_OUTPUT; in odbc_stmt_param_hook()
358 P->paramtype = SQL_PARAM_INPUT; in odbc_stmt_param_hook()
360 P->paramtype = SQL_PARAM_OUTPUT; in odbc_stmt_param_hook()
363 if (P->paramtype != SQL_PARAM_INPUT) { in odbc_stmt_param_hook()
366 P->len = param->max_value_len > 0 ? param->max_value_len : precision; in odbc_stmt_param_hook()
367 if (P->is_unicode) { in odbc_stmt_param_hook()
368 P->len *= 2; in odbc_stmt_param_hook()
370 P->outbuf = emalloc(P->len + (P->is_unicode ? 2:1)); in odbc_stmt_param_hook()
374 if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_LOB && P->paramtype != SQL_PARAM_INPUT) { in odbc_stmt_param_hook()
380 P->paramtype, ctype, sqltype, precision, scale, in odbc_stmt_param_hook()
381 P->paramtype == SQL_PARAM_INPUT ? in odbc_stmt_param_hook()
383 P->outbuf, in odbc_stmt_param_hook()
384 P->len, in odbc_stmt_param_hook()
385 &P->len in odbc_stmt_param_hook()
396 P = param->driver_data; in odbc_stmt_param_hook()
415 if (P->outbuf) { in odbc_stmt_param_hook()
417 char *ptr = P->outbuf; in odbc_stmt_param_hook()
418 char *end = P->outbuf + P->len; in odbc_stmt_param_hook()
420 P->len = 0; in odbc_stmt_param_hook()
433 P->len += len; in odbc_stmt_param_hook()
437 P->len = SQL_LEN_DATA_AT_EXEC(sb.sb.st_size); in odbc_stmt_param_hook()
440 if (P->outbuf) { in odbc_stmt_param_hook()
441 P->len = 0; in odbc_stmt_param_hook()
443 P->len = SQL_LEN_DATA_AT_EXEC(0); in odbc_stmt_param_hook()
448 if (P->outbuf) { in odbc_stmt_param_hook()
449 P->len = Z_STRLEN_P(parameter); in odbc_stmt_param_hook()
450 memcpy(P->outbuf, Z_STRVAL_P(parameter), P->len); in odbc_stmt_param_hook()
452 P->len = SQL_LEN_DATA_AT_EXEC(Z_STRLEN_P(parameter)); in odbc_stmt_param_hook()
456 P->len = SQL_NULL_DATA; in odbc_stmt_param_hook()
459 if (P->outbuf) { in odbc_stmt_param_hook()
461 switch (pdo_odbc_utf82ucs2(stmt, P->is_unicode, in odbc_stmt_param_hook()
467 P->len = Z_STRLEN_P(parameter); in odbc_stmt_param_hook()
468 memcpy(P->outbuf, Z_STRVAL_P(parameter), P->len); in odbc_stmt_param_hook()
471 P->len = ulen; in odbc_stmt_param_hook()
472 memcpy(P->outbuf, S->convbuf, P->len); in odbc_stmt_param_hook()
476 P->len = SQL_LEN_DATA_AT_EXEC(Z_STRLEN_P(parameter)); in odbc_stmt_param_hook()
482 P = param->driver_data; in odbc_stmt_param_hook()
484 if (P->outbuf) { in odbc_stmt_param_hook()
497 switch (P->len) { in odbc_stmt_param_hook()
501 switch (pdo_odbc_ucs22utf8(stmt, P->is_unicode, P->outbuf, P->len, &ulen)) { in odbc_stmt_param_hook()
505 srcbuf = P->outbuf; in odbc_stmt_param_hook()
506 srclen = P->len; in odbc_stmt_param_hook()