MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:bar Date:March 4 2008 12:13pm
Subject:bk commit into 5.0 tree (bar:1.2578) BUG#23097
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of bar.  When bar does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-03-04 16:13:08+04:00, bar@stripped +5 -0
  Bug#23097 mysql can't insert korean on mysql prompt.
  Problem: libedit is a very pure-ASCII oriented library,
  and it is not aware of extended (0x80..0xFF) or even multi-byte
  characters. It considered such characters as non-printable
  and didn't allow to input them.
  Fix: make libedit think that all bytes >= 0x80 are printable.

  cmd-line-utils/libedit/el.h@stripped, 2008-03-04 16:13:06+04:00, bar@stripped +2 -0
    Defining macro, a locale's isprint() replacement.
    We'll consider all 8bit values as printable characters.

  cmd-line-utils/libedit/key.c@stripped, 2008-03-04 16:13:06+04:00, bar@stripped +2 -2
    Changing isprint() to el_isprint().

  cmd-line-utils/libedit/map.c@stripped, 2008-03-04 16:13:06+04:00, bar@stripped +1 -1
    Changing isprint() to el_isprint().

  cmd-line-utils/libedit/read.c@stripped, 2008-03-04 16:13:06+04:00, bar@stripped +1 -1
    Changing isprint() to el_isprint().

  cmd-line-utils/libedit/refresh.c@stripped, 2008-03-04 16:13:06+04:00, bar@stripped +3 -3
    Changing isprint() to el_isprint().

diff -Nrup a/cmd-line-utils/libedit/el.h b/cmd-line-utils/libedit/el.h
--- a/cmd-line-utils/libedit/el.h	2005-04-21 15:06:38 +05:00
+++ b/cmd-line-utils/libedit/el.h	2008-03-04 16:13:06 +04:00
@@ -136,6 +136,8 @@ struct editline {
 
 protected int	el_editmode(EditLine *, int, const char **);
 
+#define el_isprint(x)  ((unsigned char) (x) < 0x80 ? isprint(x) : 1)
+
 #ifdef DEBUG
 #define	EL_ABORT(a)	do { \
 				fprintf(el->el_errfile, "%s, %d: ", \
diff -Nrup a/cmd-line-utils/libedit/key.c b/cmd-line-utils/libedit/key.c
--- a/cmd-line-utils/libedit/key.c	2005-04-21 15:06:38 +05:00
+++ b/cmd-line-utils/libedit/key.c	2008-03-04 16:13:06 +04:00
@@ -618,7 +618,7 @@ key__decode_char(char *buf, int cnt, int
 	} else if (ch == '\\') {
 		buf[cnt++] = '\\';
 		buf[cnt] = '\\';
-	} else if (ch == ' ' || (isprint(ch) && !isspace(ch))) {
+	} else if (ch == ' ' || (el_isprint(ch) && !isspace(ch))) {
 		buf[cnt] = ch;
 	} else {
 		buf[cnt++] = '\\';
@@ -660,7 +660,7 @@ key__decode_str(const char *str, char *b
 		} else if (*p == '^' || *p == '\\') {
 			*b++ = '\\';
 			*b++ = *p;
-		} else if (*p == ' ' || (isprint((unsigned char) *p) &&
+		} else if (*p == ' ' || (el_isprint((unsigned char) *p) &&
 			!isspace((unsigned char) *p))) {
 			*b++ = *p;
 		} else {
diff -Nrup a/cmd-line-utils/libedit/map.c b/cmd-line-utils/libedit/map.c
--- a/cmd-line-utils/libedit/map.c	2005-04-21 15:06:38 +05:00
+++ b/cmd-line-utils/libedit/map.c	2008-03-04 16:13:06 +04:00
@@ -961,7 +961,7 @@ map_init_nls(EditLine *el)
 	el_action_t *map = el->el_map.key;
 
 	for (i = 0200; i <= 0377; i++)
-		if (isprint(i))
+		if (el_isprint(i))
 			map[i] = ED_INSERT;
 }
 
diff -Nrup a/cmd-line-utils/libedit/read.c b/cmd-line-utils/libedit/read.c
--- a/cmd-line-utils/libedit/read.c	2005-07-18 16:52:14 +05:00
+++ b/cmd-line-utils/libedit/read.c	2008-03-04 16:13:06 +04:00
@@ -508,7 +508,7 @@ el_gets(EditLine *el, int *nread)
 		    el->el_chared.c_redo.pos < el->el_chared.c_redo.lim) {
 			if (cmdnum == VI_DELETE_PREV_CHAR &&
 			    el->el_chared.c_redo.pos != el->el_chared.c_redo.buf
-			    && isprint((unsigned char)el->el_chared.c_redo.pos[-1]))
+			    && el_isprint((unsigned char)el->el_chared.c_redo.pos[-1]))
 				el->el_chared.c_redo.pos--;
 			else
 				*el->el_chared.c_redo.pos++ = ch;
diff -Nrup a/cmd-line-utils/libedit/refresh.c b/cmd-line-utils/libedit/refresh.c
--- a/cmd-line-utils/libedit/refresh.c	2005-04-21 15:06:38 +05:00
+++ b/cmd-line-utils/libedit/refresh.c	2008-03-04 16:13:06 +04:00
@@ -88,7 +88,7 @@ private void
 re_addc(EditLine *el, int c)
 {
 
-	if (isprint(c)) {
+	if (el_isprint(c)) {
 		re_putc(el, c, 1);
 		return;
 	}
@@ -964,7 +964,7 @@ re_refresh_cursor(EditLine *el)
 					h = 1;
 					v++;
 				}
-			} else if (!isprint((unsigned char) c)) {
+			} else if (!el_isprint((unsigned char) c)) {
 				h += 3;
 				if (h > th) {	/* if overflow, compensate */
 					h = h - th;
@@ -1057,7 +1057,7 @@ re_fastaddc(EditLine *el)
 		char mc = (c == '\177') ? '?' : (c | 0100);
 		re_fastputc(el, '^');
 		re_fastputc(el, mc);
-	} else if (isprint((unsigned char) c)) {	/* normal char */
+	} else if (el_isprint((unsigned char) c)) {	/* normal char */
 		re_fastputc(el, c);
 	} else {
 		re_fastputc(el, '\\');
Thread
bk commit into 5.0 tree (bar:1.2578) BUG#23097bar4 Mar
  • Re: bk commit into 5.0 tree (bar:1.2578) BUG#23097Georgi Kodinov4 Mar
    • Re: bk commit into 5.0 tree (bar:1.2578) BUG#23097Alexander Barkov4 Mar