Close pdo connection after request ends
commite5f1b28a8bcc6ae3026cfb788770a53879e5e20c
authorDaniel Sloof <goapsychadelic@gmail.com>
Wed, 18 Dec 2013 18:32:20 +0000 (18 10:32 -0800)
committerSara Golemon <sgolemon@fb.com>
Wed, 18 Dec 2013 19:42:05 +0000 (18 11:42 -0800)
tree3a4888b8fed3747cbfd1333acca06f9cb2bbb8a4
parenta06ee23b3904344970c754cffa55ec722d6659df
Close pdo connection after request ends

When a request finishes and the PDO connection is not closed in
userland, we need to explictly close it to prevent excessive amount of
connections (and eventually causing MySQL to reject them).

This can obviously be solved in userland by closing the connection in a
register_shutdown_function, but we need to be consistent with PHP.

Closes #1345

Reviewed By: @markw65

Differential Revision: D1098327

Pulled By: @scannell
hphp/runtime/ext/ext_pdo.cpp
hphp/runtime/ext/ext_pdo.h
hphp/runtime/ext/pdo_driver.cpp
hphp/runtime/ext/pdo_driver.h
hphp/runtime/ext/pdo_sqlite.cpp
hphp/runtime/ext/pdo_sqlite.h