summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests/bug51647.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests/bug51647.phpt')
-rw-r--r--ext/mysqli/tests/bug51647.phpt126
1 files changed, 63 insertions, 63 deletions
diff --git a/ext/mysqli/tests/bug51647.phpt b/ext/mysqli/tests/bug51647.phpt
index 816a612d5a..8fd107a95d 100644
--- a/ext/mysqli/tests/bug51647.phpt
+++ b/ext/mysqli/tests/bug51647.phpt
@@ -39,69 +39,69 @@ $link->close();
?>
--FILE--
<?php
- include ("connect.inc");
-
- if (!is_object($link = mysqli_init()))
- printf("[001] Cannot create link\n");
-
- if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT)) {
- printf("[003] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- }
-
- if (!$res = $link->query('SHOW STATUS like "Ssl_cipher"')) {
- if (1064 == $link->errno) {
- /* ERROR 1064 (42000): You have an error in your SQL syntax; = sql strict mode */
- if ($res = $link->query("SHOW STATUS")) {
- while ($row = $res->fetch_assoc())
- if ($row['Variable_name'] == 'Ssl_cipher')
- break;
- } else {
- printf("[005] [%d] %s\n", $link->errno, $link->error);
- }
- } else {
- printf("[004] [%d] %s\n", $link->errno, $link->error);
- }
- } else {
- if (!$row = $res->fetch_assoc())
- printf("[006] [%d] %s\n", $link->errno, $link->error);
- if (!strlen($row["Value"]))
- printf("[007] Empty cipher. No encryption!");
- var_dump($row);
- }
-
- $link->close();
-
- if (!is_object($link = mysqli_init()))
- printf("[008] Cannot create link\n");
-
- if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_SSL)) {
- printf("[009] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
- }
-
- if (!$res = $link->query('SHOW STATUS like "Ssl_cipher"')) {
- if (1064 == $link->errno) {
- /* ERROR 1064 (42000): You have an error in your SQL syntax; = sql strict mode */
- if ($res = $link->query("SHOW STATUS")) {
- while ($row = $res->fetch_assoc())
- if ($row['Variable_name'] == 'Ssl_cipher')
- break;
- } else {
- printf("[010] [%d] %s\n", $link->errno, $link->error);
- }
- } else {
- printf("[011] [%d] %s\n", $link->errno, $link->error);
- }
- } else {
- if (!$row = $res->fetch_assoc())
- printf("[012] [%d] %s\n", $link->errno, $link->error);
- if (!strlen($row["Value"]))
- printf("[013] Empty cipher. No encryption!");
- var_dump($row);
- }
-
- $link->close();
-
- print "done!";
+ include ("connect.inc");
+
+ if (!is_object($link = mysqli_init()))
+ printf("[001] Cannot create link\n");
+
+ if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_SSL | MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT)) {
+ printf("[003] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ }
+
+ if (!$res = $link->query('SHOW STATUS like "Ssl_cipher"')) {
+ if (1064 == $link->errno) {
+ /* ERROR 1064 (42000): You have an error in your SQL syntax; = sql strict mode */
+ if ($res = $link->query("SHOW STATUS")) {
+ while ($row = $res->fetch_assoc())
+ if ($row['Variable_name'] == 'Ssl_cipher')
+ break;
+ } else {
+ printf("[005] [%d] %s\n", $link->errno, $link->error);
+ }
+ } else {
+ printf("[004] [%d] %s\n", $link->errno, $link->error);
+ }
+ } else {
+ if (!$row = $res->fetch_assoc())
+ printf("[006] [%d] %s\n", $link->errno, $link->error);
+ if (!strlen($row["Value"]))
+ printf("[007] Empty cipher. No encryption!");
+ var_dump($row);
+ }
+
+ $link->close();
+
+ if (!is_object($link = mysqli_init()))
+ printf("[008] Cannot create link\n");
+
+ if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_SSL)) {
+ printf("[009] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ }
+
+ if (!$res = $link->query('SHOW STATUS like "Ssl_cipher"')) {
+ if (1064 == $link->errno) {
+ /* ERROR 1064 (42000): You have an error in your SQL syntax; = sql strict mode */
+ if ($res = $link->query("SHOW STATUS")) {
+ while ($row = $res->fetch_assoc())
+ if ($row['Variable_name'] == 'Ssl_cipher')
+ break;
+ } else {
+ printf("[010] [%d] %s\n", $link->errno, $link->error);
+ }
+ } else {
+ printf("[011] [%d] %s\n", $link->errno, $link->error);
+ }
+ } else {
+ if (!$row = $res->fetch_assoc())
+ printf("[012] [%d] %s\n", $link->errno, $link->error);
+ if (!strlen($row["Value"]))
+ printf("[013] Empty cipher. No encryption!");
+ var_dump($row);
+ }
+
+ $link->close();
+
+ print "done!";
?>
--EXPECTF--
array(2) {