sqlrelay-discussion Mailing List for SQL Relay (Page 5)
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: David M. <dav...@fi...> - 2012-05-31 20:33:16
|
On 05/29/2012 09:20 AM, jan...@id... wrote: >> -----Ursprüngliche Nachricht----- >> Von: David Muse [mailto:dav...@fi...] >> Gesendet: Sonntag, 20. Mai 2012 00:05 >> An: Discussion of topics related to SQL Relay >> Betreff: Re: [Sqlrelay-discussion] r/w splitting configuration question >> >> Hi Jan, >> >> I'm sorry for taking over two months to reply. I hope you discovered the >> problem already, but if you didn't... >> >> The problem is that there are no users and passwords defined for each >> instance. Each instance requires a<users/> block and the<route/> tags >> must refer to them. >> >> For example, you can configure the master instance to be authenticated by >> masteruser/masterpassword and the slave instance to be authenticated by >> slaveuser/slavepassword and the test instance to be authenticated by >> testuser/testpassword as follows: >> >> <instance id="master" ...> >> <users> >> <user user="masteruser" password="masterpassword"/> </users> >> ... >> </instance> >> >> <instance id="slave" ...> >> <users> >> <user user="slaveuser" password="slavepassword"/> </users> >> ... >> </instance> >> >> <instance id="test" ...> >> <users> >> <user user="testuser" password="testpassword"/> </users> <route host="" >> port="9000" socket="/tmp/master.socke" user="masteruser" >> password="masterpassword"> >> ... >> </route> >> ... >> <route host="" port="9001" socket="/tmp/slave.socke" user="slaveuser" >> password="slavepassword"> >> ... >> </route> >> </intstance> >> >> >> Note that the route tags use the appropriate user/password that was >> configured earlier. >> >> I hope this information doesn't come too late. >> >> Take care, >> >> David Muse >> dav...@fi... > [Zeller, Jan (ID)] > Hi David, > > thanks a lot for your help. > Unfortunately I'am too dumb to use your software. > > I started from scratch, followed your guidlines on http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/mysql.html#sqlrelay used the following config file > > # cat /opt/sqlrelay-0.45/etc/sqlrelay.conf > <?xml version="1.0"?> > <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> > <instances> > <instance id="mysqltest" port="9000" socket="/tmp/mysqltest.socket" dbase="mysql" connections="3" maxconnections="5" maxqueuelength="0" growby="1" ttl="60" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass"> > <users> > <user user="mysqltest" password="mysqltest"/> > </users> > <connections> > <connection connectionid="mysqltest" string="user=testuser;password=testpassword;db=testdb;host=192.168.122.152" metric="1"/> > </connections> > </instance> > </instances> > > and with that I was able to do the following : > > # query localhost 9000 /tmp/mysqltest.socket mysqltest mysqltest "desc testtable;" > "col1","char(40)","YES","","","" > "col2","int(11)","YES","","","" > > # sqlrsh -id mysqltest > SQLRShell - Version 0.22 > Connected to: localhost:9000 as mysqltest > > type help; for a help. > [...] > > 0> show tables; > Tables_in_testdb > ================ > testtable > Rows Returned : 1 > Fields Returned : 1 > System time : 10000 > > 1> currentdb; > testdb > [...] > > But how can my regular mysql client (finally the application) can connect to ? Did I misunderstood something ? > > kind regards, > > Jan Hi Jan, I assume that you mean the MySQL command line client "mysql"... Since that program uses the MySQL Native API, rather than the SQL Relay API, you must use the SQL Relay Drop-in Replacement Library for MySQL which maps MySQL Native API calls to SQL Relay API calls. Directions for using it are here: http://sqlrelay.sourceforge.net/sqlrelay/dropin/mysql.html But basically, you run: export LD_PRELOAD=/usr/local/firstworks/lib/libmysql51sqlrelay.so Then aim the mysql program at SQL Relay rather than at the database directly: mysql --host=localhost --port=9000 --socket=/tmp/mysqltest.socket --user=mysqltest --password=mysqltest If your program also uses the MySQL Native API then the same process should work for it as well. Try this and let me know if you're still having trouble. SQL Relay has some complex features and it's not unusual to have a little trouble getting all of it to work together. I'm available for consulting services if you need them: http://sqlrelay.sourceforge.net/support.html I can usually get even the most complex configurations up and running in a few hours. Dave dav...@fi... |
From: findjaimin <fin...@gm...> - 2012-05-30 09:44:21
|
Hi, I am using SQL relay between my php app and Mysql database*s*. Following is the configuration file. <?xml version="1.0"?> <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> <instances> <!-- Regular SQL Relay Instance --> <instance id="example" port="7000" socket="/home/Jaimin/relay.sock" dbase="mysql" connections="10" maxconnections="25" maxqueuelength="5" growby="5" ttl="1" maxsessioncount="10000" endofsession="commit" sessiontimeout="600" runasuser="Jaimin" runasgroup="Jaimin" cursors="5" maxcursors="10" cursors_growby="10" authtier="listener" handoff="pass" deniedips="" allowedips="" debug="none" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no" timequeriessec="-1" timequeriesusec="-1" fakeinputbindvariables="no" translatebindvariables="no" isolationlevel="read committed" ignoreselectdatabase="no"> <users> <user user="jaimin" password="password"/> </users> <connections> <connection connectionid="db1" string="user=jaimin;password=password;db=schema;host=172.29.5.169" metric="1" behindloadbalancer="no"/> <connection connectionid="db2" string="user=jaimin;password=password;db=schema;host=172.29.5.169;port=3308" metric="1" behindloadbalancer="no"/> </connections> </instance> </instances> My problem is : When mysql referenced by connectionid db2 goes down, every second request sent by php gets error "Can't connect to MySQL server on '172.29.5.169' (111)" . However as mentioned in this ( http://sqlrelay.sourceforge.net/sqlrelay/loadbalfailover.html ) link it should just *mark* connection(s) of db2 as *unavailable to clients*. Means, my php app will never get error..instead it will have smaller pool of connections so may be some performance impact. I am using release # 0.45. Am I missing something in achieving following behaviour as mentioned in http://sqlrelay.sourceforge.net/sqlrelay/loadbalfailover.html ? : "Currently, if an SQL Relay connection daemon notices that the database server it is connected to has gone down it will mark itself unavailable to clients, log out and loop, attempting to re-connect to that database server. If that connection daemon is configured with the *behindloadbalancer * attribute set to "no", then it will also raise a flag and all connection daemons connected to that database server mark themselves unavailable to clients, close their connections and loop, attempting to re-connect to that database server. When the database server comes back up, as each connection daemon successfully re-connects to the database server, it marks itself available to clients again. While one database server is down, client sessions are still distributed over the servers that are still up, albiet through a smaller pool of persistent database connections." Thanks, Jaimin |
From: <jan...@id...> - 2012-05-29 13:39:42
|
> -----Ursprüngliche Nachricht----- > Von: David Muse [mailto:dav...@fi...] > Gesendet: Sonntag, 20. Mai 2012 00:05 > An: Discussion of topics related to SQL Relay > Betreff: Re: [Sqlrelay-discussion] r/w splitting configuration question > > Hi Jan, > > I'm sorry for taking over two months to reply. I hope you discovered the > problem already, but if you didn't... > > The problem is that there are no users and passwords defined for each > instance. Each instance requires a <users/> block and the <route/> tags > must refer to them. > > For example, you can configure the master instance to be authenticated by > masteruser/masterpassword and the slave instance to be authenticated by > slaveuser/slavepassword and the test instance to be authenticated by > testuser/testpassword as follows: > > <instance id="master" ...> > <users> > <user user="masteruser" password="masterpassword"/> </users> > ... > </instance> > > <instance id="slave" ...> > <users> > <user user="slaveuser" password="slavepassword"/> </users> > ... > </instance> > > <instance id="test" ...> > <users> > <user user="testuser" password="testpassword"/> </users> <route host="" > port="9000" socket="/tmp/master.socke" user="masteruser" > password="masterpassword"> > ... > </route> > ... > <route host="" port="9001" socket="/tmp/slave.socke" user="slaveuser" > password="slavepassword"> > ... > </route> > </intstance> > > > Note that the route tags use the appropriate user/password that was > configured earlier. > > I hope this information doesn't come too late. > > Take care, > > David Muse > dav...@fi... [Zeller, Jan (ID)] Hi David, thanks a lot for your help. Unfortunately I'am too dumb to use your software. I started from scratch, followed your guidlines on http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/mysql.html#sqlrelay used the following config file # cat /opt/sqlrelay-0.45/etc/sqlrelay.conf <?xml version="1.0"?> <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> <instances> <instance id="mysqltest" port="9000" socket="/tmp/mysqltest.socket" dbase="mysql" connections="3" maxconnections="5" maxqueuelength="0" growby="1" ttl="60" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass"> <users> <user user="mysqltest" password="mysqltest"/> </users> <connections> <connection connectionid="mysqltest" string="user=testuser;password=testpassword;db=testdb;host=192.168.122.152" metric="1"/> </connections> </instance> </instances> and with that I was able to do the following : # query localhost 9000 /tmp/mysqltest.socket mysqltest mysqltest "desc testtable;" "col1","char(40)","YES","","","" "col2","int(11)","YES","","","" # sqlrsh -id mysqltest SQLRShell - Version 0.22 Connected to: localhost:9000 as mysqltest type help; for a help. [...] 0> show tables; Tables_in_testdb ================ testtable Rows Returned : 1 Fields Returned : 1 System time : 10000 1> currentdb; testdb [...] But how can my regular mysql client (finally the application) can connect to ? Did I misunderstood something ? kind regards, Jan |
From: David M. <dav...@fi...> - 2012-05-26 01:32:25
|
Thanks Georgiy, You are correct, it should be safePoll(120,0,true,false). Thanks for finding that! I'm committing it to CVS now and the fix will be in the next release. Dave dav...@fi... On 05/23/2012 10:39 AM, Georgiy Kirichenko wrote: > > Hi, > > In some cases sqlr-connection will hang at this call: > result=recvmsg(pvt->_fd,&messageheader,0); (filedescriptor.cpp:1876, > filedescriptor::receiveFileDescriptor) - this is gdb backtrace. > > Before this safePoll(120,0,false,true) is called, but it wait POLLOUT > event instead of POLLIN (read(false) and write(true) params). In this > case, when sqlr-listener fail before passFileDescriptor, sqlr-connect > will hang. > > I think, correct call is safePoll(120,0,true,false) - we should wait > POLLIN event. > > I test this solution, and in my case have no problem. > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com |
From: Georgiy K. <ge...@st...> - 2012-05-23 14:56:47
|
Hi, In some cases sqlr-connection will hang at this call: result=recvmsg(pvt- >_fd,&messageheader,0); (filedescriptor.cpp:1876, filedescriptor::receiveFileDescriptor) - this is gdb backtrace. Before this safePoll(120,0,false,true) is called, but it wait POLLOUT event instead of POLLIN (read(false) and write(true) params). In this case, when sqlr-listener fail before passFileDescriptor, sqlr-connect will hang. I think, correct call is safePoll(120,0,true,false) - we should wait POLLIN event. I test this solution, and in my case have no problem. |
From: David M. <dav...@fi...> - 2012-05-19 22:05:44
|
Hi Jan, I'm sorry for taking over two months to reply. I hope you discovered the problem already, but if you didn't... The problem is that there are no users and passwords defined for each instance. Each instance requires a <users/> block and the <route/> tags must refer to them. For example, you can configure the master instance to be authenticated by masteruser/masterpassword and the slave instance to be authenticated by slaveuser/slavepassword and the test instance to be authenticated by testuser/testpassword as follows: <instance id="master" ...> <users> <user user="masteruser" password="masterpassword"/> </users> ... </instance> <instance id="slave" ...> <users> <user user="slaveuser" password="slavepassword"/> </users> ... </instance> <instance id="test" ...> <users> <user user="testuser" password="testpassword"/> </users> <route host="" port="9000" socket="/tmp/master.socke" user="masteruser" password="masterpassword"> ... </route> ... <route host="" port="9001" socket="/tmp/slave.socke" user="slaveuser" password="slavepassword"> ... </route> </intstance> Note that the route tags use the appropriate user/password that was configured earlier. I hope this information doesn't come too late. Take care, David Muse dav...@fi... On 03/09/2012 01:41 PM, jan...@id... wrote: > ________________________________________ > Von: David Muse [dav...@fi...] > Gesendet: Freitag, 9. März 2012 18:27 > An: Discussion of topics related to SQL Relay > Betreff: Re: [Sqlrelay-discussion] r/w splitting configuration question > > Could you send me your sqlrelay.conf file? > > Dave > > > > > > ok Dave this is the one I use : > > $ cat /opt/sqlrelay-0.44/etc/sqlrelay.conf > <?xml version="1.0"?> > <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> > > <instances> > > <!-- Master --> > <instance id="master" port="9000" socket="/tmp/master.socke" dbase="mysql" connections="1" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" maxsessioncount="1000" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" deniedips="" allowedips="" debug="none" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no" timequeriessec="-1" timequeriesusec="-1" fakeinputbindvariables="no" translatebindvariables="no" isolationlevel="read committed" ignoreselectdatabase="no"> > <connections> > <connection connectionid="db1" string="user=root;password=;db=ilias;host=192.168.122.152;port=3306;" metric="1" behindloadbalancer="no"/> > </connections> > </instance> > > <!-- Slave --> > <instance id="slave" port="9001" socket="/tmp/slave.socke" dbase="mysql" connections="1" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" maxsessioncount="1000" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" deniedips="" allowedips="" debug="connection" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no" timequeriessec="-1" timequeriesusec="-1" fakeinputbindvariables="no" translatebindvariables="no" isolationlevel="read committed" ignoreselectdatabase="no"> > <connections> > <connection connectionid="db1" string="user=root;password=;db=ilias;host=192.168.122.153;port=3306;" metric="1" behindloadbalancer="no"/> > </connections> > </instance> > > <!-- Query Router/Filter --> > <instance id="test" port="9002" socket="/tmp/router.socke" dbase="router" connections="1" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" maxsessioncount="1000" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" deniedips="" allowedips="" debug="listener_and_connection_and_sqltranslation" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no"> > <router> > <!-- send all queries to master --> > <route host="" port="9000" socket="/tmp/master.socke"> > <query pattern="^\s*update\s+.*"/> > <query pattern="^\s*delete\s+from\s+.*"/> > <query pattern="^\s*drop\s+table\s+.*"/> > <query pattern="^\s*create\s+table\s+.*"/> > </route> > <!-- filter out any queries for table2 --> > <!-- > <filter> > <query pattern="^\s*select\s+.*\s+from\s+table2"/> > <query pattern="^\s*insert\s+into\s+table2"/> > <query pattern="^\s*update\s+table2"/> > <query pattern="^\s*delete\s+from\s+table2"/> > <query pattern="^\s*drop\s+table\s+table2"/> > <query pattern="^\s*create\s+table\s+table2"/> > </filter> --> > <!-- send any other queries to slave --> > <route host="" port="9001" socket="/tmp/slave.socke"> > <!--<query pattern="^\s*select\s+.*\s+from\s+.*"> --> > <query pattern=".*"/> > </route> > </router> > </instance> > > </instances> > > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com |
From: Z S. <sha...@ho...> - 2012-05-11 19:24:11
|
Hi Dave, Thank you very much for your reply. I have also tried the "sqlrcon_setTimeout(sec,usec) " before calling sqlrcur_sendQuery, but it does not succeed (still blocking). This is my sqlrelay.conf: " <?xml version="1.0"?> <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> <instances> <!-- Regular SQL Relay Instance --> <instance id="hspgw" port="9000" socket="/tmp/example.socket" dbase="oracle8" connections="3" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" maxsessioncount="1000" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" deniedips="" allowedips="" debug="none" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no" timequeriessec="-1" timequeriesusec="-1" fakeinputbindvariables="no" translatebindvariables="no" isolationlevel="read committed" ignoreselectdatabase="no"> <users> <user user="BTO_SPP" password="BTO_SPP"/> </users> <connections> <connection connectionid="db1" string="user=BTO_SPP;password=bto_spp;oracle_sid=SPPPO2;" metric="1" behindloadbalancer="no"/> </connections> </instance> </instances> " Btw, I find out that the blocking happens by a call to bool sqlrcursor::runQuery(const char *query) { // send the query if (sendQueryInternal(query)) { sendInputBinds(); sendOutputBinds(); sendGetColumnInfo(); sqlrc->flushWriteBuffer(); if (rsbuffersize) { if (processResultSet(false,rsbuffersize-1)) { return true; } } else { if (processResultSet(true,0)) { <----- blocking return true; } } } return false; } => step into, finally: int32_t sqlrcursor::getShort(uint16_t *integer) { if (!sqlrc->cs->isUsingNonBlockingMode()){ // if the result set is coming from a cache file, read from // the file, if not, read from the server if (cachesource && cachesourceind) { return cachesource->read(integer); <--- blocking } else { return sqlrc->cs->read(integer); <--- blocking } } At the same time, I see there are different read() methods defined in filedescripter.C, some of which has the possibility to set timeout in secs, and usec. Do the parameters (sec, usec) affect the behavior? Cheers, Shan Date: Fri, 11 May 2012 14:30:43 -0400 From: dav...@fi... To: sql...@li... Subject: Re: [Sqlrelay-discussion] Blocking call when DB is offline Hi Shan, There is one option that might help... On the client side there is a sqlrcon_setTimeout(sec,usec) function that allows you to set the number of seconds and microseconds that the client will wait while connecting. If the connection doesn't succeed within that amount of time, then it will fall through. You could try that, but I'm not sure that it will help in this case. It looks like something is causing the second query to wait for an available database connection, and it gets stuck waiting forever. Could you post your sqlrelay.conf file? I'll do some tests and let you know what I find. Dave dav...@fi... On 05/10/2012 06:29 AM, Z Shan wrote: Hi, My application needs to talk with Oracle DB. To improve performance, I use SQLRelay as intermediate layer. Recently, I have met with following problem : 1 Both SQLRelay and Oracle DB are started 2 Send query from my App (use 'sqlrcur_sendQuery') => OK 3 Shutdown Oracle DB 4 Send query again from my App, the call on "sqlrcur_sendQuery" is blocked (no return). 5 Turn on Oracle DB again 6 The old call to sqlrcur_sendQuery is returned. Further queries can all be processed. I activated log flag of SqlRelay (SQLRDEBUG=ON), and see following output: " Connecting to listener... Inet socket: 10.10.10.120:9000 Authenticating with listener : bto_spp:bto_spp Waiting for auth success/failure... No authentication error. Must Reconnect. Reconnecting to server: 10.10.10.120 inet port: 33681 Connected. Authenticating with connection : bto_spp:bto_spp Waiting for auth success/failure... No authentication error. Sending Query: SELECT * FROM HSPGW_CONFIG_VIEW WHERE ZONE_ID = 1682 AND IS_ENABLED = 1 AND TARIFF_ID = 16 Length: 90 Requesting a new cursor. Sending 0 Input Bind Variables: Sending Output Bind Variables: Send Column Info: yes Skipping and Fetching Skipping 0 rows Fetching 0 rows " Is there any way to let 'sqlrcur_sendQuery' return after certain time when the connection to DB is failed (like setting a timeout)? Otherwise the whole APP will hang as far as the DB is offline. Any help will be appreciated. Shan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion _______________________________________________________ Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting http://www.doteasy.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
From: David M. <dav...@fi...> - 2012-05-11 18:31:03
|
Hi Shan, There is one option that might help... On the client side there is a sqlrcon_setTimeout(sec,usec) function that allows you to set the number of seconds and microseconds that the client will wait while connecting. If the connection doesn't succeed within that amount of time, then it will fall through. You could try that, but I'm not sure that it will help in this case. It looks like something is causing the second query to wait for an available database connection, and it gets stuck waiting forever. Could you post your sqlrelay.conf file? I'll do some tests and let you know what I find. Dave dav...@fi... On 05/10/2012 06:29 AM, Z Shan wrote: > Hi, > My application needs to talk with Oracle DB. To improve performance, I > use SQLRelay as intermediate layer. > > Recently, I have met with following problem : > > 1 Both SQLRelay and Oracle DB are started > 2 Send query from my App (use 'sqlrcur_sendQuery') => OK > 3 Shutdown Oracle DB > 4 Send query again from my App, the call on "sqlrcur_sendQuery" is > blocked (no return). > 5 Turn on Oracle DB again > 6 The old call to sqlrcur_sendQuery is returned. Further queries can > all be processed. > > I activated log flag of SqlRelay (SQLRDEBUG=ON), and see following output: > > " > Connecting to listener... > Inet socket: 10.10.10.120:9000 > Authenticating with listener : bto_spp:bto_spp > Waiting for auth success/failure... > No authentication error. > Must Reconnect. > Reconnecting to > server: 10.10.10.120 > inet port: 33681 > Connected. > Authenticating with connection : bto_spp:bto_spp > Waiting for auth success/failure... > No authentication error. > Sending Query: > SELECT * FROM HSPGW_CONFIG_VIEW WHERE ZONE_ID = 1682 AND IS_ENABLED = > 1 AND TARIFF_ID = 16 > Length: 90 > Requesting a new cursor. > Sending 0 Input Bind Variables: > Sending Output Bind Variables: > Send Column Info: yes > Skipping and Fetching > Skipping 0 rows > Fetching 0 rows > " > > Is there any way to let 'sqlrcur_sendQuery' return after certain time > when the connection to DB is failed (like setting a timeout)? > Otherwise the whole APP will hang as far as the DB is offline. > > Any help will be appreciated. > > Shan > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com |
From: Z S. <sha...@ho...> - 2012-05-10 12:16:51
|
Some further information by analysis on this issue: Using debug, I find out that the" sqlrcur_endQuery" calls sqlrcursor::sendQueryInternal() from it's inside: " bool sqlrcursor::sendQueryInternal(const char *query) { // if the first 8 characters of the query are "-- debug" followed // by a return, then set debugging on if (!charstring::compare(query,"-- debug\n",9)) { sqlrc->debugOn(); } if (!endofresultset) { abortResultSet(); } clearResultSet(); if (!sqlrc->openSession()) { return false; } cached=false; endofresultset=false; if (sqlrc->debug) { sqlrc->debugPreStart(); sqlrc->debugPrint("Sending Query:"); sqlrc->debugPrint("\n"); sqlrc->debugPrint(query); ... } " Strange thing is, when I use "Step over", openSession() as whole always returns true. However, when I use "Step into", the openSession() returns false on the following Line: bool sqlrconnection::openSession() { .... if (!authenticateWithListener()) { closeConnection(); return false; } } If openSession() fails, sqlrcur_endQuery will also return but with following debug messages for error: Connecting to listener... Inet socket: 10.10.10.120:9000 Authenticating with listener : bto_spp:bto_spp Waiting for auth success/failure... Setting Error Failed to authenticate. A network error may have ocurred. My question would be, why the return value of authenticateWithListener() could be different during run and debug (with "step-into" mode)? My expectation would be that authenticateWithListener() always return false (=>openSession() return false=>sqlrcur_sendQuery() can get returned) when DB get offline so that the system would not be blocked. Shan From: sha...@ho... To: sql...@li... Subject: Blocking call when DB is offline Date: Thu, 10 May 2012 10:29:48 +0000 Hi, My application needs to talk with Oracle DB. To improve performance, I use SQLRelay as intermediate layer. Recently, I have met with following problem : 1 Both SQLRelay and Oracle DB are started 2 Send query from my App (use 'sqlrcur_sendQuery') => OK 3 Shutdown Oracle DB 4 Send query again from my App, the call on "sqlrcur_sendQuery" is blocked (no return). 5 Turn on Oracle DB again 6 The old call to sqlrcur_sendQuery is returned. Further queries can all be processed. I activated log flag of SqlRelay (SQLRDEBUG=ON), and see following output: " Connecting to listener... Inet socket: 10.10.10.120:9000 Authenticating with listener : bto_spp:bto_spp Waiting for auth success/failure... No authentication error. Must Reconnect. Reconnecting to server: 10.10.10.120 inet port: 33681 Connected. Authenticating with connection : bto_spp:bto_spp Waiting for auth success/failure... No authentication error. Sending Query: SELECT * FROM HSPGW_CONFIG_VIEW WHERE ZONE_ID = 1682 AND IS_ENABLED = 1 AND TARIFF_ID = 16 Length: 90 Requesting a new cursor. Sending 0 Input Bind Variables: Sending Output Bind Variables: Send Column Info: yes Skipping and Fetching Skipping 0 rows Fetching 0 rows " Is there any way to let 'sqlrcur_sendQuery' return after certain time when the connection to DB is failed (like setting a timeout)? Otherwise the whole APP will hang as far as the DB is offline. Any help will be appreciated. Shan |
From: Z S. <sha...@ho...> - 2012-05-10 10:29:55
|
Hi, My application needs to talk with Oracle DB. To improve performance, I use SQLRelay as intermediate layer. Recently, I have met with following problem : 1 Both SQLRelay and Oracle DB are started 2 Send query from my App (use 'sqlrcur_sendQuery') => OK 3 Shutdown Oracle DB 4 Send query again from my App, the call on "sqlrcur_sendQuery" is blocked (no return). 5 Turn on Oracle DB again 6 The old call to sqlrcur_sendQuery is returned. Further queries can all be processed. I activated log flag of SqlRelay (SQLRDEBUG=ON), and see following output: " Connecting to listener... Inet socket: 10.10.10.120:9000 Authenticating with listener : bto_spp:bto_spp Waiting for auth success/failure... No authentication error. Must Reconnect. Reconnecting to server: 10.10.10.120 inet port: 33681 Connected. Authenticating with connection : bto_spp:bto_spp Waiting for auth success/failure... No authentication error. Sending Query: SELECT * FROM HSPGW_CONFIG_VIEW WHERE ZONE_ID = 1682 AND IS_ENABLED = 1 AND TARIFF_ID = 16 Length: 90 Requesting a new cursor. Sending 0 Input Bind Variables: Sending Output Bind Variables: Send Column Info: yes Skipping and Fetching Skipping 0 rows Fetching 0 rows " Is there any way to let 'sqlrcur_sendQuery' return after certain time when the connection to DB is failed (like setting a timeout)? Otherwise the whole APP will hang as far as the DB is offline. Any help will be appreciated. Shan |
From: David M. <dav...@fi...> - 2012-05-03 03:07:29
|
Hello all, I just released Rudiments 0.36.1 with an urgent bug fix. Anyone using 0.35 or earlier should be unaffected but if you recently updated to SQL Relay 0.45 and Rudiments 0.36, please update Rudiments to version 0.36.1. Stephen Barclay discovered a but that turned out to be caused by a modification to the charstring::copy() method that I made for the 0.36 release that can easily cause a segfault in SQL Relay. Thanks for finding that bug Stephen. The code has been fixed (reverted) and the new code shouldn't cause any problems. Thanks, David Muse dav...@fi... |
From: David M. <dav...@fi...> - 2012-05-01 14:01:56
|
Stephen, I discovered the root of the problem. In the rudiments library, in the src/charstring.cpp file, around line 842, there is a method "copy" like: char *charstring::copy(char *dest, const char *source, size_t size) { return (char *)rawbuffer::copy((void *)dest,(const void *)source,size); } which should be: char *charstring::copy(char *dest, const char *source, size_t size) { return strncpy(dest,source,size); } I had changed it to get around an issue on windows but the change is not equivalent, and actually somewhat foolish. strncpy will stop when it finds a NULL terminator, but rawbuffer::copy will copy "size" bytes even if the string isn't that long, which can cause a segfault. I'm surprised that I didn't run into it during my testing. I just made that change in the last release of rudiments, which is why it just popped up now. I'll make an updated release with a fix later today but that's a quick fix. Dave dav...@fi... On 04/30/2012 02:15 PM, David Muse wrote: > Thanks for tracking that down. I'll do some tests and see if I can > come up with a solid fix. > > Dave > dav...@fi... > > On 04/30/2012 01:03 PM, Stephen barclay wrote: >> David, >> >> Sorry for the delay, I just got back from vacation.. >> >> I tracked the issue down to what appears to be a non terminated >> string... >> >> In listenercomm.cpp when the charstring::copy is called, the data >> overflows and >> corrupts the shared memory segment. >> >> >> >> >> My temp fix to get things going was to set all of my ConnectionID's >> to <= 4 bytes >> >> ie CEA, CEAS, TEST, PROD, WORK, DEMO and change the following value >> in /src/common/defines.h >> >> #define MAXCONNECTIONIDLEN *4 *(originally 1024) >> >> >> This fixed the issue and I am up and running.. >> >> Hopefully this might give you some insight into what the >> issue might be.. >> >> >> -- >> >> Respectfully, >> >> >> *Stephen Barclay* >> Partner, Telecom Engineer >> www.call-em-all.com >> Direct: 972.893.3119 >> |
From: David M. <dav...@fi...> - 2012-04-30 18:15:36
|
Thanks for tracking that down. I'll do some tests and see if I can come up with a solid fix. Dave dav...@fi... On 04/30/2012 01:03 PM, Stephen barclay wrote: > David, > > Sorry for the delay, I just got back from vacation.. > > I tracked the issue down to what appears to be a non terminated string... > > In listenercomm.cpp when the charstring::copy is called, the data > overflows and > corrupts the shared memory segment. > > > > > My temp fix to get things going was to set all of my ConnectionID's to > <= 4 bytes > > ie CEA, CEAS, TEST, PROD, WORK, DEMO and change the following value in > /src/common/defines.h > > #define MAXCONNECTIONIDLEN *4 *(originally 1024) > > > This fixed the issue and I am up and running.. > > Hopefully this might give you some insight into what the > issue might be.. > > > -- > > Respectfully, > > > *Stephen Barclay* > Partner, Telecom Engineer > www.call-em-all.com > Direct: 972.893.3119 > |
From: David M. <dav...@fi...> - 2012-04-25 05:41:02
|
Hello all, Just a reminder... If you're using SQL Relay in a production environment, please consider an Annual Support Contract: http://sqlrelay.sourceforge.net/support.html Single-Incident Contracts are available as well. I do my best to answer questions and resolve issues raised on the mailing list but customers with a contract do get priority, so sign up today! Take care, David Muse dav...@fi... |
From: David M. <dav...@fi...> - 2012-04-25 03:19:16
|
Thank you for reporting this bug. I will test your solution and if it works well then I will include it in the next release. Take care, David Muse dav...@fi... On 04/16/2012 07:10 AM, Georgy Kirichenko wrote: > Hello! > Sorry for my bad english > > I use query from sqlrelay as client. > When sqlr-listener has a error by getting connection (getAConnection in > handOffClient function), so it send error code to client, but not call > flushWriteBuffer. In this case query don't recieve a error message from listener > and wait, and listener wait disconnect message from client > (waitForClientClose). > > Small example: all connections to db will wait at db locks. A new forked > listener wait for a free connection (at waitForConnection) and has timeout > (waitForConnection return false). In this case sqlr-listener and query will > hang. > When use this code (at bool sqlrlistener::handOffClient(filedescriptor *sock)): > if (!getAConnection(&connectionpid,&inetport, > unixportstr,&unixportstrlen)) { > // fatal error occurred while getting a connection > sock->write((uint16_t)ERROR); > sock->write((uint16_t)70); > sock->write("The listener failed to hand the client off to the > database connection."); > flushWriteBuffer(sock); > retval=false; > break; > } > all works fine. > > My system: Debian Linux (3.0.2), amd64, rudiments 0.34 and sqlrelay 0.43, > Oracle as database > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com |
From: David M. <dav...@fi...> - 2012-04-25 02:20:01
|
Weird. Your configuration works fine for me. I had to change the server and db values in the connect string, but otherwise I left it the same. Any chance I could get onto your system and debug it there? Feel free to contact me directly. dav...@fi... Dave On 04/24/2012 10:00 PM, David Muse wrote: > Hi Stephen, > > Sounds like a bug. I'll do some tests using your configuration, see > what I get and let you know. > > Dave > dav...@fi... > > On 04/19/2012 06:32 PM, Stephen barclay wrote: >> David, List, >> >> We are trying to upgrade from an older installation of SQLRelay... >> >> SQLRelay 0.39.4 >> Rudiments 0.31 >> FreeTDS 0.63 >> >> to the latest version >> >> SQLRelay 0.45 >> Rudiments 0.36 >> FreeTDS 0.91 >> >> >> FreeTDS compiles and builds, can connect to the database (Microsoft >> SQL 2008) >> with no issues using their tsql utility. >> >> freetds.conf >> >> *[callemall] >> host = XXXX.XXXX.com >> port = 1433 >> tds version = 8.0 >> dump file = /tmp/freetds.log >> debug flags = 0xffff >> timeout = 45 >> connect timeout = 10 >> >> * >> _*freetds "tsql" tool...*_ >> >> *root@VM-MXTelecom:/usr/local/src/freetds-0.91/src/apps# ./tsql -S >> callemall -U XXXX -P XXXXX >> locale is "en_US.UTF-8" >> locale charset is "UTF-8" >> using default charset "UTF-8" >> 1> use callemall; >> 2> go >> 1> select count(*) from tbcdr; >> 2> go >> >> 2513548 >> (1 row affected) >> 1> select db_name(); >> 2> go >> >> callemall >> (1 row affected) >> 1> quit >> >> * >> I turn on SQL trace and IP sniffers and what happens is this... I >> start up requesting >> 5 connection to the database, SQLRelay starts, but after the startup >> script is done >> there are NO running sqlr-connection-freetds processes running. >> >> >> _*When I try to perform a Query ::*_ >> >> *SQLRShell - Version 0.22 >> Connected to: localhost:9000 as CEA-RW >> >> type help; for a help. >> >> 0> select count(*) from tbcdr; >> >> * >> It hangs indefinitely but the status changes to this... >> >> Open Server Connections: 5 >> Opened Server Connections: 5 >> >> Open Client Connections: 0 >> Opened Client Connections: 0 >> >> Open Server Cursors: 15 >> Opened Server Cursors: 20 >> >> Times New Cursor Used: 0 >> Times Cursor Reused: 0 >> >> Total Queries: 5 >> Total Errors: 0 >> >> Forked Listeners: *1 <-----* >> >> Scaler's view: >> Connections: 5 >> Sessions: *1 <----* >> >> Semaphores: >> +---------------------------------------------+ >> | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | >> +---+---+---+---+---+---+---+---+---+---+-----+ >> | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | >> +---------------------------------------------+ >> >> When I started SQLRelay the sqlr-connection-freetds *did* connect to >> the Database, >> log in and perform some queries such as "select db_name()" and "use >> callemall" etc.. >> >> I was able to see these with my SQL Server Trace and my IP Sniffer >> >> My sqlrelay.conf file: >> >> *<?xml version="1.0"?> >> <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> >> <instances> >> <instance id="CEA" >> port="9000" >> socket="/tmp/cea.socket" >> dbase="freetds" >> connections="5" >> maxconnections="10" >> maxqueuelength="0" >> growby="1" >> ttl="60" >> maxsessioncount="10" >> endofsession="commit" >> sessiontimeout="600" >> runasuser="nobody" >> runasgroup="nobody" >> cursors="3" >> authtier="listener" >> handoff="pass" >> maxquerysize="65536" >> maxstringbindvaluelength="4000" >> maxlobbindvaluelength="71680" >> idleclienttimeout="-1" >> maxlisteners="-1" >> listenertimeout="0" >> reloginatstart="no" >> timequeriessec="0" >> timequeriesusec="0" >> debug="none"> >> <users> >> <user >> user="XXXX" >> password="XXXX" >> /> >> </users> >> <connections> >> <connection >> connectionid="CEA" >> >> string="server=callemall;db=callemall;user=XXXX;password=XXXX;" >> metric="1" >> behindloadbalancer="no" >> /> >> </connections> >> </instance> >> </instances> >> * >> I compiled in debug mode and am able to step through connecting, >> creating the connection >> including the cursors, but when I reach sqlrconnection/main.cpp:82 >> >> int sqlrconnection_svr::main(int argc, const char **argv, >> sqlrconnection_svr *c) { >> >> #include <version.h> >> >> conn=c; >> >> // handle signals >> sigh=conn->handleSignals(sqlrconnection_svr::shutDown); >> >> // open the connection to the db >> bool result=false; >> if ((result=conn->initConnection(argc,argv))) { >> // wait for client connections >> *result=conn->listen(); <---- SIGSEGV* >> } >> >> // If sqlr-stop has been run, we may be here because the >> sqlr-listener >> // has been killed. In that case, we'll get a SIGINT soon, >> but we >> // want to ignore it and just let the shutdown proceed normally, >> // otherwise we could be halfway through cleanUp() below when we >> // get it, which will ultimately run cleanUp() again and >> result in >> // double-free's and a crash. If we happen to receive the SIGINT >> // before this point, then the shutdown will proceed that way. >> shutdowninprogress=1; >> >> // unsuccessful completion >> cleanUp(); >> >> // return successful or unsuccessful completion based on >> listenresult >> process::exit((result)?0:1); >> } >> >> >> I get the following error: >> >> *Program received signal SIGSEGV, Segmentation fault. >> 0xb7c0cca1 in memcpy () from /lib/i686/cmov/libc.so.6 >> * >> Any assistance would be appreciated, I have really been trying almost >> everything that I can >> think of, this is a completely clean Debian Virtual machine with the >> base packages then I added.. >> >> apt-get install gcc >> apt-get install g++ >> apt-get install make >> >> and then retrieved the packages.. >> >> cd /usr/local/src >> >> wget http://prdownloads.sourceforge.net/sqlrelay/sqlrelay-0.45.tar.gz >> wget http://prdownloads.sourceforge.net/rudiments/rudiments-0.36.tar.gz >> wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz >> >> Of course I have since added gdb and ddd to debug but I am at the end >> of my >> resources without some further input.. >> >> >> -- >> >> Respectfully, >> >> >> *Stephen Barclay* >> Partner, Telecom Engineer >> www.call-em-all.com >> Direct: 972.893.3119 >> >> >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> >> _______________________________________________________ >> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting >> http://www.doteasy.com >> >> >> _______________________________________________ >> Sqlrelay-discussion mailing list >> Sql...@li... >> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >> >> >> _______________________________________________________ >> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting >> http://www.doteasy.com > |
From: David M. <dav...@fi...> - 2012-04-25 02:03:31
|
Hi Stephen, Sounds like a bug. I'll do some tests using your configuration, see what I get and let you know. Dave dav...@fi... On 04/19/2012 06:32 PM, Stephen barclay wrote: > David, List, > > We are trying to upgrade from an older installation of SQLRelay... > > SQLRelay 0.39.4 > Rudiments 0.31 > FreeTDS 0.63 > > to the latest version > > SQLRelay 0.45 > Rudiments 0.36 > FreeTDS 0.91 > > > FreeTDS compiles and builds, can connect to the database (Microsoft > SQL 2008) > with no issues using their tsql utility. > > freetds.conf > > *[callemall] > host = XXXX.XXXX.com > port = 1433 > tds version = 8.0 > dump file = /tmp/freetds.log > debug flags = 0xffff > timeout = 45 > connect timeout = 10 > > * > _*freetds "tsql" tool...*_ > > *root@VM-MXTelecom:/usr/local/src/freetds-0.91/src/apps# ./tsql -S > callemall -U XXXX -P XXXXX > locale is "en_US.UTF-8" > locale charset is "UTF-8" > using default charset "UTF-8" > 1> use callemall; > 2> go > 1> select count(*) from tbcdr; > 2> go > > 2513548 > (1 row affected) > 1> select db_name(); > 2> go > > callemall > (1 row affected) > 1> quit > > * > I turn on SQL trace and IP sniffers and what happens is this... I > start up requesting > 5 connection to the database, SQLRelay starts, but after the startup > script is done > there are NO running sqlr-connection-freetds processes running. > > > _*When I try to perform a Query ::*_ > > *SQLRShell - Version 0.22 > Connected to: localhost:9000 as CEA-RW > > type help; for a help. > > 0> select count(*) from tbcdr; > > * > It hangs indefinitely but the status changes to this... > > Open Server Connections: 5 > Opened Server Connections: 5 > > Open Client Connections: 0 > Opened Client Connections: 0 > > Open Server Cursors: 15 > Opened Server Cursors: 20 > > Times New Cursor Used: 0 > Times Cursor Reused: 0 > > Total Queries: 5 > Total Errors: 0 > > Forked Listeners: *1 <-----* > > Scaler's view: > Connections: 5 > Sessions: *1 <----* > > Semaphores: > +---------------------------------------------+ > | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | > +---+---+---+---+---+---+---+---+---+---+-----+ > | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | > +---------------------------------------------+ > > When I started SQLRelay the sqlr-connection-freetds *did* connect to > the Database, > log in and perform some queries such as "select db_name()" and "use > callemall" etc.. > > I was able to see these with my SQL Server Trace and my IP Sniffer > > My sqlrelay.conf file: > > *<?xml version="1.0"?> > <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> > <instances> > <instance id="CEA" > port="9000" > socket="/tmp/cea.socket" > dbase="freetds" > connections="5" > maxconnections="10" > maxqueuelength="0" > growby="1" > ttl="60" > maxsessioncount="10" > endofsession="commit" > sessiontimeout="600" > runasuser="nobody" > runasgroup="nobody" > cursors="3" > authtier="listener" > handoff="pass" > maxquerysize="65536" > maxstringbindvaluelength="4000" > maxlobbindvaluelength="71680" > idleclienttimeout="-1" > maxlisteners="-1" > listenertimeout="0" > reloginatstart="no" > timequeriessec="0" > timequeriesusec="0" > debug="none"> > <users> > <user > user="XXXX" > password="XXXX" > /> > </users> > <connections> > <connection > connectionid="CEA" > > string="server=callemall;db=callemall;user=XXXX;password=XXXX;" > metric="1" > behindloadbalancer="no" > /> > </connections> > </instance> > </instances> > * > I compiled in debug mode and am able to step through connecting, > creating the connection > including the cursors, but when I reach sqlrconnection/main.cpp:82 > > int sqlrconnection_svr::main(int argc, const char **argv, > sqlrconnection_svr *c) { > > #include <version.h> > > conn=c; > > // handle signals > sigh=conn->handleSignals(sqlrconnection_svr::shutDown); > > // open the connection to the db > bool result=false; > if ((result=conn->initConnection(argc,argv))) { > // wait for client connections > *result=conn->listen(); <---- SIGSEGV* > } > > // If sqlr-stop has been run, we may be here because the > sqlr-listener > // has been killed. In that case, we'll get a SIGINT soon, but we > // want to ignore it and just let the shutdown proceed normally, > // otherwise we could be halfway through cleanUp() below when we > // get it, which will ultimately run cleanUp() again and result in > // double-free's and a crash. If we happen to receive the SIGINT > // before this point, then the shutdown will proceed that way. > shutdowninprogress=1; > > // unsuccessful completion > cleanUp(); > > // return successful or unsuccessful completion based on > listenresult > process::exit((result)?0:1); > } > > > I get the following error: > > *Program received signal SIGSEGV, Segmentation fault. > 0xb7c0cca1 in memcpy () from /lib/i686/cmov/libc.so.6 > * > Any assistance would be appreciated, I have really been trying almost > everything that I can > think of, this is a completely clean Debian Virtual machine with the > base packages then I added.. > > apt-get install gcc > apt-get install g++ > apt-get install make > > and then retrieved the packages.. > > cd /usr/local/src > > wget http://prdownloads.sourceforge.net/sqlrelay/sqlrelay-0.45.tar.gz > wget http://prdownloads.sourceforge.net/rudiments/rudiments-0.36.tar.gz > wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz > > Of course I have since added gdb and ddd to debug but I am at the end > of my > resources without some further input.. > > > -- > > Respectfully, > > > *Stephen Barclay* > Partner, Telecom Engineer > www.call-em-all.com > Direct: 972.893.3119 > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com |
From: Stephen b. <sql...@ca...> - 2012-04-19 22:32:15
|
David, List, We are trying to upgrade from an older installation of SQLRelay... SQLRelay 0.39.4 Rudiments 0.31 FreeTDS 0.63 to the latest version SQLRelay 0.45 Rudiments 0.36 FreeTDS 0.91 FreeTDS compiles and builds, can connect to the database (Microsoft SQL 2008) with no issues using their tsql utility. freetds.conf *[callemall] host = XXXX.XXXX.com port = 1433 tds version = 8.0 dump file = /tmp/freetds.log debug flags = 0xffff timeout = 45 connect timeout = 10 * _*freetds "tsql" tool...*_ *root@VM-MXTelecom:/usr/local/src/freetds-0.91/src/apps# ./tsql -S callemall -U XXXX -P XXXXX locale is "en_US.UTF-8" locale charset is "UTF-8" using default charset "UTF-8" 1> use callemall; 2> go 1> select count(*) from tbcdr; 2> go 2513548 (1 row affected) 1> select db_name(); 2> go callemall (1 row affected) 1> quit * I turn on SQL trace and IP sniffers and what happens is this... I start up requesting 5 connection to the database, SQLRelay starts, but after the startup script is done there are NO running sqlr-connection-freetds processes running. _*When I try to perform a Query ::*_ *SQLRShell - Version 0.22 Connected to: localhost:9000 as CEA-RW type help; for a help. 0> select count(*) from tbcdr; * It hangs indefinitely but the status changes to this... Open Server Connections: 5 Opened Server Connections: 5 Open Client Connections: 0 Opened Client Connections: 0 Open Server Cursors: 15 Opened Server Cursors: 20 Times New Cursor Used: 0 Times Cursor Reused: 0 Total Queries: 5 Total Errors: 0 Forked Listeners: *1 <-----* Scaler's view: Connections: 5 Sessions: *1 <----* Semaphores: +---------------------------------------------+ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | +---+---+---+---+---+---+---+---+---+---+-----+ | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | +---------------------------------------------+ When I started SQLRelay the sqlr-connection-freetds *did* connect to the Database, log in and perform some queries such as "select db_name()" and "use callemall" etc.. I was able to see these with my SQL Server Trace and my IP Sniffer My sqlrelay.conf file: *<?xml version="1.0"?> <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> <instances> <instance id="CEA" port="9000" socket="/tmp/cea.socket" dbase="freetds" connections="5" maxconnections="10" maxqueuelength="0" growby="1" ttl="60" maxsessioncount="10" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="3" authtier="listener" handoff="pass" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no" timequeriessec="0" timequeriesusec="0" debug="none"> <users> <user user="XXXX" password="XXXX" /> </users> <connections> <connection connectionid="CEA" string="server=callemall;db=callemall;user=XXXX;password=XXXX;" metric="1" behindloadbalancer="no" /> </connections> </instance> </instances> * I compiled in debug mode and am able to step through connecting, creating the connection including the cursors, but when I reach sqlrconnection/main.cpp:82 int sqlrconnection_svr::main(int argc, const char **argv, sqlrconnection_svr *c) { #include <version.h> conn=c; // handle signals sigh=conn->handleSignals(sqlrconnection_svr::shutDown); // open the connection to the db bool result=false; if ((result=conn->initConnection(argc,argv))) { // wait for client connections *result=conn->listen(); <---- SIGSEGV* } // If sqlr-stop has been run, we may be here because the sqlr-listener // has been killed. In that case, we'll get a SIGINT soon, but we // want to ignore it and just let the shutdown proceed normally, // otherwise we could be halfway through cleanUp() below when we // get it, which will ultimately run cleanUp() again and result in // double-free's and a crash. If we happen to receive the SIGINT // before this point, then the shutdown will proceed that way. shutdowninprogress=1; // unsuccessful completion cleanUp(); // return successful or unsuccessful completion based on listenresult process::exit((result)?0:1); } I get the following error: *Program received signal SIGSEGV, Segmentation fault. 0xb7c0cca1 in memcpy () from /lib/i686/cmov/libc.so.6 * Any assistance would be appreciated, I have really been trying almost everything that I can think of, this is a completely clean Debian Virtual machine with the base packages then I added.. apt-get install gcc apt-get install g++ apt-get install make and then retrieved the packages.. cd /usr/local/src wget http://prdownloads.sourceforge.net/sqlrelay/sqlrelay-0.45.tar.gz wget http://prdownloads.sourceforge.net/rudiments/rudiments-0.36.tar.gz wget http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz Of course I have since added gdb and ddd to debug but I am at the end of my resources without some further input.. -- Respectfully, *Stephen Barclay* Partner, Telecom Engineer www.call-em-all.com Direct: 972.893.3119 |
From: Georgy K. <ge...@st...> - 2012-04-16 11:12:10
|
Hello! Sorry for my bad english I use query from sqlrelay as client. When sqlr-listener has a error by getting connection (getAConnection in handOffClient function), so it send error code to client, but not call flushWriteBuffer. In this case query don't recieve a error message from listener and wait, and listener wait disconnect message from client (waitForClientClose). Small example: all connections to db will wait at db locks. A new forked listener wait for a free connection (at waitForConnection) and has timeout (waitForConnection return false). In this case sqlr-listener and query will hang. When use this code (at bool sqlrlistener::handOffClient(filedescriptor *sock)): if (!getAConnection(&connectionpid,&inetport, unixportstr,&unixportstrlen)) { // fatal error occurred while getting a connection sock->write((uint16_t)ERROR); sock->write((uint16_t)70); sock->write("The listener failed to hand the client off to the database connection."); flushWriteBuffer(sock); retval=false; break; } all works fine. My system: Debian Linux (3.0.2), amd64, rudiments 0.34 and sqlrelay 0.43, Oracle as database |
From: David M. <dav...@fi...> - 2012-04-10 22:04:14
|
Hello all, SQL Relay 0.45 is now available. This release has the following new features: * support for getting the native database error number * support for mapping native error numbers to MySQL error numbers for the mysql drop-in replacement library * MSVC projects for sqlrclient, sqlrclientwrapper, sqlrutil and sqlrsh (all work natively on windows now) * added autocommit on/off to sqlrsh In addition, the following things have been fixed or updated: * ttl="0" works as expected * dynamic scaling of cursors works as expected now * fixed a few mdbtools errors * column aliases work as expected now with firebird * fixed a bug where if an app either enabled or disabled autocommit, that could become the default status of autocommit rather than what was set in the config file * fixed a bind-var-related memory leak in mysql drop-in lib * fixed return values in mysql drop-in lib * updated getTableList() to exclude system tables * applied Benno Lange's localstatedir patch to fix a case where the localstatedir command line parameter wasn't working properly * applied Renat's listener alarm handling patch to avoid race conditions and other issues with the listenertimeout feature Enjoy! David Muse dav...@fi... |
From: David M. <dav...@fi...> - 2012-04-10 03:51:38
|
I haven't tried it myself but it should be possible to use SQL Relay with the TimesTen database using ODBC, assuming that there is an ODBC driver available for the platform you are using SQL Relay on. First you need to set up a DSN in the odbc.ini file. If you can connect to the database using isql, then you can configure an instance in the sqlrelay.conf file as follows: <instance ... dbase="odbc" ...> .... <connections> <connection ... string="dsn=MYTIMESTENDSN" .../> </connections> </instance> Dave dav...@fi... On 03/31/2012 11:52 AM, zhu shi song wrote: > Does sqlrelay support timesten in-memory database? > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > > > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com |
From: zhu s. s. <zhu...@ya...> - 2012-03-31 15:52:46
|
Does sqlrelay support timesten in-memory database? |
From: <jan...@id...> - 2012-03-09 18:41:28
|
________________________________________ Von: David Muse [dav...@fi...] Gesendet: Freitag, 9. März 2012 18:27 An: Discussion of topics related to SQL Relay Betreff: Re: [Sqlrelay-discussion] r/w splitting configuration question Could you send me your sqlrelay.conf file? Dave ok Dave this is the one I use : $ cat /opt/sqlrelay-0.44/etc/sqlrelay.conf <?xml version="1.0"?> <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> <instances> <!-- Master --> <instance id="master" port="9000" socket="/tmp/master.socke" dbase="mysql" connections="1" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" maxsessioncount="1000" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" deniedips="" allowedips="" debug="none" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no" timequeriessec="-1" timequeriesusec="-1" fakeinputbindvariables="no" translatebindvariables="no" isolationlevel="read committed" ignoreselectdatabase="no"> <connections> <connection connectionid="db1" string="user=root;password=;db=ilias;host=192.168.122.152;port=3306;" metric="1" behindloadbalancer="no"/> </connections> </instance> <!-- Slave --> <instance id="slave" port="9001" socket="/tmp/slave.socke" dbase="mysql" connections="1" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" maxsessioncount="1000" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" deniedips="" allowedips="" debug="connection" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no" timequeriessec="-1" timequeriesusec="-1" fakeinputbindvariables="no" translatebindvariables="no" isolationlevel="read committed" ignoreselectdatabase="no"> <connections> <connection connectionid="db1" string="user=root;password=;db=ilias;host=192.168.122.153;port=3306;" metric="1" behindloadbalancer="no"/> </connections> </instance> <!-- Query Router/Filter --> <instance id="test" port="9002" socket="/tmp/router.socke" dbase="router" connections="1" maxconnections="15" maxqueuelength="5" growby="1" ttl="60" maxsessioncount="1000" endofsession="commit" sessiontimeout="600" runasuser="nobody" runasgroup="nobody" cursors="5" authtier="listener" handoff="pass" deniedips="" allowedips="" debug="listener_and_connection_and_sqltranslation" maxquerysize="65536" maxstringbindvaluelength="4000" maxlobbindvaluelength="71680" idleclienttimeout="-1" maxlisteners="-1" listenertimeout="0" reloginatstart="no"> <router> <!-- send all queries to master --> <route host="" port="9000" socket="/tmp/master.socke"> <query pattern="^\s*update\s+.*"/> <query pattern="^\s*delete\s+from\s+.*"/> <query pattern="^\s*drop\s+table\s+.*"/> <query pattern="^\s*create\s+table\s+.*"/> </route> <!-- filter out any queries for table2 --> <!-- <filter> <query pattern="^\s*select\s+.*\s+from\s+table2"/> <query pattern="^\s*insert\s+into\s+table2"/> <query pattern="^\s*update\s+table2"/> <query pattern="^\s*delete\s+from\s+table2"/> <query pattern="^\s*drop\s+table\s+table2"/> <query pattern="^\s*create\s+table\s+table2"/> </filter> --> <!-- send any other queries to slave --> <route host="" port="9001" socket="/tmp/slave.socke"> <!-- <query pattern="^\s*select\s+.*\s+from\s+.*"> --> <query pattern=".*"/> </route> </router> </instance> </instances> |
From: David M. <dav...@fi...> - 2012-03-09 17:29:45
|
Could you send me your sqlrelay.conf file? Dave On 03/09/2012 05:42 AM, jan...@id... wrote: > thanks David for your fix. This solved the problem ! Very cool. > Unfortunately I can't use the router instance 'test'. > > # query -config /opt/sqlrelay-0.44/etc/sqlrelay.conf -id test "select * from ut_online;" > > (If using 'master' or 'slave' instance query works.) > > The connections are as follows : > > # lsof -ni4 |grep sql > sqlr-list 12967 nobody 6u IPv4 116943 0t0 TCP *:9000 (LISTEN) > sqlr-conn 12986 nobody 3u IPv4 116940 0t0 TCP 192.168.122.13:34141->192.168.122.152:mysql (ESTABLISHED) > sqlr-list 13081 nobody 6u IPv4 117139 0t0 TCP *:9001 (LISTEN) > sqlr-conn 13096 nobody 4u IPv4 117114 0t0 TCP 192.168.122.13:33377->192.168.122.153:mysql (ESTABLISHED) > sqlr-list 23694 nobody 7u IPv4 127196 0t0 TCP *:9002 (LISTEN) > > > 192.168.122.13 > ---------------------- > port 9000 'master' instance > port 9001 'slave' instance > port 9002 'test' instance (router) > > 192.168.122.152 MySQL master > 192.168.122.153 MySQL slave > > Furthermore I can't use neither > > $ mysql -h 192.168.122.13 -P 9000 -p -e "select * from ut_online;" > Enter password: > > nor -P 9001 > > (output is missing) > > > MySQL client version is : > > $ mysql --version > mysql Ver 14.14 Distrib 5.1.58, for debian-linux-gnu (x86_64) using readline 6.2 > > > Could you please point me to the right direction. > > kind regards, > > --- > > Jan > > > ________________________________________ > Von: David Muse [dav...@fi...] > Gesendet: Freitag, 9. März 2012 03:40 > An: Discussion of topics related to SQL Relay > Betreff: Re: [Sqlrelay-discussion] r/w splitting configuration question > > Hi Jan, > > It looks like I introduced a bug in the last release. Here is a quick fix: > > Edit src/util/sqlrconfigfile.cpp and look for the following code, near > line 558: > > // Filter section, nested (runquery*) > case FILTER_TAG: > currentname="filter"; > if (!charstring::compare(name,"runquery")) { > thistag=RUNQUERY_TAG; > } else { > ok=false; > } > break; > > // Filter section, nested (runquery*) > case ROUTE_TAG: > currentname="route"; > if (!charstring::compare(name,"runquery")) { > thistag=RUNQUERY_TAG; > } else { > ok=false; > } > break; > > Change instances of "runquery" to "query" and RUNQUERY_TAG to QUERY_TAG, > as follows: > > // Filter section, nested (query*) > case FILTER_TAG: > currentname="filter"; > if (!charstring::compare(name,"query")) { > thistag=QUERY_TAG; > } else { > ok=false; > } > break; > > // Filter section, nested (query*) > case ROUTE_TAG: > currentname="route"; > if (!charstring::compare(name,"query")) { > thistag=QUERY_TAG; > } else { > ok=false; > } > break; > > I guess I got a little too aggressive with search and replace. With > those modifications, it should work as expected. > > Sorry for the confusion. > > David Muse > dav...@fi... > ------------------------------------------------------------------------------ > Virtualization& Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com |
From: <jan...@id...> - 2012-03-09 10:43:02
|
thanks David for your fix. This solved the problem ! Very cool. Unfortunately I can't use the router instance 'test'. # query -config /opt/sqlrelay-0.44/etc/sqlrelay.conf -id test "select * from ut_online;" (If using 'master' or 'slave' instance query works.) The connections are as follows : # lsof -ni4 |grep sql sqlr-list 12967 nobody 6u IPv4 116943 0t0 TCP *:9000 (LISTEN) sqlr-conn 12986 nobody 3u IPv4 116940 0t0 TCP 192.168.122.13:34141->192.168.122.152:mysql (ESTABLISHED) sqlr-list 13081 nobody 6u IPv4 117139 0t0 TCP *:9001 (LISTEN) sqlr-conn 13096 nobody 4u IPv4 117114 0t0 TCP 192.168.122.13:33377->192.168.122.153:mysql (ESTABLISHED) sqlr-list 23694 nobody 7u IPv4 127196 0t0 TCP *:9002 (LISTEN) 192.168.122.13 ---------------------- port 9000 'master' instance port 9001 'slave' instance port 9002 'test' instance (router) 192.168.122.152 MySQL master 192.168.122.153 MySQL slave Furthermore I can't use neither $ mysql -h 192.168.122.13 -P 9000 -p -e "select * from ut_online;" Enter password: nor -P 9001 (output is missing) MySQL client version is : $ mysql --version mysql Ver 14.14 Distrib 5.1.58, for debian-linux-gnu (x86_64) using readline 6.2 Could you please point me to the right direction. kind regards, --- Jan ________________________________________ Von: David Muse [dav...@fi...] Gesendet: Freitag, 9. März 2012 03:40 An: Discussion of topics related to SQL Relay Betreff: Re: [Sqlrelay-discussion] r/w splitting configuration question Hi Jan, It looks like I introduced a bug in the last release. Here is a quick fix: Edit src/util/sqlrconfigfile.cpp and look for the following code, near line 558: // Filter section, nested (runquery*) case FILTER_TAG: currentname="filter"; if (!charstring::compare(name,"runquery")) { thistag=RUNQUERY_TAG; } else { ok=false; } break; // Filter section, nested (runquery*) case ROUTE_TAG: currentname="route"; if (!charstring::compare(name,"runquery")) { thistag=RUNQUERY_TAG; } else { ok=false; } break; Change instances of "runquery" to "query" and RUNQUERY_TAG to QUERY_TAG, as follows: // Filter section, nested (query*) case FILTER_TAG: currentname="filter"; if (!charstring::compare(name,"query")) { thistag=QUERY_TAG; } else { ok=false; } break; // Filter section, nested (query*) case ROUTE_TAG: currentname="route"; if (!charstring::compare(name,"query")) { thistag=QUERY_TAG; } else { ok=false; } break; I guess I got a little too aggressive with search and replace. With those modifications, it should work as expected. Sorry for the confusion. David Muse dav...@fi... |