From c3944c4c4f66188e6dd5a6ed0f9e1364c701b736 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 17 Sep 2020 15:59:09 +0200 Subject: [PATCH] Fix mysqli_release_savepoint() on mysqlnd mysqli_release_savepoint() was not actually releasing a savepoint... --- ext/mysqli/mysqli_nonapi.c | 2 +- ext/mysqli/tests/mysqli_release_savepoint.phpt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 0d4a1704cd..3d0240183a 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -1234,7 +1234,7 @@ PHP_FUNCTION(mysqli_release_savepoint) #if !defined(MYSQLI_USE_MYSQLND) if (mysqli_savepoint_libmysql(mysql->mysql, name, TRUE)) { #else - if (FAIL == mysqlnd_savepoint(mysql->mysql, name)) { + if (FAIL == mysqlnd_release_savepoint(mysql->mysql, name)) { #endif RETURN_FALSE; } diff --git a/ext/mysqli/tests/mysqli_release_savepoint.phpt b/ext/mysqli/tests/mysqli_release_savepoint.phpt index e6417288d4..8f395ef6f8 100644 --- a/ext/mysqli/tests/mysqli_release_savepoint.phpt +++ b/ext/mysqli/tests/mysqli_release_savepoint.phpt @@ -50,7 +50,7 @@ if (!have_innodb($link)) printf("[009] Cannot turn off autocommit, expecting true, got %s/%s\n", gettype($tmp), $tmp); /* note that there is no savepoint my... */ - if (true !== ($tmp = mysqli_release_savepoint($link, 'my'))) + if (false !== ($tmp = mysqli_release_savepoint($link, 'my'))) printf("[010] Got %s - [%d] %s\n", var_dump($tmp, true), mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)')) -- 2.40.0