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
ef565268
Commit
ef565268
authored
Feb 11, 2004
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg2248
parents
3559cf86
f8f0c212
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
35 deletions
+28
-35
sql/item.cc
sql/item.cc
+2
-0
sql/protocol.cc
sql/protocol.cc
+4
-5
sql/set_var.cc
sql/set_var.cc
+0
-1
sql/sql_lex.cc
sql/sql_lex.cc
+22
-29
No files found.
sql/item.cc
View file @
ef565268
...
...
@@ -568,6 +568,8 @@ void Item_param::set_time(TIME *tm, timestamp_type type)
ltime
.
second_part
=
tm
->
second_part
;
ltime
.
neg
=
tm
->
neg
;
ltime
.
time_type
=
type
;
item_is_time
=
true
;
...
...
sql/protocol.cc
View file @
ef565268
...
...
@@ -313,6 +313,7 @@ send_ok(THD *thd, ha_rows affected_rows, ulonglong id, const char *message)
DBUG_VOID_RETURN
;
}
static
char
eof_buff
[
1
]
=
{
(
char
)
254
};
/* Marker for end of fields */
/*
Send eof (= end of result set) to the client
...
...
@@ -339,12 +340,11 @@ send_ok(THD *thd, ha_rows affected_rows, ulonglong id, const char *message)
void
send_eof
(
THD
*
thd
,
bool
no_flush
)
{
static
char
eof_buff
[
1
]
=
{
(
char
)
254
};
/* Marker for end of fields */
NET
*
net
=
&
thd
->
net
;
DBUG_ENTER
(
"send_eof"
);
if
(
net
->
vio
!=
0
)
{
if
(
!
no_flush
&&
(
thd
->
client_capabilities
&
CLIENT_PROTOCOL_41
)
)
if
(
thd
->
client_capabilities
&
CLIENT_PROTOCOL_41
)
{
uchar
buff
[
5
];
uint
tmp
=
min
(
thd
->
total_warn_count
,
65535
);
...
...
@@ -384,9 +384,8 @@ send_eof(THD *thd, bool no_flush)
bool
send_old_password_request
(
THD
*
thd
)
{
static
char
buff
[
1
]
=
{
(
char
)
254
};
NET
*
net
=
&
thd
->
net
;
return
my_net_write
(
net
,
buff
,
1
)
||
net_flush
(
net
);
return
my_net_write
(
net
,
eof_
buff
,
1
)
||
net_flush
(
net
);
}
#endif
/* EMBEDDED_LIBRARY */
...
...
@@ -585,7 +584,7 @@ bool Protocol::send_fields(List<Item> *list, uint flag)
#endif
}
send_eof
(
thd
,
1
);
my_net_write
(
&
thd
->
net
,
eof_buff
,
1
);
DBUG_RETURN
(
prepare_for_send
(
list
));
err:
...
...
sql/set_var.cc
View file @
ef565268
...
...
@@ -695,7 +695,6 @@ struct show_var_st init_vars[]= {
{
"port"
,
(
char
*
)
&
mysqld_port
,
SHOW_INT
},
{
"protocol_version"
,
(
char
*
)
&
protocol_version
,
SHOW_INT
},
{
sys_preload_buff_size
.
name
,
(
char
*
)
&
sys_preload_buff_size
,
SHOW_SYS
},
{
sys_pseudo_thread_id
.
name
,
(
char
*
)
&
sys_pseudo_thread_id
,
SHOW_SYS
},
{
sys_query_alloc_block_size
.
name
,
(
char
*
)
&
sys_query_alloc_block_size
,
SHOW_SYS
},
#ifdef HAVE_QUERY_CACHE
...
...
sql/sql_lex.cc
View file @
ef565268
...
...
@@ -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