Bug #95287 | mysql client ignores ~/.editrc. bind "^W" ed-delete-prev-word doesn't work | ||
---|---|---|---|
Submitted: | 8 May 2019 7:47 | Modified: | 4 Oct 2019 11:50 |
Reporter: | Ildar Amankulov | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 8.0.17 | OS: | Linux (Linux aim-server.crtdev.local 5.0.5-arch1-1-ARCH #1 SMP PREEMPT Wed Mar 27 17:53:10 UTC 2019 x86_64 ) |
Assigned to: | CPU Architecture: | x86 (x86_64) |
[8 May 2019 7:47]
Ildar Amankulov
[8 May 2019 7:48]
Ildar Amankulov
BUILD instructions
Attachment: PKGBUILD.txt (text/plain), 6.19 KiB.
[8 May 2019 14:18]
MySQL Verification Team
HI, Actually your .editrc worked just fine for me. I only removed your quotes ........
[13 May 2019 8:04]
Ildar Amankulov
Hello, It is definitely a bug. I have just installed arch linux64 + mysql from scratch. The bug is reproduced. You can try it in the configured environment. For that: 1)Install http://virtualbox.org/ 2)Create a Virtual guest arch linux 64 with the attached image (you can just copy the 64bit folder to the folder where your other VMs are located) https://drive.google.com/drive/folders/1Qf2XQK26zHxwv35jeNVMKRI8v6IRvG_N?usp=sharing 3)Run the guest and login 4)Run mysql -uroot -p1 and try any query USERS root / 1 aim / 1 PS according to https://dev.mysql.com/doc/refman/8.0/en/mysql-tips.html#mysql-input-editing quotes should be there
[13 May 2019 13:58]
MySQL Verification Team
Hi, It turns out that we are not maintaining this library. I will double check that and will confirm this to you in my next comment.
[14 May 2019 12:44]
MySQL Verification Team
Hi, We have investigating the issue further. Libedit that we use for our command line interface is the one that is shipped with our source. We debugged and found out that proper .editrc is read with our libedit library. We also found that the default key binding for the Ctrl-W is exactly ed-delete-prev-word. Hence, use our bundled libedit as we do not support any other version.
[14 May 2019 13:25]
Ildar Amankulov
Hello, Thank you for your reply. Could you suggest which version of libedit is used by mysql 8.0.15 ? I suppose the history is here https://thrysoee.dk/editline/
[14 May 2019 14:10]
MySQL Verification Team
It is the one that it distributed with our source package.
[2 Aug 2019 11:59]
Ildar Amankulov
Upgrade to 8.0.16 didn't help me. The possible reason is https://github.com/knz/go-libedit/issues/3#ref-commit-84b7963 as this instruction doesn't work for me To see the current set of key bindings, temporarily put a line that says only bind at the end of .editrc. mysql will show the bindings when it starts. https://dev.mysql.com/doc/refman/8.0/en/mysql-tips.html#mysql-input-editing
[2 Aug 2019 17:58]
MySQL Verification Team
Hi, I just tested it with 8.0.16 and ^W worked just fine for me. I used libedit that comes with our source package and the same works with our binary packages.
[3 Oct 2019 10:16]
Terje Røsten
Hi! Thanks for your report! Your build is using cmake option: -DWITH_SYSTEM_LIBS=ON which means libedit (and many other libs will be taken from build platform). You see this from ldd too: $ldd /usr/bin/mysql libedit.so.0 => /usr/lib/libedit.so.0 (0x00007f9e01779000) libedit as shipped in MySQL server sources will not be used at all. The code which does loading of ~/.editrc is located inside /usr/lib/libedit.so.0 Hence, the problem you see is due to something wrong in libedit.so.0 on your platform, it's nothing MySQL can do to fix that. If you build without the -DWITH_SYSTEM_LIBS=ON flag libedit from MySQL sources will be used and ~/.editrc will be loaded.
[3 Oct 2019 12:03]
MySQL Verification Team
Terje, Thanks a lot. Your description is more verbose then mine, but it amounts to the same conclusions. Thanks again.
[4 Oct 2019 11:50]
Ildar Amankulov
Hello, Thank you very much, using the flag -DWITH_SYSTEM_LIBS=OFF fixed the issue. I have shared the idea here https://aur.archlinux.org/pkgbase/mysql/#comment-710405 PS Currently, it looks like ldd /usr/bin/mysql linux-vdso.so.1 (0x00007fffa1986000) libjemalloc.so.2 => /usr/lib/libjemalloc.so.2 (0x00007f333d29f000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f333d27e000) libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007f333d1ee000) libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007f333cf1d000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f333cf18000) libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007f333cea9000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f333ccbf000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f333cca5000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f333cae2000) /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f333dc0e000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f333c99c000)