summaryrefslogtreecommitdiff
path: root/ext/mysqli
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-12-27 13:45:00 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-12-27 17:25:12 +0100
commitc4cbdfa99c61c3d1dfd2a23c93ce17190a392967 (patch)
tree7bef88f01133207d2d223e058394417a717201e9 /ext/mysqli
parentf97806726f85aaa42f26c7b7311ba0a807226f1a (diff)
downloadphp-git-c4cbdfa99c61c3d1dfd2a23c93ce17190a392967.tar.gz
Don't test the RENAME DATABASE query
Apparently this only existed for a short time, because it was found to be insecure. Don't try to test it.
Diffstat (limited to 'ext/mysqli')
-rw-r--r--ext/mysqli/tests/mysqli_get_client_stats.phpt28
1 files changed, 8 insertions, 20 deletions
diff --git a/ext/mysqli/tests/mysqli_get_client_stats.phpt b/ext/mysqli/tests/mysqli_get_client_stats.phpt
index 07ef78f296..f7de44b1db 100644
--- a/ext/mysqli/tests/mysqli_get_client_stats.phpt
+++ b/ext/mysqli/tests/mysqli_get_client_stats.phpt
@@ -666,7 +666,7 @@ mysqli.allow_local_infile=1
$info = $new_info;
- // CREATE, ALTER, RENAME, DROP DATABASE
+ // CREATE, ALTER, DROP DATABASE
if (mysqli_query($link, "CREATE DATABASE mysqli_get_client_stats")) {
if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
@@ -685,25 +685,13 @@ mysqli.allow_local_infile=1
mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'CREATE DATABASE');
$info = $new_info;
- if (mysqli_get_server_version($link) > 51700) {
- if (!mysqli_query($link, "RENAME DATABASE mysqli_get_client_stats TO mysqli_get_client_stats_"))
- printf("[%03d] RENAME DATABASE failed, [%d] %s\n", ++$test_counter,
- mysqli_errno($link), mysqli_error($link));
-
- if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
- printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
- ++$test_counter, gettype($new_info), $new_info);
- mysqli_get_client_stats_assert_eq('non_result_set_queries', $new_info, (string)($info['non_result_set_queries'] + 1), $test_counter, 'CREATE DATABASE');
- $info = $new_info;
- } else {
- if (!mysqli_query($link, "CREATE DATABASE mysqli_get_client_stats_"))
- printf("[%03d] CREATE DATABASE failed, [%d] %s\n", ++$test_counter,
- mysqli_errno($link), mysqli_error($link));
- if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
- printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
- ++$test_counter, gettype($new_info), $new_info);
- $info = $new_info;
- }
+ if (!mysqli_query($link, "CREATE DATABASE mysqli_get_client_stats_"))
+ printf("[%03d] CREATE DATABASE failed, [%d] %s\n", ++$test_counter,
+ mysqli_errno($link), mysqli_error($link));
+ if (!is_array($new_info = mysqli_get_client_stats()) || empty($new_info))
+ printf("[%03d] Expecting array/any_non_empty, got %s/%s\n",
+ ++$test_counter, gettype($new_info), $new_info);
+ $info = $new_info;
if (!mysqli_query($link, "DROP DATABASE mysqli_get_client_stats_"))
printf("[%03d] DROP DATABASE failed, [%d] %s\n", ++$test_counter,