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
e3ff1bf3
Commit
e3ff1bf3
authored
Feb 17, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-4.1-8303
into mysql.com:/home/jimw/my/mysql-4.1-clean
parents
9de31fea
c9490550
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
6 deletions
+37
-6
mysql-test/r/ctype_sjis.result
mysql-test/r/ctype_sjis.result
+4
-0
mysql-test/t/ctype_sjis.test
mysql-test/t/ctype_sjis.test
+7
-0
sql/sql_lex.cc
sql/sql_lex.cc
+26
-6
No files found.
mysql-test/r/ctype_sjis.result
View file @
e3ff1bf3
...
...
@@ -91,3 +91,7 @@ sjis_bin 6109
sjis_bin 61
sjis_bin 6120
drop table t1;
SET NAMES sjis;
SELECT HEX('佐淘 \圭') FROM DUAL;
HEX('佐淘 \圭')
8DB2939181408C5C
mysql-test/t/ctype_sjis.test
View file @
e3ff1bf3
...
...
@@ -68,3 +68,10 @@ SET collation_connection='sjis_japanese_ci';
--
source
include
/
ctype_filesort
.
inc
SET
collation_connection
=
'sjis_bin'
;
--
source
include
/
ctype_filesort
.
inc
# Check parsing of string literals in SJIS with multibyte characters that
# have an embedded \ in them. (Bug #8303)
--
character_set
sjis
SET
NAMES
sjis
;
SELECT
HEX
(
'@\\'
)
FROM
DUAL
;
sql/sql_lex.cc
View file @
e3ff1bf3
...
...
@@ -295,7 +295,18 @@ static char *get_text(LEX *lex)
found_escape
=
1
;
if
(
lex
->
ptr
==
lex
->
end_of_query
)
return
0
;
yySkip
();
#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
)
{
...
...
@@ -323,6 +334,10 @@ static char *get_text(LEX *lex)
else
{
uchar
*
to
;
/* Re-use found_escape for tracking state of escapes */
found_escape
=
0
;
for
(
to
=
start
;
str
!=
end
;
str
++
)
{
#ifdef USE_MB
...
...
@@ -336,7 +351,7 @@ static char *get_text(LEX *lex)
continue
;
}
#endif
if
(
*
str
==
'\\'
&&
str
+
1
!=
end
)
if
(
!
found_escape
&&
*
str
==
'\\'
&&
str
+
1
!=
end
)
{
switch
(
*++
str
)
{
case
'n'
:
...
...
@@ -362,15 +377,20 @@ static char *get_text(LEX *lex)
*
to
++=
'\\'
;
// remember prefix for wildcard
/* Fall through */
default:
*
to
++
=
*
str
;
found_escape
=
1
;
str
--
;
break
;
}
}
else
if
(
*
str
==
sep
)
*
to
++=
*
str
++
;
// Two ' or "
else
if
(
!
found_escape
&&
*
str
==
sep
)
{
found_escape
=
1
;
}
else
{
*
to
++
=
*
str
;
found_escape
=
0
;
}
}
*
to
=
0
;
lex
->
yytoklen
=
(
uint
)
(
to
-
start
);
...
...
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