1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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

ha_berkeley.cc	core dump if cursor was invalid.
This commit is contained in:
tim@white.box
2001-07-24 12:00:23 -04:00
parent 3ad21705e6
commit c61f04b005

View File

@ -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,
&tmp_cursor, 0)))
{
if (!(error=cursor->c_get(tmp_cursor,
if (!(error=tmp_cursor->c_get(tmp_cursor,
(keynr == primary_key ?
prim_key :
create_key(&key, keynr, key_buff2, record)),