From: Joe Watkins Date: Fri, 20 Jan 2017 20:11:26 +0000 (+0000) Subject: Merge branch 'PHP-7.0' into PHP-7.1 X-Git-Tag: php-7.1.2RC1~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6feb2edbdc95b2db1ec09f011595de0204b2fa1;p=php Merge branch 'PHP-7.0' into PHP-7.1 * PHP-7.0: Fixed #73959 - lastInsertId fails to throw an exception in pdsql --- d6feb2edbdc95b2db1ec09f011595de0204b2fa1 diff --cc ext/pdo_pgsql/pgsql_driver.c index 045d32e7e5,b04cadeda9..52a9b8f285 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@@ -378,10 -387,16 +378,9 @@@ static char *pdo_pgsql_last_insert_id(p id = estrdup((char *)PQgetvalue(res, 0, 0)); *len = PQgetlength(res, 0, 0); } else { - if (savepoint) { - (void)PQexec(H->server, "ROLLBACK TO SAVEPOINT _php_lastid_savepoint"); - } pdo_pgsql_error(dbh, status, pdo_pgsql_sqlstate(res)); - *len = spprintf(&id, 0, ZEND_LONG_FMT, (zend_long) H->pgoid); } - if (savepoint) { - (void)PQexec(H->server, "RELEASE SAVEPOINT _php_lastid_savepoint"); - } - if (res) { PQclear(res); }