facebook/hhvm — pull request #3016 by SiebelsTim (2014-06-23 17:44:24+00:00)
Title: Fix Segfault for LONGTEXT in bind_result

It actually does not fix the bug itself because PHP behaves the same.
The cause of the segfault is that some people run out of memory resulting in a bad call to calloc.
calloc returns a nullptr which later in mysql is dereferenced.

PHP's solution to this is to call store_result before binding. But this will also fail in hhvm.
This fixes it.

TL;DR: TEXT in mysql is now variable length instead of 4GB when calling store_result

Fixes #2377
Fixes #2921