[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: mysql check connection
From: |
Daishi Kato |
Subject: |
[Chicken-users] Re: mysql check connection |
Date: |
Thu, 18 Jun 2009 15:28:28 +0900 |
User-agent: |
Wanderlust/2.15.6 (Almost Unreal) Emacs/21.4 Mule/5.0 (SAKAKI) |
Hi everyone,
Although, I enjoy the news about moving to chicken4,
I'm still stick with chicken-3.2.0, mainly due to my heavy
dependence to the http egg.
Also, the mysql egg is one of my necesary eggs.
Since nobody seems to be maintaining releases/3/mysql/trunk,
(the latest code had even a parenthesis mismatch)
my colleague and I added a new procedure mysql-is-closed?,
just as I mentioned a long time ago.
Most of procedures now check a connection,
and if it's closed it raises a signal,
which avoids lot's of segfault errors.
Hope you like it.
Who should I ask for releasing this fixed egg?
Modifications are already committed to the svn trunk.
(One note is that I wasn't able to compile well the original one,
which uses "my_bool". So, I changed it to "char". Please refer diffs.)
Thanks and I look for any feedbacks from someone.
Best,
Daishi
At Fri, 16 May 2008 19:38:37 +0900,
Daishi Kato wrote:
>
> Hi,
>
> I was wondering if there's a procedure like mysql-closed?
> because I'd like to know if a connection is alive or not.
> Hoping mysql-ping does the job, but giving me a segfault.
>
> Any workaround for this?
> Thanks,
> Daishi
>
> CHICKEN
> (c)2008 The Chicken Team
> (c)2000-2007 Felix L. Winkelmann
> Version 3.2.0 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook ]
> SVN rev. 10664 compiled 2008-05-16 on ganglia (Linux)
>
> #;1> (use mysql)
> ; loading /usr/local/chicken-3.2.0/lib/chicken/3/mysql.so ...
> #;2> (define x (mysql-connect 'host: "192.168.1.130" 'user: "root" 'passwd:
> "mahoroba0712" 'db: "tcwebif"))
> #;3> (mysql-ping x)
> 0
> #;4> (mysql-close x)
> #;5> (mysql-ping x)
> zsh: segmentation fault (core dumped)
>
> ******************************
> XREA.COM -Free Web Hosting-
> http://www.xrea.com/
> ******************************
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Chicken-users] Re: mysql check connection,
Daishi Kato <=