diff options
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/mysqli/tests/050.phpt | 19 | ||||
| -rw-r--r-- | ext/mysqli/tests/051.phpt | 20 | ||||
| -rw-r--r-- | ext/mysqli/tests/052.phpt | 20 | ||||
| -rw-r--r-- | ext/mysqli/tests/053.phpt | 18 | ||||
| -rw-r--r-- | ext/mysqli/tests/054.phpt | 18 | ||||
| -rw-r--r-- | ext/mysqli/tests/055.phpt | 17 |
6 files changed, 112 insertions, 0 deletions
diff --git a/ext/mysqli/tests/050.phpt b/ext/mysqli/tests/050.phpt new file mode 100644 index 0000000000..9ab5d346f8 --- /dev/null +++ b/ext/mysqli/tests/050.phpt @@ -0,0 +1,19 @@ +--TEST-- +non freed statement test +--FILE-- +<?php + include "connect.inc"; + + /************************ + * non freed stamement + ************************/ + $link = mysqli_connect("localhost", $user, $passwd); + + $stmt = mysqli_prepare($link, "SELECT CURRENT_USER()"); + mysqli_execute($stmt); + + mysqli_close($link); + printf("Ok\n"); +?> +--EXPECT-- +Ok diff --git a/ext/mysqli/tests/051.phpt b/ext/mysqli/tests/051.phpt new file mode 100644 index 0000000000..746597e925 --- /dev/null +++ b/ext/mysqli/tests/051.phpt @@ -0,0 +1,20 @@ +--TEST-- +free statement after close +--FILE-- +<?php + include "connect.inc"; + + /************************ + * free statement after close + ************************/ + $link = mysqli_connect("localhost", $user, $passwd); + + $stmt1 = mysqli_prepare($link, "SELECT CURRENT_USER()"); + mysqli_execute($stmt1); + + mysqli_close($link); + mysqli_stmt_close($stmt1); + printf("Ok\n"); +?> +--EXPECT-- +Ok diff --git a/ext/mysqli/tests/052.phpt b/ext/mysqli/tests/052.phpt new file mode 100644 index 0000000000..5682478887 --- /dev/null +++ b/ext/mysqli/tests/052.phpt @@ -0,0 +1,20 @@ +--TEST-- +call statement after close +--FILE-- +<?php + include "connect.inc"; + + /************************ + * statement call after close + ************************/ + $link = mysqli_connect("localhost", $user, $passwd); + + $stmt2 = mysqli_prepare($link, "SELECT CURRENT_USER()"); + + mysqli_close($link); + mysqli_execute($stmt2); + mysqli_stmt_close($stmt2); + printf("Ok\n"); +?> +--EXPECT-- +Ok diff --git a/ext/mysqli/tests/053.phpt b/ext/mysqli/tests/053.phpt new file mode 100644 index 0000000000..f542d0f099 --- /dev/null +++ b/ext/mysqli/tests/053.phpt @@ -0,0 +1,18 @@ +--TEST-- +not freed resultset +--FILE-- +<?php + include "connect.inc"; + + /************************ + * non freed resultset + ************************/ + $link = mysqli_connect("localhost", $user, $passwd); + + $result = mysqli_query($link, "SELECT CURRENT_USER()"); + mysqli_close($link); + printf("Ok\n"); + +?> +--EXPECT-- +Ok diff --git a/ext/mysqli/tests/054.phpt b/ext/mysqli/tests/054.phpt new file mode 100644 index 0000000000..eab207db4d --- /dev/null +++ b/ext/mysqli/tests/054.phpt @@ -0,0 +1,18 @@ +--TEST-- +free resultset after close +--FILE-- +<?php + include "connect.inc"; + + /************************ + * free resultset after close + ************************/ + $link = mysqli_connect("localhost", $user, $passwd); + + $result1 = mysqli_query($link, "SELECT CURRENT_USER()"); + mysqli_close($link); + mysqli_free_result($result1); + printf("Ok\n"); +?> +--EXPECT-- +Ok diff --git a/ext/mysqli/tests/055.phpt b/ext/mysqli/tests/055.phpt new file mode 100644 index 0000000000..e777bcfc99 --- /dev/null +++ b/ext/mysqli/tests/055.phpt @@ -0,0 +1,17 @@ +--TEST-- +free nothing +--FILE-- +<?php + include "connect.inc"; + + /************************ + * don't free anything + ************************/ + $link = mysqli_connect("localhost", $user, $passwd); + + $result2 = mysqli_query($link, "SELECT CURRENT_USER()"); + $stmt2 = mysqli_prepare($link, "SELECT CURRENT_USER()"); + printf("Ok\n"); +?> +--EXPECT-- +Ok |
