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
3ad6b7ab
Commit
3ad6b7ab
authored
Jul 01, 2011
by
Karen Langford
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch to fix SS #12698716 : Java/ConnectorJ regression problem
parent
844fa544
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
sql/sql_connect.cc
sql/sql_connect.cc
+20
-0
No files found.
sql/sql_connect.cc
View file @
3ad6b7ab
...
...
@@ -22,6 +22,7 @@
/** Size of the header fields of an authentication packet. */
#define AUTH_PACKET_HEADER_SIZE_PROTO_41 32
#define AUTH_PACKET_HEADER_SIZE_PROTO_40 5
#define AUTH_PACKET_HEADER_SIZE_CONNJ_SSL 4
#ifdef __WIN__
extern
void
win_install_sigabrt_handler
();
...
...
@@ -955,6 +956,23 @@ static int check_connection(THD *thd)
thd
->
client_capabilities
=
uint2korr
(
end
);
/*
JConnector only sends client capabilities (4 bytes) before starting SSL
negotiation so we don't have char_set and other information for client in
packet read. In that case, skip reading those information. The below code
is patch for this.
*/
if
(
bytes_remaining_in_packet
==
AUTH_PACKET_HEADER_SIZE_CONNJ_SSL
&&
thd
->
client_capabilities
&
CLIENT_SSL
)
{
thd
->
client_capabilities
=
uint4korr
(
end
);
thd
->
max_client_packet_length
=
0xfffff
;
charset_code
=
default_charset_info
->
number
;
end
+=
AUTH_PACKET_HEADER_SIZE_CONNJ_SSL
;
bytes_remaining_in_packet
-=
AUTH_PACKET_HEADER_SIZE_CONNJ_SSL
;
goto
skip_to_ssl
;
}
if
(
thd
->
client_capabilities
&
CLIENT_PROTOCOL_41
)
packet_has_required_size
=
bytes_remaining_in_packet
>=
AUTH_PACKET_HEADER_SIZE_PROTO_41
;
...
...
@@ -989,6 +1007,8 @@ static int check_connection(THD *thd)
charset_code
=
default_charset_info
->
number
;
}
skip_to_ssl:
DBUG_PRINT
(
"info"
,
(
"client_character_set: %u"
,
charset_code
));
if
(
thd_init_client_charset
(
thd
,
charset_code
))
goto
error
;
...
...
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