Not the answer you need?
Register and ask your own question!
Many Forum changes were implemented on Tue 22 Sep. Read about new Ranks, Scoring, and Reactions.
Email [email protected] for any comments or concerns.

ODBC Seg Faults

jtraerjtraer EntrantInactive User Role Beginner
Hey everyone,

I found that programs that use ODBC to connect to Percona Server via the supplied libmysqlclient library's will seg fault rather reliably.

We are using Ubuntu 12.04 and Percona is installed from the Percona repository. libmysqlclient18 is 5.5.33-rel31.1-568.precise and the server version is 5.5.33-rel31.1-568.precise.

To work around this problem, we simply copied the distribution's copy of the libmysqlclient library on to the server and corrected the symlinks.

Here is how to produce the error:


$ echo 'select 1'| isql myODBCdb
+
+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+
+
SQL> select 1
+
+
| 1 |
+
+
| 1 |
+
+
SQLRowCount returns 1
1 rows fetched
Segmentation fault


Here is how we fixed the problem:


$ scp vanillia_ubuntu:/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0 .
$ sudo cp libmysqlclient.so.18.0.0 /usr/lib/x86_64-linux-gnu/
$ ls -la /usr/lib/libmysqlclient.so.18
lrwxrwxrwx 1 root root 26 Oct 31 13:34 /usr/lib/libmysqlclient.so.18 -> libmysqlclient_r.so.18.1.0
$ sudo mv /usr/lib/libmysqlclient.so.18 /usr/lib/libmysqlclient.so.18.old

$ sudo ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0 /usr/lib/libmysqlclient.so.18
$ ls -la /usr/lib/libmysqlclient.so.18
lrwxrwxrwx 1 root root 50 Oct 31 14:06 /usr/lib/libmysqlclient.so.18 -> /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0



$ echo 'select 1'| isql myODBCdb
+
+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+
+
SQL> select 1
+
+
| 1 |
+
+
| 1 |
+
+
SQLRowCount returns 1
1 rows fetched


I would like to figure out a better solution in the long run as this is just a quick and dirty work around.

I suspect that rebuilding various ODBC packages in Ubuntu with Percona's versions of the MySQL client libraries would possibly solve the issue but I have not looked into that as of yet.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.