Imported Upstream version 3.12.0

Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
This commit is contained in:
Jo Shields
2015-01-13 10:44:36 +00:00
parent 8b9b85e7f5
commit 181b81b4a4
659 changed files with 12743 additions and 16300 deletions

View File

@ -95,7 +95,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -111,7 +111,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -127,7 +127,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -142,7 +142,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -157,7 +157,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -172,7 +172,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -193,8 +193,8 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U4)] OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode);
@ -206,8 +206,8 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U4)] OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode);
@ -547,7 +547,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -558,7 +558,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
#endif
return OciNativeCalls.OCIBindByName (stmtp, out bindpp, errhp, placeholder, placeh_len, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByNameRef (IntPtr stmtp,
@ -569,7 +569,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -580,7 +580,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
#endif
return OciNativeCalls.OCIBindByNameRef (stmtp, out bindpp, errhp, placeholder, placeh_len, ref valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByNameBytes (IntPtr stmtp,
@ -591,7 +591,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -602,7 +602,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByName", "OCI");
#endif
return OciNativeCalls.OCIBindByNameBytes (stmtp, out bindpp, errhp, placeholder, placeh_len, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByPos (IntPtr stmtp,
@ -612,7 +612,7 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -623,7 +623,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
#endif
return OciNativeCalls.OCIBindByPos (stmtp, out bindpp, errhp, position, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByPosRef (IntPtr stmtp,
@ -633,7 +633,7 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -644,7 +644,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
#endif
return OciNativeCalls.OCIBindByPosRef (stmtp, out bindpp, errhp, position, ref valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
internal static int OCIBindByPosBytes (IntPtr stmtp,
@ -654,7 +654,7 @@ namespace System.Data.OracleClient.Oci
byte[] valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref short indp,
IntPtr indp,
IntPtr alenp,
IntPtr rcodep,
uint maxarr_len,
@ -665,7 +665,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIBindByPos", "OCI");
#endif
return OciNativeCalls.OCIBindByPosBytes (stmtp, out bindpp, errhp, position, valuep,
value_sz, dty, ref indp, alenp, rcodep, maxarr_len, curelp, mode);
value_sz, dty, indp, alenp, rcodep, maxarr_len, curelp, mode);
}
[DllImport ("oci")]
@ -723,8 +723,8 @@ namespace System.Data.OracleClient.Oci
IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode)
{
@ -732,7 +732,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIDefineByPos", "OCI");
#endif
return OciNativeCalls.OCIDefineByPos (stmtp, out defnpp, errhp, position, valuep,
value_sz, dty, ref indp, ref rlenp, rcodep, mode);
value_sz, dty, indp, rlenp, rcodep, mode);
}
internal static int OCIDefineByPosPtr (IntPtr stmtp,
@ -742,8 +742,8 @@ namespace System.Data.OracleClient.Oci
ref IntPtr valuep,
int value_sz,
OciDataType dty,
ref short indp,
ref short rlenp,
IntPtr indp,
IntPtr rlenp,
IntPtr rcodep,
uint mode)
{
@ -751,7 +751,7 @@ namespace System.Data.OracleClient.Oci
Trace.WriteLineIf(traceOci, "OCIDefineByPosPtr", "OCI");
#endif
return OciNativeCalls.OCIDefineByPosPtr (stmtp, out defnpp, errhp, position, ref valuep,
value_sz, dty, ref indp, ref rlenp, rcodep, mode);
value_sz, dty, indp, rlenp, rcodep, mode);
}
internal static int OCIDescriptorFree (IntPtr hndlp,

View File

@ -32,16 +32,16 @@ namespace System.Data.OracleClient.Oci
//IntPtr handle;
IntPtr value;
short indicator;
IntPtr indicator;
//OracleType type;
OciDataType ociType;
OciDataType definedType;
int definedSize;
short rlenp = 0;
IntPtr rlenp;
//short precision;
short scale;
Type fieldType;
//string name;
string name;
// Oracle defines the LONG VARCHAR and LONG VARRAW to have a size of 2 to the 31 power - 5
// see DefineLongVarChar and DefineLongVarRaw
@ -70,11 +70,13 @@ namespace System.Data.OracleClient.Oci
{
OciParameterDescriptor parameter = ((OciStatementHandle) Parent).GetParameter (position);
//name = parameter.GetName ();
name = parameter.GetName ();
definedType = parameter.GetDataType ();
definedSize = parameter.GetDataSize ();
//precision = parameter.GetPrecision ();
scale = parameter.GetScale ();
rlenp = OciCalls.AllocateClear (sizeof(short));
indicator = OciCalls.AllocateClear (sizeof(short));
Define (position, connection);
@ -103,7 +105,7 @@ namespace System.Data.OracleClient.Oci
}
internal bool IsNull {
get { return (indicator == -1); }
get { return (Indicator == -1); }
}
internal short Scale {
@ -111,7 +113,13 @@ namespace System.Data.OracleClient.Oci
}
internal short Size {
get { return rlenp; }
get { return(Marshal.ReadInt16(rlenp)); }
set { Marshal.WriteInt16(rlenp, value); }
}
internal short Indicator {
get { return(Marshal.ReadInt16(indicator)); }
set { Marshal.WriteInt16(indicator, value); }
}
internal IntPtr Value {
@ -192,8 +200,8 @@ namespace System.Data.OracleClient.Oci
ref value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@ -222,8 +230,8 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@ -261,11 +269,11 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero, 0);
rlenp = (short) definedSize;
Size = (short) definedSize;
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
@ -291,8 +299,8 @@ namespace System.Data.OracleClient.Oci
value,
maxByteCount,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
OciErrorHandle.ThrowExceptionIfError (ErrorHandle, status);
@ -312,10 +320,10 @@ namespace System.Data.OracleClient.Oci
ErrorHandle,
position + 1,
value,
definedSize * 2,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@ -357,8 +365,8 @@ namespace System.Data.OracleClient.Oci
ref value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@ -386,8 +394,8 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero, 0);
if (status != 0) {
@ -415,8 +423,8 @@ namespace System.Data.OracleClient.Oci
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero, 0);
if (status != 0) {
@ -459,8 +467,8 @@ namespace System.Data.OracleClient.Oci
ref value,
definedSize,
ociType,
ref indicator,
ref rlenp,
indicator,
rlenp,
IntPtr.Zero,
0);
@ -487,6 +495,8 @@ namespace System.Data.OracleClient.Oci
}
disposed = true;
} finally {
Marshal.FreeHGlobal (indicator);
Marshal.FreeHGlobal (rlenp);
base.Dispose (disposing);
value = IntPtr.Zero;
}