Fix return values for PDOMySqlConnection::commit/rollback
commit4ded05ade3cce30dc005640059945762ef2c7457
authorMark Williams <mwilliams@fb.com>
Thu, 28 Jun 2018 03:12:23 +0000 (27 20:12 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Thu, 28 Jun 2018 03:28:03 +0000 (27 20:28 -0700)
tree53acf06559c9601f6a655e38501766844cfc4d85
parent134a50ffdd0c2d883e1ddc7632c669a6417bea6b
Fix return values for PDOMySqlConnection::commit/rollback

Summary:
Between mysql-5.x and mysql-8.x the return values of mysql_commit and
mysql_rollback changed from my_bool (an int) to bool.

According to the docs, in both cases non-zero means failure, and zero
means success (its not clear whether the old behavior of -ve for
failure was correct in practice, even for 5.x).

I found these because gcc-7 reports bool >= 0 as a tautology.

Reviewed By: alexeyt

Differential Revision: D8642138

fbshipit-source-id: af638bc9612b36a963afca2cf3cfe41f51201f66
hphp/runtime/ext/pdo_mysql/pdo_mysql.cpp