Merge of fix for bug#12329909 from mysql-5.1 -> mysql-5.5.
This commit is contained in:
commit
6fcbb55fa2
@ -1012,8 +1012,10 @@ vi_histedit(EditLine *el, int c __attribute__((__unused__)))
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return CC_ERROR;
|
return CC_ERROR;
|
||||||
cp = el->el_line.buffer;
|
cp = el->el_line.buffer;
|
||||||
write(fd, cp, el->el_line.lastchar - cp +0u);
|
if (write(fd, cp, el->el_line.lastchar - cp +0u) == -1)
|
||||||
write(fd, "\n", 1);
|
goto error;
|
||||||
|
if (write(fd, "\n", 1) == -1)
|
||||||
|
goto error;
|
||||||
pid = fork();
|
pid = fork();
|
||||||
switch (pid) {
|
switch (pid) {
|
||||||
case -1:
|
case -1:
|
||||||
@ -1041,6 +1043,12 @@ vi_histedit(EditLine *el, int c __attribute__((__unused__)))
|
|||||||
unlink(tempfile);
|
unlink(tempfile);
|
||||||
/* return CC_REFRESH; */
|
/* return CC_REFRESH; */
|
||||||
return ed_newline(el, 0);
|
return ed_newline(el, 0);
|
||||||
|
|
||||||
|
/* XXXMYSQL: Avoid compiler warnings. */
|
||||||
|
error:
|
||||||
|
close(fd);
|
||||||
|
unlink(tempfile);
|
||||||
|
return CC_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vi_history_word():
|
/* vi_history_word():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user