Re: [Sqlrelay-discussion] LD_PRELOAD problem
Brought to you by:
mused
|
From: Jani O. <jan...@pr...> - 2008-06-19 09:41:05
|
Dániel Vásárhelyi wrote:
> - i'll try to get mysql-proxy work with this, but as mysql-proxy
> executes queries as well as accepts them, i'm not sure what will be
> the results of the LD_PRELOAD tweak
Tested this just now..
Shells 1# and 2# both root.
1# export LD_PRELOAD=/usr/lib/libmysql50sqlrelay.so
1# ldd mysql-proxy
linux-gate.so.1 => (0x00242000)
/usr/lib/libmysql50sqlrelay.so (0x00608000)
libevent-1.1a.so.1 => /usr/lib/libevent-1.1a.so.1 (0x0074a000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00d3c000)
libc.so.6 => /lib/libc.so.6 (0x00ae8000)
libsqlrclient-0.39.4.so.1 => /usr/lib/libsqlrclient-0.39.4.so.1
(0x0040f000)
librudiments-0.31.so.1 => /usr/lib/librudiments-0.31.so.1
(0x00110000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00c78000)
libssl.so.6 => /lib/libssl.so.6 (0x003b8000)
libcrypto.so.6 => /lib/libcrypto.so.6 (0x00243000)
libz.so.1 => /usr/lib/libz.so.1 (0x00cd3000)
libpcre.so.0 => /lib/libpcre.so.0 (0x0018c000)
librt.so.1 => /lib/librt.so.1 (0x00ce8000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00cf3000)
libdl.so.2 => /lib/libdl.so.2 (0x00c2a000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00428000)
libm.so.6 => /lib/libm.so.6 (0x00c91000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x001a9000)
/lib/ld-linux.so.2 (0x00ac6000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x001b5000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00513000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00ae3000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x001e3000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00209000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x0021c000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00225000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00cba000)
libsepol.so.1 => /lib/libsepol.so.1 (0x00c30000)
1# ./mysql-proxy./mysql-proxy
--proxy-backend-addresses=/var/lib/mysql/mysql.sock
2# mysql -h 127.0.0.1 -P 4040 database
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 143117 to server version: 5.0.22-log
1# ./mysql-proxy --proxy-backend-addresses=/tmp/sqlrelay.sock
2# mysql -h 127.0.0.1 -P 4040 database
(no connection)
-- Lets test if it even working:)
2# export LD_PRELOAD=/usr/lib/libmysql50sqlrelay.so
2# mysql -S /tmp/sqlrelay.sock database
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 0 to server version: 5.0.0
So seems that no luck:)
> On Thu, Jun 12, 2008 at 11:41 PM, David Muse <dav...@fi...> wrote:
>> It looks like the LD_PRELOAD part is working. The:
>>
>> Failed to get a cursor id.
>> A network error may have ocurred.
>>
>> Error is a sqlrelay client error, not a mysql error. So I believe that
>> the mysql client is using the drop-in replacement library. The
>> host/port/user/password may not be correct. Double-check those.
>>
>> David Muse
>> dav...@fi...
>>
>> On Fri, 2008-06-06 at 09:35 +0200, Dániel Vásárhelyi wrote:
>>> Hello,
>>>
>>> I've got a problem with the mysql drop-in replacement library on Debian 4.0
>>>
>>> Basically this:
>>> vm-99:~# ldd `which mysql` | grep sql
>>> libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15 (0xb7d0a000)
>>> vm-99:~# LD_PRELOAD=/usr/lib/libmysql50sqlrelay-0.37.1.so.1 ldd `which
>>> mysql` | grep sql
>>> /usr/lib/libmysql50sqlrelay-0.37.1.so.1 (0xb7eea000)
>>> libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15 (0xb7c9a000)
>>> libsqlrclient-0.37.1.so.1 =>
>>> /usr/lib/libsqlrclient-0.37.1.so.1 (0xb79ca000)
>>>
>>> It seems regardless I specify the mysql replacement library, the mysql
>>> client library (which I've used for testing) was somehow "forced" to
>>> use the original one.
>>>
>>> It isn't working:
>>>
>>> vm-99:~# LD_PRELOAD=/usr/lib/libmysql50sqlrelay-0.37.1.so.1 mysql
>>> --host=localhost --port=9000 --user=root -p
>>> Enter password:
>>> Welcome to the MySQL monitor. Commands end with ; or \g.
>>> Your MySQL connection id is 0
>>> Server version: 5.0.0
>>>
>>> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>>>
>>> mysql> show tables;
>>> ERROR:
>>> Failed to get a cursor id.
>>> A network error may have ocurred.
>>> mysql>
>>>
>>> Do anyone have an idea why does it happen?
>>>
>>> asd
>>
>>
>> __________________________________________________
>> D O T E A S Y - "Join the web hosting revolution!"
>> http://www.doteasy.com
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> Sqlrelay-discussion mailing list
>> Sql...@li...
>> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>>
>
>
>
|