Skip to content

Commit 1b34738

Browse files
committed
Change test expectation
If the prepare fails the statement state should be unaffected
1 parent f6ba875 commit 1b34738

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/mysqli/tests/mysqli_stmt_affected_rows.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ require_once('skipifconnectfailure.inc');
194194

195195
/* try to use stmt_affected_rows like stmt_num_rows */
196196
/* stmt_affected_rows is not really meant for SELECT! */
197-
if (mysqli_stmt_prepare($stmt, 'SELECT unknown_column FROM this_table_does_not_exist') ||
197+
if (mysqli_stmt_prepare($stmt, 'SELECT unknown_column FROM this_table_does_not_exist') &&
198198
mysqli_stmt_execute($stmt))
199-
printf("[041] The invalid SELECT statement is issued on purpose\n");
199+
printf("[041] Expecting SELECT statement to fail on purpose\n");
200200

201201
if (-1 !== ($tmp = mysqli_stmt_affected_rows($stmt)))
202202
printf("[042] Expecting int/-1, got %s/%s\n", gettype($tmp), $tmp);

0 commit comments

Comments
 (0)