Bug #62194 MySqlParameter constructor does not set all properties.
Submitted: 17 Aug 2011 15:40 Modified: 29 Sep 2011 19:32
Reporter: Сергей Петров Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:6.4.3 OS:Windows (Seven SP1)
Assigned to: Gabriela Martinez Sanchez CPU Architecture:Any

[17 Aug 2011 15:40] Сергей Петров
Description:
MySqlParameter constructor "public MySqlParameter(string parameterName, MySqlDbType dbType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value)" does not set value for IsNullable, Precision and Scale properties.

How to repeat:
using System;
using System.Data;
using MySql.Data.MySqlClient;
internal static class Test{
    private static void Main(){
        try{
            MySqlParameter p=new MySqlParameter("Name",MySqlDbType.Decimal,0,ParameterDirection.Input,true,10,20,"Name",DataRowVersion.Default,0);
            Console.WriteLine("{0}|{1}|{2}",p.IsNullable,p.Precision,p.Scale);
        }catch(Exception e){
            Console.WriteLine(e);
        }
        Console.ReadKey(true);
    }
}