| Bug #25950 | DataSourceInformation collection contains incorrect values | ||
|---|---|---|---|
| Submitted: | 30 Jan 2007 16:41 | Modified: | 31 Jan 2007 16:36 |
| Reporter: | Sönke Schau | ||
| Status: | Closed | ||
| Category: | Connector/Net | Severity: | S3 (Non-critical) |
| Version: | 5.0.3 | OS: | Microsoft Windows (Windows) |
| Assigned to: | Target Version: | ||
[30 Jan 2007 16:41]
Sönke Schau
[30 Jan 2007 23:38]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/19051
[30 Jan 2007 23:39]
Reggie Burnett
Fixed in 5.0.4
We don't need to change ParameterMarkerFormat since the docs indicate that if the
parameter name is expected to include the leading marker, then the pattern should be {0}
which is what we have.
[31 Jan 2007 16:36]
MC Brown
A note has been added to the 5.0.4 changelog.
[10 Aug 2007 22:28]
Max Toro
> ParameterMarkerFormat
> ---------------------
> A format string that represents how to format a parameter.
>
> If named parameters are supported by the data source, the first placeholder in this
string should be where the parameter name should be formatted.
> For example, if the data source expects parameters to be named and prefixed with an
‘:’ this would be “:{0}”. When formatting this with a parameter name of “p1”
the resulting string is “:p1”.
> If the data source expects parameters to be prefixed with the ‘@’, but the names
already include them, this would be ‘{0}’, and the result of formatting a parameter
named “@p1” would simply be “@p1”.
//******** MySql returns {0}, so that means that the '?' is expected to be a part of the
parameter name?
> For data sources that do not expect named parameters and expect the use of the ‘?’
character, the format string can be specified as simply ‘?’, which would ignore the
parameter name. For OLE DB we return ‘?’.
> ParameterMarkerPattern
> ----------------------
> A regular expression that matches a parameter marker. It will have a match value of the
parameter name, if any.
> For example, if named parameters are supported with an ‘@’ lead-in character that
will be included in the parameter name, this would be: “(@[A-Za-z0-9_$#]*)”.
//******** MySql returns ?([A-Za-z0-9_$#]*), so that means that the '?' is NOT expected to
be a part of the parameter name?
> However, if named parameters are supported with a ‘:’ as the lead-in character and
it is not part of the parameter name, this would be: “:([A-Za-z0-9_$#]*)”.
> Of course, if the data source doesn’t support named parameters, this would simply be
“?”.
