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

    modified:
      cmd-line-utils/libedit/vi.c
 3470 Magnus Bl next-mr (mysql-5.1-rep+2) in RBR
       - fix the fix to properly detect when engine is NDB and
         also don't drop the table t9 if it hasn't been created

    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-20110427115751-mhfq9j1nc1bkx7tj.bundle
Thread
bzr push into mysql-5.5 branch (nirbhay.choubey:3470 to 3471) Bug#12329909Nirbhay Choubey27 Apr