diff options
author | unknown <msvensson@neptunus.(none)> | 2006-02-13 14:02:39 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-02-13 14:02:39 +0100 |
commit | b39626f9e4fa3a45d06b9f1146eb9763a21aad3d (patch) | |
tree | ff5a30f359fd8dc4be5bca098d0aa77e9b35d8ce /cmd-line-utils | |
parent | 101e618f7f46fb0012a4166aea7213730a0b4281 (diff) | |
download | mariadb-git-b39626f9e4fa3a45d06b9f1146eb9763a21aad3d.tar.gz |
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.
Diffstat (limited to 'cmd-line-utils')
-rw-r--r-- | cmd-line-utils/libedit/readline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-line-utils/libedit/readline.c b/cmd-line-utils/libedit/readline.c index 616b55a877e..8c09a6f39d5 100644 --- a/cmd-line-utils/libedit/readline.c +++ b/cmd-line-utils/libedit/readline.c @@ -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); } |