2
0
mirror of https://github.com/boostorg/mysql.git synced 2026-02-16 01:22:20 +00:00

Refactored binary protocol magic numbers

Fixed wider ranges for DATE and DATETIME
Removed old binary (de)serialization functions
This commit is contained in:
ruben
2020-05-08 16:54:22 +01:00
parent d71695b3d4
commit a76caa8a83
10 changed files with 238 additions and 172 deletions

View File

@@ -133,9 +133,13 @@ INSTANTIATE_TEST_SUITE_P(DATE, DeserializeBinaryValueErrorTest, Values(
err_binary_value_testcase("empty", {}, protocol_field_type::date, errc::incomplete_message),
err_binary_value_testcase("incomplete_year", {0x04, 0xff},
protocol_field_type::date, errc::incomplete_message),
err_binary_value_testcase("year_gt_max", {0x04, 0x10, 0x27, 0x03, 0x1c}, // year 10000
err_binary_value_testcase("no_month_day", {0x04, 0x09, 0x27},
protocol_field_type::date, errc::incomplete_message),
err_binary_value_testcase("no_day", {0x04, 0x09, 0x27, 0x01},
protocol_field_type::date, errc::incomplete_message),
err_binary_value_testcase("gt_max", {0x04, 0x10, 0x27, 0x0c, 0x1f}, // year 10000
protocol_field_type::date),
err_binary_value_testcase("year_lt_min", {0x04, 0x63, 0x00, 0x03, 0x1c}, // year 99
err_binary_value_testcase("protocol_max", {0x04, 0xff, 0xff, 0x0c, 0x1f},
protocol_field_type::date)
));