ClickHouse: CLI is broken starting with v22.3

Cli is broken starting with v22.3-lts:

  1. When I try to copy-paste multiline sql query, clickhouse-client (launched with -m flag ofc) goes insane and breaks query:
CREATE TABLE test
(
    Date Date,
    user_id Nullable(UInt32),
    custom_audience_id UInt32,
    segment_id Nullable(UInt32),
)
ENGINE = MergeTree() partition by Date order by (Date, user_id);

grim-22 03 2022-152400 2. When I press enter, query should kind of split and continue on a new line with prompt :-] as it was in previous versions, but starting with 22.3 I just get newline feed: grim-22 03 2022-152657

How to reproduce?

  1. Using your linux disro (ubuntu for instance) open any text editor, gedit for instance, and paste in it the query above: grim-22 03 2022-154645
  2. Using your mouse, select query and press CTRL+C on your keyboard.
  3. Open your terminal emulator and launch clickhouse-client -m. I use alacritty terminal emulator, but may be there are some more affected emulator. I also tried foot terminal – same result.
  4. Press CTRL+SHIFT+V Expected behavior: grim-22 03 2022-155246 Not expected behavior: grim-22 03 2022-155328

Does it reproduce on recent release? yes, ClickHouse server version 22.3.2 revision 54455

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 15 (8 by maintainers)

Most upvoted comments

I can reproduce with alacritty. It’s related to bracketed paste. Will investigate further.