[Devel] [ openser-Bugs-1614386 ] mysql module does not handle LONGLONG

SourceForge.net noreply at sourceforge.net
Mon Dec 18 20:56:57 CET 2006


Bugs item #1614386, was opened at 2006-12-12 16:22
Message generated for change (Comment added) made by ekobi
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1614386&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Bogdan (bogdan_iancu)
Summary: mysql module does not handle LONGLONG

Initial Comment:
The function db_mysql_get_columns() in modules/mysql/res.c does not include a case for FIELD_TYPE_LONGLONG. Thus, any integer values returned from SELECT are stored as OpenSER string type.

To reproduce against mysql version 5.0.24 with OpenSER 1.2 CVS HEAD, try the following script snippet:

avp_db_query("select 0+1","$avp(i:100)");
if (avp_check("i:100","and/i:1"))
    xlog ("L_DBG","Stored correctly.\n");
else
    xlog ("L_DBG","Error!\n");

To fix, add 'case FIELD_TYPE_LONGLONG' to switch statement in main loop.
--
kobi

----------------------------------------------------------------------

Comment By: Kobi Eshun (ekobi)
Date: 2006-12-18 11:56

Message:
Logged In: YES 
user_id=1039134
Originator: NO

Thanks for the fix. FYI, works on this Linux box:

listen-6 /etc/openser # uname -a
Linux listen-6 2.6.16-gentoo-r9 #4 SMP Tue Jul 11 09:47:51 PDT 2006 i686
Pentium III (Coppermine) GenuineIntel GNU/Linux

Cheers,
--
kobi

----------------------------------------------------------------------

Comment By: Bogdan (bogdan_iancu)
Date: 2006-12-15 09:42

Message:
Logged In: YES 
user_id=1275325
Originator: NO

the FIELD_TYPE_LONGLONG and FIELD_TYPE_DECIMAL type were mapped over
DB_INT - need to check on non linux platform also.

regards,
bogdan

----------------------------------------------------------------------

Comment By: Kobi Eshun (ekobi)
Date: 2006-12-12 16:33

Message:
Logged In: YES 
user_id=1039134
Originator: NO

I also noticed that there is no case for FIELD_TYPE_DECIMAL, but I'm not
sure how that case would be mapped to OpenSER's types.

--
kobi

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1614386&group_id=139143



More information about the Devel mailing list