SCM

[#1010683] Bug while parsing parameter

View Trackers | Patches | Download .csv | Monitor

Date:
2009-08-07 18:47
Priority:
3
State:
Open
Submitted by:
Yann ROBIN (kyann)
Assigned to:
Nobody (None)
Category:
Group:
Resolution:
None
 
Summary:
Bug while parsing parameter

Detailed description
Hi,

I found a bug in npgsql, it's a small one as it won't affect everyone but I think it should really be fixed.

This bug occurs when you send a querystring that use both parameter and raw sql, like :
INSERT INTO "D" ("Type", "Id", "d" ) VALUES ('Test:D' , @EntityId , @d )

In the GetClearCommandText there is a Split on ":" and "@", that split the command here 'Test:D' and then try to replace :D with the parameter.

So i've created a patch that iterate over the parameters instead of splitting the querystring and replace the parameterName in the string (using a regexp) with the needed informations.

I don't think this is very efficient (and it removes the previons performance patch that was applied) but it works.

Followup

No Followups Have Been Posted

Attached Files:

Attachments:
NpgsqlCommand.cs.patch

Changes:

Field Old Value Date By
File Added419: NpgsqlCommand.cs.patch2009-08-07 18:47kyann
Powered By FusionForge