sqlrelay-discussion Mailing List for SQL Relay (Page 35)
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: Rob T. <rt...@li...> - 2007-04-05 00:07:08
|
David, It didn't hang again until late this afternoon. Before doing anything else, I did a 'ps' and there were three sqlr-connection-mysql processes running, which is consistent with sqlrelay.conf. After a restart, there were again three processes, so that's normal. The one difference I noticed was that there were two listeners running before the restart and one afterwards. Is that normal? I turned on debug and I'll see if we can break it in testing tomorrow. Thanks for your help so far. -- Rob David Muse said the following on 04/03/2007 06:40 PM: > Sounds like the sqlrelay server-side components are crashing or hanging. > Whenever it hangs up, take a look and see if any sqlr-connection-mysql > processes are running. If not, then they may have crashed. If so, then > they may have hung. You can turn on debug in the sqlrelay.conf file and > take a look at the logs. > > Recently, I updated SQL Relay to use the mysql statement API rather than > the standard mysql API. There could be a bug with that. > > The debug logs would be really helpful in figuring out what's going on. > > Dave > dav...@fi... > > On Tue, 2007-04-03 at 10:07 -0700, Rob Tanner wrote: > >> I'm afraid that I'm definitely a newbie using sqlrelay, so I'm not sure >> what information to provide. >> >> I built and installed sqlrelay on a RedHat AS3 system running apache, >> php and perl. The database I want to provide connection pooling for is >> a mysql database running on a different machine. I can start sqlrelay >> using the linux service command (service sqlrelay start) and all is well >> for a while. Database accesses work both in php and perl. Then >> suddenly (and I don't know what causes the "suddenly"), both php and >> perl apps hang while trying to retrieve data from the database. >> Sqlrelay has not stopped running and so I do a restart (service sqlrelay >> restart), and everything is working again. >> >> Any ideas how to figure out the cause of the hanging on the database >> access? This is the connection string from the sqlrelay.conf file: >> >> <connections> >> <connection connectionid="db1" >> string="user=dbuser;password=secret;db=webapps;host=dbhost.linfield.edu;port=3306;fakebinds=no;" >> metric="1" behindloadbalancer="1"/> >> </connections> >> >> Thanks, >> Rob >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >> > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: David M. <dav...@fi...> - 2007-04-04 01:40:22
|
Sounds like the sqlrelay server-side components are crashing or hanging. Whenever it hangs up, take a look and see if any sqlr-connection-mysql processes are running. If not, then they may have crashed. If so, then they may have hung. You can turn on debug in the sqlrelay.conf file and take a look at the logs. Recently, I updated SQL Relay to use the mysql statement API rather than the standard mysql API. There could be a bug with that. The debug logs would be really helpful in figuring out what's going on. Dave dav...@fi... On Tue, 2007-04-03 at 10:07 -0700, Rob Tanner wrote: > I'm afraid that I'm definitely a newbie using sqlrelay, so I'm not sure > what information to provide. > > I built and installed sqlrelay on a RedHat AS3 system running apache, > php and perl. The database I want to provide connection pooling for is > a mysql database running on a different machine. I can start sqlrelay > using the linux service command (service sqlrelay start) and all is well > for a while. Database accesses work both in php and perl. Then > suddenly (and I don't know what causes the "suddenly"), both php and > perl apps hang while trying to retrieve data from the database. > Sqlrelay has not stopped running and so I do a restart (service sqlrelay > restart), and everything is working again. > > Any ideas how to figure out the cause of the hanging on the database > access? This is the connection string from the sqlrelay.conf file: > > <connections> > <connection connectionid="db1" > string="user=dbuser;password=secret;db=webapps;host=dbhost.linfield.edu;port=3306;fakebinds=no;" > metric="1" behindloadbalancer="1"/> > </connections> > > Thanks, > Rob > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
|
From: Rob T. <rt...@li...> - 2007-04-03 17:07:29
|
I'm afraid that I'm definitely a newbie using sqlrelay, so I'm not sure
what information to provide.
I built and installed sqlrelay on a RedHat AS3 system running apache,
php and perl. The database I want to provide connection pooling for is
a mysql database running on a different machine. I can start sqlrelay
using the linux service command (service sqlrelay start) and all is well
for a while. Database accesses work both in php and perl. Then
suddenly (and I don't know what causes the "suddenly"), both php and
perl apps hang while trying to retrieve data from the database.
Sqlrelay has not stopped running and so I do a restart (service sqlrelay
restart), and everything is working again.
Any ideas how to figure out the cause of the hanging on the database
access? This is the connection string from the sqlrelay.conf file:
<connections>
<connection connectionid="db1"
string="user=dbuser;password=secret;db=webapps;host=dbhost.linfield.edu;port=3306;fakebinds=no;"
metric="1" behindloadbalancer="1"/>
</connections>
Thanks,
Rob
--
Rob Tanner
UNIX Services Manager
Linfield College, McMinnville OR
|
|
From: David M. <dav...@fi...> - 2007-03-22 15:12:56
|
I wonder if this is a mysql bug?
If the line:
if ((queryresult=mysql_stmt_execute(stmt))) {
is where it's crashing, the only possibility is that mysql_stmt_execute
is crashing. Aside from a bug insidy mysql_stmt_execute, the only thing
that could cause a crash is if "stmt" is messed up somehow.
I'll take a look at the code that initializes stmt. It's possible that
I'm doing something wrong there.
Dave
dav...@fi...
On Mon, 2007-03-19 at 18:11 -0500, Chris Coyle wrote:
> I've run into a some situations where complex queries in a certain
> sequence cause the connection handler to segfault which results in a
> cursor error from the listener.
>
> Mysql Version: mysql-5.0.x-max
> SQLRelay Version: 0.38 - 0.39 (from cvs) (++ autoreconnect patch)
> Pertinent mysql settings: "wait_timeout = 10"
>
> sql to generate table schema from mysqldump (sans comments):
> DROP TABLE IF EXISTS `sqlrelay`;
> CREATE TABLE `sqlrelay` (
> `var1` varchar(25) default NULL,
> `var2` varchar(25) default NULL,
> `var3` varchar(25) default NULL,
> `var4` varchar(25) default NULL
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
> LOCK TABLES `sqlrelay` WRITE;
> INSERT INTO `sqlrelay` VALUES
> ('one','two','three','four'),('one','two','three','four'),('one','two','three','four');
> UNLOCK TABLES;
>
> testsql.sql
> ----
> SELECT var1, var2, var3, COALESCE(var4,'whatever') as var4 FROM
> test_sqlrelay.sqlrelay ORDER BY var1 ASC LIMIT 0,70;
> select count(*) as numResults from test_sqlrelay.sqlrelay limit 10;
>
> testsql.sh
> ----
> #!/bin/sh
> for I in `seq 10`; do
> /usr/local/sqlrelay/bin/sqlrsh -id <mysql> testsql.sql
> echo -e "[ $I ]\n"
> sleep 10
> done
>
> Running this script with that sql on a freshly started sqlrelay
> instance (it seems to vary otherwise) will result in a segfault and
> cursor error on the second pass.
>
> In gdb I was able to track it down to:
> -- mysqlconnection.C:437 --
> if ((queryresult=mysql_stmt_execute(stmt))) {
>
> Now here's where it gets weird. If you do reverse the statements in
> testsql.sql (do the select count() first) then this error does NOT
> occur.
>
> There are other examples where I've found this behavior, but they're
> far more sporadic.
>
> I'll continue to try to track this further on my end, but if you need
> any further details, please let me know.
>
> Thanks for your time,
>
> - Chris
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
|
|
From: Chris C. <cc...@gm...> - 2007-03-19 23:11:36
|
I've run into a some situations where complex queries in a certain
sequence cause the connection handler to segfault which results in a
cursor error from the listener.
Mysql Version: mysql-5.0.x-max
SQLRelay Version: 0.38 - 0.39 (from cvs) (++ autoreconnect patch)
Pertinent mysql settings: "wait_timeout = 10"
sql to generate table schema from mysqldump (sans comments):
DROP TABLE IF EXISTS `sqlrelay`;
CREATE TABLE `sqlrelay` (
`var1` varchar(25) default NULL,
`var2` varchar(25) default NULL,
`var3` varchar(25) default NULL,
`var4` varchar(25) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
LOCK TABLES `sqlrelay` WRITE;
INSERT INTO `sqlrelay` VALUES
('one','two','three','four'),('one','two','three','four'),('one','two','three','four');
UNLOCK TABLES;
testsql.sql
----
SELECT var1, var2, var3, COALESCE(var4,'whatever') as var4 FROM
test_sqlrelay.sqlrelay ORDER BY var1 ASC LIMIT 0,70;
select count(*) as numResults from test_sqlrelay.sqlrelay limit 10;
testsql.sh
----
#!/bin/sh
for I in `seq 10`; do
/usr/local/sqlrelay/bin/sqlrsh -id <mysql> testsql.sql
echo -e "[ $I ]\n"
sleep 10
done
Running this script with that sql on a freshly started sqlrelay
instance (it seems to vary otherwise) will result in a segfault and
cursor error on the second pass.
In gdb I was able to track it down to:
-- mysqlconnection.C:437 --
if ((queryresult=mysql_stmt_execute(stmt))) {
Now here's where it gets weird. If you do reverse the statements in
testsql.sql (do the select count() first) then this error does NOT
occur.
There are other examples where I've found this behavior, but they're
far more sporadic.
I'll continue to try to track this further on my end, but if you need
any further details, please let me know.
Thanks for your time,
- Chris
|
|
From: David M. <dav...@fi...> - 2007-03-05 17:16:51
|
Those messages mean that SQL Relay was unable to connect to the server. Specifically, that there was a timeout while trying to connect. It's possible that the TNS listener is not running on the db server, that the port (or some other parameter) is incorrect in the tnsnames.ora file, or that sqlrelay is configured to use the wrong SID. Dave dav...@fi... On Fri, 2007-03-02 at 17:33 +0900, 송 태환 wrote: > hello. > i execute sqlr-relay > > #sqlr-relay -id testOR > ------------------------------------------------------- > Starting listener: > sqlr-listener -id testOR -config /usr/local/firstworks/etc/sqlrelay.conf > > Starting 5 connections to testOR : > sqlr-connection-oracle8 -id testOR -connectionid testOR -config > /usr/local/firstworks/etc/sqlrelay.conf > OCIServerAttach() failed. > > ORA-12535: TNS:operation timed out > sqlr-connection-oracle8 failed to start. > > > Thanks to MP3.com for sponsoring: > Clustered/Replicated database support. > Perl API. > -------------------------------------- > what mean is "OCIServerATtach() failed" ?? > what mean is "ORA-12535: TNS:operation timed out" ?? > > help please, > > _________________________________________________________________ > 특별한 누군가를 찾고 싶다면 MSN 친구사귀기! > http://match.kr.msn.com/channel/index.aspx?trackingid=1002127 > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
|
From: <th...@ho...> - 2007-03-02 08:34:00
|
hello. i execute sqlr-relay #sqlr-relay -id testOR ------------------------------------------------------- Starting listener: sqlr-listener -id testOR -config /usr/local/firstworks/etc/sqlrelay.conf Starting 5 connections to testOR : sqlr-connection-oracle8 -id testOR -connectionid testOR -config /usr/local/firstworks/etc/sqlrelay.conf OCIServerAttach() failed. ORA-12535: TNS:operation timed out sqlr-connection-oracle8 failed to start. Thanks to MP3.com for sponsoring: Clustered/Replicated database support. Perl API. -------------------------------------- what mean is "OCIServerATtach() failed" ?? what mean is "ORA-12535: TNS:operation timed out" ?? help please, _________________________________________________________________ 특별한 누군가를 찾고 싶다면 MSN 친구사귀기! http://match.kr.msn.com/channel/index.aspx?trackingid=1002127 |
|
From: Victor <vi...@vs...> - 2007-03-01 15:00:17
|
Hello!
I have a problem with perl SQLRelay API.
I want to sub-class SQLRelay classes to add few methods for myself.
like
package MySQLRelayCursor;
use base SQLRelay::Cursor;
i want to add few fields as well
sub new {
my ($class, $con)=@_;
return undef unless defined $con;
my $self=SQLRelay::Cursor->new($con);
$self->getNullsAsUndefined(); # it is a real mess when you see mysql nulls as empty strings
$self->{MyField1} = 1; # new field!
$self->{MyField2} = 2; # new field!
bless $self, $class;
return $self;
}
and i am getting error
Not a HASH reference at /path/to/file ...
I think this means that you have no line like
my $self = {}; # ref to empty hash
in SQLRelay::Cursor::new or XS analog
Am I wrong ?
Maybe i just have some error in connections and in normal situation it returns hash ref ?
What is the best way to inherit SQLRelay::Cursor ? Maybe better make it aggregated object ?
What is the best practice for this ?
--
BR/Victor mailto:vi...@vs...
|
|
From: David M. <dav...@fi...> - 2007-02-28 20:24:55
|
Yes, I'm definitely interested. Let me know what you get working, even if it's just using unix2tcp. Dave On Wed, 2007-02-28 at 18:42 +0200, Max Korzhanoff wrote: > Thanks for help, David! I was concerning sqlrelay first because one my > friend solved similar problem with sqlrelay 2-3 years befbore. Btw I > configured sqlrelay the same way you suggested (sqlrsh was fine, but > php required recompilation). I'm currently testing unix2tcp program > that simply proxy local socket connection to remote TCP port. Seems > that php scripts works now without php recompilation. If you are > interested I can report you after I'll test Tomcat. > -- > Kind regards, > Max Korzhanoff (CEO) > GARM Technologies (www.garmtech.lv) > Riga, Latvia > Phone: +371-26402104 > > David Muse wrote: > > This is actually quite complicated, and there are caveats, but it may be > > possible :) > > > > First, you need to set up SQL Relay on the local host, listening > > on /var/lib/mysql/mysql.sock and talking to the database at sql:3306 and > > using authtier="database" and a dummy user/password. > > > > sqlrelay.conf: > > > > ... > > <instances> > > <instance ... socket="/var/lib/mysql/mysql.sock" ... > > authtier="database" ...> > > <users> > > <user user="dummy" password="dummy"/> > > </users> > > <connections> > > <connection connectionid="db" > > string="user=...;password=...;db=...;host=sql;port=3306" metric="1"/> > > </connections> > > </instance> > > </instances> > > > > Verify that works by using sqlrsh to run test queries. > > > > Next, you'll have to use the drop-in replacement library for MySQL on > > the webserver. See: > > http://sqlrelay.sourceforge.net/sqlrelay/dropin/mysql.html > > for details. > > > > Basically, you need to edit the init script that starts apache and make > > sure that the library is LD_PRELOAD'ed right before apache starts up. > > Similar for Tomcat. > > > > I've never used it with Tomcat before, so I'm not certain that it'll > > work, but you can see if the library is loaded or not by getting the > > process id of the running tomcat process and grepping for sqlr > > in /proc/<pid>/maps. You should see libmysql3sqlrelay or > > libmysql40sqlrelay or libmysql41sqlrelay or libmysql5sqlrelay, depending > > on which you loaded. You can check apache the same way. > > > > There are a few caveats to all of this: > > > > PHP is often built with the code for MySQL compiled directly into the > > PHP library itself. So when PHP needs to talk to MySQL it doesn't load > > the mysql client library, it just uses it's own built-in functions. If > > your PHP was built that way then the drop-in replacement library won't > > work. You'll need to rebuild and reinstall PHP so that it uses the > > MySQL library rather than built-in code. > > > > On the Tomcat side, the JDBC driver for MySQL may be pure java and may > > not use the mysql client library either. Or, it may be JNI and compiled > > against the MySQL code just like PHP. Again, if the JDBC driver doesn't > > use libmysqlclient, then the drop-in library won't work. You'll have to > > find a JDBC driver that does use libmysqlclient and use it. > > > > Also, the drop-in library doesn't support every mysql function. So, > > it's possible that your app may try to use a function that isn't > > supported. Most functions are supported and I haven't run into an app > > that doesn't work yet, but your mileage may vary. > > > > > > If you're socket-savvy, I'd think it would be simpler and more reliable > > to write proxy program that listens on the socket and whenever it get's > > a connection, it forks off a child which connects to mysql and ferries > > data back and forth. There may be programs out there that do it > > already. You may actually be able to do it with stunnel or something > > like that. > > > > Dave > > dav...@fi... > > > > On Wed, 2007-02-21 at 00:01 +0200, Max Korzhanoff wrote: > > > > > Dear Community, > > > > > > I would like to setup "redirect" for mysql requests from local socket > > > (/var/lib/mysql/mysql.sock) to remote mysql server (sql:3306) with > > > authentication on remote server. It's for PHP(Apache) and Java(Tomcat) > > > applications that used local mysql server and now we moved mysql to > > > dedicated box. We can't touch applications and change hostname or > > > something like that. What would be best method and configuration to do > > > this? If it's possible please provide example. > > > > > > Thank you forward! > > > > > > ------------------------------------------------------------------------- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > > opinions on IT & business topics through brief surveys-and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys-and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Sqlrelay-discussion mailing list > > Sql...@li... > > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
|
From: Max K. <mk...@ga...> - 2007-02-28 16:42:58
|
Thanks for help, David! I was concerning sqlrelay first because one my friend solved similar problem with sqlrelay 2-3 years befbore. Btw I configured sqlrelay the same way you suggested (sqlrsh was fine, but php required recompilation). I'm currently testing unix2tcp program that simply proxy local socket connection to remote TCP port. Seems that php scripts works now without php recompilation. If you are interested I can report you after I'll test Tomcat. -- Kind regards, Max Korzhanoff (CEO) GARM Technologies (www.garmtech.lv) Riga, Latvia Phone: +371-26402104 David Muse wrote: > This is actually quite complicated, and there are caveats, but it may be > possible :) > > First, you need to set up SQL Relay on the local host, listening > on /var/lib/mysql/mysql.sock and talking to the database at sql:3306 and > using authtier="database" and a dummy user/password. > > sqlrelay.conf: > > ... > <instances> > <instance ... socket="/var/lib/mysql/mysql.sock" ... > authtier="database" ...> > <users> > <user user="dummy" password="dummy"/> > </users> > <connections> > <connection connectionid="db" > string="user=...;password=...;db=...;host=sql;port=3306" metric="1"/> > </connections> > </instance> > </instances> > > Verify that works by using sqlrsh to run test queries. > > Next, you'll have to use the drop-in replacement library for MySQL on > the webserver. See: > http://sqlrelay.sourceforge.net/sqlrelay/dropin/mysql.html > for details. > > Basically, you need to edit the init script that starts apache and make > sure that the library is LD_PRELOAD'ed right before apache starts up. > Similar for Tomcat. > > I've never used it with Tomcat before, so I'm not certain that it'll > work, but you can see if the library is loaded or not by getting the > process id of the running tomcat process and grepping for sqlr > in /proc/<pid>/maps. You should see libmysql3sqlrelay or > libmysql40sqlrelay or libmysql41sqlrelay or libmysql5sqlrelay, depending > on which you loaded. You can check apache the same way. > > There are a few caveats to all of this: > > PHP is often built with the code for MySQL compiled directly into the > PHP library itself. So when PHP needs to talk to MySQL it doesn't load > the mysql client library, it just uses it's own built-in functions. If > your PHP was built that way then the drop-in replacement library won't > work. You'll need to rebuild and reinstall PHP so that it uses the > MySQL library rather than built-in code. > > On the Tomcat side, the JDBC driver for MySQL may be pure java and may > not use the mysql client library either. Or, it may be JNI and compiled > against the MySQL code just like PHP. Again, if the JDBC driver doesn't > use libmysqlclient, then the drop-in library won't work. You'll have to > find a JDBC driver that does use libmysqlclient and use it. > > Also, the drop-in library doesn't support every mysql function. So, > it's possible that your app may try to use a function that isn't > supported. Most functions are supported and I haven't run into an app > that doesn't work yet, but your mileage may vary. > > > If you're socket-savvy, I'd think it would be simpler and more reliable > to write proxy program that listens on the socket and whenever it get's > a connection, it forks off a child which connects to mysql and ferries > data back and forth. There may be programs out there that do it > already. You may actually be able to do it with stunnel or something > like that. > > Dave > dav...@fi... > > On Wed, 2007-02-21 at 00:01 +0200, Max Korzhanoff wrote: > >> Dear Community, >> >> I would like to setup "redirect" for mysql requests from local socket >> (/var/lib/mysql/mysql.sock) to remote mysql server (sql:3306) with >> authentication on remote server. It's for PHP(Apache) and Java(Tomcat) >> applications that used local mysql server and now we moved mysql to >> dedicated box. We can't touch applications and change hostname or >> something like that. What would be best method and configuration to do >> this? If it's possible please provide example. >> >> Thank you forward! >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion >> > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: David M. <dav...@fi...> - 2007-02-28 15:45:07
|
This is actually quite complicated, and there are caveats, but it may be possible :) First, you need to set up SQL Relay on the local host, listening on /var/lib/mysql/mysql.sock and talking to the database at sql:3306 and using authtier="database" and a dummy user/password. sqlrelay.conf: ... <instances> <instance ... socket="/var/lib/mysql/mysql.sock" ... authtier="database" ...> <users> <user user="dummy" password="dummy"/> </users> <connections> <connection connectionid="db" string="user=...;password=...;db=...;host=sql;port=3306" metric="1"/> </connections> </instance> </instances> Verify that works by using sqlrsh to run test queries. Next, you'll have to use the drop-in replacement library for MySQL on the webserver. See: http://sqlrelay.sourceforge.net/sqlrelay/dropin/mysql.html for details. Basically, you need to edit the init script that starts apache and make sure that the library is LD_PRELOAD'ed right before apache starts up. Similar for Tomcat. I've never used it with Tomcat before, so I'm not certain that it'll work, but you can see if the library is loaded or not by getting the process id of the running tomcat process and grepping for sqlr in /proc/<pid>/maps. You should see libmysql3sqlrelay or libmysql40sqlrelay or libmysql41sqlrelay or libmysql5sqlrelay, depending on which you loaded. You can check apache the same way. There are a few caveats to all of this: PHP is often built with the code for MySQL compiled directly into the PHP library itself. So when PHP needs to talk to MySQL it doesn't load the mysql client library, it just uses it's own built-in functions. If your PHP was built that way then the drop-in replacement library won't work. You'll need to rebuild and reinstall PHP so that it uses the MySQL library rather than built-in code. On the Tomcat side, the JDBC driver for MySQL may be pure java and may not use the mysql client library either. Or, it may be JNI and compiled against the MySQL code just like PHP. Again, if the JDBC driver doesn't use libmysqlclient, then the drop-in library won't work. You'll have to find a JDBC driver that does use libmysqlclient and use it. Also, the drop-in library doesn't support every mysql function. So, it's possible that your app may try to use a function that isn't supported. Most functions are supported and I haven't run into an app that doesn't work yet, but your mileage may vary. If you're socket-savvy, I'd think it would be simpler and more reliable to write proxy program that listens on the socket and whenever it get's a connection, it forks off a child which connects to mysql and ferries data back and forth. There may be programs out there that do it already. You may actually be able to do it with stunnel or something like that. Dave dav...@fi... On Wed, 2007-02-21 at 00:01 +0200, Max Korzhanoff wrote: > Dear Community, > > I would like to setup "redirect" for mysql requests from local socket > (/var/lib/mysql/mysql.sock) to remote mysql server (sql:3306) with > authentication on remote server. It's for PHP(Apache) and Java(Tomcat) > applications that used local mysql server and now we moved mysql to > dedicated box. We can't touch applications and change hostname or > something like that. What would be best method and configuration to do > this? If it's possible please provide example. > > Thank you forward! > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
|
From: Max K. <mk...@ga...> - 2007-02-20 22:01:42
|
Dear Community, I would like to setup "redirect" for mysql requests from local socket (/var/lib/mysql/mysql.sock) to remote mysql server (sql:3306) with authentication on remote server. It's for PHP(Apache) and Java(Tomcat) applications that used local mysql server and now we moved mysql to dedicated box. We can't touch applications and change hostname or something like that. What would be best method and configuration to do this? If it's possible please provide example. Thank you forward! -- Kind regards, Max Korzhanoff (CEO) GARM Technologies Riga, Latvia Phone: +371-26402104 --- This e-mail and any attachments are privileged and may contain confidential information intended for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any disclosure of this information is prohibited under applicable law. The person addressed in the e-mail is the sole authorized recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. --- |
|
From: <fr...@gm...> - 2007-02-16 11:35:33
|
2007/1/2, David Muse : > > Actually, now that I look at it, there are several places in that file > where the same problem occurs. And there is a slight error in the > command from the last email. And, now that I try it, it appears that > the --no-print-directory option doesn't work anyway :) > > So, try the attached file instead. > Hi Dave, I tried your Makefile but it doesn't work better. |
|
From: <fr...@gm...> - 2007-02-16 10:31:01
|
2007/2/16, Simon Martin : > > Hi Fr=E9d=E9ric, > > I am using SQLRelay + FreeTDS to communicate with MS SQL Server 2000. > The only restrictions I have are due to those imposed by FreeTDS, i.e. > calling stored procedures. As far as plain vanilla SQL is concerned, > works like a dream. > Thanks fo your feedback Simon. I hope not to need to call stored procedures ! |
|
From: Simon M. <sm...@mi...> - 2007-02-16 10:16:03
|
Hi Frédéric,
I am using SQLRelay + FreeTDS to communicate with MS SQL Server 2000.
The only restrictions I have are due to those imposed by FreeTDS, i.e.
calling stored procedures. As far as plain vanilla SQL is concerned,
works like a dream.
On Fri, 2007-02-16 at 11:01 +0100, Frédéric Logier wrote:
> Hi all,
>
> I'm looking for some feedbacks about using sqlrelay with MS SqlServer
> 2000 database.
> Thanks in advance.
> -------------------------------------------------------------------------
--
__ _ Debian GNU User Simon Martin
/ /(_)_ __ _ ___ __ Project Manager
/ / | | '_ \| | | \ \/ / Milliways
/ /__| | | | | |_| |> < mailto: sm...@mi...
\____/_|_| |_|\__,_/_/\_\ ICQ: 81183862 Skype: spm_cl
|
|
From: <fr...@gm...> - 2007-02-16 10:02:06
|
Hi all, I'm looking for some feedbacks about using sqlrelay with MS SqlServer 2000 database. Thanks in advance. |
|
From: David M. <dav...@fi...> - 2007-02-15 16:01:21
|
SQL Relay isn't really designed to do this exactly. There's a really round-about way to accomplish this with SQL Relay though. If you're using linux, you forward requests to the local machine to a remote machine using iptables port-forwarding much more easily. I believe a command like: iptables -t nat -A PREROUTING \ -p tcp -d "localip" --dport 3306 \ -j DNAT --to-destination "remoteip:":3306 should do it. Replace "localip" with the ip of the local machine and "remoteip" with the ip of the remote machine. You have to add a separate rule for each network interface (including localhost loopback). You could also use SQL Relay's drop-in replacement library for mysql with your app, run an instance of SQL Relay on port 3306 on the local machine and configure it to log into mysql on the remote machine and use authtier="database" with a dummy user. The config file would look like: <instances> <instance id="mysqltest" port="3306" ... authtier="database"> <users> <user user="dummy" password="dummy"/> </users> <connections> <connection connectionid="db" string="user=mysqluser;password=mydsqlpassword;host=remotehost" metric="1"/> </connections> </instance> </intances> This is much more round-about way of doing things though. David Muse dav...@fi... On Wed, 2007-02-14 at 00:45 +0100, Bertrand LUPART wrote: > Hello, > > I'm just trying to set up a simple MySQL proxy: all the request to > the local machine is to be forwarded to a remote one, > authentification should be done on the remote MySQL server. > > > The configuration i'm trying to set up is the following (0.38): > ----8<----8<----8<----8<---- > <?xml version="1.0"?> > <!DOCTYPE instances SYSTEM "sqlrelay.dtd"> > <instances> > <instance id="mysqltest" port="3306" socket="/var/run/mysqld/ > mysqld.sock" dbase="mysql" connections="3" maxconnections="5" > maxqueuelength="0" growby="1" ttl="60" endofsession="commit" > sessiontimeout="600" runasuser="" runasgroup="" cursors="5" > authtier="database" handoff="pass"> > <router> > <route host="my.remote.mysql.server" port="3306"> > <query pattern=".*"/> > </route> > </router> > </instance> > </instances> > ---->8---->8---->8---->8---- > > That's not correct, since users and connections elements are required > by the dtd. > > I'd just like to forward all the local connections to a remote host, > without dealing with users (i don't know all the login/passwords for > all users). Is that possible? > > Greetings, > |
|
From: Bertrand L. <ber...@li...> - 2007-02-13 23:45:41
|
Hello,
I'm just trying to set up a simple MySQL proxy: all the request to
the local machine is to be forwarded to a remote one,
authentification should be done on the remote MySQL server.
The configuration i'm trying to set up is the following (0.38):
----8<----8<----8<----8<----
<?xml version="1.0"?>
<!DOCTYPE instances SYSTEM "sqlrelay.dtd">
<instances>
<instance id="mysqltest" port="3306" socket="/var/run/mysqld/
mysqld.sock" dbase="mysql" connections="3" maxconnections="5"
maxqueuelength="0" growby="1" ttl="60" endofsession="commit"
sessiontimeout="600" runasuser="" runasgroup="" cursors="5"
authtier="database" handoff="pass">
<router>
<route host="my.remote.mysql.server" port="3306">
<query pattern=".*"/>
</route>
</router>
</instance>
</instances>
---->8---->8---->8---->8----
That's not correct, since users and connections elements are required
by the dtd.
I'd just like to forward all the local connections to a remote host,
without dealing with users (i don't know all the login/passwords for
all users). Is that possible?
Greetings,
--
Bertrand LUPART
Linkeo.com | http://www.linkeo.com/
+33 1 72 71 71 84 | 17, rue de la Banque - F75002 Paris
http://www.linkeo.com/signatures/bertrand-lupart/
|
|
From: David M. <dav...@fi...> - 2007-02-13 02:23:25
|
Thanks for the patches Chris, The totalRows() patch will work with some DB's but not with ones that don't know how many rows are going to come back from the query ahead of time. But, I think I know how to fix it for all db's. I'll test out the autoreconnect patch. It may need some #ifdefs for older platforms, but otherwise it looks good! Dave dav...@fi... On Mon, 2007-02-12 at 21:50 +0000, Chris Coyle wrote: > This is in reference to the bugs mentioned with the router overlay > where it only returns 10 rows (see: > http://sourceforge.net/mailarchive/message.php?msg_id=37528685) and > MySQL connections looping on reLogIn() infinitely when the host-end > closes the connection (see: > http://sourceforge.net/mailarchive/forum.php?thread_id=26504786&forum_id=43840). > > Setup: > - sqlrelay-0.3.9 (from CVS) on Gentoo > - dbhost1 - Gentoo running MySQL-5.0.22-MAX > - dbhost2 - Debian (Sarge) running MySQL-5.0.22-MAX > > ::Insufficient Result Set with "router" dbtype:: > For this problem, the suggested patch of looking to > cur->endOfResultSet() still did not return the entire set (seemed to > return anywhere from 2-10 fewer rows than it should have) so i dug > around and found cur->totalRows(); > > --- routerconnection.C.orig 2007-02-09 18:22:18.000000000 +0000 > +++ routerconnection.C 2007-02-12 20:21:19.000000000 +0000 > @@ -708,7 +708,12 @@ > } > > bool routercursor::fetchRow() { > - if (nextrow<cur->rowCount()) { > + //if (nextrow<cur->rowCount()) { > + //if (!cur->endOfResultSet()) { > + if (nextrow < cur->totalRows()) { > nextrow++; > return true; > } > > With this patch I no longer have this issue, but as the documentation > for the API states, not all databases support this function, but it > works for MySQL. > > ::MySQL connection loops infinitely:: > For our specific purposes we have an aggressive wait_timeout with > mysql (10 seconds) due to some broken clients that would spawn > hundreds of connections without properly closing them. > > This can be fixed by enabling auto_reconnect: > --- /root/sqlrel-mon/sqlrelay/src/connections/mysql/mysqlconnection.C > 2006-12-13 03:00:28.000000000 +0000 > +++ ./mysqlconnection.C 2007-02-12 21:35:45.000000000 +0000 > @@ -95,6 +95,10 @@ > logOut(); > return false; > } > + > + // Enable autoreconnect in the C api > + mysql_options(&mysql,MYSQL_OPT_RECONNECT,"1"); > + > #ifdef MYSQL_SELECT_DB > if (mysql_select_db(&mysql,dbval)) { > if (printerrors) { > > Auto_reconnect is transparent to the client API so the "Server Has > Gone Away!" message never makes it back to handleError(). NOTE: This > may not be compatible with older versions of MySQL (3.x-4.x). > > Hopefully this helps some other people who would like to use sqlRelay > but ran into the same walls I did. > > Kudos to Dave Muse for a great project, > > - ccoyle > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: Chris C. <cc...@gm...> - 2007-02-12 21:50:14
|
This is in reference to the bugs mentioned with the router overlay where it only returns 10 rows (see: http://sourceforge.net/mailarchive/message.php?msg_id=37528685) and MySQL connections looping on reLogIn() infinitely when the host-end closes the connection (see: http://sourceforge.net/mailarchive/forum.php?thread_id=26504786&forum_id=43840). Setup: - sqlrelay-0.3.9 (from CVS) on Gentoo - dbhost1 - Gentoo running MySQL-5.0.22-MAX - dbhost2 - Debian (Sarge) running MySQL-5.0.22-MAX ::Insufficient Result Set with "router" dbtype:: For this problem, the suggested patch of looking to cur->endOfResultSet() still did not return the entire set (seemed to return anywhere from 2-10 fewer rows than it should have) so i dug around and found cur->totalRows(); --- routerconnection.C.orig 2007-02-09 18:22:18.000000000 +0000 +++ routerconnection.C 2007-02-12 20:21:19.000000000 +0000 @@ -708,7 +708,12 @@ } bool routercursor::fetchRow() { - if (nextrow<cur->rowCount()) { + //if (nextrow<cur->rowCount()) { + //if (!cur->endOfResultSet()) { + if (nextrow < cur->totalRows()) { nextrow++; return true; } With this patch I no longer have this issue, but as the documentation for the API states, not all databases support this function, but it works for MySQL. ::MySQL connection loops infinitely:: For our specific purposes we have an aggressive wait_timeout with mysql (10 seconds) due to some broken clients that would spawn hundreds of connections without properly closing them. This can be fixed by enabling auto_reconnect: --- /root/sqlrel-mon/sqlrelay/src/connections/mysql/mysqlconnection.C 2006-12-13 03:00:28.000000000 +0000 +++ ./mysqlconnection.C 2007-02-12 21:35:45.000000000 +0000 @@ -95,6 +95,10 @@ logOut(); return false; } + + // Enable autoreconnect in the C api + mysql_options(&mysql,MYSQL_OPT_RECONNECT,"1"); + #ifdef MYSQL_SELECT_DB if (mysql_select_db(&mysql,dbval)) { if (printerrors) { Auto_reconnect is transparent to the client API so the "Server Has Gone Away!" message never makes it back to handleError(). NOTE: This may not be compatible with older versions of MySQL (3.x-4.x). Hopefully this helps some other people who would like to use sqlRelay but ran into the same walls I did. Kudos to Dave Muse for a great project, - ccoyle |
|
From: David M. <dav...@fi...> - 2007-02-05 20:43:29
|
Now that I think about it... SQL Relay does have a few timeouts. They use the number of seconds since 1970 as a basis though, or the alarm() system call, so neither should be affected by a transition into or out of daylight savings time. There is also a debug mode where time/date is printed out in a file with each debug message. If the OS fails to set the clock ahead or behind because it hasn't been updated to calculate daylight savings time per the new standard, then those messages may not show the right time, but in that case, the rest of the system would be off too. On Mon, 2007-02-05 at 08:52 -0500, Francis Fauteux wrote: > Here's the reply I got from James K. Lowden regarding FreeTDS: > > FreeTDS knows nothing of time zones or the zoneinfo files. It gets > the > > local time from the OS for logging and timeout purposes. The > intention is > > that even if your query timeout crosses a localtime change boundary or > the > > admin resets the clock, the timeout will continue to work as intended > by > > the application. > > HTH. > > --jkl > > -----Original Message----- > From: sql...@li... > [mailto:sql...@li...] On Behalf Of > David Muse > Sent: Friday, February 02, 2007 3:50 PM > To: Discussion of topics related to SQL Relay > Subject: Re: [Sqlrelay-discussion] US Daylight savings update in 2007 > > To my knowledge, SQL Relay doesn't contain any code that does anything > timezone-related. There are very few places in the code where any > date/time related functions are called at all and they don't appear to > be time-zone-dependent. It's possible that freetds does though. SQL > Relay uses the freetds library to connect to SQL Server. It's also > possible that the PHP, Python, Perl, etc. API's that SQL Relay > interfaces with do, so you may want to check into whichever of those > that you use. > > Take care, > > Dave > > On Fri, 2007-02-02 at 15:03 -0500, Francis Fauteux wrote: > > Good day, > > > > We are using SQL relay to access MS SQL Server from a Red Hat 8 > > machine. We need to upgrade our system in preparation of the US > > daylight savings update of 2007 > > > (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylig > ht_saving_time). > > > > I suspect that SQL relay gathers time zone information (if any) from > > the OS (/usr/share/zoneinfo, see > > http://www.twinsun.com/tz/tz-link.htm), but I need confirmation before > > considering this issue classified. > > > > Thanks for your input. > > > > Francis > > > > > > > > ______________________________________________________________________ > > This email has been scanned by the MessageLabs Email Security System. > > For more information please visit http://www.messagelabs.com/email > > ______________________________________________________________________ > > > ------------------------------------------------------------------------ > - > > Using Tomcat but need to do more? Need to support web services, > security? > > Get stuff done quickly with pre-integrated technology to make your job > easier. > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ Sqlrelay-discussion > mailing list Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > > ------------------------------------------------------------------------ > - > Using Tomcat but need to do more? Need to support web services, > security? > Get stuff done quickly with pre-integrated technology to make your job > easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |
|
From: Francis F. <ffa...@me...> - 2007-02-05 13:52:38
|
Here's=20the=20reply=20I=20got=20from=20James=20K.=20Lowden=20regarding=20= FreeTDS: >=20FreeTDS=20knows=20nothing=20of=20time=20zones=20or=20the=20zoneinfo=20= files.=20=20It=20gets the=20 >=20local=20time=20from=20the=20OS=20for=20logging=20and=20timeout=20purpo= ses.=20=20The intention=20is=20 >=20that=20even=20if=20your=20query=20timeout=20crosses=20a=20localtime=20= change=20boundary=20or the=20 >=20admin=20resets=20the=20clock,=20the=20timeout=20will=20continue=20to=20= work=20as=20intended by=20 >=20the=20application.=20 >=20HTH.=20 >=20--jkl -----Original=20Message----- From:=20s...@li... [mailto:sql...@li...]=20On=20Behalf=20= Of David=20Muse Sent:=20Friday,=20February=2002,=202007=203:50=20PM To:=20Discussion=20of=20topics=20related=20to=20SQL=20Relay Subject:=20Re:=20[Sqlrelay-discussion]=20US=20Daylight=20savings=20update=20= in=202007 To=20my=20knowledge,=20SQL=20Relay=20doesn't=20contain=20any=20code=20that= =20does=20anything timezone-related.=20=20There=20are=20very=20few=20places=20in=20the=20code= =20where=20any date/time=20related=20functions=20are=20called=20at=20all=20and=20they=20d= on't=20appear=20to be=20time-zone-dependent.=20=20It's=20possible=20that=20freetds=20does=20t= hough.=20=20=20SQL Relay=20uses=20the=20freetds=20library=20to=20connect=20to=20SQL=20Server.= =20=20It's=20also possible=20that=20the=20PHP,=20Python,=20Perl,=20etc.=20API's=20that=20SQL= =20Relay interfaces=20with=20do,=20so=20you=20may=20want=20to=20check=20into=20whic= hever=20of=20those that=20you=20use. Take=20care, Dave On=20Fri,=202007-02-02=20at=2015:03=20-0500,=20Francis=20Fauteux=20wrote: >=20Good=20day, >=20 >=20We=20are=20using=20SQL=20relay=20to=20access=20MS=20SQL=20Server=20fro= m=20a=20Red=20Hat=208 >=20machine.=20We=20need=20to=20upgrade=20our=20system=20in=20preparation=20= of=20the=20US >=20daylight=20savings=20update=20of=202007 > (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylig ht_saving_time). >=20 >=20I=20suspect=20that=20SQL=20relay=20gathers=20time=20zone=20information= =20(if=20any)=20from >=20the=20OS=20(/usr/share/zoneinfo,=20see >=20http://www.twinsun.com/tz/tz-link.htm),=20but=20I=20need=20confirmatio= n=20before >=20considering=20this=20issue=20classified. >=20 >=20Thanks=20for=20your=20input. >=20 >=20Francis >=20 >=20 >=20 >=20______________________________________________________________________= >=20This=20email=20has=20been=20scanned=20by=20the=20MessageLabs=20Email=20= Security=20System. >=20For=20more=20information=20please=20visit=20http://www.messagelabs.com= /email=20 >=20______________________________________________________________________= > ------------------------------------------------------------------------ - >=20Using=20Tomcat=20but=20need=20to=20do=20more?=20Need=20to=20support=20= web=20services, security? >=20Get=20stuff=20done=20quickly=20with=20pre-integrated=20technology=20to= =20make=20your=20job easier. >=20Download=20IBM=20WebSphere=20Application=20Server=20v.1.0.1=20based=20= on=20Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 >=20_______________________________________________=20Sqlrelay-discussion mai...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion ------------------------------------------------------------------------ - Using=20Tomcat=20but=20need=20to=20do=20more?=20Need=20to=20support=20web=20= services, security? Get=20stuff=20done=20quickly=20with=20pre-integrated=20technology=20to=20m= ake=20your=20job easier. Download=20IBM=20WebSphere=20Application=20Server=20v.1.0.1=20based=20on=20= Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Sqlrelay-discussion=20mailing=20list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion ______________________________________________________________________ This=20email=20has=20been=20scanned=20by=20the=20MessageLabs=20Email=20Sec= urity=20System. For=20more=20information=20please=20visit=20http://www.messagelabs.com/ema= il=20 ______________________________________________________________________ ______________________________________________________________________ This=20email=20has=20been=20scanned=20by=20the=20MessageLabs=20Email=20Sec= urity=20System. For=20more=20information=20please=20visit=20http://www.messagelabs.com/ema= il=20 ______________________________________________________________________ |
|
From: Rony C. <coh...@gm...> - 2007-02-05 11:05:08
|
Hi Dave,
This is Mysql Database.
With InnoDB.
I was only able to work fine with it with :
Autocommit : ON
and
Start transaction;
process.......
Commit or Rollback.....
Message: 3
Date: Thu, 18 Jan 2007 09:47:31 -0500
From: David Muse <dav...@fi...>
Subject: Re: [Sqlrelay-discussion] SQLRELAY PHP - TRANSACTION COMMIT
ROLLBACK.
To: Discussion of topics related to SQL Relay
<sql...@li...>
Message-ID:
<116...@ne...>
Content-Type: text/plain
What database are you using? Does it support rollback?
If so, some databases (like postgresql) require that you use a BEGIN
query to begin a transaction and then end the transaction with a COMMIT
or ROLLBACK, but if you don't BEGIN then all queries are committed
automatically.
Some other database interfaces do the BEGIN for you, but SQL Relay
requires that you do the BEGIN yourself.
Dave
On Thu, 2007-01-18 at 11:15 +0100, Rony Cohen wrote:
> Hello,
>
> I'm using SQLRELAY with PHP.
>
> I meet problems when I want Rollback.
> That doesn't work at all....
>
> I put :
>
> SqlrelayClass::ConnexionBDD();
> sqlrcon_autoCommitOff(SqlrelayClass::$dbConn);
>
> try{
> ... somes send queries .....
>
>
> // I PUT AN EXCEPTION HERE....
> throw new MyException("error");
>
>
> SqlrelayClass::commit();
> SqlrelayClass::EndSessionBDD();
>
> }
>
> catch(MyException $ActionErr){
>
> // MY ROLLBACK
> sqlrcon_rollback(SqlrelayClass::$dbConn);
>
> }
>
> SqlrelayClass::CloseConnexionBDD();
>
>
>
> I do that, but all my queries still work, and are register in my
> DataBASE.
>
> Can someone Tell my WHY ..??
> THANK YOU FOR THE HELP.
> Rony
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________ Sqlrelay-discussion
mailing list Sql...@li...
https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
|
|
From: David M. <dav...@fi...> - 2007-02-02 20:48:54
|
To my knowledge, SQL Relay doesn't contain any code that does anything timezone-related. There are very few places in the code where any date/time related functions are called at all and they don't appear to be time-zone-dependent. It's possible that freetds does though. SQL Relay uses the freetds library to connect to SQL Server. It's also possible that the PHP, Python, Perl, etc. API's that SQL Relay interfaces with do, so you may want to check into whichever of those that you use. Take care, Dave On Fri, 2007-02-02 at 15:03 -0500, Francis Fauteux wrote: > Good day, > > We are using SQL relay to access MS SQL Server from a Red Hat 8 > machine. We need to upgrade our system in preparation of the US > daylight savings update of 2007 > (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_saving_time). > > I suspect that SQL relay gathers time zone information (if any) from > the OS (/usr/share/zoneinfo, see > http://www.twinsun.com/tz/tz-link.htm), but I need confirmation before > considering this issue classified. > > Thanks for your input. > > Francis > > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ Sqlrelay-discussion mailing list Sql...@li... https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion |
|
From: Francis F. <ffa...@me...> - 2007-02-02 20:03:13
|
Good=20day, We=20are=20using=20SQL=20relay=20to=20access=20MS=20SQL=20Server=20from=20= a=20Red=20Hat=208=20machine. We=20need=20to=20upgrade=20our=20system=20in=20preparation=20of=20the=20US= =20daylight=20savings update=20of=202007 (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylig ht_saving_time <http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylig ht_saving_time>=20). I=20suspect=20that=20SQL=20relay=20gathers=20time=20zone=20information=20(= if=20any)=20from=20the OS=20(/usr/share/zoneinfo,=20see=20http://www.twinsun.com/tz/tz-link.htm),= =20but I=20need=20confirmation=20before=20considering=20this=20issue=20classified= . Thanks=20for=20your=20input. Francis ______________________________________________________________________ This=20email=20has=20been=20scanned=20by=20the=20MessageLabs=20Email=20Sec= urity=20System. For=20more=20information=20please=20visit=20http://www.messagelabs.com/ema= il=20 ______________________________________________________________________ |