mirror of
https://github.com/boostorg/mysql.git
synced 2026-02-18 02:02:17 +00:00
Added stmt_prepare msg and serialization
This commit is contained in:
@@ -493,5 +493,30 @@ INSTANTIATE_TEST_SUITE_P(ComQuery, SerializeTest, testing::Values(
|
||||
})
|
||||
));
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(ComStmtPrepare, SerializeTest, testing::Values(
|
||||
SerializeParams(com_stmt_prepare_packet{
|
||||
string_eof("SELECT * from three_rows_table WHERE id = ?")
|
||||
}, {
|
||||
0x16, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x20,
|
||||
0x2a, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74,
|
||||
0x68, 0x72, 0x65, 0x65, 0x5f, 0x72, 0x6f, 0x77,
|
||||
0x73, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20,
|
||||
0x57, 0x48, 0x45, 0x52, 0x45, 0x20, 0x69, 0x64,
|
||||
0x20, 0x3d, 0x20, 0x3f
|
||||
})
|
||||
));
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(ComStmtPrepareResponse, DeserializeSpaceTest, testing::Values(
|
||||
SerializeParams(com_stmt_prepare_ok_packet{
|
||||
int4(1), // statement id
|
||||
int2(2), // number of fields
|
||||
int2(3), // number of params
|
||||
int2(0), // warnings
|
||||
}, {
|
||||
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00
|
||||
})
|
||||
));
|
||||
|
||||
|
||||
} // anon namespace
|
||||
|
||||
Reference in New Issue
Block a user