Executes a previously prepared statement.
If specific data is large, it can be sent separately prior to this command (see COM_STMT_SEND_LONG_DATA).
If a statement is re-executed without changing the bind types, the types do not need to be sent to the server again.
Client to server.
Statement id is the identifier of the prepared statement (from COM_STMT_PREPARE answer)
Specific "-1" statement id value
Since MariaDB server version 10.2, value -1 (0xFFFFFFFF) can be used to indicate to use the last statement prepared on current connection if no COM_STMT_PREPARE has fail since.
This permit pipelining :
- send COM_STMT_PREPARE + COM_STMT_EXECUTE with statement id -1
- read COM_STMT_PREPARE + COM_STMT_EXECUTE response
In case COM_STMT_PREPARE returns an error, COM_STMT_EXECUTE will return an error that statement id -1 is unknown. This permits to avoid much of the network latency.
|2||cursor for update|
parameter type flag byte:
The NULL-Bitmap indicates if parameters are null (one bit per parameter).
NULL-bitmap size is (parameter number + 7) / 8
Binary parameter encoding
The server can answer with 3 different responses: