Properly reset errno for rdbLoad (#7542)
This commit is contained in:
parent
36b9494385
commit
818dc3a089
@ -4881,6 +4881,7 @@ void loadDataFromDisk(void) {
|
|||||||
serverLog(LL_NOTICE,"DB loaded from append only file: %.3f seconds",(float)(ustime()-start)/1000000);
|
serverLog(LL_NOTICE,"DB loaded from append only file: %.3f seconds",(float)(ustime()-start)/1000000);
|
||||||
} else {
|
} else {
|
||||||
rdbSaveInfo rsi = RDB_SAVE_INFO_INIT;
|
rdbSaveInfo rsi = RDB_SAVE_INFO_INIT;
|
||||||
|
errno = 0; /* Prevent a stale value from affecting error checking */
|
||||||
if (rdbLoad(server.rdb_filename,&rsi,RDBFLAGS_NONE) == C_OK) {
|
if (rdbLoad(server.rdb_filename,&rsi,RDBFLAGS_NONE) == C_OK) {
|
||||||
serverLog(LL_NOTICE,"DB loaded from disk: %.3f seconds",
|
serverLog(LL_NOTICE,"DB loaded from disk: %.3f seconds",
|
||||||
(float)(ustime()-start)/1000000);
|
(float)(ustime()-start)/1000000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user