summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysqli/tests')
-rw-r--r--ext/mysqli/tests/010.phpt6
-rw-r--r--ext/mysqli/tests/bug67839.phpt18
2 files changed, 16 insertions, 8 deletions
diff --git a/ext/mysqli/tests/010.phpt b/ext/mysqli/tests/010.phpt
index 83a43e06b..b1712ca2a 100644
--- a/ext/mysqli/tests/010.phpt
+++ b/ext/mysqli/tests/010.phpt
@@ -62,7 +62,7 @@ mysqli_close($link);
--EXPECT--
array(7) {
[0]=>
- float(3.141593)
+ float(3.14159)
[1]=>
float(-1.0E-6)
[2]=>
@@ -70,10 +70,10 @@ array(7) {
[3]=>
float(1.0E+12)
[4]=>
- float(0.5646425)
+ float(0.564642)
[5]=>
float(1)
[6]=>
- float(8.888889E+14)
+ float(8.88889E+14)
}
done!
diff --git a/ext/mysqli/tests/bug67839.phpt b/ext/mysqli/tests/bug67839.phpt
index b2821a21b..aadce9310 100644
--- a/ext/mysqli/tests/bug67839.phpt
+++ b/ext/mysqli/tests/bug67839.phpt
@@ -36,19 +36,27 @@ mysqli_float_handling - ensure 4 byte float is handled correctly
die();
}
- if (!mysqli_stmt_execute($stmt)) {
+ $id = null;
+ $fp4 = null;
+ $fp8 = null;
+
+ if (!mysqli_stmt_bind_result($stmt, $id, $fp4, $fp8)) {
printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
die();
}
-
- if (!($result = mysqli_stmt_get_result($stmt))) {
+ if (!mysqli_stmt_execute($stmt)) {
printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
die();
}
- $data = mysqli_fetch_assoc($result);
- print $data['id'] . ": " . $data['fp4'] . ": " . $data['fp8'] . "\n";
+
+ if (!(mysqli_stmt_fetch($stmt))) {
+ printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ die();
+ }
+
+ print $id . ": " . $fp4 . ": " . $fp8 . "\n";
?>
--CLEAN--
<?php