Bug 1965671 - bug in libedit causes mysql client to not read .editrc file thus ^W doesn't work as expected
Summary: bug in libedit causes mysql client to not read .editrc file thus ^W doesn't w...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libedit
Version: 33
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Boris Ranto
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-28 19:41 UTC by Trevor Cordes
Modified: 2021-06-13 01:19 UTC (History)
2 users (show)

Fixed In Version: libedit-3.1-37.20210522cvs.fc33
Clone Of:
Environment:
Last Closed: 2021-06-13 01:19:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Trevor Cordes 2021-05-28 19:41:53 UTC
Description of problem:
A few months ago something changed in mariadb/mysql client build such that ^W no longer does a delete-previous-word, but does a delete-from-cursor-to-start-of-line.  It used to be that to fix this you just put a line in ~/.editrc to bind ^W as you want it.  But the new mysql client wasn't reading this file.

The cause is a bug in libedit that was causing it to never read editrc files on linux.

I have submitted a patch to upstream and the maintainer accepted it and it solves this problem.  Building against the latest upstream will solve this problem, regardless of how mariadb is built.


Version-Release number of selected component (if applicable):
libedit-3.1-33.20191231cvs.fc33.x86_64


How reproducible:
always


Steps to Reproduce:
0. have an ~/.editrc file with contents like:
  bind "^W" ed-delete-prev-word
1. start a mysql client: mysql -u root -p mysql
2. type a query
3. move cursor to middle of query
4. press ^W


Actual results:
Deletes the line from cursor back to start of line


Expected results:
Delete just to first preceding whitespace


Additional info:
fixed in upstream latest version libedit-20210522-3.1.tar.gz
http://thrysoee.dk/editline/

This fix impacts anything using libedit, not just mysql client.

Also see debian bug:
https://linux.debian.bugs.dist.narkive.com/9eqpgh8z/bug-975911-mariadb-client-appears-to-ignore-editrc-keybind-settings

Comment 1 Jerry James 2021-05-28 19:45:01 UTC
Builds of the new version have already been done, and were pushed to stable about a day ago.  If you do a dnf update, you should get the fixed version.

Comment 2 Trevor Cordes 2021-05-28 20:01:13 UTC
Wow, that was fast!  I don't see anything for my F33 yet.  Looking at bodhi it looks like only 34/35 were done.  Can we push to 33?

Comment 3 Jerry James 2021-05-28 20:05:33 UTC
Uh oh, you're right.  I wonder why I skipped F33?  It must have made sense at the time. *shrug*

I'll get builds going for F33.  Sorry about that.

Comment 4 Fedora Update System 2021-05-28 20:27:16 UTC
FEDORA-2021-a963f18434 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a963f18434

Comment 5 Fedora Update System 2021-05-29 01:37:59 UTC
FEDORA-2021-a963f18434 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a963f18434`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a963f18434

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2021-06-13 01:19:42 UTC
FEDORA-2021-a963f18434 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.