sqlrelay-discussion Mailing List for SQL Relay (Page 22)
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: Steve P. <ste...@gm...> - 2008-11-21 08:23:54
|
Just something to pay attention to: If you're using the drop-in replacement lib for MySQL or Postgre, make sure you do NOT have LD_PRELOAD referencing that library WHEN YOU START SQL Relay. If you do, and SQL Relay is linking against the shared client libs, you're telling SQL Relay to use the drop-in lib instead. It will happily do so without complaint, but obviously it ain't gonna' do what you expect. Drove me nuts 'til I figured out what the heck I'd done. Hopefully others are more observant (and less groggy) than I am. Don't know if there's anything you could do to catch that, David. I don't know if there are any scenarios when someone would intentionally need to link SQL Relay against the drop-ins...? SPP -- Stephen P. Paschall <st...@th...> |
|
From: Alberto C. <aca...@pu...> - 2008-11-18 12:39:52
|
getValue is present as a member of class commandline in rudiments version 0.31, but not in version 0.29 (the one shipped with etch). So you should be building rudiments 0.31 first. Happily, there are no more dependecies involved. Hope that helps. |
|
From: Chris <dm...@gm...> - 2008-11-16 22:20:04
|
David Muse wrote: > Weird. I think that error usually means that a C++ "new" operator > failed. I think it usually happens if you compile against 1 version of > a library but then run against a different, incompatible version. Could it be a mix of tools causing it? gcc for compiling, gnu make, but the solaris ld tool. > Did you have an older version of SQL Relay or Rudiments installed when > you built the one you're trying to use now? If so, you might try > removing them, rebuilding, reinstalling and retrying. Nope, first time install. > On Fri, 2008-11-14 at 10:22 +1100, Chris wrote: >> Hi all, >> >> I'm now trying to get sqlrelay working on solaris. Everything >> compiles/builds fine. When I try to start it up though I get this: >> >> # ./sqlr-start -id oracle >> >> Starting listener: >> sqlr-listener -id oracle -config /usr/local/sqlrelay/etc/sqlrelay.conf >> >> Starting 3 connections to db : >> sqlr-connection-oracle8 -id oracle -connectionid db -config >> /usr/local/sqlrelay/etc/sqlrelay.conf >> terminate called after throwing an instance of 'std::bad_alloc' >> what(): St9bad_alloc >> >> (with it repeated another 2 times). >> >> >> I have no idea what that means :) >> >> Rudiments is in /usr/local/rudiments (which is not in my path or library >> path). >> >> Running solaris 10. Compiled with gcc. >> >> As far as I can tell, it does connect to oracle on the 2nd server ok (I >> can see stuff in the oracle listener.log). >> >> Not sure what other info to include :) >> >> Thanks! -- Postgresql & php tutorials http://www.designmagick.com/ |
|
From: David M. <dav...@fi...> - 2008-11-14 16:19:52
|
Weird. I think that error usually means that a C++ "new" operator
failed. I think it usually happens if you compile against 1 version of
a library but then run against a different, incompatible version.
Did you have an older version of SQL Relay or Rudiments installed when
you built the one you're trying to use now? If so, you might try
removing them, rebuilding, reinstalling and retrying.
David Muse
dav...@fi...
On Fri, 2008-11-14 at 10:22 +1100, Chris wrote:
> Hi all,
>
> I'm now trying to get sqlrelay working on solaris. Everything
> compiles/builds fine. When I try to start it up though I get this:
>
> # ./sqlr-start -id oracle
>
> Starting listener:
> sqlr-listener -id oracle -config /usr/local/sqlrelay/etc/sqlrelay.conf
>
> Starting 3 connections to db :
> sqlr-connection-oracle8 -id oracle -connectionid db -config
> /usr/local/sqlrelay/etc/sqlrelay.conf
> terminate called after throwing an instance of 'std::bad_alloc'
> what(): St9bad_alloc
>
> (with it repeated another 2 times).
>
>
> I have no idea what that means :)
>
> Rudiments is in /usr/local/rudiments (which is not in my path or library
> path).
>
> Running solaris 10. Compiled with gcc.
>
> As far as I can tell, it does connect to oracle on the 2nd server ok (I
> can see stuff in the oracle listener.log).
>
> Not sure what other info to include :)
>
> Thanks!
__________________________________________________
D O T E A S Y - "Join the web hosting revolution!"
http://www.doteasy.com
|
|
From: David M. <dav...@fi...> - 2008-11-14 16:16:48
|
Cool! I've been trying to figure this out for a while. I'll add it to the documentation :) Dave dav...@fi... On Fri, 2008-11-14 at 01:32 -0500, Steve Paschall wrote: > I've as yet been unable to get the Apache PHP module to load with > libmysql50sqlrelay preloaded. I originally had both the mysql and > mysqli modules built as DSOs, and no matter where I tried setting > LD_PRELOAD, they'd never see the library. Judging by the listserv > archives, several folks appear to have had the same problem, but I > haven't seen a solution. > > I tried linking the two modules in staticly; didn't make a difference. > But I may have hit upon something. > > By compiling PHP with > > LDFLAGS="$LDFLAGS -L/usr/local/sqlrelay/lib -lmysql50sqlrelay" > > (change the lib path to suit your install) > > and linking the old PHP mysql module in statically while building > mysqli support as a dso: > > ./configure --with-mysql=/usr/local/mysql > --with-mysqli=shared,/usr/local/mysql/bin/mysql_config > > (again, change the paths to suit your install) > > I may just have found a way to give myself the best of both worlds. > The mysqli extension's still linking against libmysqlclient while the > older module is properly linking against libmysql50sqlrelay. > > This is helpful in my particular instance as I'm using a popular open > source content management framework (ahem, Drupal) that helpfully > includes support for both libraries. Simply changing one variable > allows me to use one library to tunnel through SQL Relay while using > the other to pound on our db directly. > > Don't know how useful this might be for others, but I'm certainly > elated to have found something workable for our situation. :) > > Crossing my fingers that I'm on the right track now. > > -- > Stephen P. Paschall > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > __________________________________________________ > D O T E A S Y - "Join the web hosting revolution!" > http://www.doteasy.com > _______________________________________________ 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: Steve P. <ste...@gm...> - 2008-11-14 06:32:23
|
I've as yet been unable to get the Apache PHP module to load with libmysql50sqlrelay preloaded. I originally had both the mysql and mysqli modules built as DSOs, and no matter where I tried setting LD_PRELOAD, they'd never see the library. Judging by the listserv archives, several folks appear to have had the same problem, but I haven't seen a solution. I tried linking the two modules in staticly; didn't make a difference. But I may have hit upon something. By compiling PHP with LDFLAGS="$LDFLAGS -L/usr/local/sqlrelay/lib -lmysql50sqlrelay" (change the lib path to suit your install) and linking the old PHP mysql module in statically while building mysqli support as a dso: ./configure --with-mysql=/usr/local/mysql --with-mysqli=shared,/usr/local/mysql/bin/mysql_config (again, change the paths to suit your install) I may just have found a way to give myself the best of both worlds. The mysqli extension's still linking against libmysqlclient while the older module is properly linking against libmysql50sqlrelay. This is helpful in my particular instance as I'm using a popular open source content management framework (ahem, Drupal) that helpfully includes support for both libraries. Simply changing one variable allows me to use one library to tunnel through SQL Relay while using the other to pound on our db directly. Don't know how useful this might be for others, but I'm certainly elated to have found something workable for our situation. :) Crossing my fingers that I'm on the right track now. -- Stephen P. Paschall |
|
From: Chris <dm...@gm...> - 2008-11-13 23:23:03
|
Hi all, I'm now trying to get sqlrelay working on solaris. Everything compiles/builds fine. When I try to start it up though I get this: # ./sqlr-start -id oracle Starting listener: sqlr-listener -id oracle -config /usr/local/sqlrelay/etc/sqlrelay.conf Starting 3 connections to db : sqlr-connection-oracle8 -id oracle -connectionid db -config /usr/local/sqlrelay/etc/sqlrelay.conf terminate called after throwing an instance of 'std::bad_alloc' what(): St9bad_alloc (with it repeated another 2 times). I have no idea what that means :) Rudiments is in /usr/local/rudiments (which is not in my path or library path). Running solaris 10. Compiled with gcc. As far as I can tell, it does connect to oracle on the 2nd server ok (I can see stuff in the oracle listener.log). Not sure what other info to include :) Thanks! -- Postgresql & php tutorials http://www.designmagick.com/ |
|
From: David M. <dav...@fi...> - 2008-11-11 15:40:28
|
Yep, looks right to me. On Tue, 2008-11-11 at 10:49 +1100, Chris wrote: > David Muse wrote: > > There are 2 solutions; use postgresql native bind format or add > > fakebinds=yes to the string attribute of the connection tag in your > > sqlrelay.conf file. > > > > Prior to version 8.0, postgres did not support bind variables so > > sqlrelay faked them by rewriting the query. These days, sqlrelay > > attempts to use postgres's native binds, but you can override that and > > fall back to the old behavior using fakebinds=yes. > > > > If you want to use native postgresql binds, you'll need to rewrite your > > queries, replacing :assetid with a ? and then in the inputBind call, > > you'll need to refer to each bind variable by number rather than name. > > > > For example: > > > > sqlrcur_prepareQuery($cur,"select * from sq_ast where assetid=? and > > otherid=?"); > > sqlrcur_inputBind($cur,"1","43"); > > sqlrcur_inputBind($cur,"2","100"); > > Ahh. That works. > > I tried using fakebinds (since it's more "pdo" style which is what the > app is using) but I must have it wrong. > > <connection connectionid="pgsql" > string="user=user;password=pass;db=dbname;host=127.0.0.1;port=5432;fakebinds=yes;" > metric="1" behindloadbalancer="no" /> > > Does that look right? > > Of course I restarted sqlrelay after adding the fakebinds param in.. > _____________________________________________________________ Veteran's Day Domain Sales: Hosting + Domain = US$5.95/year Offer Ends: Nov 12, 2008. http://www.doteasy.com |
|
From: Chris <dm...@gm...> - 2008-11-11 00:56:02
|
Hi all, I'm trying to build sqlrelay on a debian etch system and having some issues. Configure cmd looks like: ./configure --with-oracle-home=/home/oracle/oracle/product/10.2.0/db_1 --prefix=/usr/local/sqlrelay It is inside a Xen VM machine, I don't know if that is an issue or not. I tried "forcing" the host/build with --build=i386 but no difference. When I get to the 'make' step I get this error: make -C src all make[1]: Entering directory `/home/csmith/sqlrelay-0.39.4/src' make -C util all make[2]: Entering directory `/home/csmith/sqlrelay-0.39.4/src/util' /bin/sh ../../libtool --mode=compile g++ -Wall -pipe -pthread -DTMP_DIR=\"/usr/local/sqlrelay/var/sqlrelay/tmp\" -DDEBUG_DIR=\"/usr/local/sqlrelay/var/sqlrelay/debug\" -DDEFAULT_CONFIG_FILE=\"/usr/local/sqlrelay/etc/sqlrelay.conf\" -I./ -I../../ -I../../src/common -pthread -c cmdline.C -o cmdline.lo mkdir .libs g++ -Wall -pipe -pthread -DTMP_DIR=\"/usr/local/sqlrelay/var/sqlrelay/tmp\" -DDEBUG_DIR=\"/usr/local/sqlrelay/var/sqlrelay/debug\" -DDEFAULT_CONFIG_FILE=\"/usr/local/sqlrelay/etc/sqlrelay.conf\" -I./ -I../../ -I../../src/common -pthread -c cmdline.C -fPIC -DPIC -o .libs/cmdline.o cmdline.C: In member function 'void cmdline::setId()': cmdline.C:20: error: 'getValue' was not declared in this scope cmdline.C: In member function 'void cmdline::setConfig()': cmdline.C:30: error: 'getValue' was not declared in this scope cmdline.C: In member function 'void cmdline::setLocalStateDir()': cmdline.C:39: error: 'getValue' was not declared in this scope Any suggestions? Thanks! -- Postgresql & php tutorials http://www.designmagick.com/ |
|
From: Chris <dm...@gm...> - 2008-11-10 23:49:46
|
David Muse wrote: > There are 2 solutions; use postgresql native bind format or add > fakebinds=yes to the string attribute of the connection tag in your > sqlrelay.conf file. > > Prior to version 8.0, postgres did not support bind variables so > sqlrelay faked them by rewriting the query. These days, sqlrelay > attempts to use postgres's native binds, but you can override that and > fall back to the old behavior using fakebinds=yes. > > If you want to use native postgresql binds, you'll need to rewrite your > queries, replacing :assetid with a ? and then in the inputBind call, > you'll need to refer to each bind variable by number rather than name. > > For example: > > sqlrcur_prepareQuery($cur,"select * from sq_ast where assetid=? and > otherid=?"); > sqlrcur_inputBind($cur,"1","43"); > sqlrcur_inputBind($cur,"2","100"); Ahh. That works. I tried using fakebinds (since it's more "pdo" style which is what the app is using) but I must have it wrong. <connection connectionid="pgsql" string="user=user;password=pass;db=dbname;host=127.0.0.1;port=5432;fakebinds=yes;" metric="1" behindloadbalancer="no" /> Does that look right? Of course I restarted sqlrelay after adding the fakebinds param in.. -- Postgresql & php tutorials http://www.designmagick.com/ |
|
From: David M. <dav...@fi...> - 2008-11-10 22:32:31
|
Could you send me the config.log file that got generated when you ran configure. It appears that the little test programs that it builds to test the different mysql functions aren't building for some reason. The log should say why. Dave Muse dav...@fi... On Mon, 2008-11-03 at 20:13 -0500, Joseph Hardeman wrote: > Hi Everyone, > > I am having a little problem building the sqlrelay package on our > server. I am wanting to use this as a proxy between our web servers and > our production databases, in a read/write scenario. With all writes > going to the Master DB and all reads going to a slave. > > The problem I am having is that when building sqlrelay it does not see > entries for mysql: > > ***** MySQL ****************** > checking for valid mysql_config output... no > checking for mysql_real_connect... no > checking for mysql_select_db... no > checking for mysql_ping... no > checking for mysql_change_user... no > checking for mysql_commit... no > checking for mysql_rollback... no > checking for mysql_autocommit... no > checking for mysql_prepare... no > checking for mysql_next_result... no > checking for CR_SERVER_GONE_ERROR... no > checking for CR_SERVER_LOST... no > checking for FIELD_TYPE_YEAR... no > checking for FIELD_TYPE_NEWDATE... no > checking for FIELD_TYPE_ENUM... no > checking for FIELD_TYPE_SET... no > checking for FIELD_TYPE_NEWDECIMAL... no > checking for MYSQL_OPT_RECONNECT... no > checking for MYSQL_GET_SERVER_VERSION... no > mysql includes... -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 > -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 > -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > -fno-strict-aliasing -fwrapv > mysql libs... -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm > -L/usr/lib64 -lssl -lcrypto > ****************************** > > > > It completes the configuration, and it says that mysql is dynamic. But > when I go to make, I get the following: > > make -C mysql all > make[3]: Entering directory > `/usr/local/src/sqlrelay-0.39.4/src/connections/mysql' > /bin/sh ../../../libtool --mode=compile g++ -Wall -pipe -pthread -I./ > -I../../../ -I../../../src/common -I../../../src/util > -I../../../src/connection -I/usr/local/firstworks/include -pthread > -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic > -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE > -fno-strict-aliasing -fwrapv -I../../../src/api/c++/include -c > mysqlconnection.C -o mysqlconnection.lo > mkdir .libs > g++ -Wall -pipe -pthread -I./ -I../../../ -I../../../src/common > -I../../../src/util -I../../../src/connection > -I/usr/local/firstworks/include -pthread -I/usr/include/mysql -g -pipe > -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector > --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv > -I../../../src/api/c++/include -c mysqlconnection.C -fPIC -DPIC -o > .libs/mysqlconnection.o > mysqlconnection.C: In member function 'virtual bool > mysqlconnection::logIn(bool)': > mysqlconnection.C:102: error: 'mysql_connect' was not declared in this scope > mysqlconnection.C:70: warning: unused variable 'dbval' > make[3]: *** [mysqlconnection.lo] Error 1 > make[3]: Leaving directory > `/usr/local/src/sqlrelay-0.39.4/src/connections/mysql' > make[2]: *** [all] Error 2 > make[2]: Leaving directory `/usr/local/src/sqlrelay-0.39.4/src/connections' > make[1]: *** [all] Error 2 > make[1]: Leaving directory `/usr/local/src/sqlrelay-0.39.4/src' > make: *** [all] Error 2 > > > I am at a loss as to what I need to do, I installed mysql, mysql-server, > and mysql-devel on this server to see if it needed those added. > > Can someone advise me on what I am missing? > > Thanks > > Joe > > -- > This message has been scanned for viruses by Colocube's AV Scanner > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > 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 _____________________________________________________________ Veteran's Day Domain Sales: Hosting + Domain = US$5.95/year Offer Ends: Nov 12, 2008. http://www.doteasy.com |
|
From: David M. <dav...@fi...> - 2008-11-10 22:29:27
|
This looks like a bug. I just tracked down the cause, but I'm not 100% sure how to fix it yet :) It'll be fixed in the next release though. Dave dav...@fi... On Fri, 2008-11-07 at 11:57 -0500, Steve Paschall wrote: > I can't find mention of this in the documentation, but the first > example in the Routing and Filtering how-to indicates that using an > empty value for the port in an instance config will prevent > sqlr-listen from binding to a port -- it'll only use a local socket. I > can't make it work. It binds to port 9000 no matter what I've tried. > It isn't a _huge_ deal, but I'd really like it to work if possible. > > I have a typical master-slave setup I'd like to route queries between. > I'm leaving out the other rot to protect the innocent and keep this > brief: > > <instance id="dev_master" port="" socket="/tmp/dev_master.socket" > dbase="mysql">...</instance> > > <instance id="dev_slave" port="" socket="/tmp/dev_slave.socket" > dbase="mysql">...</instance> > > Either instance starts up fine on its own, but starting the other > instance gives me a "Could not listen on: 0.0.0.0/9000 \ Error was: > Address already in use". > > I've tried setting port to a space char, setting addresses to > 127.0.0.1, empty, and a space char, and all combinations thereof. > Setting non-conflicting ports for each instance is the only thing > that's worked for me. > > I can make it bind only to the localhost, but that isn't optimal. Any > suggestions from the gurus? > > (CentOS 5, x86/32) > > -- > Steve Paschall > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > 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 _____________________________________________________________ Veteran's Day Domain Sales: Hosting + Domain = US$5.95/year Offer Ends: Nov 12, 2008. http://www.doteasy.com |
|
From: David M. <dav...@fi...> - 2008-11-10 22:26:11
|
There are 2 solutions; use postgresql native bind format or add fakebinds=yes to the string attribute of the connection tag in your sqlrelay.conf file. Prior to version 8.0, postgres did not support bind variables so sqlrelay faked them by rewriting the query. These days, sqlrelay attempts to use postgres's native binds, but you can override that and fall back to the old behavior using fakebinds=yes. If you want to use native postgresql binds, you'll need to rewrite your queries, replacing :assetid with a ? and then in the inputBind call, you'll need to refer to each bind variable by number rather than name. For example: sqlrcur_prepareQuery($cur,"select * from sq_ast where assetid=? and otherid=?"); sqlrcur_inputBind($cur,"1","43"); sqlrcur_inputBind($cur,"2","100"); Either way should work. On Tue, 2008-11-11 at 08:50 +1100, Chris wrote: > Martin Fleurke wrote: > > Chris schreef: > >> sqlrcur_prepareQuery($cur,"select * from sq_ast where assetid=:assetid"); > >> sqlrcur_inputBind($cur,"assetid","43"); > >> ERROR: syntax error at or near ":" at character 36 > >> STATEMENT: select * from sq_ast where assetid=:assetid > >> > >> I'm sure I'm missing something really simple but can't work out what > >> it is. Any suggestions very welcome. > >> > > > > Try > > > > sqlrcur_inputBind($cur,":assetid","43"); > > > > ?? > > > > (The colon should be in the name of the bindvar.) > > I got the same thing as before (postgres throwing an error). > > Could I have done something wrong with the compiling/configuring (though > I'm not really sure what it could be).. ? > _____________________________________________________________ Veteran's Day Domain Sales: Hosting + Domain = US$5.95/year Offer Ends: Nov 12, 2008. http://www.doteasy.com |
|
From: Chris <dm...@gm...> - 2008-11-10 22:12:41
|
Martin Fleurke wrote: > Chris schreef: >> sqlrcur_prepareQuery($cur,"select * from sq_ast where assetid=:assetid"); >> sqlrcur_inputBind($cur,"assetid","43"); >> ERROR: syntax error at or near ":" at character 36 >> STATEMENT: select * from sq_ast where assetid=:assetid >> >> I'm sure I'm missing something really simple but can't work out what >> it is. Any suggestions very welcome. >> > > Try > > sqlrcur_inputBind($cur,":assetid","43"); > > ?? > > (The colon should be in the name of the bindvar.) I got the same thing as before (postgres throwing an error). Could I have done something wrong with the compiling/configuring (though I'm not really sure what it could be).. ? -- Postgresql & php tutorials http://www.designmagick.com/ |
|
From: Martin F. <mar...@po...> - 2008-11-10 09:28:21
|
Chris schreef: > sqlrcur_prepareQuery($cur,"select * from sq_ast where assetid=:assetid"); > sqlrcur_inputBind($cur,"assetid","43"); > ERROR: syntax error at or near ":" at character 36 > STATEMENT: select * from sq_ast where assetid=:assetid > > I'm sure I'm missing something really simple but can't work out what it > is. Any suggestions very welcome. > Try sqlrcur_inputBind($cur,":assetid","43"); ?? (The colon should be in the name of the bindvar.) Regards, Martin |
|
From: Chris <dm...@gm...> - 2008-11-10 04:47:55
|
Hi all,
I'm looking to use sqlrelay with php & postgresql but having some
trouble getting it working properly.
Using sqlrelay 0.39.4 (compiled from source) on ubuntu (8.0.4) against
postgresql 8.3 (ubuntu package).
I've tried the pear db method and the non-pear method but both seem to
not process bind variables correctly.
Copied pretty much verbatim from the manual (except tablename & field
names changed):
<?php
dl("sql_relay.so");
$con=sqlrcon_alloc("localhost",9000,"","user1","password1",0,1);
$cur=sqlrcur_alloc($con);
sqlrcur_prepareQuery($cur,"select * from sq_ast where assetid=:assetid");
sqlrcur_inputBind($cur,"assetid","43");
sqlrcur_executeQuery($cur);
for ($row=0; $row<sqlrcur_rowCount($cur); $row++) {
echo "Row: " . $row . "\n";
for ($col=0; $col<sqlrcur_colCount($cur); $col++) {
echo sqlrcur_getField($cur,$row,$col);
echo ",";
}
echo "\n";
}
sqlrcur_free($cur);
sqlrcon_free($con);
Postgres error log says:
ERROR: syntax error at or near ":" at character 36
STATEMENT: select * from sq_ast where assetid=:assetid
I'm sure I'm missing something really simple but can't work out what it
is. Any suggestions very welcome.
Thanks!
--
Postgresql & php tutorials
http://www.designmagick.com/
|
|
From: Steve P. <ste...@gm...> - 2008-11-07 16:57:37
|
I can't find mention of this in the documentation, but the first example in the Routing and Filtering how-to indicates that using an empty value for the port in an instance config will prevent sqlr-listen from binding to a port -- it'll only use a local socket. I can't make it work. It binds to port 9000 no matter what I've tried. It isn't a _huge_ deal, but I'd really like it to work if possible. I have a typical master-slave setup I'd like to route queries between. I'm leaving out the other rot to protect the innocent and keep this brief: <instance id="dev_master" port="" socket="/tmp/dev_master.socket" dbase="mysql">...</instance> <instance id="dev_slave" port="" socket="/tmp/dev_slave.socket" dbase="mysql">...</instance> Either instance starts up fine on its own, but starting the other instance gives me a "Could not listen on: 0.0.0.0/9000 \ Error was: Address already in use". I've tried setting port to a space char, setting addresses to 127.0.0.1, empty, and a space char, and all combinations thereof. Setting non-conflicting ports for each instance is the only thing that's worked for me. I can make it bind only to the localhost, but that isn't optimal. Any suggestions from the gurus? (CentOS 5, x86/32) -- Steve Paschall |
|
From: Renat S. <sr...@st...> - 2008-11-06 10:46:23
|
Renat Sabitov пишет: > 2) For Unicode strings, when one character fits one or more bytes, max > output buffer for string variables is 34464 bytes, not characters, so > russian strings (1 char = 2 bytes) are cut to 17232 characters This issue is about how Oracle handles UTF-8 strings. I don't know why there is no message like 'ORA-06502: PL/SQL: numeric or value error'. -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |
|
From: Joseph H. <jha...@co...> - 2008-11-04 01:13:59
|
Hi Everyone, I am having a little problem building the sqlrelay package on our server. I am wanting to use this as a proxy between our web servers and our production databases, in a read/write scenario. With all writes going to the Master DB and all reads going to a slave. The problem I am having is that when building sqlrelay it does not see entries for mysql: ***** MySQL ****************** checking for valid mysql_config output... no checking for mysql_real_connect... no checking for mysql_select_db... no checking for mysql_ping... no checking for mysql_change_user... no checking for mysql_commit... no checking for mysql_rollback... no checking for mysql_autocommit... no checking for mysql_prepare... no checking for mysql_next_result... no checking for CR_SERVER_GONE_ERROR... no checking for CR_SERVER_LOST... no checking for FIELD_TYPE_YEAR... no checking for FIELD_TYPE_NEWDATE... no checking for FIELD_TYPE_ENUM... no checking for FIELD_TYPE_SET... no checking for FIELD_TYPE_NEWDECIMAL... no checking for MYSQL_OPT_RECONNECT... no checking for MYSQL_GET_SERVER_VERSION... no mysql includes... -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv mysql libs... -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto ****************************** It completes the configuration, and it says that mysql is dynamic. But when I go to make, I get the following: make -C mysql all make[3]: Entering directory `/usr/local/src/sqlrelay-0.39.4/src/connections/mysql' /bin/sh ../../../libtool --mode=compile g++ -Wall -pipe -pthread -I./ -I../../../ -I../../../src/common -I../../../src/util -I../../../src/connection -I/usr/local/firstworks/include -pthread -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -I../../../src/api/c++/include -c mysqlconnection.C -o mysqlconnection.lo mkdir .libs g++ -Wall -pipe -pthread -I./ -I../../../ -I../../../src/common -I../../../src/util -I../../../src/connection -I/usr/local/firstworks/include -pthread -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -I../../../src/api/c++/include -c mysqlconnection.C -fPIC -DPIC -o .libs/mysqlconnection.o mysqlconnection.C: In member function 'virtual bool mysqlconnection::logIn(bool)': mysqlconnection.C:102: error: 'mysql_connect' was not declared in this scope mysqlconnection.C:70: warning: unused variable 'dbval' make[3]: *** [mysqlconnection.lo] Error 1 make[3]: Leaving directory `/usr/local/src/sqlrelay-0.39.4/src/connections/mysql' make[2]: *** [all] Error 2 make[2]: Leaving directory `/usr/local/src/sqlrelay-0.39.4/src/connections' make[1]: *** [all] Error 2 make[1]: Leaving directory `/usr/local/src/sqlrelay-0.39.4/src' make: *** [all] Error 2 I am at a loss as to what I need to do, I installed mysql, mysql-server, and mysql-devel on this server to see if it needed those added. Can someone advise me on what I am missing? Thanks Joe -- This message has been scanned for viruses by Colocube's AV Scanner |
|
From: Sebastien B. <seb...@do...> - 2008-11-03 10:42:45
|
Hello, Can i use sqlrcur_inputBindBlob with postgresSQL ? I try to run the example given on web site but it doesn't work. My php box is not compiled with support of postgresql so i can't use pg_escape_bytea. Who to add bytea ? Thanks for your answer. Séb. |
|
From: Renat S. <sr...@st...> - 2008-11-01 15:03:32
|
Hello! We are using sqlrelay 0.39.4 with Oracle. There are 2 problems with output string bind variables: 1) When you prepare cursor, bind output variable and then execute it in a loop, size of bind variable changes from one iteration to another - it becomes the size of return value from previous iteration. For example, if result in first iteration was 'abc', then size of output bind in next iteration will be 3, no matter what value you put in sqlrcur_defineOutputBindString. 2) For Unicode strings, when one character fits one or more bytes, max output buffer for string variables is 32464 bytes, not characters, so russian strings (1 char = 2 bytes) are cut to 17232 characters Test script can be found here: http://www.srr.pp.ru/www/sqlr/test_sqlr.htms It prints page like this: Example 1: 1 ok: strlen_ora=7 != strlen=7|БЭгЮхВП| 2 error: strlen_ora=10 != strlen=7|ЛлаЕМШВ| 3 error: strlen_ora=8 != strlen=7|рДРуУлЗ| Example 2: 1 error: strlen_ora=25268 != strlen=17232 2 error: strlen_ora=23904 != strlen=17232 3 error: strlen_ora=23095 != strlen=17232 Debug output can be found here: http://www.srr.pp.ru/www/sqlr/debug_utf8.txt -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |
|
From: Mark M. <mar...@gm...> - 2008-10-21 15:29:42
|
Hi there,Today one of my accounts was locked on our oracle server. And when i went to start the sqlrelay stuff up for this particular server I saw the error message that the account was locked. So not everything could start. But then I get processes that hang: nobody 23814 1 0 11:04 pts/1 00:00:00 sqlr-listener-debug -id tpirate -config /usr/etc/sqlrelay.conf nobody 23822 1 0 11:04 ? 00:00:00 sqlr-scaler -id tpirate -debug -config /usr/etc/sqlrelay.conf If i try to stop them using sqlr-stop it does not work. The only way to get them to stop is to do kill -9. Do you think I have something misconfigured? We're on RHEL 5.1. Using the latest sqlrelay. Any help would be appreciated. Thanks, mark |
|
From: Tom H. <tom...@si...> - 2008-10-21 15:06:07
|
I just started looking into SQLRelay mostly from a standpoint of connection pooling when I found out that it is also able to do load balancing, routing and filtering. I have a configuration of about 23 servers all connecting to a cluster of MySQL database servers hosting several databases. Database servers are set up in master-slave configurations where the slaves are put "behind" a load-balancer. Some of the application servers host websites where the database load will be relatively low bust most of them host webservices that need to be able to handle several thousands of requests per hour. All of these requests will result in one or more database transactions. Right now all the applications running on these server decide themselves which database to access (albeit via some configuration mechanism), whether they need to connect to a master or a slave, etc. but you can imagine that maintenance of this configuration mechanism is becoming quite a challenge. My question is: would it be possible to deploy SQLRelay on one separate server where all the servers mentioned above connect to for their database access? I guess that's exactly the idea behind SQLRelay but wouldn't it become a huge bottleneck? In addition: has anyone ever tried building a native driver for LDAP? Thanks for your time. Kind Regards, Tom Hesp tom...@si... |
|
From: Ömer F. İ. <ome...@pi...> - 2008-10-17 05:58:57
|
Hi, I'm setting sqlrelay for oracle connections=200 and max_connections=300 When i increase the connection number it just ignores it and start with 200 connections Is there a limit for this setting? |
|
From: David M. <dav...@fi...> - 2008-10-15 17:08:36
|
Yes, you would need to LD_PRELOAD the drop-in replacement libraries. See http://sqlrelay.sourceforge.net/sqlrelay/dropin/mysql.html and http://sqlrelay.sourceforge.net/sqlrelay/dropin/postgresql.html David Muse dav...@fi... On Wed, 2008-10-15 at 10:34 -0400, Rolf wrote: > In the features list of SQL relay it says : > > An application coded using another database's native client API may be > able to use SQL Relay without modification. SQL Relay provides drop-in > replacement libraries for: > > * MySQL > > > > * PostgreSQL > > > > Does this mean that you have to use the drop-ins? > > > Rolf > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > 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 |