Implement server-side cursors by handling COM_STMT_FETCH command. The client indicates that it wants to use cursor by setting a flag in COM_STMT_EXECUTE Please refer to https://dev.mysql.com/doc/internals/en/com-stmt-execute.html Subsequently, the client acquires result rows repeatedly by COM_STMT_FETCH, which will carry stmt-id and fetch size. Please refer to https://dev.mysql.com/doc/internals/en/com-stmt-fetch.html This commit only support forward-only, read-only cursor