Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
b1279c13
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,发现更多精彩内容 >>
未验证
提交
b1279c13
编写于
3月 23, 2019
作者:
A
alexey-milovidov
提交者:
GitHub
3月 23, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4743 from azat-archive/clickhouse-client-tty
clickhouse-client: fix --help without tty
上级
ba474ab2
6d8706e6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
7 deletion
+20
-7
dbms/programs/client/Client.cpp
dbms/programs/client/Client.cpp
+7
-6
dbms/tests/integration/image/Dockerfile
dbms/tests/integration/image/Dockerfile
+1
-0
dbms/tests/queries/0_stateless/00910_client_window_size_detection.reference
.../0_stateless/00910_client_window_size_detection.reference
+1
-0
dbms/tests/queries/0_stateless/00910_client_window_size_detection.sh
...queries/0_stateless/00910_client_window_size_detection.sh
+10
-0
debian/control
debian/control
+1
-1
未找到文件。
dbms/programs/client/Client.cpp
浏览文件 @
b1279c13
...
...
@@ -101,6 +101,7 @@ namespace ErrorCodes
extern
const
int
LOGICAL_ERROR
;
extern
const
int
CANNOT_SET_SIGNAL_HANDLER
;
extern
const
int
CANNOT_READLINE
;
extern
const
int
SYSTEM_ERROR
;
}
...
...
@@ -295,7 +296,6 @@ private:
/// The value of the option is used as the text of query (or of multiple queries).
/// If stdin is not a terminal, INSERT data for the first query is read from it.
/// - stdin is not a terminal. In this case queries are read from it.
stdin_is_not_tty
=
!
isatty
(
STDIN_FILENO
);
if
(
stdin_is_not_tty
||
config
().
has
(
"query"
))
is_interactive
=
false
;
...
...
@@ -610,9 +610,6 @@ private:
try
{
/// Determine the terminal size.
ioctl
(
0
,
TIOCGWINSZ
,
&
terminal_size
);
if
(
!
process
(
input
))
break
;
}
...
...
@@ -1568,7 +1565,7 @@ public:
}
}
ioctl
(
0
,
TIOCGWINSZ
,
&
terminal_size
);
stdin_is_not_tty
=
!
isatty
(
STDIN_FILENO
);
namespace
po
=
boost
::
program_options
;
...
...
@@ -1576,7 +1573,11 @@ public:
unsigned
min_description_length
=
line_length
/
2
;
if
(
!
stdin_is_not_tty
)
{
line_length
=
std
::
max
(
3U
,
static_cast
<
unsigned
>
(
terminal_size
.
ws_col
));
if
(
ioctl
(
STDIN_FILENO
,
TIOCGWINSZ
,
&
terminal_size
))
throwFromErrno
(
"Cannot obtain terminal window size (ioctl TIOCGWINSZ)"
,
ErrorCodes
::
SYSTEM_ERROR
);
line_length
=
std
::
max
(
static_cast
<
unsigned
>
(
strlen
(
"--http_native_compression_disable_checksumming_on_decompress "
)),
static_cast
<
unsigned
>
(
terminal_size
.
ws_col
));
min_description_length
=
std
::
min
(
min_description_length
,
line_length
-
2
);
}
...
...
dbms/tests/integration/image/Dockerfile
浏览文件 @
b1279c13
...
...
@@ -19,6 +19,7 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes -
tzdata
\
libreadline-dev
\
libicu-dev
\
bsdutils
\
curl
ENV
TZ=Europe/Moscow
...
...
dbms/tests/queries/0_stateless/00910_client_window_size_detection.reference
0 → 100644
浏览文件 @
b1279c13
79
dbms/tests/queries/0_stateless/00910_client_window_size_detection.sh
0 → 100755
浏览文件 @
b1279c13
#!/usr/bin/env bash
CURDIR
=
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
.
$CURDIR
/../shell_config.sh
set
-e
set
-o
pipefail
${
CLICKHOUSE_CLIENT
}
--help
</dev/null |
wc
-L
script
-e
-q
-c
"
${
CLICKHOUSE_CLIENT
}
--help"
/dev/null </dev/null
>
/dev/null
debian/control
浏览文件 @
b1279c13
...
...
@@ -61,5 +61,5 @@ Description: debugging symbols for clickhouse-common-static
Package: clickhouse-test
Priority: optional
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, clickhouse-client, bash, expect, python, python-lxml, python-termcolor, python-requests, curl, perl, sudo, openssl, netcat-openbsd, telnet, brotli
Depends: ${shlibs:Depends}, ${misc:Depends}, clickhouse-client, bash, expect, python, python-lxml, python-termcolor, python-requests, curl, perl, sudo, openssl, netcat-openbsd, telnet, brotli
, bsdutils
Description: ClickHouse tests
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录