Skip to content

Commit 079773c

Browse files
committed
Merge branch 'IS_MARIADB'
* IS_MARIADB: Deprecate MYSQLI_IS_MARIADB
2 parents 4d8dd8d + 5a69cb6 commit 079773c

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ PHP 8.2 UPGRADE NOTES
247247
mysqli with libmysql and all relevant functionality has been removed.
248248
. The reconnect property of mysqli_driver has been removed. It was supported only by libmysql.
249249
. The INI directive mysqli.reconnect has been removed.
250+
. The constant MYSQLI_IS_MARIADB has been deprecated.
250251

251252
- OCI8:
252253
. The minimum Oracle Client library version required is now 11.2.

ext/mysqli/mysqli.stub.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,10 @@
610610
*/
611611
const MYSQLI_TRANS_COR_NO_RELEASE = UNKNOWN;
612612

613-
/** @var bool */
613+
/**
614+
* @var bool
615+
* @deprecated
616+
*/
614617
const MYSQLI_IS_MARIADB = false;
615618

616619
final class mysqli_driver

ext/mysqli/mysqli_arginfo.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/mysqli/tests/deprecated_constants.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ if (stristr(mysqli_get_client_info(), 'mysqlnd')) {
1616
print("\nDeprecated: Constant MYSQLI_SERVER_QUERY_WAS_SLOW is deprecated in dummy\n-1\n");
1717
print("\nDeprecated: Constant MYSQLI_SERVER_PS_OUT_PARAMS is deprecated in dummy\n-1\n");
1818
}
19+
echo constant('MYSQLI_IS_MARIADB')."\n";
1920

2021
?>
2122
--EXPECTF--
@@ -37,3 +38,5 @@ Deprecated: Constant MYSQLI_SERVER_QUERY_WAS_SLOW is deprecated in %s
3738

3839
Deprecated: Constant MYSQLI_SERVER_PS_OUT_PARAMS is deprecated in %s
3940
%i
41+
42+
Deprecated: Constant MYSQLI_IS_MARIADB is deprecated in %s

ext/mysqli/tests/mysqli_constants.phpt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ $expected_constants = array(
4747
"MYSQLI_GROUP_FLAG" => true,
4848
"MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED"=> true,
4949
"MYSQLI_SERVER_QUERY_NO_INDEX_USED" => true,
50+
"MYSQLI_OPT_LOAD_DATA_LOCAL_DIR" => true,
5051
"MYSQLI_IS_MARIADB" => true,
5152

5253
"MYSQLI_TYPE_DECIMAL" => true,
@@ -181,10 +182,6 @@ if ($IS_MYSQLND) {
181182
$expected_constants["MYSQLI_TYPE_JSON"] = true;
182183
}
183184

184-
if (($version > 80021 && $constants['mysqli']['MYSQLI_IS_MARIADB']) || $IS_MYSQLND) {
185-
$expected_constants['MYSQLI_OPT_LOAD_DATA_LOCAL_DIR'] = true;
186-
}
187-
188185
$unexpected_constants = array();
189186

190187
foreach ($constants as $group => $consts) {

0 commit comments

Comments
 (0)