Commit c61f04b0 authored by tim@white.box's avatar tim@white.box

ha_berkeley.cc Fix bug in remove_key(), when key != primary_key it would

ha_berkeley.cc	core dump if cursor was invalid.
parent 3ad21705
...@@ -1207,7 +1207,7 @@ int ha_berkeley::remove_key(DB_TXN *trans, uint keynr, const byte *record, ...@@ -1207,7 +1207,7 @@ int ha_berkeley::remove_key(DB_TXN *trans, uint keynr, const byte *record,
if (!(error=key_file[keynr]->cursor(key_file[keynr], trans, if (!(error=key_file[keynr]->cursor(key_file[keynr], trans,
&tmp_cursor, 0))) &tmp_cursor, 0)))
{ {
if (!(error=cursor->c_get(tmp_cursor, if (!(error=tmp_cursor->c_get(tmp_cursor,
(keynr == primary_key ? (keynr == primary_key ?
prim_key : prim_key :
create_key(&key, keynr, key_buff2, record)), create_key(&key, keynr, key_buff2, record)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment