COM_STMT_EXECUTE asks the server to execute a prepared statement as identified by stmt-id.
It sends the values for the placeholders of the prepared statement (if it contained any) in Binary Protocol Value form. The type of each parameter is made up of two bytes:
the type as in
a flag byte which has the highest bit set if the type is unsigned 
The num-params used for this packet has
to match the num_params of the
of the corresponding prepared statement.
The server returns a COM_STMT_EXECUTE Response.
COM_STMT_EXECUTE execute a prepared statement direction: client -> server response: COM_STMT_EXECUTE Response payload: 1  COM_STMT_EXECUTE 4 stmt-id 1 flags 4 iteration-count if num-params > 0: n NULL-bitmap, length: (num-params+7)/8 1 new-params-bound-flag if new-params-bound-flag == 1: n type of each parameter, length: num-params * 2 n value of each parameter example: 12 00 00 00 17 01 00 00 00 00 01 00 00 00 00 01 ................ 0f 00 03 66 6f 6f ...foo
The iteration-count is always 1.
The flags are:
Copyright © 1997, 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices