mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
fix(mysql): handle reading binary-encoded string data
This commit is contained in:
parent
6622f45b3a
commit
16f961584d
@ -69,13 +69,17 @@ impl<'de> Deserialize<'de, (MySqlRawValueFormat, &'de [MySqlColumn])> for Row {
|
||||
| MySqlTypeId::INT
|
||||
| MySqlTypeId::INT_UNSIGNED => 4,
|
||||
|
||||
MySqlTypeId::TEXT | MySqlTypeId::CHAR | MySqlTypeId::VARCHAR => {
|
||||
buf.get_uint_lenenc()
|
||||
}
|
||||
|
||||
id => {
|
||||
// TODO: return a protocol error instead
|
||||
unimplemented!("unsupported column type: {}", id.ty());
|
||||
}
|
||||
};
|
||||
|
||||
values.push(Some(buf.split_to(size)));
|
||||
values.push(Some(buf.split_to(size as usize)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user