sqlrelay-discussion Mailing List for SQL Relay (Page 25)
Brought to you by:
mused
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
(20) |
Mar
(27) |
Apr
(17) |
May
(32) |
Jun
(45) |
Jul
(49) |
Aug
(68) |
Sep
(44) |
Oct
(29) |
Nov
(64) |
Dec
(25) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(61) |
Feb
(22) |
Mar
(25) |
Apr
(31) |
May
(18) |
Jun
(28) |
Jul
(19) |
Aug
(16) |
Sep
(8) |
Oct
(17) |
Nov
(32) |
Dec
(4) |
| 2007 |
Jan
(20) |
Feb
(25) |
Mar
(5) |
Apr
(12) |
May
(11) |
Jun
(18) |
Jul
(16) |
Aug
(22) |
Sep
(37) |
Oct
(20) |
Nov
(11) |
Dec
(2) |
| 2008 |
Jan
(11) |
Feb
(33) |
Mar
(12) |
Apr
(18) |
May
(22) |
Jun
(31) |
Jul
(23) |
Aug
(6) |
Sep
|
Oct
(10) |
Nov
(22) |
Dec
|
| 2009 |
Jan
(12) |
Feb
(8) |
Mar
(11) |
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(27) |
Aug
(2) |
Sep
(10) |
Oct
(5) |
Nov
(2) |
Dec
(1) |
| 2010 |
Jan
(11) |
Feb
(18) |
Mar
(10) |
Apr
(28) |
May
(28) |
Jun
|
Jul
(27) |
Aug
(9) |
Sep
(21) |
Oct
(2) |
Nov
(2) |
Dec
(11) |
| 2011 |
Jan
|
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
(2) |
Jun
(44) |
Jul
(9) |
Aug
(2) |
Sep
(12) |
Oct
(7) |
Nov
(11) |
Dec
(7) |
| 2012 |
Jan
(5) |
Feb
|
Mar
(9) |
Apr
(9) |
May
(12) |
Jun
|
Jul
(13) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
(10) |
| 2013 |
Jan
(21) |
Feb
(3) |
Mar
(4) |
Apr
|
May
(3) |
Jun
(2) |
Jul
(3) |
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
(4) |
| 2014 |
Jan
(7) |
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
(4) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: leonid b. <leo...@gm...> - 2008-06-17 11:01:16
|
How to use this type of variables? Simple inputBind(variable, value) defineOutputBindDouble(variable) won't work :( |
|
From: Jani O. <jan...@pr...> - 2008-06-13 18:44:40
|
On Fri, Jun 13, 2008 at 01:36:12PM -0400, David Muse wrote: > > What would that option have been or where to look if one might want to > > search that possibility? Then these configure parameters must just mean > > that they are not builded into php binary itself > > '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/bin/mysql_config' > > but they still use own mysql code? > Hmm, those look like the correct parameters. I suspect using those > parameters will link against the libmysqlclient library, not against > PHP's code. Give them a try. What version of PHP are they in? In stock PHP in RHEL5/CentOS5 PHP Version => 5.1.6 And that was the version which I tested with dropin mysql library. > > And of course requests are easy to say and the coding is a big job > > but PDO or MDB2 driver for sqlrelay would be nice. As Pear DB is now > > "obsolete" and superseded with MDB2. Pear DB doesn't feel like the right > > choice to use in new projects. > Yeah, MDB2 is on the TODO list, not sure when I'll get around to it > though :/ Ok, well don't they say that it's the thought that counts :) |
|
From: David M. <dav...@fi...> - 2008-06-13 18:01:25
|
On Fri, 2008-06-13 at 10:19 +0300, Jani Ollikainen wrote:
> David Muse wrote:
> > PHP actually contains it's own copy of the mysql client library that is
> > compiled into PHP itself. Since it doesn't dynamically load the mysql
> > client library, it can't be overridden with the SQL Relay drop-in
> > library.
>
> Oh, This explains why there is that license exception for PHP :)
>
> > A long time ago, it was possible to build PHP such that it dynamically
> > linked in the mysql client library. But I don't believe that option
> > exists any more, and may not have for a while.
>
> What would that option have been or where to look if one might want to
> search that possibility? Then these configure parameters must just mean
> that they are not builded into php binary itself
> '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/bin/mysql_config'
> but they still use own mysql code?
Hmm, those look like the correct parameters. I suspect using those
parameters will link against the libmysqlclient library, not against
PHP's code. Give them a try. What version of PHP are they in?
>
> > Unfortunately, at this time, the only solution would be to find a
> > version of PHP that dynamically links to mysql and use it if you can.
>
> Most probably too old PHP's and not suitable for OO coding.
>
> > I've been looking into what it would take to remap mysql calls in PHP,
> > but I haven't come up with a solution yet.
> > Sorry for the bad news.
>
> Well, we made couple of classes to emulate PDO's basic features which
> we need. More work and not so nice but it seems to do it's work and
> that's what counts.
>
> And of course requests are easy to say and the coding is a big job
> but PDO or MDB2 driver for sqlrelay would be nice. As Pear DB is now
> "obsolete" and superseded with MDB2. Pear DB doesn't feel like the right
> choice to use in new projects.
Yeah, MDB2 is on the TODO list, not sure when I'll get around to it
though :/
Dave
>
>
> > David Muse
> > dav...@fi...
> >
> > On Thu, 2008-06-05 at 11:34 +0300, Jani Ollikainen wrote:
> >> Jani Ollikainen wrote:
> >>
> >> And if this helps I straced the normal mysql client:
> >>
> >> connect(3, {sa_family=AF_FILE, path="/tmp/sqlrelay.sock"}, 110) = 0
> >> setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EOPNOTSUPP (Operation
> >> not suppo
> >> rted)
> >> write(3, "\0\0\0\10sqlrelay\0\0\0\tpass", 25) = 25
> >> read(3, "\0\1\0\0", 8192) = 4
> >> write(3, "\0\v\0\0\0\10sqlrelay\0\0\0\tpass", 27) = 27
> >> read(3, "\0\1", 8192) = 2
> >>
> >> It write()'s before tries to read() which PHP mysql
> >> doesn't do.
> >>
> >> PHP code for connection is:
> >>
> >> try {
> >> $dbh = new
> >> PDO("mysql:unix_socket=/tmp/sqlrelay.sock;dbname=www",_SQLUSER, _SQLPASS);
> >> } catch (PDOException $e) {
> >> echo 'Connection failed: ' . $e->getMessage();
> >> }
> >>
> >> And the _SQLUSER and _SQLPASS are the user/pass for
> >> sqlrelay not for the mysql.
> >>
> >> With LD_PRELOAD defined the normal mysqlsocket connection
> >> works..
> >>
> >> connect(3, {sa_family=AF_FILE, path="/var/lib/mysql/mysql.sock"}, 110) = 0
> >> setsockopt(3, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not
> >> supported
> >> )
> >> setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
> >> read(3, "8\0\0\0\n5.0.22-log\0\371\4\0\0]Z,iN)#q\0,\242\10"..., 16384) = 60
> >>
> >> So it seems like for some reason the LD_PRELOAD won't do it's trick?
> >>
> >>
> >>> Hi,
> >>>
> >>> Subject is the problem.
> >>>
> >>> If I set the LD_PRELOAD cli mysql client
> >>> can connect and works nicely.
> >>>
> >>> But with PHP neither pdo_mysql or mysql
> >>> works. It just hangs when connecting.
> >>>
> >>> Strace says it is trying to connect the
> >>> right socket but it just cannot get anything from there.
> >>>
> >>> Any ideas?
> >>>
> >>> The system is CentOS.
> >>>
> >>> Strace output:
> >>> connect(3, {sa_family=AF_FILE, path="/tmp/sqlrelay.sock"}, 110) = 0
> >>> setsockopt(3, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not
> >>> supported)
> >>> setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
> >>> read(3,
> >>>
> >>> # ldd php-cli
> >>> linux-gate.so.1 => (0x00110000)
> >>> /usr/lib/libmysql50sqlrelay.so (0x0018a000)
> >>> libcrypt.so.1 => /lib/libcrypt.so.1 (0x00cf3000)
> >>> libaspell.so.15 => /usr/lib/libaspell.so.15 (0x005e4000)
> >>> libpspell.so.15 => /usr/lib/libpspell.so.15 (0x00ce8000)
> >>> libgmp.so.3 => /usr/lib/sse2/libgmp.so.3 (0x003ff000)
> >>> libdb-4.3.so => /lib/libdb-4.3.so (0x006a7000)
> >>> libpthread.so.0 => /lib/libpthread.so.0 (0x00c78000)
> >>> libcurl.so.3 => /usr/lib/libcurl.so.3 (0x005a6000)
> >>> libbz2.so.1 => /usr/lib/libbz2.so.1 (0x00de6000)
> >>> libz.so.1 => /usr/lib/libz.so.1 (0x00cd3000)
> >>> libpcre.so.0 => /lib/libpcre.so.0 (0x00dc7000)
> >>> libresolv.so.2 => /lib/libresolv.so.2 (0x00d4a000)
> >>> libm.so.6 => /lib/libm.so.6 (0x00c91000)
> >>> libdl.so.2 => /lib/libdl.so.2 (0x00c2a000)
> >>> libnsl.so.1 => /lib/libnsl.so.1 (0x00d23000)
> >>> libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00472000)
> >>> libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00d97000)
> >>> libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00323000)
> >>> libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00d5f000)
> >>> libcom_err.so.2 => /lib/libcom_err.so.2 (0x00ae3000)
> >>> libssl.so.6 => /lib/libssl.so.6 (0x003b8000)
> >>> libcrypto.so.6 => /lib/libcrypto.so.6 (0x001ee000)
> >>> libidn.so.11 => /usr/lib/libidn.so.11 (0x00435000)
> >>> libc.so.6 => /lib/libc.so.6 (0x00ae8000)
> >>> libsqlrclient-0.39.4.so.1 => /usr/lib/libsqlrclient-0.39.4.so.1
> >>> (0x00111000)
> >>> librudiments-0.31.so.1 => /usr/lib/librudiments-0.31.so.1
> >>> (0x0079e000)
> >>> librt.so.1 => /lib/librt.so.1 (0x0012a000)
> >>> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0081a000)
> >>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00d3c000)
> >>> /lib/ld-linux.so.2 (0x00ac6000)
> >>> libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00d87000)
> >>> libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00d92000)
> >>> libselinux.so.1 => /lib/libselinux.so.1 (0x00cba000)
> >>> libsepol.so.1 => /lib/libsepol.so.1 (0x00c30000)
> >>>
> >>> -------------------------------------------------------------------------
> >>> 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
> >>
> >> -------------------------------------------------------------------------
> >> 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
> >>
> >>
> >> __________________________________________________
> >> D O T E A S Y - "Join the web hosting revolution!"
> >> http://www.doteasy.com
> >
> >
> >
> > __________________________________________________
> > 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
>
>
> -------------------------------------------------------------------------
> 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
>
>
> __________________________________________________
> D O T E A S Y - "Join the web hosting revolution!"
> http://www.doteasy.com
__________________________________________________
D O T E A S Y - "Join the web hosting revolution!"
http://www.doteasy.com
|
|
From: David M. <dav...@fi...> - 2008-06-13 17:59:14
|
It might use that much. You can tune memory usage though: http://sqlrelay.sourceforge.net/sqlrelay/tuning.html#memoryusage David Muse dav...@fi... On Fri, 2008-06-13 at 16:48 +0800, 孙庚 wrote: > 16:56:59 up 6:30, 2 users, load average: 000, 0.07, 3.62 > 85 processes: 83 sleeping, 2 running, 0 zombie, 0 stopped > CPU states: 0.1% user 0.0% system 0.0% nice 0.0% iowait 99.8% > idle > Mem: 247188k av, 147556k used, 99632k free, 0k shrd, > 4740k buff > 114940k active, 452k inactive > Swap: 2104472k av, 57440k used, 2047032k free > 19344k cached > > PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU > COMMAND > 10348 nobody 16 0 1964 1964 1692 S 0.0 0.7 0:00 0 > sqlr-listener > 10350 nobody 15 0 12972 12M 4724 S 0.0 5.2 0:00 0 > sqlr-connection > 10352 nobody 15 0 11544 11M 4488 S 0.0 4.6 0:00 0 > sqlr-connection > 10354 nobody 22 0 11544 11M 4492 S 0.0 4.6 0:00 0 > sqlr-connection > 10356 nobody 22 0 11540 11M 4488 S 0.0 46 0:00 0 > sqlr-connection > 10358 nobody 22 0 11544 11M 4492 S 0.0 4.6 0:00 0 > sqlr-connection > 10360 nobody 22 0 11548 11M 4492 S 0.0 4.6 0:00 0 > sqlr-connection > 10362 nobody 22 0 11548 11M 4492 S 0.0 4.6 0:00 0 > sqlr-connection > 10364 nobody 22 0 11540 11M 4488 S 0.0 4.6 0:00 0 > sqlr-connection > 10366 nobody 22 0 11540 11M 4492 S 0.0 46 0:00 0 > sqlr-connection > 10368 nobody 22 0 11540 11M 4488 S 0.0 4.6 0:00 0 > sqlr-connection > 10370 nobody 15 0 1928 1928 1672 S 0.0 0.7 0:00 0 > sqlr-scaler > > > every sqlrelay connection user 11M memary? > > if i have to user 100 connection,sqlrelay will use 1G memmary? > > > > > > ______________________________________________________________________ > 小户型月供一千多 __________________________________________________ > 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 __________________________________________________ D O T E A S Y - "Join the web hosting revolution!" http://www.doteasy.com |
|
From: 孙庚 <tss...@16...> - 2008-06-13 08:49:02
|
16:56:59 up 6:30, 2 users, load average: 0.00, 0.07, 3.62
85 processes: 83 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 0.1% user 0.0% system 0.0% nice 0.0% iowait 99.8% idle
Mem: 247188k av, 147556k used, 99632k free, 0k shrd, 4740k buff
114940k active, 452k inactive
Swap: 2104472k av, 57440k used, 2047032k free 19344k cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND
10348 nobody 16 0 1964 1964 1692 S 0.0 0.7 0:00 0 sqlr-listener
10350 nobody 15 0 12972 12M 4724 S 0.0 5.2 0:00 0 sqlr-connection
10352 nobody 15 0 11544 11M 4488 S 0.0 4.6 0:00 0 sqlr-connection
10354 nobody 22 0 11544 11M 4492 S 0.0 4.6 0:00 0 sqlr-connection
10356 nobody 22 0 11540 11M 4488 S 0.0 4.6 0:00 0 sqlr-connection
10358 nobody 22 0 11544 11M 4492 S 0.0 4.6 0:00 0 sqlr-connection
10360 nobody 22 0 11548 11M 4492 S 0.0 4.6 0:00 0 sqlr-connection
10362 nobody 22 0 11548 11M 4492 S 0.0 4.6 0:00 0 sqlr-connection
10364 nobody 22 0 11540 11M 4488 S 0.0 4.6 0:00 0 sqlr-connection
10366 nobody 22 0 11540 11M 4492 S 0.0 4.6 0:00 0 sqlr-connection
10368 nobody 22 0 11540 11M 4488 S 0.0 4.6 0:00 0 sqlr-connection
10370 nobody 15 0 1928 1928 1672 S 0.0 0.7 0:00 0 sqlr-scaler
every sqlrelay connection user 11M memary?
if i have to user 100 connection,sqlrelay will use 1G memmary?
|
|
From: Jani O. <jan...@pr...> - 2008-06-13 07:19:33
|
David Muse wrote:
> PHP actually contains it's own copy of the mysql client library that is
> compiled into PHP itself. Since it doesn't dynamically load the mysql
> client library, it can't be overridden with the SQL Relay drop-in
> library.
Oh, This explains why there is that license exception for PHP :)
> A long time ago, it was possible to build PHP such that it dynamically
> linked in the mysql client library. But I don't believe that option
> exists any more, and may not have for a while.
What would that option have been or where to look if one might want to
search that possibility? Then these configure parameters must just mean
that they are not builded into php binary itself
'--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/bin/mysql_config'
but they still use own mysql code?
> Unfortunately, at this time, the only solution would be to find a
> version of PHP that dynamically links to mysql and use it if you can.
Most probably too old PHP's and not suitable for OO coding.
> I've been looking into what it would take to remap mysql calls in PHP,
> but I haven't come up with a solution yet.
> Sorry for the bad news.
Well, we made couple of classes to emulate PDO's basic features which
we need. More work and not so nice but it seems to do it's work and
that's what counts.
And of course requests are easy to say and the coding is a big job
but PDO or MDB2 driver for sqlrelay would be nice. As Pear DB is now
"obsolete" and superseded with MDB2. Pear DB doesn't feel like the right
choice to use in new projects.
> David Muse
> dav...@fi...
>
> On Thu, 2008-06-05 at 11:34 +0300, Jani Ollikainen wrote:
>> Jani Ollikainen wrote:
>>
>> And if this helps I straced the normal mysql client:
>>
>> connect(3, {sa_family=AF_FILE, path="/tmp/sqlrelay.sock"}, 110) = 0
>> setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EOPNOTSUPP (Operation
>> not suppo
>> rted)
>> write(3, "\0\0\0\10sqlrelay\0\0\0\tpass", 25) = 25
>> read(3, "\0\1\0\0", 8192) = 4
>> write(3, "\0\v\0\0\0\10sqlrelay\0\0\0\tpass", 27) = 27
>> read(3, "\0\1", 8192) = 2
>>
>> It write()'s before tries to read() which PHP mysql
>> doesn't do.
>>
>> PHP code for connection is:
>>
>> try {
>> $dbh = new
>> PDO("mysql:unix_socket=/tmp/sqlrelay.sock;dbname=www",_SQLUSER, _SQLPASS);
>> } catch (PDOException $e) {
>> echo 'Connection failed: ' . $e->getMessage();
>> }
>>
>> And the _SQLUSER and _SQLPASS are the user/pass for
>> sqlrelay not for the mysql.
>>
>> With LD_PRELOAD defined the normal mysqlsocket connection
>> works..
>>
>> connect(3, {sa_family=AF_FILE, path="/var/lib/mysql/mysql.sock"}, 110) = 0
>> setsockopt(3, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not
>> supported
>> )
>> setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
>> read(3, "8\0\0\0\n5.0.22-log\0\371\4\0\0]Z,iN)#q\0,\242\10"..., 16384) = 60
>>
>> So it seems like for some reason the LD_PRELOAD won't do it's trick?
>>
>>
>>> Hi,
>>>
>>> Subject is the problem.
>>>
>>> If I set the LD_PRELOAD cli mysql client
>>> can connect and works nicely.
>>>
>>> But with PHP neither pdo_mysql or mysql
>>> works. It just hangs when connecting.
>>>
>>> Strace says it is trying to connect the
>>> right socket but it just cannot get anything from there.
>>>
>>> Any ideas?
>>>
>>> The system is CentOS.
>>>
>>> Strace output:
>>> connect(3, {sa_family=AF_FILE, path="/tmp/sqlrelay.sock"}, 110) = 0
>>> setsockopt(3, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not
>>> supported)
>>> setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
>>> read(3,
>>>
>>> # ldd php-cli
>>> linux-gate.so.1 => (0x00110000)
>>> /usr/lib/libmysql50sqlrelay.so (0x0018a000)
>>> libcrypt.so.1 => /lib/libcrypt.so.1 (0x00cf3000)
>>> libaspell.so.15 => /usr/lib/libaspell.so.15 (0x005e4000)
>>> libpspell.so.15 => /usr/lib/libpspell.so.15 (0x00ce8000)
>>> libgmp.so.3 => /usr/lib/sse2/libgmp.so.3 (0x003ff000)
>>> libdb-4.3.so => /lib/libdb-4.3.so (0x006a7000)
>>> libpthread.so.0 => /lib/libpthread.so.0 (0x00c78000)
>>> libcurl.so.3 => /usr/lib/libcurl.so.3 (0x005a6000)
>>> libbz2.so.1 => /usr/lib/libbz2.so.1 (0x00de6000)
>>> libz.so.1 => /usr/lib/libz.so.1 (0x00cd3000)
>>> libpcre.so.0 => /lib/libpcre.so.0 (0x00dc7000)
>>> libresolv.so.2 => /lib/libresolv.so.2 (0x00d4a000)
>>> libm.so.6 => /lib/libm.so.6 (0x00c91000)
>>> libdl.so.2 => /lib/libdl.so.2 (0x00c2a000)
>>> libnsl.so.1 => /lib/libnsl.so.1 (0x00d23000)
>>> libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00472000)
>>> libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00d97000)
>>> libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00323000)
>>> libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00d5f000)
>>> libcom_err.so.2 => /lib/libcom_err.so.2 (0x00ae3000)
>>> libssl.so.6 => /lib/libssl.so.6 (0x003b8000)
>>> libcrypto.so.6 => /lib/libcrypto.so.6 (0x001ee000)
>>> libidn.so.11 => /usr/lib/libidn.so.11 (0x00435000)
>>> libc.so.6 => /lib/libc.so.6 (0x00ae8000)
>>> libsqlrclient-0.39.4.so.1 => /usr/lib/libsqlrclient-0.39.4.so.1
>>> (0x00111000)
>>> librudiments-0.31.so.1 => /usr/lib/librudiments-0.31.so.1
>>> (0x0079e000)
>>> librt.so.1 => /lib/librt.so.1 (0x0012a000)
>>> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0081a000)
>>> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00d3c000)
>>> /lib/ld-linux.so.2 (0x00ac6000)
>>> libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00d87000)
>>> libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00d92000)
>>> libselinux.so.1 => /lib/libselinux.so.1 (0x00cba000)
>>> libsepol.so.1 => /lib/libsepol.so.1 (0x00c30000)
>>>
>>> -------------------------------------------------------------------------
>>> 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
>>
>> -------------------------------------------------------------------------
>> 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
>>
>>
>> __________________________________________________
>> D O T E A S Y - "Join the web hosting revolution!"
>> http://www.doteasy.com
>
>
>
> __________________________________________________
> 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
|
|
From: David M. <dav...@fi...> - 2008-06-12 22:03:44
|
I use this in another project of mine, it might work for you:
dnl Checks for sqlrelay
echo
echo "***** SQL Relay **************"
AC_MSG_CHECKING(for sqlrelay)
if ( test -n "$SQLRELAYPREFIX" )
then
SQLRELAYCONFIG="$SQLRELAYPREFIX/bin/sqlrclient-config"
else
AC_PATH_PROG(SQLRELAYCONFIG,sqlrclient-config,"","/bin:/usr/bin:/usr/local/bin:/opt/sfw/bin:/usr/pkg/bin:/usr/local/firstworks/bin:/usr/local/sqlrelay/bin")
fi
SQLRELAYCFLAGS="`$SQLRELAYCONFIG --cflags 2> /dev/null`"
SQLRELAYLIBS="`$SQLRELAYCONFIG --libs 2> /dev/null`"
if ( test -n "$SQLRELAYLIBS" )
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_ERROR("sqlrclient not found.")
fi
AC_SUBST(SQLRELAYCFLAGS)
AC_SUBST(SQLRELAYLIBS)
echo "******************************"
David Muse
dav...@fi...
On Tue, 2008-06-03 at 16:25 +0300, Denis Chapligin wrote:
> Hello!
>
>
> Is there any good SQLRelay detection and configuration code for autotools?
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
>
> __________________________________________________
> D O T E A S Y - "Join the web hosting revolution!"
> http://www.doteasy.com
__________________________________________________
D O T E A S Y - "Join the web hosting revolution!"
http://www.doteasy.com
|
|
From: David M. <dav...@fi...> - 2008-06-12 21:58:17
|
PHP actually contains it's own copy of the mysql client library that is
compiled into PHP itself. Since it doesn't dynamically load the mysql
client library, it can't be overridden with the SQL Relay drop-in
library.
A long time ago, it was possible to build PHP such that it dynamically
linked in the mysql client library. But I don't believe that option
exists any more, and may not have for a while.
Unfortunately, at this time, the only solution would be to find a
version of PHP that dynamically links to mysql and use it if you can.
I've been looking into what it would take to remap mysql calls in PHP,
but I haven't come up with a solution yet.
Sorry for the bad news.
David Muse
dav...@fi...
On Thu, 2008-06-05 at 11:34 +0300, Jani Ollikainen wrote:
> Jani Ollikainen wrote:
>
> And if this helps I straced the normal mysql client:
>
> connect(3, {sa_family=AF_FILE, path="/tmp/sqlrelay.sock"}, 110) = 0
> setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EOPNOTSUPP (Operation
> not suppo
> rted)
> write(3, "\0\0\0\10sqlrelay\0\0\0\tpass", 25) = 25
> read(3, "\0\1\0\0", 8192) = 4
> write(3, "\0\v\0\0\0\10sqlrelay\0\0\0\tpass", 27) = 27
> read(3, "\0\1", 8192) = 2
>
> It write()'s before tries to read() which PHP mysql
> doesn't do.
>
> PHP code for connection is:
>
> try {
> $dbh = new
> PDO("mysql:unix_socket=/tmp/sqlrelay.sock;dbname=www",_SQLUSER, _SQLPASS);
> } catch (PDOException $e) {
> echo 'Connection failed: ' . $e->getMessage();
> }
>
> And the _SQLUSER and _SQLPASS are the user/pass for
> sqlrelay not for the mysql.
>
> With LD_PRELOAD defined the normal mysqlsocket connection
> works..
>
> connect(3, {sa_family=AF_FILE, path="/var/lib/mysql/mysql.sock"}, 110) = 0
> setsockopt(3, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not
> supported
> )
> setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
> read(3, "8\0\0\0\n5.0.22-log\0\371\4\0\0]Z,iN)#q\0,\242\10"..., 16384) = 60
>
> So it seems like for some reason the LD_PRELOAD won't do it's trick?
>
>
> > Hi,
> >
> > Subject is the problem.
> >
> > If I set the LD_PRELOAD cli mysql client
> > can connect and works nicely.
> >
> > But with PHP neither pdo_mysql or mysql
> > works. It just hangs when connecting.
> >
> > Strace says it is trying to connect the
> > right socket but it just cannot get anything from there.
> >
> > Any ideas?
> >
> > The system is CentOS.
> >
> > Strace output:
> > connect(3, {sa_family=AF_FILE, path="/tmp/sqlrelay.sock"}, 110) = 0
> > setsockopt(3, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not
> > supported)
> > setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
> > read(3,
> >
> > # ldd php-cli
> > linux-gate.so.1 => (0x00110000)
> > /usr/lib/libmysql50sqlrelay.so (0x0018a000)
> > libcrypt.so.1 => /lib/libcrypt.so.1 (0x00cf3000)
> > libaspell.so.15 => /usr/lib/libaspell.so.15 (0x005e4000)
> > libpspell.so.15 => /usr/lib/libpspell.so.15 (0x00ce8000)
> > libgmp.so.3 => /usr/lib/sse2/libgmp.so.3 (0x003ff000)
> > libdb-4.3.so => /lib/libdb-4.3.so (0x006a7000)
> > libpthread.so.0 => /lib/libpthread.so.0 (0x00c78000)
> > libcurl.so.3 => /usr/lib/libcurl.so.3 (0x005a6000)
> > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x00de6000)
> > libz.so.1 => /usr/lib/libz.so.1 (0x00cd3000)
> > libpcre.so.0 => /lib/libpcre.so.0 (0x00dc7000)
> > libresolv.so.2 => /lib/libresolv.so.2 (0x00d4a000)
> > libm.so.6 => /lib/libm.so.6 (0x00c91000)
> > libdl.so.2 => /lib/libdl.so.2 (0x00c2a000)
> > libnsl.so.1 => /lib/libnsl.so.1 (0x00d23000)
> > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00472000)
> > libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00d97000)
> > libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00323000)
> > libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00d5f000)
> > libcom_err.so.2 => /lib/libcom_err.so.2 (0x00ae3000)
> > libssl.so.6 => /lib/libssl.so.6 (0x003b8000)
> > libcrypto.so.6 => /lib/libcrypto.so.6 (0x001ee000)
> > libidn.so.11 => /usr/lib/libidn.so.11 (0x00435000)
> > libc.so.6 => /lib/libc.so.6 (0x00ae8000)
> > libsqlrclient-0.39.4.so.1 => /usr/lib/libsqlrclient-0.39.4.so.1
> > (0x00111000)
> > librudiments-0.31.so.1 => /usr/lib/librudiments-0.31.so.1
> > (0x0079e000)
> > librt.so.1 => /lib/librt.so.1 (0x0012a000)
> > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0081a000)
> > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00d3c000)
> > /lib/ld-linux.so.2 (0x00ac6000)
> > libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00d87000)
> > libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00d92000)
> > libselinux.so.1 => /lib/libselinux.so.1 (0x00cba000)
> > libsepol.so.1 => /lib/libsepol.so.1 (0x00c30000)
> >
> > -------------------------------------------------------------------------
> > 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
>
>
> -------------------------------------------------------------------------
> 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
>
>
> __________________________________________________
> D O T E A S Y - "Join the web hosting revolution!"
> http://www.doteasy.com
__________________________________________________
D O T E A S Y - "Join the web hosting revolution!"
http://www.doteasy.com
|
|
From: David M. <dav...@fi...> - 2008-06-12 21:50:14
|
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
|
|
From: D. V. <as...@gm...> - 2008-06-06 07:35:37
|
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ániel Vásárhelyi
"He who asks a question is a fool for five minutes; he who does not
ask a question remains a fool forever"
Chinese proverb
|
|
From: Jani O. <jan...@pr...> - 2008-06-05 08:34:11
|
Jani Ollikainen wrote:
And if this helps I straced the normal mysql client:
connect(3, {sa_family=AF_FILE, path="/tmp/sqlrelay.sock"}, 110) = 0
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = -1 EOPNOTSUPP (Operation
not suppo
rted)
write(3, "\0\0\0\10sqlrelay\0\0\0\tpass", 25) = 25
read(3, "\0\1\0\0", 8192) = 4
write(3, "\0\v\0\0\0\10sqlrelay\0\0\0\tpass", 27) = 27
read(3, "\0\1", 8192) = 2
It write()'s before tries to read() which PHP mysql
doesn't do.
PHP code for connection is:
try {
$dbh = new
PDO("mysql:unix_socket=/tmp/sqlrelay.sock;dbname=www",_SQLUSER, _SQLPASS);
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}
And the _SQLUSER and _SQLPASS are the user/pass for
sqlrelay not for the mysql.
With LD_PRELOAD defined the normal mysqlsocket connection
works..
connect(3, {sa_family=AF_FILE, path="/var/lib/mysql/mysql.sock"}, 110) = 0
setsockopt(3, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not
supported
)
setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
read(3, "8\0\0\0\n5.0.22-log\0\371\4\0\0]Z,iN)#q\0,\242\10"..., 16384) = 60
So it seems like for some reason the LD_PRELOAD won't do it's trick?
> Hi,
>
> Subject is the problem.
>
> If I set the LD_PRELOAD cli mysql client
> can connect and works nicely.
>
> But with PHP neither pdo_mysql or mysql
> works. It just hangs when connecting.
>
> Strace says it is trying to connect the
> right socket but it just cannot get anything from there.
>
> Any ideas?
>
> The system is CentOS.
>
> Strace output:
> connect(3, {sa_family=AF_FILE, path="/tmp/sqlrelay.sock"}, 110) = 0
> setsockopt(3, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not
> supported)
> setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
> read(3,
>
> # ldd php-cli
> linux-gate.so.1 => (0x00110000)
> /usr/lib/libmysql50sqlrelay.so (0x0018a000)
> libcrypt.so.1 => /lib/libcrypt.so.1 (0x00cf3000)
> libaspell.so.15 => /usr/lib/libaspell.so.15 (0x005e4000)
> libpspell.so.15 => /usr/lib/libpspell.so.15 (0x00ce8000)
> libgmp.so.3 => /usr/lib/sse2/libgmp.so.3 (0x003ff000)
> libdb-4.3.so => /lib/libdb-4.3.so (0x006a7000)
> libpthread.so.0 => /lib/libpthread.so.0 (0x00c78000)
> libcurl.so.3 => /usr/lib/libcurl.so.3 (0x005a6000)
> libbz2.so.1 => /usr/lib/libbz2.so.1 (0x00de6000)
> libz.so.1 => /usr/lib/libz.so.1 (0x00cd3000)
> libpcre.so.0 => /lib/libpcre.so.0 (0x00dc7000)
> libresolv.so.2 => /lib/libresolv.so.2 (0x00d4a000)
> libm.so.6 => /lib/libm.so.6 (0x00c91000)
> libdl.so.2 => /lib/libdl.so.2 (0x00c2a000)
> libnsl.so.1 => /lib/libnsl.so.1 (0x00d23000)
> libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00472000)
> libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00d97000)
> libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00323000)
> libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00d5f000)
> libcom_err.so.2 => /lib/libcom_err.so.2 (0x00ae3000)
> libssl.so.6 => /lib/libssl.so.6 (0x003b8000)
> libcrypto.so.6 => /lib/libcrypto.so.6 (0x001ee000)
> libidn.so.11 => /usr/lib/libidn.so.11 (0x00435000)
> libc.so.6 => /lib/libc.so.6 (0x00ae8000)
> libsqlrclient-0.39.4.so.1 => /usr/lib/libsqlrclient-0.39.4.so.1
> (0x00111000)
> librudiments-0.31.so.1 => /usr/lib/librudiments-0.31.so.1
> (0x0079e000)
> librt.so.1 => /lib/librt.so.1 (0x0012a000)
> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0081a000)
> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00d3c000)
> /lib/ld-linux.so.2 (0x00ac6000)
> libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00d87000)
> libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00d92000)
> libselinux.so.1 => /lib/libselinux.so.1 (0x00cba000)
> libsepol.so.1 => /lib/libsepol.so.1 (0x00c30000)
>
> -------------------------------------------------------------------------
> 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
|
|
From: Jani O. <jan...@pr...> - 2008-06-05 08:20:02
|
Hi,
Subject is the problem.
If I set the LD_PRELOAD cli mysql client
can connect and works nicely.
But with PHP neither pdo_mysql or mysql
works. It just hangs when connecting.
Strace says it is trying to connect the
right socket but it just cannot get anything from there.
Any ideas?
The system is CentOS.
Strace output:
connect(3, {sa_family=AF_FILE, path="/tmp/sqlrelay.sock"}, 110) = 0
setsockopt(3, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not
supported)
setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
read(3,
# ldd php-cli
linux-gate.so.1 => (0x00110000)
/usr/lib/libmysql50sqlrelay.so (0x0018a000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00cf3000)
libaspell.so.15 => /usr/lib/libaspell.so.15 (0x005e4000)
libpspell.so.15 => /usr/lib/libpspell.so.15 (0x00ce8000)
libgmp.so.3 => /usr/lib/sse2/libgmp.so.3 (0x003ff000)
libdb-4.3.so => /lib/libdb-4.3.so (0x006a7000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00c78000)
libcurl.so.3 => /usr/lib/libcurl.so.3 (0x005a6000)
libbz2.so.1 => /usr/lib/libbz2.so.1 (0x00de6000)
libz.so.1 => /usr/lib/libz.so.1 (0x00cd3000)
libpcre.so.0 => /lib/libpcre.so.0 (0x00dc7000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00d4a000)
libm.so.6 => /lib/libm.so.6 (0x00c91000)
libdl.so.2 => /lib/libdl.so.2 (0x00c2a000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00d23000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00472000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00d97000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00323000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00d5f000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00ae3000)
libssl.so.6 => /lib/libssl.so.6 (0x003b8000)
libcrypto.so.6 => /lib/libcrypto.so.6 (0x001ee000)
libidn.so.11 => /usr/lib/libidn.so.11 (0x00435000)
libc.so.6 => /lib/libc.so.6 (0x00ae8000)
libsqlrclient-0.39.4.so.1 => /usr/lib/libsqlrclient-0.39.4.so.1
(0x00111000)
librudiments-0.31.so.1 => /usr/lib/librudiments-0.31.so.1
(0x0079e000)
librt.so.1 => /lib/librt.so.1 (0x0012a000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0081a000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00d3c000)
/lib/ld-linux.so.2 (0x00ac6000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00d87000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00d92000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00cba000)
libsepol.so.1 => /lib/libsepol.so.1 (0x00c30000)
|
|
From: BlacKarma <bla...@gm...> - 2008-06-05 06:20:52
|
Great, I'll wait David's reply before try this. Thanks a lot Martin. 2008/6/4 Martin Fleurke <mar...@po...>: > BlacKarma schreef: > >> Hi everybody, >> >> I'm experiencing some problem using SqlRelay (0.39.4) over Oracle 10g. >> SqlRelay start and after a while the listener fork but the open client >> connection is less than the open server connection and when a check with a >> "ps aux" the number of process is less than the open server connection >> displayed by sqlr-status. >> > Probably the same bug we found and reported, but David hasn't responded on > it yet. > > Here is my previous email: > > Hello David, > > Just an update for this reported bug: we have commented the line 1658 (with > "OCIHandleFree(def[i],OCI_HTYPE_DEFINE);") and haven't had any problems > since, we are using the code in production enviroment for 2 months. So I'd > say: you can safely update the sourcecode of sqlrelay, to prevent the > connection-crash-bug that was bugging us. > > Regards, > > Martin Fleurke > > Ingmar Brouns schreef: > Hi David, > > I have been trying to debug what's going on. The connection process > crashes on this statement > > OCIHandleFree(def[i],OCI_HTYPE_DEFINE); > > line 1744 of oracle8connection.C with a segmentation fault. I've not > been able to figer out why this happens. I am new to C++ and GDB and I > cannot view the contents of the OCIDefine object. However, when I > looked into the Oracle Call Interface Programmer's Guide > > > http://www.ewp.rpi.edu/hartford/webgen//appdocs/oracle/doc/appdev.920/a96584/oci02bas.htm > > it said the following: > > OCI_HTYPE_DEFINE = OCI define handle > > and > > Bind and define handles are freed when the statement handle is freed > or when a new statement is prepared on the statement handle. > > So my question is, why is it being freed explicitly anyway? I've > compiled sqlrelay with the statement commented out, and now everything > seems to be going fine. For what situations is the > OCIHandleFree(def[i],OCI_HTYPE_DEFINE) statement neccesary? > > Anxiously awaiting your reply, > > Ingmar > > ------------------------------------------------------------------------- > 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 > > |
|
From: Martin F. <mar...@po...> - 2008-06-04 12:37:39
|
BlacKarma schreef:
> Hi everybody,
>
> I'm experiencing some problem using SqlRelay (0.39.4) over Oracle 10g.
> SqlRelay start and after a while the listener fork but the open client
> connection is less than the open server connection and when a check
> with a "ps aux" the number of process is less than the open server
> connection displayed by sqlr-status.
Probably the same bug we found and reported, but David hasn't responded
on it yet.
Here is my previous email:
Hello David,
Just an update for this reported bug: we have commented the line 1658
(with "OCIHandleFree(def[i],OCI_HTYPE_DEFINE);") and haven't had any
problems since, we are using the code in production enviroment for 2
months. So I'd say: you can safely update the sourcecode of sqlrelay, to
prevent the connection-crash-bug that was bugging us.
Regards,
Martin Fleurke
Ingmar Brouns schreef:
Hi David,
I have been trying to debug what's going on. The connection process
crashes on this statement
OCIHandleFree(def[i],OCI_HTYPE_DEFINE);
line 1744 of oracle8connection.C with a segmentation fault. I've not
been able to figer out why this happens. I am new to C++ and GDB and I
cannot view the contents of the OCIDefine object. However, when I
looked into the Oracle Call Interface Programmer's Guide
http://www.ewp.rpi.edu/hartford/webgen//appdocs/oracle/doc/appdev.920/a96584/oci02bas.htm
it said the following:
OCI_HTYPE_DEFINE = OCI define handle
and
Bind and define handles are freed when the statement handle is freed
or when a new statement is prepared on the statement handle.
So my question is, why is it being freed explicitly anyway? I've
compiled sqlrelay with the statement commented out, and now everything
seems to be going fine. For what situations is the
OCIHandleFree(def[i],OCI_HTYPE_DEFINE) statement neccesary?
Anxiously awaiting your reply,
Ingmar
|
|
From: BlacKarma <bla...@gm...> - 2008-06-04 10:24:13
|
Hi everybody, I'm experiencing some problem using SqlRelay (0.39.4) over Oracle 10g. SqlRelay start and after a while the listener fork but the open client connection is less than the open server connection and when a check with a "ps aux" the number of process is less than the open server connection displayed by sqlr-status. IE : Open Server Connections: 24 Open Client Connections: 5 Forked Listeners: 20 (maximum set in the configuration file) result of ps aux on linux : 8 sqlr-connection-oracle8 (some have been spawned on start, some after start (-silent)) In this case I have to restart the instance because of forking listener. Someone have an idea ? Best regards, -=- BlacKarma -=- |
|
From: Denis C. <aka...@gm...> - 2008-06-03 13:25:45
|
Hello! Is there any good SQLRelay detection and configuration code for autotools? |
|
From: Peter C. <pc...@sa...> - 2008-05-27 15:18:32
|
Apologies, config file *now* attached... Pete > Hello Dave, > > I *think* I'm almost there with query redirection. Basically he > objective is if a user wishes to connect to database test1 then the > query needs to be directed to instance on server 1 port xxx and if a > query is made for database test2 then it needs to be directed to server > instance 2 on port yyyy etc. > > I've included the config used but I think I'm missing something with > the route section as there it generates an error starting the routing. > I'm also unsure as to which usernamr / password the route part is > expecting... is this a generic pair that needs to exist on all instances ? > > Any pointers, as always much appreciated. > > > Pete > > > P.S. You previous suggestion of removing the Debian included xllint has > allowed things to move a tad more smoothly, thanks for hte heads up. > > > -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. |
|
From: Peter C. <pc...@sa...> - 2008-05-27 15:17:04
|
Hi all, We have connection pooling running nicely between various test instances, however, one group that are particularly interested in using this feature need to be able to connect natively via DBIx. Initial tests have shown that this is not going to be a direct plugin replacement. Using the libmysqlclient allows a certain degree of extra functionality with vanilla DBI but regrettably DBIx connetions are a non-starter. Has anyone tried this sort of combination before ? If so any suggestions ? Many thanks Pete -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. |
|
From: Peter C. <pc...@sa...> - 2008-05-27 15:14:05
|
Hello Dave, I *think* I'm almost there with query redirection. Basically he objective is if a user wishes to connect to database test1 then the query needs to be directed to instance on server 1 port xxx and if a query is made for database test2 then it needs to be directed to server instance 2 on port yyyy etc. I've included the config used but I think I'm missing something with the route section as there it generates an error starting the routing. I'm also unsure as to which usernamr / password the route part is expecting... is this a generic pair that needs to exist on all instances ? Any pointers, as always much appreciated. Pete P.S. You previous suggestion of removing the Debian included xllint has allowed things to move a tad more smoothly, thanks for hte heads up. -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. |
|
From: Anthony G. <ant...@gm...> - 2008-05-23 15:30:21
|
Here is a snippit of my top output just after starting 20 connections. Memory usage seems a bit high, to me. 2580 nly91717 17 0 0 0:00.01 0.2 429m 12m 5472 S sqlr-connection 2582 nly91717 18 0 0 0:00.01 0.2 430m 12m 5472 S sqlr-connection 2584 nly91717 18 0 0 0:00.01 0.2 429m 12m 5472 S sqlr-connection 2586 nly91717 18 0 0 0:00.01 0.2 430m 12m 5472 S sqlr-connection 2588 nly91717 17 0 0 0:00.00 0.2 430m 12m 5472 S sqlr-connection System: Red Hat Enterprise Linux WS release 4 (Nahant Update 6) Linux nlvu038 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux I've googled around but couldn't see anything to help. -- Disclaimer: Technically speaking, I'm always wrong! |
|
From: Anthony G. <cyc...@ya...> - 2008-05-23 09:00:01
|
Okay, I've sorted this one out. I overlook the fact that I only had one connection in my .conf file and for good measure, changed the runas* params.
On to the next question/email
-Ants
Disclaimer: Technically speaking, I am always wrong!
--- On Thu, 22/5/08, Anthony Gardner <ant...@gm...> wrote:
From: Anthony Gardner <ant...@gm...>
Subject: [Sqlrelay-discussion] Apache::DBI->connect_on_init() problems/questions
To: "Discussion of topics related to SQL Relay" <sql...@li...>
Date: Thursday, 22 May, 2008, 5:48 PM
While running Apache::DBI->connect_on_init("dbi:SQLRelay:$sid", $user, $password, {} ) in a server startup script, I keep getting the following repeated errors until I sqlr-stop ....
Couldn't parse config file sqlrelay.conf.
Couldn't find id csg-db.
After starting sqlr, I get the following output from ps -fe | grep sqlr
nly91717 2558 1 0 18:26 ? 00:00:00 sqlr-cachemanager
nly91717 3265 1 0 18:30 ? 00:00:00 sqlr-listener -id csg-db -config sqlrelay.conf
nly91717 3271 1 0 18:30 ? 00:00:00 sqlr-connection-oracle8 -id csg-db -connectionid csg-db -config sqlrelay.conf
nly91717 3273 1 0 18:30 ? 00:00:00 sqlr-scaler -id csg-db -config sqlrelay.conf
While all the above errors are flying past, I run ps -fe | grep sqlr and this is the output ....
nly91717 2558 1 0 18:26 ? 00:00:00 sqlr-cachemanager
nly91717 3622 1 0 18:33 ? 00:00:00 sqlr-listener -id csg-db -config sqlrelay.conf
nly91717 3624 1 0 18:33 ? 00:00:00 sqlr-connection-oracle8 -id csg-db -connectionid csg-db -config sqlrelay.conf
nly91717 3626 1 0 18:33 ? 00:00:00 sqlr-scaler -id csg-db -config sqlrelay.conf
nly91717 3667 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db -config sqlrelay.conf
nly91717 3669 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db -config sqlrelay.conf
nly91717 3670 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db -config sqlrelay.conf
nly91717 3671 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db -config sqlrelay.conf
nly91717 3672 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db -config sqlrelay.conf
nly91717 3673 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db -config sqlrelay.conf
nly91717 3674 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db -config sqlrelay.conf
nly91717 4531 3626 0 18:33 ? 00:00:00 sqlr-connection-oracle8 -silent -ttl 60 -id csg-db -connectionid csg-db -config sqlrelay.con
The web server is run as a different user than that which started sqlr. I even set the following to 777 thinking that might have been the soln.
-rw------- 1 nly91717 appldev 4 May 22 18:38 sqlr-connection-csg-db.5442
-rw------- 1 nly91717 appldev 4 May 22 18:38 sqlr-listener-csg-db
-rw------- 1 nly91717 appldev 4 May 22 18:38 sqlr-scaler-csg-db
Everything works if I don't use connect_on_init(). So, I need tips/advice as to what I'm doing wrong and how I could get this working with Apache/mod_perl using connect_on_init()
Again, CIA
-Ants
--
Disclaimer: Technically speaking, I'm always wrong!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Sqlrelay-discussion mailing list
Sql...@li...
https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html |
|
From: Anthony G. <ant...@gm...> - 2008-05-22 16:48:08
|
While running *Apache::DBI->connect_on_init(**"dbi:SQLRelay:$sid", $user,
$password, {} )* in a server startup script, I keep getting the following
repeated errors until I *sqlr-stop* ....
Couldn't parse config file sqlrelay.conf.
Couldn't find id csg-db.
*After starting sqlr, I get the following **output from ps -fe | grep sqlr *
nly91717 2558 1 0 18:26 ? 00:00:00 sqlr-cachemanager
nly91717 3265 1 0 18:30 ? 00:00:00 sqlr-listener -id csg-db
-config sqlrelay.conf
nly91717 3271 1 0 18:30 ? 00:00:00 sqlr-connection-oracle8 -id
csg-db -connectionid csg-db -config sqlrelay.conf
nly91717 3273 1 0 18:30 ? 00:00:00 sqlr-scaler -id csg-db
-config sqlrelay.conf
*While all the above errors are flying past, I run **ps -fe | grep sqlr and
this is the **output .... *
nly91717 2558 1 0 18:26 ? 00:00:00 sqlr-cachemanager
nly91717 3622 1 0 18:33 ? 00:00:00 sqlr-listener -id csg-db
-config sqlrelay.conf
nly91717 3624 1 0 18:33 ? 00:00:00 sqlr-connection-oracle8 -id
csg-db -connectionid csg-db -config sqlrelay.conf
nly91717 3626 1 0 18:33 ? 00:00:00 sqlr-scaler -id csg-db
-config sqlrelay.conf
nly91717 3667 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db
-config sqlrelay.conf
nly91717 3669 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db
-config sqlrelay.conf
nly91717 3670 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db
-config sqlrelay.conf
nly91717 3671 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db
-config sqlrelay.conf
nly91717 3672 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db
-config sqlrelay.conf
nly91717 3673 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db
-config sqlrelay.conf
nly91717 3674 3622 0 18:33 ? 00:00:00 sqlr-listener -id csg-db
-config sqlrelay.conf
nly91717 4531 3626 0 18:33 ? 00:00:00 sqlr-connection-oracle8
-silent -ttl 60 -id csg-db -connectionid csg-db -config sqlrelay.con
The web server is run as a different user than that which started sqlr. I
even set the following to 777 thinking that might have been the soln.
-rw------- 1 nly91717 appldev 4 May 22 18:38 sqlr-connection-csg-db.5442
-rw------- 1 nly91717 appldev 4 May 22 18:38 sqlr-listener-csg-db
-rw------- 1 nly91717 appldev 4 May 22 18:38 sqlr-scaler-csg-db
Everything works if I don't use connect_on_init(). So, I need tips/advice as
to what I'm doing wrong and how I could get this working with
Apache/mod_perl using connect_on_init()
Again, CIA
-Ants
--
Disclaimer: Technically speaking, I'm always wrong!
|
|
From: Anthony G. <ant...@gm...> - 2008-05-22 13:11:57
|
Okay, I can connect to our DB using the real user and the user's real
password along with the SID.
But, in reality, we use a wallet here and so the user is / and there is no
password for the Perl's DBI
When trying to use a connection thus ...
<connection connectionid="csg-db"
string="user='/';password='';oracle_sid=P4C_DEV;"
metric="1" />
I get ....
OCISessionBegin() failed.
error: ORA-01005: null password given; logon denied
Couldn't log into database.
Does anyone have experience of using SQLRelay with wallets?
CIA
-Ants
--
Disclaimer: Technically speaking, I'm always wrong!
|
|
From: Anthony G. <ant...@gm...> - 2008-05-22 13:01:15
|
Thanks for the help, David. I uninstalled everything and started again but the package manager didn't build the dirs when installing the packages (it did delete them when uninstalling, though) Anyway, some of the dirs were created when running sqlrealy for the first time, the other dirs I made myself. All of that was on my local machine. We've had the same problems on our work's machines and they use RedHat. Any who, we're getting there. Have another question but will write a new mail, for that. 2008/5/21 David Muse <dav...@fi...>: > The package installation should have created /var/sqlrelay/tmp and the > necessary subdirectories. I'm surprised that it didn't. They would > have been root-owned, but should have 777 permissions. > > Make sure that the following directories exist and have 777 perms: > > /var/sqlrelay/tmp > /var/sqlrelay/tmp/ipc > /var/sqlrelay/tmp/pids > /var/sqlrelay/tmp/sockets > > /var/sqlrelay/cache > > /var/sqlrelay/debug > > If they already exist, remove any existing files in them. If you ran > sqlrelay as root once, then try to run it as a different user afterward, > there could still be a file out there owned by root that can't be > overwritten or opened by the new user. > > That should take care of it. Hope this helps. > > David > dav...@fi... > > > On Tue, 2008-05-20 at 17:42 +0200, Anthony Gardner wrote: > > I sent this under yahoo but have just seen in the archives that it's > > totally HTML. So, sorry about that. Let's see how gmail copes!! > > > > Using the following sqlrelay.conf file ..... > > <?xml version="1.0"?> > > <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> > > <instances> > > > > <instance id="sqlitetest" > > port="9000" > > socket="/tmp/sqlitetest.socket" > > dbase="sqlite" > > connections="3" > > maxconnections="5" > > maxqueuelength="0" > > growby="1" > > ttl="60" > > endofsession="commit" > > sessiontimeout="600" > > runasuser="anthony" > > runasgroup="anthony" > > cursors="5" > > authtier="listener" > > handoff="pass" > > debug="listener_and_connection"> > > <users> > > <!-- user user="sqlitetest" password="sqlitetest"/ --> > > <user user="" password=""/> > > </users> > > <connections> > > <connection connectionid="sqlitetest" > > string="db=/home/anthony/Development/sqlrelay/sqlrelay_test.db" > > metric="1"/> > > </connections> > > </instance> > > > > </instances> > > > > I get the following output from running .... sudo sqlr-start -id > > sqlitetest -config sqlrelay.conf > > > > > > Starting listener: > > sqlr-listener-debug -id sqlitetest -config sqlrelay.conf & > > Debugging to: /var/cache/sqlrelay/debug/sqlr-listener.10989 > > Could not open: /var/cache/sqlrelay/tmp/ipc/sqlitetest > > Make sure that the file and directory are readable and writable. > > > > unsuccessful completion > > > > Starting 3 connections to sqlitetest : > > sqlr-connection-sqlite-debug -id sqlitetest -connectionid sqlitetest > > -config sqlrelay.conf & > > Debugging to: /var/cache/sqlrelay/debug/sqlr-connection.10991 > > > > sqlr-connection error: > > The pid > > file /var/cache/sqlrelay/tmp/pids/sqlr-listener-sqlitetest was not > > found. > > This usually means that the sqlr-listener > > is not running. > > The sqlr-listener must be running for the sqlr-connection to > > start. > > > > sqlr-connection-sqlite-debug -id sqlitetest -connectionid sqlitetest > > -config sqlrelay.conf & > > Debugging to: /var/cache/sqlrelay/debug/sqlr-connection.10996 > > > > sqlr-connection error: > > The pid > > file /var/cache/sqlrelay/tmp/pids/sqlr-listener-sqlitetest was not > > found. > > This usually means that the sqlr-listener > > is not running. > > The sqlr-listener must be running for the sqlr-connection to > > start. > > > > sqlr-connection-sqlite-debug -id sqlitetest -connectionid sqlitetest > > -config sqlrelay.conf & > > Debugging to: /var/cache/sqlrelay/debug/sqlr-connection.10998 > > > > sqlr-connection error: > > The pid > > file /var/cache/sqlrelay/tmp/pids/sqlr-listener-sqlitetest was not > > found. > > This usually means that the sqlr-listener > > is not running. > > The sqlr-listener must be running for the sqlr-connection to > > start. > > > > > > Starting cache manager: > > sqlr-cachemanager > > Warning: using default id. > > > > > > Thanks to MP3.com for sponsoring: > > Clustered/Replicated database support. > > Perl API. > > Thanks to FeedLounge for sponsoring: > > Query routing and filtering. > > > > /var/cache/sqlrelay/tmp/ipc/sqlitetest was automatically created by > > sqlrelay > > > > I manually created pids and sockets directory > > /var/cache/sqlrelay/tmp/pids > > /var/cache/sqlrelay/tmp/sockets > > > > I have changed permissions to 777 from /var/cache/sqlrelay downwards > > > > SQL Relay version: 0.38 installed from Ubuntu binaries on 8.04 > > > > Any pointers would be great. > > > > -Ants __________________________________________________ > > D O T E A S Y - "Join the web hosting revolution!" > > http://www.doteasy.com > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ Sqlrelay-discussion > mailing list Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > __________________________________________________ > D O T E A S Y - "Join the web hosting revolution!" > http://www.doteasy.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > -- Disclaimer: Technically speaking, I'm always wrong! |
|
From: David M. <dav...@fi...> - 2008-05-21 03:51:48
|
Yeah, I wasn't really sure what cur.rowcount should return.
When using PySQLRClient, rowCount() will return the number of rows
fetched from the DB so far. The PySQLRDB client caches the entire
result set so rowCount() will return the total number of rows in the
result set. There's another method totalRows() that gets the number of
rows in the result set directly from the db. Many db's don't support
that feature, so totalRows() returns 0 for those. In PySQLRDB, rowcount
is set from totalRows(). I thought this would be appropriate because
you'd get the same result if you connected directly to the db.
However, if you'd like to change that behavior, just edit
src/api/python/PySQLRDB.py and replace all instances of totalRows with
rowCount and reinstall.
David Muse
dav...@fi...
On Fri, 2008-05-09 at 15:39 -0400, Jonathan Kaczynski wrote:
> Hi,
>
> (This is a resend because I didn't see it show up in the mailing list.)
>
> I'm running the latest release of SQLRelay, 0.39.4, which is talking to an Oracle database.
>
> I've looked at the archives of the mailing list and haven't seen my issue mentioned before.
>
> I have a problem with the python db api 2.0-esque bindings, PySQLRDB; cur.rowcount always returns 0 (cur.rowCount() from PySQLClient works fine).
>
>
>
> >>> from SQLRelay import PySQLRDB
> >>> con = PySQLRDB.connect('localhost', 9200, '', 'username', 'password', 0, 1)
> >>> cur = con.cursor()
> >>> cur.execute("select 1 from dual")
> >>> cur.rowcount
> 0
> >>> cur.fetchall()
> [[Decimal("1")]]
> >>> cur.rowcount
> 0
>
>
>
> >>> from SQLRelay import PySQLRClient
> >>> con = PySQLRClient.sqlrconnection('localhost', 9200, '', 'username', 'password', 0, 1)
> >>> cur = PySQLRClient.sqlrcursor(con)
> >>> cur.sendQuery("select 1 from dual")
> 1
> >>> cur.rowCount()
> 1
>
>
>
> I looked at PySQLRDB.py, PySQLRClient.py, and CSQLRelay.C.
>
> In rowCount(), in PySQLRClient.py, the value returned comes from CSQLRelay.rowCount(self.cursor), which comes from ((sqlrcursor *)sqlrcur)->rowCount().
>
> In execute(), in PySQLRDB.py, rowcount is assigned to either CSQLRelay.totalRows(self.cursor) or CSQLRelay.affectedRows(self.cursor), which come from ((sqlrcursor *)sqlrcur)->totalRows() or ((sqlrcursor *)sqlrcur)->affectedRows(), respectively.
>
> So, rowCount returns 1, and both totalRows and affectedRows return 0.
>
> Does anyone know why cur.rowcount, from PySQLRDB.py, would always return 0?
>
> Thank you,
> Jonathan Kaczynski
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
>
> __________________________________________________
> D O T E A S Y - "Join the web hosting revolution!"
> http://www.doteasy.com
__________________________________________________
D O T E A S Y - "Join the web hosting revolution!"
http://www.doteasy.com
|