mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
[t:3187] Make assert code more robust.
git-svn-id: file:///svn/toku/tokudb@27209 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
16caca9d6c
commit
60b8508095
1 changed files with 3 additions and 1 deletions
|
@ -740,6 +740,8 @@ toku_env_open(DB_ENV * env, const char *home, u_int32_t flags, int mode) {
|
|||
BOOL newenv; // true iff creating a new environment
|
||||
u_int32_t unused_flags=flags;
|
||||
|
||||
most_recent_env = NULL;
|
||||
|
||||
if (env_opened(env)) {
|
||||
r = toku_ydb_do_error(env, EINVAL, "The environment is already open\n");
|
||||
goto cleanup;
|
||||
|
@ -2135,7 +2137,7 @@ toku_maybe_get_engine_status_text (char * buff, int buffsize) {
|
|||
static void
|
||||
toku_maybe_set_env_panic(int code, char * msg) {
|
||||
DB_ENV * env = most_recent_env;
|
||||
if (env) {
|
||||
if (env && env->i) {
|
||||
if (env->i->is_panicked == 0) {
|
||||
env->i->is_panicked = code;
|
||||
env->i->panic_string = toku_strdup(msg);
|
||||
|
|
Loading…
Add table
Reference in a new issue