Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 0 additions & 10 deletions ext/mysqli/mysqli.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,6 @@
* @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 */
/**
Expand Down
2 changes: 0 additions & 2 deletions ext/mysqli/mysqli_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
4 changes: 1 addition & 3 deletions ext/mysqli/mysqli_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions ext/mysqli/tests/mysqli_constants.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions ext/mysqli/tests/mysqli_report.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions ext/mysqli/tests/mysqli_stmt_attr_set.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions ext/mysqlnd/mysqlnd_enum_n_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading