Skip to content
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

键盘输入异常 #19

Open
protectione055 opened this issue Nov 14, 2022 · 10 comments
Open

键盘输入异常 #19

protectione055 opened this issue Nov 14, 2022 · 10 comments

Comments

@protectione055
Copy link

系统:Ubuntu 20.04.5 LTS
内核版本:5.15.0-50-generic
OceanBase版本:开源3.1.1
obclient版本:Ver Distrib 10.4.18-MariaDB, for Linux (x86_64) using readline 5.1

遇到了和 #8 类似的问题。使用obclient -uxxx@xxx -h127.0.0.1 -P 2881 -c -Doceanbase连接到observer后敲击功能键会输出空格。使用mysql-client测试过以后,并没有发现同样的问题。

@kztao
Copy link

kztao commented Apr 12, 2023

OS: ubuntu server 22.04.2
OB: OB-server-4.1.0
问题相同,稳定复现
image

@meiq4096
Copy link

meiq4096 commented May 29, 2023

root@MQBOOK:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy

root@MQBOOK:~# obclient --version
obclient Ver Distrib 10.4.18-MariaDB, for Linux (x86_64) using readline 5.1

When obclient is used, the backspace key on the keyboard is abnormal 。
If the mysql client is used, no problem is found.
image

@longdafeng
Copy link
Member

longdafeng commented May 29, 2023

@kztao @meiq4096 @protectione055 Thanks for your feedback.

The developer is working on this issue, he is try to find out the root cause.

Later he will give us some feedback.

@kongchengzhuge
Copy link
Contributor

@unique5945 @longdafeng @meiq4096 @protectione055 @kztao
The issue is caused by obclient using the readline library to implement input capability, which depends on the Curses library. However, Curses has different implementations on CentOS and Ubuntu. If the library is dynamically linked, it can work on both CentOS and Ubuntu, but both systems need to have Curses installed. Currently, obclient is statically compiled on CentOS, so running it directly on Ubuntu can cause problems.

@longdafeng
Copy link
Member

If using dynamically linked, it is likely to bring compatibility issues. How does mysql resolve this problem? @kongchengzhuge

@kongchengzhuge
Copy link
Contributor

Is MySQL on Ubuntu installed using a method similar to apt? If so, then this method is similar to compiling on Ubuntu and there should be no issues with dependencies. @longdafeng @meiq4096

@kongchengzhuge
Copy link
Contributor

After checking the dependencies of the MySQL package on my local machine, I found that MySQL is dynamically linked.

ldd /usr/bin/mysql
linux-vdso.so.1 => (0x00007fff35edf000)
/lib/libsysconf-alipay.so (0x00007f6175fc5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6175d91000)
libz.so.1 => /lib64/libz.so.1 (0x00007f6175b7b000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f6175977000)
libssl.so.10 => /lib64/libssl.so.10 (0x00007f6175705000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f61752a1000)
libncurses.so.5 => /lib64/libncurses.so.5 (0x00007f617507a000)
libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f6174e50000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f6174b48000)
libm.so.6 => /lib64/libm.so.6 (0x00007f6174846000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6174478000)
/lib64/ld-linux-x86-64.so.2 (0x00007f617672e000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f617422a000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f6173f41000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f6173d3d000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f6173b09000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f61738f3000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f61736e2000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f61734de000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f61732c4000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f617309c000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f6172e3b000)

@meiq4096
Copy link

meiq4096 commented Jun 5, 2023

root@MQBOOK:~# ldd /usr/bin/mysql
        linux-vdso.so.1 (0x00007fff875f2000)
        libedit.so.2 => /lib/x86_64-linux-gnu/libedit.so.2 (0x00007ff479667000)
        libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007ff479598000)
        libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007ff4794f4000)
        libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007ff4790b2000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ff47909e000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff478e74000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff478e52000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff478c2a000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff479d53000)
        libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007ff478bf8000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007ff478be0000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff478af9000)
        libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007ff478aea000)
root@MQBOOK:~#
root@MQBOOK:~# apt list --installed |grep mysql

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

mysql-client-8.0/jammy-security,jammy-updates,now 8.0.33-0ubuntu0.22.04.2 amd64 [installed,automatic]
mysql-client-core-8.0/jammy-security,jammy-updates,now 8.0.33-0ubuntu0.22.04.2 amd64 [installed,automatic]
mysql-client/jammy-security,jammy-updates,now 8.0.33-0ubuntu0.22.04.2 all [installed]
mysql-common/jammy,now 5.8+1.0.8 all [installed,automatic]
root@MQBOOK:~# mysql --version
mysql  Ver 8.0.33-0ubuntu0.22.04.2 for Linux on x86_64 ((Ubuntu))

@jiangtao69039
Copy link

@kongchengzhuge @meiq4096 @longdafeng
Is there any solution?
I need to use obclient on ubuntu22.04/debian11

@jiangtao69039
Copy link

在debian上构建的过程记录了一下, 我自己能成功构建出obclient并且解决了输入异常的问题
https://zhuanlan.zhihu.com/p/678874871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants