MySQL panic: range end index 4 out of range for slice of length 2 #3975
-
Hey, firstly thanks for an amazing crate, it's working wonders for me. I have a MySQL schema with a table, and a column defined as `HP lvl 1` BIGINT, This then generates a schema including HP_lvl_1 -> Nullable<Bigint>, I also have a models.rs, (which is a copy almost verbatim of the schema table) pub HP_lvl_1: Option<i64>, I'm using a simple I receive the following panic
Clicking into the schema Bigint, I see the following macro declared #[diesel(mysql_type(name = "LongLong"))] However, the panic is occurring at this point MysqlType::UnsignedLong | MysqlType::Long => {
NumericRepresentation::Medium(i32::from_ne_bytes((&self.raw[..4]).try_into()?))
} It seems to me, that there's a disconnect where the schema and model are |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Thanks for opening this discussion. This might be a bug in diesel. Could you provide some code + schema to reproduce the issue? Also information about your exact MySQL and mysqlclient version might help to track the issue down. |
Beta Was this translation helpful? Give feedback.
That sounds related to #3929. It seems like there are a few backward incompatible changes in the MySQL 8.3 release.