Skip to content

Commit

Permalink
fix float decode panic
Browse files Browse the repository at this point in the history
Signed-off-by: zjregee <[email protected]>
  • Loading branch information
zjregee committed Jul 7, 2024
1 parent 79191fb commit 38ecddd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sqllogictest-engines/src/mysql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ impl sqllogictest::AsyncDB for MySql {
| "MEDIUMINT UNSIGNED" | "BIGINT UNSIGNED" => {
row.try_get::<u64, _>(i).map(|v| v.to_string())
}
"FLOAT" | "DOUBLE" | "DECIMAL" => {
row.try_get::<f64, _>(i).map(|v| v.to_string())
}
"FLOAT" => row.try_get::<f32, _>(i).map(|v| v.to_string()),
"DOUBLE" => row.try_get::<f64, _>(i).map(|v| v.to_string()),
_ => {
return Err(sqlx::Error::Decode(
format!("Unsupported type: {}", type_info.name()).into(),
Expand Down

0 comments on commit 38ecddd

Please sign in to comment.