Avoid copying in mdb_cursor_get if possible. JNI is slooow.