Skip to content

Commit dc88ab9

Browse files
committed
Fix UUID test for MySQL
The previous test used the wrong SQL for MySQL. This commit corrects it.
1 parent 3689578 commit dc88ab9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/any/any.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,13 @@ async fn it_has_json() -> anyhow::Result<()> {
117117
async fn it_has_uuid() -> anyhow::Result<()> {
118118
use sqlx_oldapi::types::Uuid;
119119
#[cfg(feature = "sqlite")]
120-
let sql = "CAST('123e4567-e89b-12d3-a456-426614174000' AS TEXT)";
120+
let sql = "x'123e4567e89b12d3a456426614174000'";
121121
#[cfg(feature = "mssql")]
122122
let sql = "CONVERT(uniqueidentifier, '123e4567-e89b-12d3-a456-426614174000')";
123123
#[cfg(feature = "postgres")]
124124
let sql = "CAST('123e4567-e89b-12d3-a456-426614174000' AS UUID)";
125+
#[cfg(feature = "mysql")]
126+
let sql = "UUID_TO_BIN('123e4567-e89b-12d3-a456-426614174000')";
125127
assert_eq!(
126128
Uuid::parse_str("123e4567-e89b-12d3-a456-426614174000")?,
127129
get_val::<Uuid>(sql).await?

0 commit comments

Comments
 (0)