Skip to content

BUG: can't stop execution of open SQL_TABLE.db with Ctrl+C #14960

Closed

Description

@Marat22

Describe the bug

If I run:

open C:\marat\programs\BASE\MiriadRobot\_databases\fut_ru.db

I can't stop execution of command by pressing Ctrl+C.

This db contains several tables, each of them contain 3224 records, so i need to wait until all of them are printed.

How to reproduce

  1. Open any sqlite3 big table by open command
  2. Try to stop the printing of table by pressing Ctrl+C

Expected behavior

I expected the command to stop execution.

Configuration

key value
version 0.101.0
major 0
minor 101
patch 0
branch
commit_hash
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.83.0 (90b35a623 2024-11-26)
rust_channel stable-x86_64-pc-windows-msvc
cargo_version cargo 1.83.0 (5ffbef321 2024-10-29)
build_time 2025-01-20 08:30:19 +05:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash
installed_plugins

Activity

  1. added
    status:needs-triage
    on Jan 29, 2025
  2. fdncred commented on Jan 29, 2025

    @fdncred
    Contributor

    We'd like to fix this. Contributions welcome.

  3. added
    category:bug
    A:signal-cancel
    and removed
    status:needs-triage
    on Jan 29, 2025
  4. changed the title [-]BUG: can't stop execution of `open SQL_TABLE.db` with Ctrl+[/-] [+]BUG: can't stop execution of `open SQL_TABLE.db` with Ctrl+C[/+] on Jan 30, 2025
  5. added a commit that references this issue on Feb 7, 2025
    9420301
  6. added this to the v0.103.0 milestone on Feb 7, 2025
  7. Marat22 commented on Mar 28, 2025

    @Marat22
    Author

    Ctrl+C still doesn't stop execution of open SQL_TABLE.db

    key value
    version 0.103.0
    major 0
    minor 103
    patch 0
    branch
    commit_hash
    build_os windows-x86_64
    build_target x86_64-pc-windows-msvc
    rust_version rustc 1.83.0 (90b35a623 2024-11-26)
    rust_channel stable-x86_64-pc-windows-msvc
    cargo_version cargo 1.83.0 (5ffbef321 2024-10-29)
    build_time 2025-03-28 08:43:51 +05:00
    build_rust_channel release
    allocator standard
    features default, sqlite, trash
    installed_plugins
  8. sgvictorino commented on Apr 17, 2025

    @sgvictorino
    Contributor

    @Marat22 does your database have large text/blob values? If so, I wonder if it's stalling here:

    let mut cell = expand_entry(item, inner_cfg);
    let value_width = string_width(&cell.text);
    if value_width > available_width {
    // it must only happen when a string is produced, so we can safely wrap it.
    // (it might be string table representation as well) (I guess I mean default { table ...} { list ...})
    //
    // todo: Maybe convert_to_table2_entry could do for strings to not mess caller code?
    cell.text = wrap_text(&cell.text, available_width, cfg.opts.config);
    }
    let value = NuRecordsValue::new(cell.text);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:signal-cancelcategory:bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions