1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Drop MYSQLI_CURSOR_TYPE_FOR_UPDATE & MYSQLI_CURSOR_TYPE_SCROLLABLE (#15486)

This commit is contained in:
Kamil Tekiela
2024-08-19 13:54:40 +02:00
committed by GitHub
parent 4baf6a643b
commit 6c7ff08920
8 changed files with 4 additions and 33 deletions

View File

@@ -876,6 +876,9 @@ PHP 8.4 UPGRADE NOTES
has been removed.
. The MYSQLI_STMT_ATTR_PREFETCH_ROWS constant has been removed.
The feature is unavailable with mysqlnd.
. The MYSQLI_CURSOR_TYPE_FOR_UPDATE and MYSQLI_CURSOR_TYPE_SCROLLABLE
constants have been removed. This functionality was never implemented,
neither with mysqlnd nor with libmysql.
- OpenSSL:
. The OpenSSL extension now requires at least OpenSSL 1.1.1.

View File

@@ -181,16 +181,6 @@ const MYSQLI_CURSOR_TYPE_NO_CURSOR = UNKNOWN;
* @cvalue CURSOR_TYPE_READ_ONLY
*/
const MYSQLI_CURSOR_TYPE_READ_ONLY = UNKNOWN;
/**
* @var int
* @cvalue CURSOR_TYPE_FOR_UPDATE
*/
const MYSQLI_CURSOR_TYPE_FOR_UPDATE = UNKNOWN;
/**
* @var int
* @cvalue CURSOR_TYPE_SCROLLABLE
*/
const MYSQLI_CURSOR_TYPE_SCROLLABLE = UNKNOWN;
/* column information */
/**

View File

@@ -1740,8 +1740,6 @@ PHP_FUNCTION(mysqli_stmt_attr_set)
switch (mode_in) {
case CURSOR_TYPE_NO_CURSOR:
case CURSOR_TYPE_READ_ONLY:
case CURSOR_TYPE_FOR_UPDATE:
case CURSOR_TYPE_SCROLLABLE:
break;
default:
zend_argument_value_error(ERROR_ARG_POS(3), "must be one of the MYSQLI_CURSOR_TYPE_* constants "

View File

@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 6ab095be89ce9416df60f2dfaa1bd70732e33136 */
* Stub hash: 6a64c5833a4c83d0bd0e63f34d27d2e696c78b66 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
@@ -1075,8 +1075,6 @@ static void register_mysqli_symbols(int module_number)
REGISTER_LONG_CONSTANT("MYSQLI_STMT_ATTR_CURSOR_TYPE", STMT_ATTR_CURSOR_TYPE, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_CURSOR_TYPE_NO_CURSOR", CURSOR_TYPE_NO_CURSOR, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_CURSOR_TYPE_READ_ONLY", CURSOR_TYPE_READ_ONLY, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_CURSOR_TYPE_FOR_UPDATE", CURSOR_TYPE_FOR_UPDATE, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_CURSOR_TYPE_SCROLLABLE", CURSOR_TYPE_SCROLLABLE, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_NOT_NULL_FLAG", NOT_NULL_FLAG, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_PRI_KEY_FLAG", PRI_KEY_FLAG, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("MYSQLI_UNIQUE_KEY_FLAG", UNIQUE_KEY_FLAG, CONST_PERSISTENT);

View File

@@ -133,8 +133,6 @@ $expected_constants = array_merge($expected_constants, array(
"MYSQLI_STMT_ATTR_CURSOR_TYPE" => true,
"MYSQLI_CURSOR_TYPE_NO_CURSOR" => true,
"MYSQLI_CURSOR_TYPE_READ_ONLY" => true,
"MYSQLI_CURSOR_TYPE_FOR_UPDATE" => true,
"MYSQLI_CURSOR_TYPE_SCROLLABLE" => true,
));
$expected_constants['MYSQLI_OPT_SSL_VERIFY_SERVER_CERT'] = true;

View File

@@ -59,9 +59,6 @@ require_once 'skipifconnectfailure.inc';
}
mysqli_next_result($link);
$stmt = mysqli_prepare($link, "SELECT 1");
mysqli_stmt_attr_set($stmt, MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_FOR_UPDATE);
// Check that none of the above would have caused any error messages if MYSQL_REPORT_ERROR would
// not have been set. If that would be the case, the test would be broken.
mysqli_report(MYSQLI_REPORT_OFF);
@@ -89,9 +86,6 @@ require_once 'skipifconnectfailure.inc';
}
mysqli_next_result($link);
$stmt = mysqli_prepare($link, "SELECT 1");
mysqli_stmt_attr_set($stmt, MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_FOR_UPDATE);
/*
Internal macro MYSQL_REPORT_STMT_ERROR
*/
@@ -330,8 +324,6 @@ Warning: mysqli_next_result(): (%s/%d): You have an error in your SQL syntax; ch
Warning: mysqli_store_result(): (%s/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'FOO' at line 1 in %s on line %d
Warning: mysqli_stmt_attr_set(): (%s/%d): Not implemented in %s on line %d
Deprecated: Function mysqli_kill() is deprecated since 8.4, use KILL CONNECTION/QUERY SQL statement instead in %s
mysqli_kill(): Argument #2 ($process_id) must be greater than 0

View File

@@ -100,12 +100,6 @@ require_once 'skipifconnectfailure.inc';
echo $e->getMessage() . \PHP_EOL;
}
if (false !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_FOR_UPDATE)))
printf("[011] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
if (false !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_SCROLLABLE)))
printf("[012] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp);
if (true !== ($tmp = $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_NO_CURSOR)))
printf("[013] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);

View File

@@ -406,8 +406,6 @@ enum myslqnd_cursor_type
{
CURSOR_TYPE_NO_CURSOR= 0,
CURSOR_TYPE_READ_ONLY= 1,
CURSOR_TYPE_FOR_UPDATE= 2,
CURSOR_TYPE_SCROLLABLE= 4
};
typedef enum mysqlnd_connection_close_type