All pages
Powered by GitBook
1 of 1

ERR_Packet

ERR_Packet indicates that an error occurred.

Fields

  • int<1> ERR_Packet header = 0xFF.

  • int<2> error code. see error list.

  • If (error code == 0xFFFF) /* progress reporting */:

    • int<1> stage.

    • int<1> max_stage.

    • int<3> progress.

    • string progress_info.

  • Else:

    • If (next byte = '#'):

      • string<1> sql state marker '#'.

      • string<5> sql state.

      • string human-readable error message.

    • Else:

      • string human-readable error message.

Note that the ERR_Packet is supposed to send a server error to the client. In particular, all error codes in the range 2000 to 2999 and 5000 to 5999 (inclusive) are reserved for client errors and an ERR packet with such an error code will be considered malformed.

See also

"Progress reporting"

This page is licensed: CC BY-SA / Gnu FDL