Expose MySQL client error codes to Hack
commit42571a87901ca520fde4784d4e0b80ec7fbb54f4
authorJay Edgar <jkedgar@fb.com>
Wed, 20 Oct 2021 23:44:35 +0000 (20 16:44 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 20 Oct 2021 23:46:12 +0000 (20 16:46 -0700)
treeef1204086987097bb8714eb9c7d8fa89121e69f2
parent2f2df3b0406866ecb82dfead9f97399cd2879e49
Expose MySQL client error codes to Hack

Summary: The MySQL extension can return a variety of error codes. Rather than hard-coding these values in Hack code, we should expose the error codes as named constants, to make code easier to read and to automatically pick up new values for these constants if the MySQL codes change.

Reviewed By: abal147

Differential Revision: D31172064

fbshipit-source-id: 05882aa6e80f0ffa449eaa34ecaacdd400efe384
hphp/hack/hhi/stdlib/builtins_mysql.hhi
hphp/runtime/ext/mysql/ext_mysql.cpp
hphp/test/slow/ext_mysql/error_codes.php [new file with mode: 0644]
hphp/test/slow/ext_mysql/error_codes.php.expect [new file with mode: 0644]