fix some tests
This commit is contained in:
parent
2925f6d444
commit
85871448bc
|
@ -50,6 +50,9 @@ try {
|
|||
// with or without AE: 1 or 0 should be inserted when inserting into an integer column
|
||||
// double is inserted when inserting into a real column
|
||||
} else if ($pdoParamType == "PDO::PARAM_BOOL") {
|
||||
if ($r === false) {
|
||||
echo "Conversion from $pdoParamType to $dataType should be supported\n";
|
||||
} else {
|
||||
$sql = "SELECT c_det, c_rand FROM $tbname";
|
||||
$stmt = $conn->query($sql);
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
@ -64,7 +67,12 @@ try {
|
|||
echo "Conversion from $pdoParamType to $dataType insert a boolean\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
// check the case when inserting as PDO::PARAM_INT, PDO::PARAM_STR or PDO::PARAM_LOB
|
||||
// with or without AE: should work
|
||||
} else {
|
||||
if ($r === false) {
|
||||
echo "Conversion from $pdoParamType to $dataType should be supported\n";
|
||||
} else {
|
||||
$sql = "SELECT c_det, c_rand FROM $tbname";
|
||||
$stmt = $conn->query($sql);
|
||||
|
@ -83,6 +91,7 @@ try {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$conn->query("TRUNCATE TABLE $tbname");
|
||||
}
|
||||
dropTable($conn, $tbname);
|
||||
|
|
|
@ -122,6 +122,7 @@ foreach($dataTypes as $dataType) {
|
|||
echo "****Conversion from $sqlType to $typeFull is supported****\n";
|
||||
} else {
|
||||
echo "Conversion from $sqlType to $typeFull causes data corruption\n";
|
||||
var_dump($row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ Testing float(24):
|
|||
Test successfully done
|
||||
|
||||
Testing float(36):
|
||||
Conversion from SQLSRV_SQLTYPE_FLOAT to float(36) should be supported
|
||||
****Conversion from SQLSRV_SQLTYPE_FLOAT to float(36) is supported****
|
||||
|
||||
Testing float(53):
|
||||
Conversion from SQLSRV_SQLTYPE_FLOAT to float(53) should be supported
|
||||
****Conversion from SQLSRV_SQLTYPE_FLOAT to float(53) is supported****
|
Loading…
Reference in a new issue