summaryrefslogtreecommitdiff
path: root/mysql-test/include/strict_autoinc.inc
diff options
context:
space:
mode:
authorMats Kindahl <mats@sun.com>2009-09-25 11:47:15 +0200
committerMats Kindahl <mats@sun.com>2009-09-25 11:47:15 +0200
commit5d2f79def9b67dd5400411070d47f8180ceb072b (patch)
tree270ae52002cbf3c0a958eed57e9f0cf4a5560791 /mysql-test/include/strict_autoinc.inc
parentd47710c8dccd295428fa7547720f4a5d7311c413 (diff)
downloadmariadb-git-5d2f79def9b67dd5400411070d47f8180ceb072b.tar.gz
Bug #47645: Segmentation fault when out of memory during handlerton initialization
There is a missing check for memory allocation failure when allocating memory for the handlerton structure. If the handlerton init function tries to de-reference the pointer, it will cause a segmentation fault and crash the server. This patch fixes the problem by not calling the init function if memory allocation failed, and instead prints an informative error message and reports the error to the caller. sql/handler.cc: Add a check if memory allocation succeeded before calling the init function. If it failed, it is not necessary to free the memory, but the plugin->data is set to NULL to ensure that it can be checked for failure.
Diffstat (limited to 'mysql-test/include/strict_autoinc.inc')
0 files changed, 0 insertions, 0 deletions