1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#16557 mysql cmd-line client does not rename .mysql_history.TMP to .mysql_history

- Return error only if 'history' returns -1


cmd-line-utils/libedit/readline.c:
  Return 1 to indicate error only if 'history' returned -1, since the history function normally will return the number of entries written or read. Only -1 indicates error.
This commit is contained in:
unknown
2006-02-13 14:02:39 +01:00
parent 101e618f7f
commit b39626f9e4

View File

@ -1109,7 +1109,7 @@ read_history(const char *filename)
if (h == NULL || e == NULL)
rl_initialize();
return (history(h, &ev, H_LOAD, filename));
return (history(h, &ev, H_LOAD, filename) == -1);
}
@ -1123,7 +1123,7 @@ write_history(const char *filename)
if (h == NULL || e == NULL)
rl_initialize();
return (history(h, &ev, H_SAVE, filename));
return (history(h, &ev, H_SAVE, filename) == -1);
}