List:MySQL++« Previous MessageNext Message »
From:rajesh choudhary Date:December 26 2008 8:16am
Subject:limited parameter in SQL Query templet [mysql++ 3.0.4]
View as plain text  
I have put a fix (on latest MySql++ code taken from svm) for under mentioned
bug. Patch file is attached.

 

  _____  

From: rajesh choudhary [mailto:rajesh.choudhary@stripped] 
Sent: Thursday, December 25, 2008 6:38 PM
To: 'plusplus@stripped'
Cc: 'Sachin Mangarole'; 'Arvind Tiwari'
Subject: limited parameter in SQL Query templet [mysql++ 3.0.4]

 

Hello,

 

I am using mysql++-3.0.4.

 

I am trying to execute a Stored Procedure which is having 151 input
parameters and 1 output parameter. But MySQL++ is allowing maximum128 input
parameters. 

 

I have checked the code and found that it is happening because "num"
parameter of SQLParseElement is of type "signed char" (Refer Qparms.h).

 

I am not sure that it is intentional or a bug, this is because:

"num" parameter of SQLParseElement structure is populated by parse() API of
Query.cpp. One char array of length 3 is used to maintain count of input
parameter, it is converted to int (using atoi() system API) and filled in a
signed char.

So, user can give 999 input parameters (character array of length 3) to a
Stored procedure, but only first 128 parameters will be used to frame final
query, value for rest input parameters will be blank (taken from
template_defaults, as done in proc() API of Query.cpp).

 

Can you please explain, why "num" parameter of SQLParseElement is kept as
"signed char", although it is used for number of parameters. Can we change
it to integer type?

 

Is there any other way to pass this much input input parameters to a
Query/Stored-procedure.

 

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

Thanks & Regards,

Rajesh Choudhary,

ZenMedia Solutions. Pvt. Ltd.

Mob. +91-9987586234

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


Attachment: [text/html]
Attachment: [text/html]
Attachment: [text/html]
Thread
limited parameter in SQL Query templet [mysql++ 3.0.4]rajesh choudhary26 Dec
Re: limited parameter in SQL Query templet [mysql++ 3.0.4]Warren Young29 Dec