Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
2789a83c
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2789a83c
编写于
4月 08, 2019
作者:
Y
Yuriy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed compilation with clang
上级
1dc5c4cb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
20 deletion
+7
-20
dbms/programs/server/MySQLHandler.cpp
dbms/programs/server/MySQLHandler.cpp
+5
-2
dbms/src/Core/MySQLProtocol.h
dbms/src/Core/MySQLProtocol.h
+2
-18
未找到文件。
dbms/programs/server/MySQLHandler.cpp
浏览文件 @
2789a83c
...
...
@@ -41,7 +41,8 @@ void MySQLHandler::run()
LOG_TRACE
(
log
,
"Sent handshake"
);
auto
handshake_response
=
packet_sender
.
receivePacket
<
HandshakeResponse
>
();
HandshakeResponse
handshake_response
;
packet_sender
.
receivePacket
(
handshake_response
);
LOG_DEBUG
(
log
,
"Capabilities: "
<<
handshake_response
.
capability_flags
<<
"
\n
max_packet_size: "
...
...
@@ -74,7 +75,9 @@ void MySQLHandler::run()
{
packet_sender
.
sendPacket
(
AuthSwitchRequest
(
Authentication
::
ClearText
,
""
),
true
);
password
=
packet_sender
.
receivePacket
<
NullTerminatedString
>
().
value
;
NullTerminatedString
password_packet
;
packet_sender
.
receivePacket
(
password_packet
);
password
=
password_packet
.
value
;
}
else
{
...
...
dbms/src/Core/MySQLProtocol.h
浏览文件 @
2789a83c
...
...
@@ -186,13 +186,9 @@ public:
return
std
::
move
(
buf
.
str
());
}
template
<
typename
T
>
T
receivePacket
()
void
receivePacket
(
ReadPacket
&
packet
)
{
static_assert
(
std
::
is_base_of
<
ReadPacket
,
T
>
());
T
packet
;
packet
.
readPayload
(
std
::
move
(
receivePacketPayload
()));
return
packet
;
packet
.
readPayload
(
receivePacketPayload
());
}
template
<
class
T
>
...
...
@@ -301,10 +297,6 @@ public:
String
database
;
String
auth_plugin_name
;
HandshakeResponse
()
=
default
;
HandshakeResponse
(
const
HandshakeResponse
&
)
=
default
;
void
readPayload
(
String
s
)
override
{
std
::
istringstream
ss
(
s
);
...
...
@@ -372,10 +364,6 @@ class NullTerminatedString : public ReadPacket
public:
String
value
;
NullTerminatedString
()
=
default
;
NullTerminatedString
(
const
NullTerminatedString
&
)
=
default
;
void
readPayload
(
String
s
)
override
{
if
(
s
.
length
()
==
0
||
s
.
back
()
!=
0
)
...
...
@@ -550,10 +538,6 @@ class ComFieldList : public ReadPacket
public:
String
table
,
field_wildcard
;
ComFieldList
()
=
default
;
ComFieldList
(
const
ComFieldList
&
)
=
default
;
void
readPayload
(
String
payload
)
{
std
::
istringstream
ss
(
payload
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录