fix(mysql): handle Changed and Warnings in OK info parser

This commit is contained in:
Ryan Leckey 2021-01-29 23:37:46 -08:00
parent ad6d4b5740
commit 5926dcaa69
No known key found for this signature in database
GPG Key ID: F8AA68C235AB08C9

View File

@ -1,7 +1,7 @@
// https://dev.mysql.com/doc/c-api/8.0/en/mysql-info.html
// https://mariadb.com/kb/en/mysql_info/
#[derive(Debug)]
#[derive(Debug, Default)]
pub(crate) struct Info {
pub(crate) records: u64,
pub(crate) duplicates: u64,
@ -33,6 +33,14 @@ impl Info {
"Duplicates" => duplicates = value,
"Rows matched" => matched = value,
// ignore records changed
// this is "rows affected" for UPDATE
"Changed" => {},
// ignore warnings in info
// these are passed back differently
"Warnings" => {},
// unknown key
_ => failed = true,
}