List:Commits« Previous MessageNext Message »
From:Nirbhay Choubey Date:April 27 2011 12:03pm
Subject:bzr push into mysql-trunk branch (nirbhay.choubey:3328 to 3329) Bug#12329909
View as plain text  
 3329 Nirbhay Choubey	2011-04-27 [merge]
      Merge of fix for bug#12329909 from mysql-5.5 -> mysql-trunk.

    modified:
      cmd-line-utils/libedit/vi.c
 3328 Magnus Blåudd	2011-04-27 [merge]
      merge 5.5 -> trunk

    modified:
      mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
=== modified file 'cmd-line-utils/libedit/vi.c'
--- a/cmd-line-utils/libedit/vi.c	2010-10-19 22:51:34 +0000
+++ b/cmd-line-utils/libedit/vi.c	2011-04-27 11:57:51 +0000
@@ -1012,8 +1012,10 @@ vi_histedit(EditLine *el, int c __attrib
 	if (fd < 0)
 		return CC_ERROR;
 	cp = el->el_line.buffer;
-	write(fd, cp, el->el_line.lastchar - cp +0u);
-	write(fd, "\n", 1);
+	if (write(fd, cp, el->el_line.lastchar - cp +0u) == -1)
+          goto error;
+	if (write(fd, "\n", 1) == -1)
+          goto error;
 	pid = fork();
 	switch (pid) {
 	case -1:
@@ -1041,6 +1043,12 @@ vi_histedit(EditLine *el, int c __attrib
 	unlink(tempfile);
 	/* return CC_REFRESH; */
 	return ed_newline(el, 0);
+
+/* XXXMYSQL: Avoid compiler warnings. */
+error:
+        close(fd);
+        unlink(tempfile);
+        return CC_ERROR;
 }
 
 /* vi_history_word():

Attachment: [text/bzr-bundle] bzr/nirbhay.choubey@oracle.com-20110427120034-7ub5ddh617pj13ht.bundle
Thread
bzr push into mysql-trunk branch (nirbhay.choubey:3328 to 3329) Bug#12329909Nirbhay Choubey27 Apr