public void GetProcedureParametersDoesNotRequireSelectFromMySqlProceduresTable()
        {
            executeSQL(@"CREATE  PROCEDURE spTest(id INT, name VARCHAR(20))
          BEGIN SELECT name; END");

            MySqlConnectionStringBuilder cb = new MySqlConnectionStringBuilder(Connection.ConnectionString);

            cb.CheckParameters = false;

            using (MySqlConnection c = new MySqlConnection(cb.ConnectionString))
            {
                c.Open();

                string[] restrictions = new string[4];
                restrictions[1] = c.Database;
                restrictions[2] = "spTest";

                DataTable procTable = c.GetSchema("procedures", restrictions);

                ISSchemaProvider isp  = new ISSchemaProvider(c);
                string[]         rest = isp.CleanRestrictions(restrictions);

                MySqlSchemaCollection parametersTable = isp.GetProcedureParameters(rest, new MySqlSchemaCollection(procTable));

                Assert.NotNull(parametersTable);
            }
        }
Exemple #2
0
        internal static void SetDSInfo(MySqlSchemaCollection sc)
        {
            // we use name indexing because this method will only be called
            // when GetSchema is called for the DataSourceInformation
            // collection and then it wil be cached.
            MySqlSchemaRow row = sc.AddRow();

            row["TypeName"]              = "BIT";
            row["ProviderDbType"]        = MySqlDbType.Bit;
            row["ColumnSize"]            = 64;
            row["CreateFormat"]          = "BIT";
            row["CreateParameters"]      = DBNull.Value;;
            row["DataType"]              = typeof(UInt64).ToString();
            row["IsAutoincrementable"]   = false;
            row["IsBestMatch"]           = true;
            row["IsCaseSensitive"]       = false;
            row["IsFixedLength"]         = false;
            row["IsFixedPrecisionScale"] = true;
            row["IsLong"]               = false;
            row["IsNullable"]           = true;
            row["IsSearchable"]         = true;
            row["IsSearchableWithLike"] = false;
            row["IsUnsigned"]           = false;
            row["MaximumScale"]         = 0;
            row["MinimumScale"]         = 0;
            row["IsConcurrencyType"]    = DBNull.Value;
            row["IsLiteralSupported"]   = false;
            row["LiteralPrefix"]        = DBNull.Value;
            row["LiteralSuffix"]        = DBNull.Value;
            row["NativeDataType"]       = DBNull.Value;
        }
Exemple #3
0
        internal static void SetDSInfo(MySqlSchemaCollection sc)
        {
            MySqlSchemaRow mySqlSchemaRow = sc.AddRow();

            mySqlSchemaRow["TypeName"]              = "BIGINT";
            mySqlSchemaRow["ProviderDbType"]        = MySqlDbType.UInt64;
            mySqlSchemaRow["ColumnSize"]            = 0;
            mySqlSchemaRow["CreateFormat"]          = "BIGINT UNSIGNED";
            mySqlSchemaRow["CreateParameters"]      = null;
            mySqlSchemaRow["DataType"]              = "System.UInt64";
            mySqlSchemaRow["IsAutoincrementable"]   = true;
            mySqlSchemaRow["IsBestMatch"]           = true;
            mySqlSchemaRow["IsCaseSensitive"]       = false;
            mySqlSchemaRow["IsFixedLength"]         = true;
            mySqlSchemaRow["IsFixedPrecisionScale"] = true;
            mySqlSchemaRow["IsLong"]               = false;
            mySqlSchemaRow["IsNullable"]           = true;
            mySqlSchemaRow["IsSearchable"]         = true;
            mySqlSchemaRow["IsSearchableWithLike"] = false;
            mySqlSchemaRow["IsUnsigned"]           = true;
            mySqlSchemaRow["MaximumScale"]         = 0;
            mySqlSchemaRow["MinimumScale"]         = 0;
            mySqlSchemaRow["IsConcurrencyType"]    = DBNull.Value;
            mySqlSchemaRow["IsLiteralSupported"]   = false;
            mySqlSchemaRow["LiteralPrefix"]        = null;
            mySqlSchemaRow["LiteralSuffix"]        = null;
            mySqlSchemaRow["NativeDataType"]       = null;
        }
Exemple #4
0
        internal static void SetDSInfo(MySqlSchemaCollection sc)
        {
            MySqlSchemaRow expr_06 = sc.AddRow();

            expr_06["TypeName"]              = "BIT";
            expr_06["ProviderDbType"]        = MySqlDbType.Bit;
            expr_06["ColumnSize"]            = 64;
            expr_06["CreateFormat"]          = "BIT";
            expr_06["CreateParameters"]      = DBNull.Value;
            expr_06["DataType"]              = typeof(ulong).ToString();
            expr_06["IsAutoincrementable"]   = false;
            expr_06["IsBestMatch"]           = true;
            expr_06["IsCaseSensitive"]       = false;
            expr_06["IsFixedLength"]         = false;
            expr_06["IsFixedPrecisionScale"] = true;
            expr_06["IsLong"]               = false;
            expr_06["IsNullable"]           = true;
            expr_06["IsSearchable"]         = true;
            expr_06["IsSearchableWithLike"] = false;
            expr_06["IsUnsigned"]           = false;
            expr_06["MaximumScale"]         = 0;
            expr_06["MinimumScale"]         = 0;
            expr_06["IsConcurrencyType"]    = DBNull.Value;
            expr_06["IsLiteralSupported"]   = false;
            expr_06["LiteralPrefix"]        = DBNull.Value;
            expr_06["LiteralSuffix"]        = DBNull.Value;
            expr_06["NativeDataType"]       = DBNull.Value;
        }
Exemple #5
0
 internal static void SetDSInfo(MySqlSchemaCollection sc)
 {
     string[] array = new string[]
     {
         "CHAR",
         "NCHAR",
         "VARCHAR",
         "NVARCHAR",
         "SET",
         "ENUM",
         "TINYTEXT",
         "TEXT",
         "MEDIUMTEXT",
         "LONGTEXT"
     };
     MySqlDbType[] array2 = new MySqlDbType[]
     {
         MySqlDbType.String,
         MySqlDbType.String,
         MySqlDbType.VarChar,
         MySqlDbType.VarChar,
         MySqlDbType.Set,
         MySqlDbType.Enum,
         MySqlDbType.TinyText,
         MySqlDbType.Text,
         MySqlDbType.MediumText,
         MySqlDbType.LongText
     };
     for (int i = 0; i < array.Length; i++)
     {
         MySqlSchemaRow mySqlSchemaRow = sc.AddRow();
         mySqlSchemaRow["TypeName"]              = array[i];
         mySqlSchemaRow["ProviderDbType"]        = array2[i];
         mySqlSchemaRow["ColumnSize"]            = 0;
         mySqlSchemaRow["CreateFormat"]          = ((i < 4) ? (array[i] + "({0})") : array[i]);
         mySqlSchemaRow["CreateParameters"]      = ((i < 4) ? "size" : null);
         mySqlSchemaRow["DataType"]              = "System.String";
         mySqlSchemaRow["IsAutoincrementable"]   = false;
         mySqlSchemaRow["IsBestMatch"]           = true;
         mySqlSchemaRow["IsCaseSensitive"]       = false;
         mySqlSchemaRow["IsFixedLength"]         = false;
         mySqlSchemaRow["IsFixedPrecisionScale"] = true;
         mySqlSchemaRow["IsLong"]               = false;
         mySqlSchemaRow["IsNullable"]           = true;
         mySqlSchemaRow["IsSearchable"]         = true;
         mySqlSchemaRow["IsSearchableWithLike"] = true;
         mySqlSchemaRow["IsUnsigned"]           = false;
         mySqlSchemaRow["MaximumScale"]         = 0;
         mySqlSchemaRow["MinimumScale"]         = 0;
         mySqlSchemaRow["IsConcurrencyType"]    = DBNull.Value;
         mySqlSchemaRow["IsLiteralSupported"]   = false;
         mySqlSchemaRow["LiteralPrefix"]        = null;
         mySqlSchemaRow["LiteralSuffix"]        = null;
         mySqlSchemaRow["NativeDataType"]       = null;
     }
 }
        public async Task GetSchemaCollectionAsync()
        {
            MySqlConnection c1 = new MySqlConnection(st.GetConnectionString(true));

            c1.Open();
            MySqlSchemaCollection schemaColl = await c1.GetSchemaCollectionAsync(SchemaProvider.MetaCollection, null);

            c1.Close();
            Assert.NotNull(schemaColl);
        }
Exemple #7
0
 internal static void SetDSInfo(MySqlSchemaCollection sc)
 {
     string[] array = new string[]
     {
         "INT",
         "YEAR",
         "MEDIUMINT"
     };
     MySqlDbType[] array2 = new MySqlDbType[]
     {
         MySqlDbType.Int32,
         MySqlDbType.Year,
         MySqlDbType.Int24
     };
     for (int i = 0; i < array.Length; i++)
     {
         MySqlSchemaRow expr_3E = sc.AddRow();
         expr_3E["TypeName"]              = array[i];
         expr_3E["ProviderDbType"]        = array2[i];
         expr_3E["ColumnSize"]            = 0;
         expr_3E["CreateFormat"]          = array[i];
         expr_3E["CreateParameters"]      = null;
         expr_3E["DataType"]              = "System.Int32";
         expr_3E["IsAutoincrementable"]   = (array2[i] != MySqlDbType.Year);
         expr_3E["IsBestMatch"]           = true;
         expr_3E["IsCaseSensitive"]       = false;
         expr_3E["IsFixedLength"]         = true;
         expr_3E["IsFixedPrecisionScale"] = true;
         expr_3E["IsLong"]               = false;
         expr_3E["IsNullable"]           = true;
         expr_3E["IsSearchable"]         = true;
         expr_3E["IsSearchableWithLike"] = false;
         expr_3E["IsUnsigned"]           = false;
         expr_3E["MaximumScale"]         = 0;
         expr_3E["MinimumScale"]         = 0;
         expr_3E["IsConcurrencyType"]    = DBNull.Value;
         expr_3E["IsLiteralSupported"]   = false;
         expr_3E["LiteralPrefix"]        = null;
         expr_3E["LiteralSuffix"]        = null;
         expr_3E["NativeDataType"]       = null;
     }
 }
 internal static void SetDSInfo(MySqlSchemaCollection sc)
 {
     string[] array = new string[]
     {
         "DATE",
         "DATETIME",
         "TIMESTAMP"
     };
     MySqlDbType[] array2 = new MySqlDbType[]
     {
         MySqlDbType.Date,
         MySqlDbType.DateTime,
         MySqlDbType.Timestamp
     };
     for (int i = 0; i < array.Length; i++)
     {
         MySqlSchemaRow mySqlSchemaRow = sc.AddRow();
         mySqlSchemaRow["TypeName"]              = array[i];
         mySqlSchemaRow["ProviderDbType"]        = array2[i];
         mySqlSchemaRow["ColumnSize"]            = 0;
         mySqlSchemaRow["CreateFormat"]          = array[i];
         mySqlSchemaRow["CreateParameters"]      = null;
         mySqlSchemaRow["DataType"]              = "System.DateTime";
         mySqlSchemaRow["IsAutoincrementable"]   = false;
         mySqlSchemaRow["IsBestMatch"]           = true;
         mySqlSchemaRow["IsCaseSensitive"]       = false;
         mySqlSchemaRow["IsFixedLength"]         = true;
         mySqlSchemaRow["IsFixedPrecisionScale"] = true;
         mySqlSchemaRow["IsLong"]               = false;
         mySqlSchemaRow["IsNullable"]           = true;
         mySqlSchemaRow["IsSearchable"]         = true;
         mySqlSchemaRow["IsSearchableWithLike"] = false;
         mySqlSchemaRow["IsUnsigned"]           = false;
         mySqlSchemaRow["MaximumScale"]         = 0;
         mySqlSchemaRow["MinimumScale"]         = 0;
         mySqlSchemaRow["IsConcurrencyType"]    = DBNull.Value;
         mySqlSchemaRow["IsLiteralSupported"]   = false;
         mySqlSchemaRow["LiteralPrefix"]        = null;
         mySqlSchemaRow["LiteralSuffix"]        = null;
         mySqlSchemaRow["NativeDataType"]       = null;
     }
 }
        public static void SetDSInfo(MySqlSchemaCollection sc)
        {
            string[]      types  = new string[] { "BLOB", "TINYBLOB", "MEDIUMBLOB", "LONGBLOB", "BINARY", "VARBINARY" };
            MySqlDbType[] dbtype = new MySqlDbType[] { MySqlDbType.Blob,
                                                       MySqlDbType.TinyBlob, MySqlDbType.MediumBlob, MySqlDbType.LongBlob, MySqlDbType.Binary, MySqlDbType.VarBinary };
            long[]   sizes  = new long[] { 65535L, 255L, 16777215L, 4294967295L, 255L, 65535L };
            string[] format = new string[] { null, null, null, null, "binary({0})", "varbinary({0})" };
            string[] parms  = new string[] { null, null, null, null, "length", "length" };

            // we use name indexing because this method will only be called
            // when GetSchema is called for the DataSourceInformation
            // collection and then it wil be cached.
            for (int x = 0; x < types.Length; x++)
            {
                MySqlSchemaRow row = sc.AddRow();
                row["TypeName"]              = types[x];
                row["ProviderDbType"]        = dbtype[x];
                row["ColumnSize"]            = sizes[x];
                row["CreateFormat"]          = format[x];
                row["CreateParameters"]      = parms[x];
                row["DataType"]              = "System.Byte[]";
                row["IsAutoincrementable"]   = false;
                row["IsBestMatch"]           = true;
                row["IsCaseSensitive"]       = false;
                row["IsFixedLength"]         = x < 4 ? false : true;
                row["IsFixedPrecisionScale"] = false;
                row["IsLong"]               = sizes[x] > 255;
                row["IsNullable"]           = true;
                row["IsSearchable"]         = false;
                row["IsSearchableWithLike"] = false;
                row["IsUnsigned"]           = DBNull.Value;
                row["MaximumScale"]         = DBNull.Value;
                row["MinimumScale"]         = DBNull.Value;
                row["IsConcurrencyType"]    = DBNull.Value;
                row["IsLiteralSupported"]   = false;
                row["LiteralPrefix"]        = "0x";
                row["LiteralSuffix"]        = DBNull.Value;
                row["NativeDataType"]       = DBNull.Value;
            }
        }
Exemple #10
0
        internal static void SetDSInfo(MySqlSchemaCollection sc)
        {
            string[] types = new string[] { "CHAR", "NCHAR", "VARCHAR", "NVARCHAR", "SET",
                                            "ENUM", "TINYTEXT", "TEXT", "MEDIUMTEXT", "LONGTEXT" };
            MySqlDbType[] dbtype = new MySqlDbType[] { MySqlDbType.String, MySqlDbType.String,
                                                       MySqlDbType.VarChar, MySqlDbType.VarChar, MySqlDbType.Set, MySqlDbType.Enum,
                                                       MySqlDbType.TinyText, MySqlDbType.Text, MySqlDbType.MediumText,
                                                       MySqlDbType.LongText };

            // we use name indexing because this method will only be called
            // when GetSchema is called for the DataSourceInformation
            // collection and then it wil be cached.
            for (int x = 0; x < types.Length; x++)
            {
                MySqlSchemaRow row = sc.AddRow();
                row["TypeName"]              = types[x];
                row["ProviderDbType"]        = dbtype[x];
                row["ColumnSize"]            = 0;
                row["CreateFormat"]          = x < 4 ? types[x] + "({0})" : types[x];
                row["CreateParameters"]      = x < 4 ? "size" : null;
                row["DataType"]              = "System.String";
                row["IsAutoincrementable"]   = false;
                row["IsBestMatch"]           = true;
                row["IsCaseSensitive"]       = false;
                row["IsFixedLength"]         = false;
                row["IsFixedPrecisionScale"] = true;
                row["IsLong"]               = false;
                row["IsNullable"]           = true;
                row["IsSearchable"]         = true;
                row["IsSearchableWithLike"] = true;
                row["IsUnsigned"]           = false;
                row["MaximumScale"]         = 0;
                row["MinimumScale"]         = 0;
                row["IsConcurrencyType"]    = DBNull.Value;
                row["IsLiteralSupported"]   = false;
                row["LiteralPrefix"]        = null;
                row["LiteralSuffix"]        = null;
                row["NativeDataType"]       = null;
            }
        }
Exemple #11
0
        internal static void SetDSInfo(MySqlSchemaCollection sc)
        {
            string[]      types  = new string[] { "MEDIUMINT", "INT" };
            MySqlDbType[] dbtype = new MySqlDbType[] { MySqlDbType.UInt24,
                                                       MySqlDbType.UInt32 };

            // we use name indexing because this method will only be called
            // when GetSchema is called for the DataSourceInformation
            // collection and then it wil be cached.
            for (int x = 0; x < types.Length; x++)
            {
                MySqlSchemaRow row = sc.AddRow();
                row["TypeName"]              = types[x];
                row["ProviderDbType"]        = dbtype[x];
                row["ColumnSize"]            = 0;
                row["CreateFormat"]          = types[x] + " UNSIGNED";
                row["CreateParameters"]      = null;
                row["DataType"]              = "System.UInt32";
                row["IsAutoincrementable"]   = true;
                row["IsBestMatch"]           = true;
                row["IsCaseSensitive"]       = false;
                row["IsFixedLength"]         = true;
                row["IsFixedPrecisionScale"] = true;
                row["IsLong"]               = false;
                row["IsNullable"]           = true;
                row["IsSearchable"]         = true;
                row["IsSearchableWithLike"] = false;
                row["IsUnsigned"]           = true;
                row["MaximumScale"]         = 0;
                row["MinimumScale"]         = 0;
                row["IsConcurrencyType"]    = DBNull.Value;
                row["IsLiteralSupported"]   = false;
                row["LiteralPrefix"]        = null;
                row["LiteralSuffix"]        = null;
                row["NativeDataType"]       = null;
            }
        }
Exemple #12
0
 public static void SetDSInfo(MySqlSchemaCollection sc)
 {
     string[] array = new string[]
     {
         "BLOB",
         "TINYBLOB",
         "MEDIUMBLOB",
         "LONGBLOB",
         "BINARY",
         "VARBINARY"
     };
     MySqlDbType[] array2 = new MySqlDbType[]
     {
         MySqlDbType.Blob,
         MySqlDbType.TinyBlob,
         MySqlDbType.MediumBlob,
         MySqlDbType.LongBlob,
         MySqlDbType.Binary,
         MySqlDbType.VarBinary
     };
     long[] array3 = new long[]
     {
         65535L,
         255L,
         16777215L,
         4294967295L,
         255L,
         65535L
     };
     string[] array4 = new string[]
     {
         null,
         null,
         null,
         null,
         "binary({0})",
         "varbinary({0})"
     };
     string[] array5 = new string[]
     {
         null,
         null,
         null,
         null,
         "length",
         "length"
     };
     for (int i = 0; i < array.Length; i++)
     {
         MySqlSchemaRow mySqlSchemaRow = sc.AddRow();
         mySqlSchemaRow["TypeName"]              = array[i];
         mySqlSchemaRow["ProviderDbType"]        = array2[i];
         mySqlSchemaRow["ColumnSize"]            = array3[i];
         mySqlSchemaRow["CreateFormat"]          = array4[i];
         mySqlSchemaRow["CreateParameters"]      = array5[i];
         mySqlSchemaRow["DataType"]              = "System.Byte[]";
         mySqlSchemaRow["IsAutoincrementable"]   = false;
         mySqlSchemaRow["IsBestMatch"]           = true;
         mySqlSchemaRow["IsCaseSensitive"]       = false;
         mySqlSchemaRow["IsFixedLength"]         = (i >= 4);
         mySqlSchemaRow["IsFixedPrecisionScale"] = false;
         mySqlSchemaRow["IsLong"]               = (array3[i] > 255L);
         mySqlSchemaRow["IsNullable"]           = true;
         mySqlSchemaRow["IsSearchable"]         = false;
         mySqlSchemaRow["IsSearchableWithLike"] = false;
         mySqlSchemaRow["IsUnsigned"]           = DBNull.Value;
         mySqlSchemaRow["MaximumScale"]         = DBNull.Value;
         mySqlSchemaRow["MinimumScale"]         = DBNull.Value;
         mySqlSchemaRow["IsConcurrencyType"]    = DBNull.Value;
         mySqlSchemaRow["IsLiteralSupported"]   = false;
         mySqlSchemaRow["LiteralPrefix"]        = "0x";
         mySqlSchemaRow["LiteralSuffix"]        = DBNull.Value;
         mySqlSchemaRow["NativeDataType"]       = DBNull.Value;
     }
 }
        public void ProcedureParameters()
        {
            if (st.Version < new Version(5, 0))
            {
                return;
            }

            st.execSQL("DROP PROCEDURE IF EXISTS spTest");
            st.execSQL("CREATE PROCEDURE spTest (id int, name varchar(50)) BEGIN SELECT 1; END");

            string[] restrictions = new string[5];
            restrictions[1] = st.database0;
            restrictions[2] = "spTest";
#if RT
            MySqlSchemaCollection dt = st.conn.GetSchemaCollection("Procedure Parameters", restrictions);
            string tableName         = dt.Name;
#else
            DataTable dt        = st.conn.GetSchema("Procedure Parameters", restrictions);
            string    tableName = dt.TableName;
#endif
            Assert.True(dt.Rows.Count == 2);
            Assert.Equal("Procedure Parameters", tableName);
            Assert.Equal(st.database0.ToLower(), dt.Rows[0]["SPECIFIC_SCHEMA"].ToString().ToLower());
            Assert.Equal("sptest", dt.Rows[0]["SPECIFIC_NAME"].ToString().ToLower());
            Assert.Equal("id", dt.Rows[0]["PARAMETER_NAME"].ToString().ToLower());
            Assert.Equal(1, dt.Rows[0]["ORDINAL_POSITION"]);
            Assert.Equal("IN", dt.Rows[0]["PARAMETER_MODE"]);

            restrictions[4] = "name";
#if RT
            dt = st.conn.GetSchemaCollection("Procedure Parameters", restrictions);
#else
            dt.Clear();
            dt = st.conn.GetSchema("Procedure Parameters", restrictions);
#endif
            Assert.Equal(1, dt.Rows.Count);
            Assert.Equal("sptest", dt.Rows[0]["SPECIFIC_NAME"].ToString().ToLower());
            Assert.Equal("name", dt.Rows[0]["PARAMETER_NAME"].ToString().ToLower());
            Assert.Equal(2, dt.Rows[0]["ORDINAL_POSITION"]);
            Assert.Equal("IN", dt.Rows[0]["PARAMETER_MODE"]);

            st.execSQL("DROP FUNCTION IF EXISTS spFunc");
            st.execSQL("CREATE FUNCTION spFunc (id int) RETURNS INT BEGIN RETURN 1; END");

            restrictions[4] = null;
            restrictions[1] = st.database0;
            restrictions[2] = "spFunc";
#if RT
            dt = st.conn.GetSchemaCollection("Procedure Parameters", restrictions);
#else
            dt = st.conn.GetSchema("Procedure Parameters", restrictions);
#endif
            Assert.True(dt.Rows.Count == 2);
            Assert.Equal("Procedure Parameters", tableName);
            Assert.Equal(st.database0.ToLower(), dt.Rows[0]["SPECIFIC_SCHEMA"].ToString().ToLower());
            Assert.Equal("spfunc", dt.Rows[0]["SPECIFIC_NAME"].ToString().ToLower());
            Assert.Equal(0, dt.Rows[0]["ORDINAL_POSITION"]);

            Assert.Equal(st.database0.ToLower(), dt.Rows[1]["SPECIFIC_SCHEMA"].ToString().ToLower());
            Assert.Equal("spfunc", dt.Rows[1]["SPECIFIC_NAME"].ToString().ToLower());
            Assert.Equal("id", dt.Rows[1]["PARAMETER_NAME"].ToString().ToLower());
            Assert.Equal(1, dt.Rows[1]["ORDINAL_POSITION"]);
            Assert.Equal("IN", dt.Rows[1]["PARAMETER_MODE"]);
        }
        public void SingleProcedureParameters()
        {
            if (st.Version < new Version(5, 0))
            {
                return;
            }

            st.execSQL("DROP PROCEDURE IF EXISTS spTest");
            st.execSQL("CREATE PROCEDURE spTest(id int, IN id2 INT(11), " +
                       "INOUT io1 VARCHAR(20), OUT out1 FLOAT) BEGIN END");
            string[] restrictions = new string[4];
            restrictions[1] = st.database0;
            restrictions[2] = "spTest";
#if RT
            MySqlSchemaCollection procs = st.conn.GetSchemaCollection("PROCEDURES", restrictions);
#else
            DataTable procs = st.conn.GetSchema("PROCEDURES", restrictions);
#endif
            Assert.Equal(1, procs.Rows.Count);
            Assert.Equal("spTest", procs.Rows[0][0]);
            Assert.Equal(st.database0.ToLower(), procs.Rows[0][2].ToString().ToLower(CultureInfo.InvariantCulture));
            Assert.Equal("spTest", procs.Rows[0][3]);

#if RT
            MySqlSchemaCollection parameters = st.conn.GetSchemaCollection("PROCEDURE PARAMETERS", restrictions);
#else
            DataTable parameters = st.conn.GetSchema("PROCEDURE PARAMETERS", restrictions);
#endif
            Assert.Equal(4, parameters.Rows.Count);

#if RT
            MySqlSchemaRow row = parameters.Rows[0];
#else
            DataRow row = parameters.Rows[0];
#endif
            Assert.Equal(st.database0.ToLower(CultureInfo.InvariantCulture),
                         row["SPECIFIC_SCHEMA"].ToString().ToLower(CultureInfo.InvariantCulture));
            Assert.Equal("spTest", row["SPECIFIC_NAME"]);
            Assert.Equal(1, row["ORDINAL_POSITION"]);
            Assert.Equal("IN", row["PARAMETER_MODE"]);
            Assert.Equal("id", row["PARAMETER_NAME"]);
            Assert.Equal("INT", row["DATA_TYPE"].ToString().ToUpper(CultureInfo.InvariantCulture));

            row = parameters.Rows[1];
            Assert.Equal(st.database0.ToLower(CultureInfo.InvariantCulture), row["SPECIFIC_SCHEMA"].ToString().ToLower(CultureInfo.InvariantCulture));
            Assert.Equal("spTest", row["SPECIFIC_NAME"]);
            Assert.Equal(2, row["ORDINAL_POSITION"]);
            Assert.Equal("IN", row["PARAMETER_MODE"]);
            Assert.Equal("id2", row["PARAMETER_NAME"]);
            Assert.Equal("INT", row["DATA_TYPE"].ToString().ToUpper(CultureInfo.InvariantCulture));

            row = parameters.Rows[2];
            Assert.Equal(st.database0.ToLower(CultureInfo.InvariantCulture), row["SPECIFIC_SCHEMA"].ToString().ToLower(CultureInfo.InvariantCulture));
            Assert.Equal("spTest", row["SPECIFIC_NAME"]);
            Assert.Equal(3, row["ORDINAL_POSITION"]);
            Assert.Equal("INOUT", row["PARAMETER_MODE"]);
            Assert.Equal("io1", row["PARAMETER_NAME"]);
            Assert.Equal("VARCHAR", row["DATA_TYPE"].ToString().ToUpper(CultureInfo.InvariantCulture));

            row = parameters.Rows[3];
            Assert.Equal(st.database0.ToLower(CultureInfo.InvariantCulture), row["SPECIFIC_SCHEMA"].ToString().ToLower(CultureInfo.InvariantCulture));
            Assert.Equal("spTest", row["SPECIFIC_NAME"]);
            Assert.Equal(4, row["ORDINAL_POSITION"]);
            Assert.Equal("OUT", row["PARAMETER_MODE"]);
            Assert.Equal("out1", row["PARAMETER_NAME"]);
            Assert.Equal("FLOAT", row["DATA_TYPE"].ToString().ToUpper(CultureInfo.InvariantCulture));
        }