2019-09-09 18:40:24 +08:00
|
|
|
/*
|
2020-01-11 18:21:43 +08:00
|
|
|
* Copyright 2017-2020 Leonid Yuriev <leo@yuriev.ru>
|
2017-03-30 23:54:57 +08:00
|
|
|
* and other libmdbx authors: please see AUTHORS file.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted only as authorized by the OpenLDAP
|
|
|
|
* Public License.
|
|
|
|
*
|
|
|
|
* A copy of this license is available in the file LICENSE in the
|
|
|
|
* top-level directory of the distribution or, alternatively, at
|
|
|
|
* <http://www.OpenLDAP.org/license.html>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "test.h"
|
|
|
|
|
|
|
|
bool testcase_deadread::run() {
|
2017-04-21 23:41:11 +08:00
|
|
|
db_open();
|
2017-10-27 02:14:29 +08:00
|
|
|
txn_begin(true);
|
2018-11-04 23:57:27 +08:00
|
|
|
cursor_guard.reset();
|
|
|
|
txn_guard.reset();
|
|
|
|
db_guard.reset();
|
2017-03-30 23:54:57 +08:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
bool testcase_deadwrite::run() {
|
2017-04-21 23:41:11 +08:00
|
|
|
db_open();
|
2017-10-27 02:14:29 +08:00
|
|
|
txn_begin(false);
|
2018-11-04 23:57:27 +08:00
|
|
|
cursor_guard.reset();
|
|
|
|
txn_guard.reset();
|
|
|
|
db_guard.reset();
|
2017-03-30 23:54:57 +08:00
|
|
|
return true;
|
|
|
|
}
|