diff --git a/modules/sql_cacher/sql_cacher.c b/modules/sql_cacher/sql_cacher.c index 7ebde16b244..5321c1cf2d2 100644 --- a/modules/sql_cacher/sql_cacher.c +++ b/modules/sql_cacher/sql_cacher.c @@ -964,7 +964,7 @@ static int load_entire_table(cache_entry_t *c_entry, db_handlers_t *db_hdls, if (insert_in_cachedb(c_entry, db_hdls, values ,values + 1, reload_vers, ROW_N(row) - 1) < 0) { lock_stop_write(db_hdls->c_entry->ref_lock); - return -1; + goto error; } loaded_rec++; }