Skip to content

Remove MYSQLI_IS_MARIADB constant #8919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
5 changes: 4 additions & 1 deletion ext/mysqli/mysqli.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,10 @@
*/
const MYSQLI_TRANS_COR_NO_RELEASE = UNKNOWN;

/** @var bool */
/**
* @var bool
* @deprecated
*/
const MYSQLI_IS_MARIADB = false;

final class mysqli_driver
Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/mysqli_arginfo.h

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

3 changes: 3 additions & 0 deletions ext/mysqli/tests/deprecated_constants.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if (stristr(mysqli_get_client_info(), 'mysqlnd')) {
print("\nDeprecated: Constant MYSQLI_SERVER_QUERY_WAS_SLOW is deprecated in dummy\n-1\n");
print("\nDeprecated: Constant MYSQLI_SERVER_PS_OUT_PARAMS is deprecated in dummy\n-1\n");
}
echo constant('MYSQLI_IS_MARIADB')."\n";

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

Deprecated: Constant MYSQLI_SERVER_PS_OUT_PARAMS is deprecated in %s
%i

Deprecated: Constant MYSQLI_IS_MARIADB is deprecated in %s
5 changes: 1 addition & 4 deletions ext/mysqli/tests/mysqli_constants.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ $expected_constants = array(
"MYSQLI_GROUP_FLAG" => true,
"MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED"=> true,
"MYSQLI_SERVER_QUERY_NO_INDEX_USED" => true,
"MYSQLI_OPT_LOAD_DATA_LOCAL_DIR" => true,
"MYSQLI_IS_MARIADB" => true,

"MYSQLI_TYPE_DECIMAL" => true,
Expand Down Expand Up @@ -181,10 +182,6 @@ if ($IS_MYSQLND) {
$expected_constants["MYSQLI_TYPE_JSON"] = true;
}

if (($version > 80021 && $constants['mysqli']['MYSQLI_IS_MARIADB']) || $IS_MYSQLND) {
$expected_constants['MYSQLI_OPT_LOAD_DATA_LOCAL_DIR'] = true;
}

$unexpected_constants = array();

foreach ($constants as $group => $consts) {
Expand Down