Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
1d522eb7
Commit
1d522eb7
authored
Jun 12, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-main
parents
f4fcc239
ac7d73b0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
35 deletions
+35
-35
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+13
-0
mysql-test/r/ctype_sjis.result
mysql-test/r/ctype_sjis.result
+2
-2
mysql-test/t/ctype_sjis.test
mysql-test/t/ctype_sjis.test
+1
-1
sql/sql_lex.cc
sql/sql_lex.cc
+5
-25
tests/mysql_client_test.c
tests/mysql_client_test.c
+14
-7
No files found.
mysql-test/mysql-test-run.pl
View file @
1d522eb7
...
...
@@ -611,6 +611,12 @@ sub command_line_setup () {
{
push
(
@opt_extra_mysqld_opt
,
$arg
);
}
elsif
(
$arg
=~
/^--$/
)
{
# It is an effect of setting 'pass_through' in option processing
# that the lone '--' separating options from arguments survives,
# simply ignore it.
}
elsif
(
$arg
=~
/^-/
)
{
usage
("
Invalid option
\"
$arg
\"
");
...
...
@@ -2461,6 +2467,13 @@ sub valgrind_arguments {
##############################################################################
sub
usage
($)
{
my
$message
=
shift
;
if
(
$message
)
{
print
STDERR
"
$message
\n
";
}
print
STDERR
<<HERE;
mysql-test-run [ OPTIONS ] [ TESTCASE ]
...
...
mysql-test/r/ctype_sjis.result
View file @
1d522eb7
...
...
@@ -172,6 +172,6 @@ c2h
ab_def
drop table t1;
SET NAMES sjis;
SELECT HEX('佐淘
\
圭') FROM DUAL;
HEX('佐淘
\
圭')
SELECT HEX('@\') FROM DUAL;
HEX('@\')
8DB2939181408C5C
mysql-test/t/ctype_sjis.test
View file @
1d522eb7
...
...
@@ -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
sql/sql_lex.cc
View file @
1d522eb7
...
...
@@ -295,17 +295,6 @@ 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
();
}
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
);
...
...
tests/mysql_client_test.c
View file @
1d522eb7
...
...
@@ -11554,25 +11554,26 @@ static void test_bug7990()
static
void
test_bug8378
()
{
#if defined(HAVE_CHARSET_gbk) && !defined(EMBEDDED_LIBRARY)
MYSQL
*
l
mysql
;
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
(
!
(
l
mysql
=
mysql_init
(
NULL
)))
if
(
!
(
mysql
=
mysql_init
(
NULL
)))
{
myerror
(
"mysql_init() failed"
);
exit
(
1
);
}
if
(
mysql_options
(
l
mysql
,
MYSQL_SET_CHARSET_NAME
,
"gbk"
))
if
(
mysql_options
(
mysql
,
MYSQL_SET_CHARSET_NAME
,
"gbk"
))
{
myerror
(
"mysql_options() failed"
);
exit
(
1
);
}
if
(
!
(
mysql_real_connect
(
l
mysql
,
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
(
l
mysql
,
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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment