mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Merge branch 'PHP-7.1'
* PHP-7.1: Clean up FR #72633 Fixed invalid handle error with Implicit Result Sets and bump OCI8 version.
This commit is contained in:
commit
3e5dbdc3e8
5 changed files with 7 additions and 8 deletions
|
@ -482,7 +482,7 @@ This version is for PHP 7 only.
|
||||||
Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns)
|
Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns)
|
||||||
</notes>
|
</notes>
|
||||||
</release>
|
</release>
|
||||||
|
|
||||||
<release>
|
<release>
|
||||||
<version>
|
<version>
|
||||||
<release>2.1.0</release>
|
<release>2.1.0</release>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
*/
|
*/
|
||||||
#undef PHP_OCI8_VERSION
|
#undef PHP_OCI8_VERSION
|
||||||
#endif
|
#endif
|
||||||
#define PHP_OCI8_VERSION "2.1.1"
|
#define PHP_OCI8_VERSION "2.1.2"
|
||||||
|
|
||||||
extern zend_module_entry oci8_module_entry;
|
extern zend_module_entry oci8_module_entry;
|
||||||
#define phpext_oci8_ptr &oci8_module_entry
|
#define phpext_oci8_ptr &oci8_module_entry
|
||||||
|
|
|
@ -363,12 +363,13 @@ static char *pdo_pgsql_last_insert_id(pdo_dbh_t *dbh, const char *name, size_t *
|
||||||
char *id = NULL;
|
char *id = NULL;
|
||||||
PGresult *res;
|
PGresult *res;
|
||||||
ExecStatusType status;
|
ExecStatusType status;
|
||||||
const char *q[1];
|
|
||||||
q[0] = name;
|
|
||||||
|
|
||||||
if (PHP_PDO_PGSQL_LASTVAL_PG_VERSION <= PQserverVersion(H->server) && name == NULL) {
|
if (name == NULL) {
|
||||||
res = PQexec(H->server, "SELECT LASTVAL()");
|
res = PQexec(H->server, "SELECT LASTVAL()");
|
||||||
} else {
|
} else {
|
||||||
|
const char *q[1];
|
||||||
|
q[0] = name;
|
||||||
|
|
||||||
res = PQexecParams(H->server, "SELECT CURRVAL($1)", 1, NULL, q, NULL, NULL, 0);
|
res = PQexecParams(H->server, "SELECT CURRVAL($1)", 1, NULL, q, NULL, NULL, 0);
|
||||||
}
|
}
|
||||||
status = PQresultStatus(res);
|
status = PQresultStatus(res);
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
|
|
||||||
#define PHP_PDO_PGSQL_CONNECTION_FAILURE_SQLSTATE "08006"
|
#define PHP_PDO_PGSQL_CONNECTION_FAILURE_SQLSTATE "08006"
|
||||||
|
|
||||||
#define PHP_PDO_PGSQL_LASTVAL_PG_VERSION 80100
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *file;
|
const char *file;
|
||||||
int line;
|
int line;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
currval() vs lastval() - PDO PgSQL Bug #1134 [BUG] New record, PostgreSQL and the Primary key https://github.com/phalcon/cphalcon/issues/1134
|
PDO PgSQL Bug #72633 (Postgres PDO lastInsertId() should work without specifying a sequence)
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php
|
<?php
|
||||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
|
if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
|
Loading…
Add table
Add a link
Reference in a new issue