Problem
types::decode cannot express the wire-level decoding policy the mysql2 npm package actually implements. Two concrete gaps: there is no option to truncate a DATETIME column's sub-second part the way mysql2 does, and because MySQL reports character_set == 63 (binary) for every non-string column type, TIME, BIT and GEOMETRY all collapse into the same generic Buffer arm with no way to tell them apart by type.
Why it matters
This gap is wide enough that Perry's P7 lane's own report says plainly: "This binding ended up not using decode at all" — the crate's decoding path was not usable for turnloop-mysql's actual consumer (mysql2 parity), so the binding bypassed it and implemented its own decoding instead.
What would fix it
Either a MySQL-column-type-aware decode path that keeps TIME/BIT/GEOMETRY distinguishable instead of collapsing them via character_set, plus an option controlling DATETIME sub-second truncation — or, at minimum, exposing enough raw column-type metadata alongside the decoded value that a host can implement mysql2's specific policy without reimplementing decoding wholesale.
Problem
types::decodecannot express the wire-level decoding policy themysql2npm package actually implements. Two concrete gaps: there is no option to truncate aDATETIMEcolumn's sub-second part the waymysql2does, and because MySQL reportscharacter_set == 63(binary) for every non-string column type,TIME,BITandGEOMETRYall collapse into the same genericBufferarm with no way to tell them apart by type.Why it matters
This gap is wide enough that Perry's P7 lane's own report says plainly: "This binding ended up not using
decodeat all" — the crate's decoding path was not usable forturnloop-mysql's actual consumer (mysql2parity), so the binding bypassed it and implemented its own decoding instead.What would fix it
Either a MySQL-column-type-aware decode path that keeps
TIME/BIT/GEOMETRYdistinguishable instead of collapsing them viacharacter_set, plus an option controlling DATETIME sub-second truncation — or, at minimum, exposing enough raw column-type metadata alongside the decoded value that a host can implementmysql2's specific policy without reimplementing decoding wholesale.