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
c97d923c
Commit
c97d923c
authored
Apr 25, 2006
by
serg@sergbook.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
17a80c9d
3144d5eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
sql/sql_parse.cc
sql/sql_parse.cc
+18
-1
No files found.
sql/sql_parse.cc
View file @
c97d923c
...
...
@@ -906,13 +906,20 @@ static int check_connection(THD *thd)
*
passwd
++
:
strlen
(
passwd
);
db
=
thd
->
client_capabilities
&
CLIENT_CONNECT_WITH_DB
?
db
+
passwd_len
+
1
:
0
;
uint
db_len
=
db
?
strlen
(
db
)
:
0
;
if
(
passwd
+
passwd_len
+
db_len
>
net
->
read_pos
+
pkt_len
)
{
inc_host_errors
(
&
thd
->
remote
.
sin_addr
);
return
ER_HANDSHAKE_ERROR
;
}
/* Since 4.1 all database names are stored in utf8 */
if
(
db
)
{
db_buff
[
copy_and_convert
(
db_buff
,
sizeof
(
db_buff
)
-
1
,
system_charset_info
,
db
,
strlen
(
db
)
,
db
,
db_len
,
thd
->
charset
(),
&
dummy_errors
)]
=
0
;
db
=
db_buff
;
}
...
...
@@ -1379,7 +1386,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
{
char
*
db
,
*
tbl_name
;
uint
db_len
=
*
(
uchar
*
)
packet
;
if
(
db_len
>=
packet_length
||
db_len
>
NAME_LEN
)
{
send_error
(
&
thd
->
net
,
ER_UNKNOWN_COM_ERROR
);
break
;
}
uint
tbl_len
=
*
(
uchar
*
)
(
packet
+
db_len
+
1
);
if
(
db_len
+
tbl_len
+
2
>
packet_length
||
tbl_len
>
NAME_LEN
)
{
send_error
(
&
thd
->
net
,
ER_UNKNOWN_COM_ERROR
);
break
;
}
statistic_increment
(
com_other
,
&
LOCK_status
);
thd
->
enable_slow_log
=
opt_log_slow_admin_statements
;
...
...
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