@@ -80,14 +80,15 @@ where
8080 w. write_u16 :: < LittleEndian > ( 0 ) ?; // number of warnings
8181 w. end_packet ( ) ?;
8282
83- write_column_definitions ( pi, w, false , client_capabilities) ?;
84- write_column_definitions ( ci, w, false , client_capabilities)
83+ write_column_definitions_41 ( pi, w, client_capabilities) ?;
84+ write_column_definitions_41 ( ci, w, client_capabilities)
8585}
8686
87- pub ( crate ) fn write_column_definitions < ' a , I , W > (
87+ /// works for Protocol::ColumnDefinition41 is set
88+ /// see: https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_com_query_response_text_resultset_column_definition.html
89+ pub ( crate ) fn write_column_definitions_41 < ' a , I , W > (
8890 i : I ,
8991 w : & mut PacketWriter < W > ,
90- is_comm_field_list_response : bool ,
9192 client_capabilities : CapabilityFlags ,
9293) -> io:: Result < ( ) >
9394where
@@ -112,13 +113,6 @@ where
112113 w. write_all ( & [ 0x00 ] ) ?; // decimals
113114 w. write_all ( & [ 0x00 , 0x00 ] ) ?; // unused
114115
115- if is_comm_field_list_response {
116- // We should write length encoded int with string size
117- // followed by string with some "default values" (possibly it's column defaults).
118- // But we just send NULL for simplicity
119- w. write_u8 ( 0xfb ) ?;
120- }
121-
122116 w. end_packet ( ) ?;
123117 empty = false ;
124118 }
@@ -143,5 +137,5 @@ where
143137 let i = i. into_iter ( ) ;
144138 w. write_lenenc_int ( i. len ( ) as u64 ) ?;
145139 w. end_packet ( ) ?;
146- write_column_definitions ( i, w, false , client_capabilities)
140+ write_column_definitions_41 ( i, w, client_capabilities)
147141}
0 commit comments