Lines Matching refs:stmt

494 mysqlnd_stmt_free_copies(MYSQLND_STMT_DATA * stmt, zval *copies)  in mysqlnd_stmt_free_copies()  argument
498 for (i = 0; i < stmt->param_count; i++) { in mysqlnd_stmt_free_copies()
537 mysqlnd_stmt_execute_prepare_param_types(MYSQLND_STMT_DATA * stmt, zval ** copies_param, int * rese… in mysqlnd_stmt_execute_prepare_param_types() argument
541 for (i = 0; i < stmt->param_count; i++) { in mysqlnd_stmt_execute_prepare_param_types()
542 const short current_type = stmt->param_bind[i].type; in mysqlnd_stmt_execute_prepare_param_types()
543 zval *parameter = &stmt->param_bind[i].zv; in mysqlnd_stmt_execute_prepare_param_types()
549 PASS != mysqlnd_stmt_copy_it(copies_param, parameter, stmt->param_count, i)) in mysqlnd_stmt_execute_prepare_param_types()
551 SET_OOM_ERROR(stmt->error_info); in mysqlnd_stmt_execute_prepare_param_types()
573 stmt->send_types_to_server = *resend_types_next_time = 1; in mysqlnd_stmt_execute_prepare_param_types()
590 mysqlnd_stmt_execute_store_types(MYSQLND_STMT_DATA * stmt, zval * copies, zend_uchar ** p) in mysqlnd_stmt_execute_store_types() argument
593 for (i = 0; i < stmt->param_count; i++) { in mysqlnd_stmt_execute_store_types()
594 short current_type = stmt->param_bind[i].type; in mysqlnd_stmt_execute_store_types()
595 zval *parameter = &stmt->param_bind[i].zv; in mysqlnd_stmt_execute_store_types()
634 mysqlnd_stmt_execute_calculate_param_values_size(MYSQLND_STMT_DATA * stmt, zval ** copies_param, si… in mysqlnd_stmt_execute_calculate_param_values_size() argument
638 for (i = 0; i < stmt->param_count; i++) { in mysqlnd_stmt_execute_calculate_param_values_size()
641 zval *bind_var, *the_var = &stmt->param_bind[i].zv; in mysqlnd_stmt_execute_calculate_param_values_size()
645 if ((stmt->param_bind[i].type != MYSQL_TYPE_LONG_BLOB && Z_TYPE_P(the_var) == IS_NULL)) { in mysqlnd_stmt_execute_calculate_param_values_size()
650 for (j = i + 1; j < stmt->param_count; j++) { in mysqlnd_stmt_execute_calculate_param_values_size()
651 if (Z_ISREF(stmt->param_bind[j].zv) && Z_REFVAL(stmt->param_bind[j].zv) == the_var) { in mysqlnd_stmt_execute_calculate_param_values_size()
654 if (PASS != mysqlnd_stmt_copy_it(copies_param, the_var, stmt->param_count, i)) { in mysqlnd_stmt_execute_calculate_param_values_size()
655 SET_OOM_ERROR(stmt->error_info); in mysqlnd_stmt_execute_calculate_param_values_size()
664 switch (stmt->param_bind[i].type) { in mysqlnd_stmt_execute_calculate_param_values_size()
669 if (PASS != mysqlnd_stmt_copy_it(copies_param, the_var, stmt->param_count, i)) { in mysqlnd_stmt_execute_calculate_param_values_size()
670 SET_OOM_ERROR(stmt->error_info); in mysqlnd_stmt_execute_calculate_param_values_size()
690 if (!(stmt->param_bind[i].flags & MYSQLND_PARAM_BIND_BLOB_USED)) { in mysqlnd_stmt_execute_calculate_param_values_size()
704 if (PASS != mysqlnd_stmt_copy_it(copies_param, the_var, stmt->param_count, i)) { in mysqlnd_stmt_execute_calculate_param_values_size()
705 SET_OOM_ERROR(stmt->error_info); in mysqlnd_stmt_execute_calculate_param_values_size()
728 mysqlnd_stmt_execute_store_param_values(MYSQLND_STMT_DATA * stmt, zval * copies, zend_uchar * buf, … in mysqlnd_stmt_execute_store_param_values() argument
731 for (i = 0; i < stmt->param_count; i++) { in mysqlnd_stmt_execute_store_param_values()
732 zval *data, *parameter = &stmt->param_bind[i].zv; in mysqlnd_stmt_execute_store_param_values()
740 switch (stmt->param_bind[i].type) { in mysqlnd_stmt_execute_store_param_values()
770 if (stmt->param_bind[i].flags & MYSQLND_PARAM_BIND_BLOB_USED) { in mysqlnd_stmt_execute_store_param_values()
771 stmt->param_bind[i].flags &= ~MYSQLND_PARAM_BIND_BLOB_USED; in mysqlnd_stmt_execute_store_param_values()
802 MYSQLND_STMT_DATA * stmt = s->data; in mysqlnd_stmt_execute_store_params() local
813 unsigned int null_count = (stmt->param_count + 7) / 8; in mysqlnd_stmt_execute_store_params()
815 SET_OOM_ERROR(stmt->error_info); in mysqlnd_stmt_execute_store_params()
832 if (FAIL == mysqlnd_stmt_execute_prepare_param_types(stmt, &copies, &resend_types_next_time)) { in mysqlnd_stmt_execute_store_params()
836 int1store(*p, stmt->send_types_to_server); in mysqlnd_stmt_execute_store_params()
839 if (stmt->send_types_to_server) { in mysqlnd_stmt_execute_store_params()
840 …if (FAIL == mysqlnd_stmt_execute_check_n_enlarge_buffer(buf, p, buf_len, provided_buffer, stmt->pa… in mysqlnd_stmt_execute_store_params()
841 SET_OOM_ERROR(stmt->error_info); in mysqlnd_stmt_execute_store_params()
844 mysqlnd_stmt_execute_store_types(stmt, copies, p); in mysqlnd_stmt_execute_store_params()
847 stmt->send_types_to_server = resend_types_next_time; in mysqlnd_stmt_execute_store_params()
851 if (FAIL == mysqlnd_stmt_execute_calculate_param_values_size(stmt, &copies, &data_size)) { in mysqlnd_stmt_execute_store_params()
857 SET_OOM_ERROR(stmt->error_info); in mysqlnd_stmt_execute_store_params()
862 mysqlnd_stmt_execute_store_param_values(stmt, copies, *buf, p, null_byte_offset); in mysqlnd_stmt_execute_store_params()
866 mysqlnd_stmt_free_copies(stmt, copies); in mysqlnd_stmt_execute_store_params()
878 MYSQLND_STMT_DATA * stmt = s->data; in mysqlnd_stmt_execute_generate_request() local
879 zend_uchar *p = stmt->execute_cmd_buffer.buffer, in mysqlnd_stmt_execute_generate_request()
880 *cmd_buffer = stmt->execute_cmd_buffer.buffer; in mysqlnd_stmt_execute_generate_request()
881 size_t cmd_buffer_length = stmt->execute_cmd_buffer.length; in mysqlnd_stmt_execute_generate_request()
886 int4store(p, stmt->stmt_id); in mysqlnd_stmt_execute_generate_request()
890 int1store(p, (zend_uchar) stmt->flags); in mysqlnd_stmt_execute_generate_request()
899 if (stmt->param_count != 0) { in mysqlnd_stmt_execute_generate_request()
903 *free_buffer = (cmd_buffer != stmt->execute_cmd_buffer.buffer); in mysqlnd_stmt_execute_generate_request()