diff options
author | svoj@mysql.com/april.(none) <> | 2006-12-01 19:11:43 +0400 |
---|---|---|
committer | svoj@mysql.com/april.(none) <> | 2006-12-01 19:11:43 +0400 |
commit | 5e733ee8fab00c5a5ecb12875ec05c70400156e2 (patch) | |
tree | 864d7f3e6b50ed278b665908ef18382aea403af4 /myisam/mi_dynrec.c | |
parent | 24c7b22b4dea568a047f1a0a443dbb454d0bd57e (diff) | |
download | mariadb-git-5e733ee8fab00c5a5ecb12875ec05c70400156e2.tar.gz |
BUG#23196 - MySQL server does not exit / shutdown when
storage engine returns errno 12
If there is not enough memory to store or update blob record
(while allocating record buffer), myisam marks table as crashed.
With this fix myisam attempts to roll an index back and return
an error, not marking a table as crashed.
Affects myisam tables with blobs only. No test case for this fix.
Diffstat (limited to 'myisam/mi_dynrec.c')
-rw-r--r-- | myisam/mi_dynrec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index 727f44341b1..260f461685e 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -81,7 +81,7 @@ int _mi_write_blob_record(MI_INFO *info, const byte *record) #endif if (!(rec_buff=(byte*) my_alloca(reclength))) { - my_errno=ENOMEM; + my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(-1); } reclength2= _mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), @@ -115,7 +115,7 @@ int _mi_update_blob_record(MI_INFO *info, my_off_t pos, const byte *record) #endif if (!(rec_buff=(byte*) my_alloca(reclength))) { - my_errno=ENOMEM; + my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(-1); } reclength=_mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER), |