diff --git a/src/box/box.m b/src/box/box.m index af8b195ff58e6ca1059176bdb9e3a16b6d1bbb38..37e73c93492a4fa37bc55d3e64b0fe753e18f52a 100644 --- a/src/box/box.m +++ b/src/box/box.m @@ -154,8 +154,11 @@ box_xlog_sprint(struct tbuf *buf, const struct tbuf *t) case REPLACE: flags = read_u32(b); field_count = read_u32(b); - if (b->size != valid_tuple(b, field_count)) + if (b->size != valid_tuple(b, field_count)) { + say_error("found a corrupt tuple, %s", + tbuf_str(buf)); abort(); + } tuple_print(buf, field_count, b->data); break; @@ -164,8 +167,10 @@ box_xlog_sprint(struct tbuf *buf, const struct tbuf *t) case DELETE_1_3: key_len = read_u32(b); key = read_field(b); - if (b->size != 0) + if (b->size != 0) { + say_error("found a corrupt tuple %s", tbuf_str(buf)); abort(); + } tuple_print(buf, key_len, key); break; diff --git a/src/recovery.m b/src/recovery.m index 6473b18162f9221402efd1ae26a3403414253fc0..d700decaffb96144824a51de67d25a99a2096a59 100644 --- a/src/recovery.m +++ b/src/recovery.m @@ -1257,6 +1257,9 @@ read_log(const char *filename, FILE *f = fopen(filename, "r"); struct log_io *l = log_io_open(dir, LOG_READ, filename, NONE, f); + if (l == NULL) + return -1; + struct log_io_cursor i; log_io_cursor_open(&i, l); diff --git a/src/tarantool.m b/src/tarantool.m index f546436c2597667e8a0b74bdf1a6451122978091..2eab7533ac4b44f99c871d5256928af41e84e605 100644 --- a/src/tarantool.m +++ b/src/tarantool.m @@ -619,6 +619,7 @@ static void initialize_minimal() { initialize(0.1, 4, 2); + fill_default_tarantool_cfg(&cfg); } int @@ -701,6 +702,7 @@ main(int argc, char **argv) if (gopt_arg(opt, 'C', &cat_filename)) { initialize_minimal(); + cfg.log_level += gopt(opt, 'v'); if (access(cat_filename, R_OK) == -1) { panic("access(\"%s\"): %s", cat_filename, strerror(errno)); exit(EX_OSFILE); @@ -709,7 +711,10 @@ main(int argc, char **argv) } gopt_arg(opt, 'c', &cfg_filename); - /* if config is not specified trying ./tarantool.cfg then /etc/tarantool.cfg */ + /* + * if config is not specified trying ./tarantool.cfg then + * /etc/tarantool.cfg + */ if (cfg_filename == NULL) { if (access(DEFAULT_CFG_FILENAME, F_OK) == 0) cfg_filename = DEFAULT_CFG_FILENAME;