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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7be0954e
Commit
7be0954e
authored
Feb 11, 2004
by
vva@eagle.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BUG_2592/mysql-4.1
parents
9de20058
34fb646f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
29 deletions
+22
-29
sql/sql_lex.cc
sql/sql_lex.cc
+22
-29
No files found.
sql/sql_lex.cc
View file @
7be0954e
...
...
@@ -193,6 +193,13 @@ static LEX_STRING get_token(LEX *lex,uint length)
return
tmp
;
}
/*
todo:
There are no dangerous charsets in mysql for function
get_quoted_token yet. But it should be fixed in the
future to operate multichar strings (like ucs2)
*/
static
LEX_STRING
get_quoted_token
(
LEX
*
lex
,
uint
length
,
char
quote
)
{
LEX_STRING
tmp
;
...
...
@@ -670,37 +677,14 @@ int yylex(void *arg, void *yythd)
uint
double_quotes
=
0
;
char
quote_char
=
c
;
// Used char
lex
->
tok_start
=
lex
->
ptr
;
// Skip first `
while
((
c
=
yyGet
()))
{
#ifdef USE_MB
if
(
use_mb
(
cs
))
{
while
((
c
=
yyGet
()))
{
if
(
c
==
quote_char
)
{
if
(
yyPeek
()
!=
quote_char
)
break
;
c
=
yyGet
();
double_quotes
++
;
continue
;
}
if
(
c
==
(
uchar
)
NAMES_SEP_CHAR
)
break
;
if
(
my_mbcharlen
(
cs
,
c
)
>
1
)
{
int
l
;
if
((
l
=
my_ismbchar
(
cs
,
(
const
char
*
)
lex
->
ptr
-
1
,
(
const
char
*
)
lex
->
end_of_query
))
==
0
)
break
;
lex
->
ptr
+=
l
-
1
;
}
}
}
else
if
(
my_mbcharlen
(
cs
,
c
)
==
1
)
#endif
{
while
((
c
=
yyGet
()))
{
if
(
c
==
(
uchar
)
NAMES_SEP_CHAR
)
break
;
/* Old .frm format can't handle this char */
if
(
c
==
quote_char
)
{
if
(
yyPeek
()
!=
quote_char
)
...
...
@@ -709,9 +693,18 @@ int yylex(void *arg, void *yythd)
double_quotes
++
;
continue
;
}
if
(
c
==
(
uchar
)
NAMES_SEP_CHAR
)
}
#ifdef USE_MB
else
{
int
l
;
if
((
l
=
my_ismbchar
(
cs
,
(
const
char
*
)
lex
->
ptr
-
1
,
(
const
char
*
)
lex
->
end_of_query
))
==
0
)
break
;
lex
->
ptr
+=
l
-
1
;
}
#endif
}
if
(
double_quotes
)
yylval
->
lex_str
=
get_quoted_token
(
lex
,
yyLength
()
-
double_quotes
,
...
...
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