mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
fix(postgres): fix buffer management in PgCopyIn.read_from (#2630)
This commit is contained in:
@@ -229,7 +229,7 @@ impl<C: DerefMut<Target = PgConnection>> PgCopyIn<C> {
|
||||
let buf = conn.stream.write_buffer_mut();
|
||||
|
||||
// CopyData format code and reserved space for length
|
||||
buf.put_slice(b"d\0\0\0\0");
|
||||
buf.put_slice(b"d\0\0\0\x04");
|
||||
|
||||
let read = match () {
|
||||
// Tokio lets us read into the buffer without zeroing first
|
||||
|
||||
Reference in New Issue
Block a user