Hello Henning
I just needed something quick and dirty so I just added the following
function and used it instead of escape_common. This works fine with
Oracle.
int sql_escape(char *dst, char *src, int src_len)
{
int i, j;
if(dst==0 || src==0 || src_len<=0)
return 0;
j = 0;
for(i=0; i<src_len; i++)
{
switch(src[i])
{
case '\'':
dst[j++] = '\'';
dst[j++] = src[i];
break;
default:
dst[j++] = src[i];
}
}
return j;
}
It would be nice to add this as a configuration parameter in the future.
thanks
George
> -----Original Message-----
> From: Henning Westerholt [mailto:henning.westerholt@1und1.de]
> Sent: Thursday, June 21, 2007 12:00 PM
> To: users(a)openser.org
> Cc: Papadopoulos Georgios
> Subject: Re: [Users] unixodbc: use_escape_common
>
> On Donnerstag, 7. Juni 2007, Papadopoulos Georgios wrote:
> > Hello all,
> >
> > I am using
> > modparam("unixodbc", "use_escape_common", 1) and the result
> is that if
> > I have a string like he'llo (single quote between the e and l), it
> > becomes he\'llo which is not working in sql.
> > The result should be he''llo (two single quotes between e
> and l). The
> > reason is that unixodbc uses the core function escape_common(). I
> > think that unixodbc whould have two parameters like
> > modparam("unixodbc", "use_escape_character", "'")
> modparam("unixodbc",
> > "escaped_characters", "'\%^") use_escape_character would be null by
> > default and if it is not null it would be the character to use for
> > escaping.
> > escaped_characters would be a list of characters that should be
> > escaped by the character defined above.
> >
> > I have patched unixodbc to use its own escape function
> instead, but it
> > would be nice if this was a configurable option that others
> could use.
> > I could try to implement this if there is an interest.
> Please let me
> > know your thoughts.
>
> Hello George,
>
> sorry for the late reply. Yes, improvements of the unixodbc
> escape functions would be nice. Do you add another function
> for escaping to unixodbc, or do you use some provided
> functions from the odbc driver?
>
> In the past we had the problem that different odbc drivers
> need different escape signs. So the mechanism you suggested
> above (have options for the
> escaping) would provide a solution for this problem.
>
> Cheers,
>
> Henning
>
Disclaimer
The information in this e-mail and any attachments is confidential. It is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or person responsible for delivering this information to the intended recipient, please notify the sender immediately. Unless you are the intended recipient or his/her representative you are not authorized to, and must not, read, copy, distribute, use or retain this message or any part of it. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
Hello all,
We have an ongoing issue with Openser running out of memory after a few
hours. It is very consistent which makes me believe it is a memory leak.
Can someone look at the log file? I have done a mem dump on process 8573
which is the one that ran out of memory. Here is the log:
http://www.real.gr/files/openser.20070620.log.gz
<http://www.real.gr/files/openser.20070620.log.gz>
It always happens on the first receiver child. Our current solution is
to restart Openser every few hours. I would like to solve this at its
root, so please let me know if you need more info.
My Openser is 1.2.x from svn, revision 2333.
thank you for any help
George
Disclaimer
The information in this e-mail and any attachments is confidential. It is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or person responsible for delivering this information to the intended recipient, please notify the sender immediately. Unless you are the intended recipient or his/her representative you are not authorized to, and must not, read, copy, distribute, use or retain this message or any part of it. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
Hello,
Cluecon 2007 is taking place next week in Chicago (June 26-28). If any
of you is attending and want to meet, please send an email.
http://www.cluecon.com
There will be 1 hour OpenSER session, in the first day, afternoon.
Cheers,
Daniel
Hi
1. Is there any benefit of increasing the value of PKG_MEM_POOL_SIZE and
SHM_MEM_SIZE ?
/*used only if PKG_MALLOC is defined*/
#define PKG_MEM_POOL_SIZE 1024*1024
/*used if SH_MEM is defined*/
#define SHM_MEM_SIZE 32
2. I've compiled my ser with
#define PKG_MEM_POOL_SIZE 1024*1024*512
ans started using ser -m 100 option with children=4 and listening on two ips
when I started memory usages was seems to fine for few days(3-4) less then
1GB but after that nealy 1.7 - 1.8 GB of memory usage and when I do top:
16165 root 15 0 617m 54m 36m S 0.3 2.7 0:16.34 ser
16167 root 15 0 617m 54m 36m S 0.3 2.7 0:15.89 ser
16164 root 15 0 617m 54m 36m S 0.3 2.7 0:16.29 ser
16166 root 15 0 617m 54m 36m S 0.7 2.7 0:16.16 ser
16172 root 16 0 617m 53m 35m S 0.0 2.7 0:05.04 ser
16168 root 16 0 617m 52m 34m S 0.0 2.6 0:00.09 ser
16170 root 16 0 617m 52m 34m S 0.0 2.6 0:00.07 ser
16169 root 16 0 617m 52m 34m S 0.0 2.6 0:00.08 ser
16171 root 16 0 617m 52m 34m S 0.0 2.6 0:00.10 ser
16163 root 16 0 617m 52m 34m S 0.0 2.6 0:00.01 ser
16145 root 25 0 617m 52m 34m S 0.0 2.6 0:07.80 ser
it shows 11 instance of ser with above info. If I sum up
617 * 11 = 6787 MB of memory but in my machine I've only 2 GB Physical RAM
and it never uses Swap ?
if 54 * 11 = 594 ? but free -m and top shows more memory usage ?
can please explain me in brief . I'll be really thankfull. B'coz of this I'm
facing may problem.
thanks
arun
Hi All,
please can some one tell me is there any memory leak with ser-0.9.6. It runs
fine for few days and then starts some memory related problems in that case
I've to restart my ser. I've 2GB of physical RAM in my machine with Quad
Core cpu. but now I've only 70MB free out of 2 GB in max 1 day It will start
to give me again error.
I've compiled my ser with 512MB Private Memory and running with 100MB shared
memory.
please help soon.
thanks
arun
Hello all,
I am using
modparam("unixodbc", "use_escape_common", 1)
and the result is that if I have a string like he'llo (single quote
between the e and l), it becomes he\'llo which is not working in sql.
The result should be he''llo (two single quotes between e and l). The
reason is that unixodbc uses the core function escape_common(). I think
that unixodbc whould have two parameters like
modparam("unixodbc", "use_escape_character", "'")
modparam("unixodbc", "escaped_characters", "'\%^")
use_escape_character would be null by default and if it is not null it
would be the character to use for escaping.
escaped_characters would be a list of characters that should be escaped
by the character defined above.
I have patched unixodbc to use its own escape function instead, but it
would be nice if this was a configurable option that others could use. I
could try to implement this if there is an interest. Please let me know
your thoughts.
thank you
George
Disclaimer
The information in this e-mail and any attachments is confidential. It is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or person responsible for delivering this information to the intended recipient, please notify the sender immediately. Unless you are the intended recipient or his/her representative you are not authorized to, and must not, read, copy, distribute, use or retain this message or any part of it. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
Hi,
there were couple of requests to change the prefix used by the mailing
list to something more descriptive. Like:
[Devel] -> [OpenSER-Devel]
[Users] -> [OpenSER-Users]
I guess it is quite standard to have the project name included in the
prefix, but I want to see if anybody is aware of an side effect ;)
regards,
bogdan