Users have been complaining about strange errors arising when using the OracleClient classes.
I have tracked it down to the OciDefineHandle and OciDefineByPos calls, and OracleParameter
handling of amanged objects by unmanaged code. Currently two of the parameters passed to the
above OCI call are short variables. They are passed as "ref" fields as Oracle uses their
address to put size and indicator data once the data is fetched. However, being defined as
short means that they are eligible for being moved during garbage collection. Thus if that
field is moved between the OciDefineByPos call and the fetch of the data then what Oracle is
pointing to may no longer be variable. I'm thinking it may be better to define these fields as
IntPtr and allocate them and retrieve their values via Marshal.ReadInt16. As for OracleParameter,
it uses a managed object "indicator" that is also used in a similar way. This reference is replaced
by a IntPtr and a get/set method to access the contents.
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller. I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.
With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
* System.Data.OracleClient/OracleParameter.cs: add
parameter support for LONG RAW and RAW data types
* System.Data.OracleClient.Oci/OciDefineHandle.cs: flush
extra assigning of types
svn path=/trunk/mcs/; revision=146885
* System.Data.OracleClient/OracleParameter.cs:
- if programmer explicitly sets the Size property,
do not override the size later if the Value property
is set for character data.
- for character and numeric data types, output and
return parameters were not allocated memory. Also,
input/output parameters need to allocate memory
based on Size because the output can be bigger than
the input after an execute.
* Test/TestOracleClient.cs: Data Adapter Test 2 is failing
for NET_2_0 profile.
svn path=/trunk/mcs/; revision=146683
** Fixes#322695
* OracleParameter.cs: Use oracle returned rsize instead of
MAXBYTECOUNT. Reduces the size of allocated buffer.
svn path=/trunk/mcs/; revision=145054
** Fixes#321718
* OciCalls.cs: Add stub for OCILobCharSetForm to get the charset
form associated with a CLOB/NCLOB.
* OciLobLocator.cs: Add Environment handle property that is
required to call OCILobCharSetForm and pass the output value to
OCILobRead.
* OciDefineHandler.cs: Update Environment property of
OCILobLocator.
svn path=/trunk/mcs/; revision=144980
** Fixes#535889
* OracleParameter.cs: In case of OUT param, update sizeSet even if
value is null or DBNull. Also, use rsize instead of bindSize to
avoid extra allocation.
svn path=/trunk/mcs/; revision=142608
* OracleParameter.cs: Infer size only for 2.0 profile when only
value is passed. Fixes test failure under 1.1 profile.
svn path=/trunk/mcs/; revision=135427
* OracleParameter.cs: If a non-zero size is passed, update
the size member but sizeSet is updated only when a non-null
value is passed.
svn path=/trunk/mcs/; revision=135234