Below is the list of changes that have just been committed into a local
4.1 repository of serg. When serg 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
1.2463 06/05/23 19:36:06 serg@stripped +4 -0
don't let bugfix for bug#8303 break the bugfix for bug#8378
revert the fix for bug#8303
correct the test for bug#8378
tests/mysql_client_test.c
1.166 06/05/23 19:35:57 serg@stripped +14 -7
correct the test for bug#8378
sql/sql_lex.cc
1.152 06/05/23 19:35:57 serg@stripped +5 -25
revert the fix for bug#8303
mysql-test/t/ctype_sjis.test
1.10 06/05/23 19:35:57 serg@stripped +1 -1
updated
mysql-test/r/ctype_sjis.result
1.9 06/05/23 19:35:56 serg@stripped +2 -2
updated
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: serg
# Host: serg.mylan
# Root: /usr/home/serg/Abk/mysql-4.1
--- 1.151/sql/sql_lex.cc Wed Oct 12 22:51:38 2005
+++ 1.152/sql/sql_lex.cc Tue May 23 19:35:57 2006
@@ -295,18 +295,7 @@ static char *get_text(LEX *lex)
found_escape=1;
if (lex->ptr == lex->end_of_query)
return 0;
-#ifdef USE_MB
- int l;
- if (use_mb(cs) &&
- (l = my_ismbchar(cs,
- (const char *)lex->ptr,
- (const char *)lex->end_of_query))) {
- lex->ptr += l;
- continue;
- }
- else
-#endif
- yySkip();
+ yySkip();
}
else if (c == sep)
{
@@ -335,9 +324,6 @@ static char *get_text(LEX *lex)
{
uchar *to;
- /* Re-use found_escape for tracking state of escapes */
- found_escape= 0;
-
for (to=start ; str != end ; str++)
{
#ifdef USE_MB
@@ -351,7 +337,7 @@ static char *get_text(LEX *lex)
continue;
}
#endif
- if (!found_escape && *str == '\\' && str+1 != end)
+ if (*str == '\\' && str+1 != end)
{
switch(*++str) {
case 'n':
@@ -377,20 +363,14 @@ static char *get_text(LEX *lex)
*to++= '\\'; // remember prefix for wildcard
/* Fall through */
default:
- found_escape= 1;
- str--;
+ *to++= *str;
break;
}
}
- else if (!found_escape && *str == sep)
- {
- found_escape= 1;
- }
+ else if (*str == sep)
+ *to++= *str++; // Two ' or "
else
- {
*to++ = *str;
- found_escape= 0;
- }
}
*to=0;
lex->yytoklen=(uint) (to-start);
--- 1.8/mysql-test/r/ctype_sjis.result Wed Sep 21 19:17:27 2005
+++ 1.9/mysql-test/r/ctype_sjis.result Tue May 23 19:35:56 2006
@@ -172,6 +172,6 @@ c2h
ab_def
drop table t1;
SET NAMES sjis;
-SELECT HEX('²@\\') FROM DUAL;
-HEX('²@_\')
+SELECT HEX('²@\') FROM DUAL;
+HEX('²@\')
8DB2939181408C5C
--- 1.9/mysql-test/t/ctype_sjis.test Wed Sep 21 19:13:34 2005
+++ 1.10/mysql-test/t/ctype_sjis.test Tue May 23 19:35:57 2006
@@ -78,6 +78,6 @@ SET collation_connection='sjis_bin';
--character_set sjis
SET NAMES sjis;
-SELECT HEX('²@\\') FROM DUAL;
+SELECT HEX('²@\') FROM DUAL;
# End of 4.1 tests
--- 1.165/tests/mysql_client_test.c Sat Mar 4 22:38:41 2006
+++ 1.166/tests/mysql_client_test.c Tue May 23 19:35:57 2006
@@ -11554,25 +11554,26 @@ static void test_bug7990()
static void test_bug8378()
{
#if defined(HAVE_CHARSET_gbk) && !defined(EMBEDDED_LIBRARY)
- MYSQL *lmysql;
+ MYSQL *old_mysql=mysql;
char out[9]; /* strlen(TEST_BUG8378)*2+1 */
- int len;
+ char buf[256];
+ int len, rc;
myheader("test_bug8378");
if (!opt_silent)
fprintf(stdout, "\n Establishing a test connection ...");
- if (!(lmysql= mysql_init(NULL)))
+ if (!(mysql= mysql_init(NULL)))
{
myerror("mysql_init() failed");
exit(1);
}
- if (mysql_options(lmysql, MYSQL_SET_CHARSET_NAME, "gbk"))
+ if (mysql_options(mysql, MYSQL_SET_CHARSET_NAME, "gbk"))
{
myerror("mysql_options() failed");
exit(1);
}
- if (!(mysql_real_connect(lmysql, opt_host, opt_user,
+ if (!(mysql_real_connect(mysql, opt_host, opt_user,
opt_password, current_db, opt_port,
opt_unix_socket, 0)))
{
@@ -11582,12 +11583,18 @@ static void test_bug8378()
if (!opt_silent)
fprintf(stdout, " OK");
- len= mysql_real_escape_string(lmysql, out, TEST_BUG8378_IN, 4);
+ len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4);
/* No escaping should have actually happened. */
DIE_UNLESS(memcmp(out, TEST_BUG8378_OUT, len) == 0);
- mysql_close(lmysql);
+ sprintf(buf, "SELECT '%s'", out);
+ rc=mysql_real_query(mysql, buf, strlen(buf));
+ myquery(rc);
+
+ mysql_close(mysql);
+
+ mysql=old_mysql;
#endif
}
| Thread |
|---|
| • bk commit into 4.1 tree (serg:1.2463) BUG#8378 | Sergei Golubchik | 23 May |