@@ -106,7 +106,6 @@ if (!$IS_MYSQLND)
106
106
// either there is no result (no SELECT) or there is an error
107
107
if (mysqli_errno ($ link ) > 0 ) {
108
108
$ saved_errors [$ thread_id ] = mysqli_errno ($ link );
109
- printf ("[003] '%s' caused %d \n" , $ links [$ thread_id ]['query ' ], mysqli_errno ($ link ));
110
109
}
111
110
}
112
111
}
@@ -115,10 +114,13 @@ if (!$IS_MYSQLND)
115
114
116
115
// Checking if all lines are still usable
117
116
foreach ($ links as $ thread_id => $ link ) {
118
- if (isset ($ saved_errors [$ thread_id ]) &&
119
- $ saved_errors [$ thread_id ] != mysqli_errno ($ link ['link ' ])) {
120
- printf ("[004] Error state not saved for query '%s', %d != %d \n" , $ link ['query ' ],
121
- $ saved_errors [$ thread_id ], mysqli_errno ($ link ['link ' ]));
117
+ if (isset ($ saved_errors [$ thread_id ])) {
118
+ printf ("[003] '%s' caused %d \n" ,
119
+ $ links [$ thread_id ]['query ' ], $ saved_errors [$ thread_id ]);
120
+ if ($ saved_errors [$ thread_id ] != mysqli_errno ($ link ['link ' ])) {
121
+ printf ("[004] Error state not saved for query '%s', %d != %d \n" , $ link ['query ' ],
122
+ $ saved_errors [$ thread_id ], mysqli_errno ($ link ['link ' ]));
123
+ }
122
124
}
123
125
124
126
if (!$ res = mysqli_query ($ link ['link ' ], 'SELECT * FROM test WHERE id = 100 ' ))
0 commit comments