-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for building client with readline (bug1266386) #57
Conversation
@@ -8,7 +8,7 @@ diff -rup old/client/CMakeLists.txt new/client/CMakeLists.txt | |||
-TARGET_LINK_LIBRARIES(mysql perconaserverclient) | |||
+TARGET_LINK_LIBRARIES(mysql mysqlclient) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not a change, it's part of the centos7 patch so github gui is marking it red/green since it contains +/- start of line.
Did you test -DWITH_EDITLINE=system and bundled with this patch? What happens if both WITH_EDITLINE and WITH_READLINE are specified? Do completion and history across the sessions functions work in the
-- Performing Test READLINE_HAVE_HIST_ENTRY because only readline.h but not history.h is included. Once this goes in, this might fix more bugs than 1266386 alone, please
It should be verified that readline binaries fix the issues in the bug |
64d4598
to
b285128
Compare
I have tested building with -DWITH_EDITLINE=system and bundled previously and now with this latest commit and didn't have issues - I think I only tested running the client with previous patch with editline. In the new commit I have added that if you specify both build options it exits with error. We link with curses also - variable ${MY_READLINE_LIBRARY} includes ${READLINE_LIBRARY} and ${CURSES_LIBRARY}. In the second commit I changed the stuff you wrote about including the history.h stuff and extern functions. I tried something like this before but had some issues in some conditions so left it like it was - but that time I didn't see the patch you mentioned - so it seems it works. From the bugs listed above the issues were: putty command line mixup when resizeing windows general readline hotkey usage I'll update the bugs once we agree that this is ok and it gets merged. BUILDS: param: Linking looks like this on debian7: CMAKE: |
Could you please flatten the two commits (i.e. git rebase -i) and then it's OK to merge |
b285128
to
723f4b6
Compare
Added support for building client with readline (bug1266386)
Thanks Tomislav, please update the bugs as well |
Hi @tplavcic would you consider submitting this to upstream https://github.com/mysql/mysql-server? I've successfully used your patch to restore sane readline functionality to my personal mysql client (my vim addled fingers thank you!), and there appears to be an open issue for doing just this: http://bugs.mysql.com/bug.php?id=69991 |
Hi @mal I would consider it and will put it into my todo list but I make no further promises! IIRC this patch doesn't break the current editline builds so they might even consider it. |
That's all I could ask for, thanks! |
Summary: Do exactly that: remember what locks we've held at the start of the statement, and release all other locks if the statement is rolled back. Test Plan: Ran mtr Reviewers: maykov, jtolmer, yoshinorim, hermanlee4 Reviewed By: hermanlee4 Differential Revision: https://reviews.facebook.net/D38313
Summary: Do exactly that: remember what locks we've held at the start of the statement, and release all other locks if the statement is rolled back. Test Plan: Ran mtr Reviewers: maykov, jtolmer, yoshinorim, hermanlee4 Reviewed By: hermanlee4 Differential Revision: https://reviews.facebook.net/D38313
Summary: Do exactly that: remember what locks we've held at the start of the statement, and release all other locks if the statement is rolled back. Differential Revision: https://reviews.facebook.net/D38313 fbshipit-source-id: 709bdf5aade
Summary: Do exactly that: remember what locks we've held at the start of the statement, and release all other locks if the statement is rolled back. Differential Revision: https://reviews.facebook.net/D38313 fbshipit-source-id: 709bdf5aade
Summary: Do exactly that: remember what locks we've held at the start of the statement, and release all other locks if the statement is rolled back. Differential Revision: https://reviews.facebook.net/D38313 fbshipit-source-id: 30de0110702
Summary: Do exactly that: remember what locks we've held at the start of the statement, and release all other locks if the statement is rolled back. Differential Revision: https://reviews.facebook.net/D38313
Summary: Do exactly that: remember what locks we've held at the start of the statement, and release all other locks if the statement is rolled back. Differential Revision: https://reviews.facebook.net/D38313
This change is to enable building mysql client with readline library since upstream mysql switched to editline and there were multiple requests to enable building with readline again (bug1266386).
Build with system readline is here set as default but it can be enforced with -DWITH_READLINE=system
Basically options for building are:
-DWITH_EDITLINE=system|bundled or -DWITH_READLINE=system
And system readline is the default.
Here is the test build:
rpm: http://jenkins.percona.com/job/percona-server-5.6-redhat-binary/143/
deb: http://jenkins.percona.com/job/percona-server-5.6-debian-binary/137/
deb32: http://jenkins.percona.com/job/percona-server-5.6-debian-binary-32/122/
bin: http://jenkins.percona.com/job/percona-server-5.6-binaries-release/107/
Here is the param build:
http://jenkins.percona.com/job/percona-server-5.6-param/837/
Some testing:
readline link in mysql client lib
[vagrant@t-centos6-64 ~]$ ldd /usr/bin/mysql
...
libreadline.so.6 => /lib64/libreadline.so.6 (0x00007fe657bba000)
Running:
mysql> show variables;
Ctrl+w
mysql> show
Comment: in editline Ctrl+w deletes the whole line, while in readline it deletes the characters from pointer back to first space character.
Reverse search:
In readline:
Ctrl+r
(reverse-i-search)`sh': show engines;
In editline it looks like this:
mysql> show engines;
bck:show