This release fixes bugs since 6.4.5.
Bugs Fixed
When using Entity Frameworks: Code First in Visual Studio 2012 and using a GUID as the primary key in a class, the following error could occur:
Incorrect column specifier for column 'column_name'.
Connector/Net was applying the AUTO_INCREMENT
attribute to the column, which requires that the column use an
integer data type.
(Bug #15834176, Bug #67450)
Calling the method FirstOrDefault “LINQ
to Entities” queries caused a
System.Data.EntityCommandCompilationException
exception.
(Bug #15856964, Bug #67377)
Connection attempts using IPV6 addresses in Connector/Net would fail. (Bug #14835718, Bug #67253)
Visual Studio 2012 projects could sometimes give the following error dialog:
Failed to merge object(s). Keyword not supported. Parameter name: AttachDbFilename.
This issue affected mostly VisualStudio 2012 projects, either migrated from VisualStudio 2010 or including web sites created with VS2010, connecting to a MySQL 5.5 server. (Bug #14733472, Bug #66880)
When an application starts up, creates a connection, and then goes idle after a single database operation, the connections are now cleaned up more quickly: typically after an idle time of 3 minutes rather than 6 minutes. This optimization is especially useful for ASP.net applications on low-traffic sites. (Bug #14652624, Bug #66472)
Under some circumstances, setting
CacheServerProperties=true in the connection
string could cause a Packet too large error.
With connection pooling enabled and
CacheServerProperties=true, the first
connection worked as expected, but the second, third, and so on
connections would fail if the query exceeded 1024 bytes.
(Bug #14593547, Bug #66578)
Connector/Net did not support creating an entity with a key of
type string. During database creation, a
MySqlException was thrown saying
BLOB/TEXT column 'Name' used in key specification
without a key length. The DDL produced by the provider
specified a MEDIUMTEXT column for
the primary key without specifying a length for the key. This
fix is particularly important when working with Entity Framework
versions 4.3 and later, since the
__MigrationsHitory table (which replaces the
EdmMetadata table) uses a string property as
its key.
(Bug #14540202, Bug #65289, Bug #64288)
The ExecuteNonQuery() could return an error
Parameter '?' must be defined, when
attempting to execute a statement such as:
insert into table_name (Field1, Field1) VALUES(?,?)
That is, when referencing the same field twice with two
different ? placeholders.
(Bug #14499549, Bug #66060)
Customizing precision by calling the
HasPrecision() method within the
OnModelCreating() method in a Code First
project would always produce precision settings (10,2) rather
than the specified precision.
(Bug #14469048, Bug #65001)
The MySQL Connector/Net EntityFramework provider would throw
NullReferenceException when trying to insert
a new record with an empty VALUES clause.
Such an INSERT should work when the only
required (NOT NULL) column in the table is a
primary key auto-increment column.
(Bug #14479715, Bug #66066)
When building commands through the
MySql.Data.MySqlClient.MySqlCommand() class,
memory could be leaked because some
IO.MemoryStream instances were not being
freed efficiently. The memory leak could be an issue in
SQL-heavy applications, for example a logging application
processing large numbers of INSERT
statements.
(Bug #14468204, Bug #65696)
Using the Entity Data Model Designer decimal
type and CreateDatabase function, the values
were stored with 0 digits at the right of the decimal point.
With this fix, the default is 2 digits to the right of the
decimal point, and any precision specified through the Entity
Data Model Designer is applied correctly.
(Bug #14474342, Bug #65127)
When using a MySQL database set up as UTF32
as an ASP.net membership database, web applications could give a
“key too long” error, and the Website
Administration Tool would not connect to providers. The cause
was that the column
my_aspnet_sessions.SessionId, when converted
from Latin1 character set to
UTF32 with 4 bytes per character, exceeded
the length limit for a primary
key:
Specified key was too long; max key length is 767 bytes
(Bug #14495292, Bug #65144)
When using the ASP.net web security functionality with a MySQL
database, using features that access the
my_aspnet_usersinroles table caused an
exception:
MySql.Data.MySqlClient.MySqlException: Table 'testdb.my_aspnet_usersinrole' doesn't exist.
For example, this error could occur when trying to remove the
user from a role or find users in a role. The fix corrects the
spelling of the table name to
my_aspnet_usersinroles.
(Bug #14405338, Bug #65805)
Although the member variable
MySqlCommand.LastInsertedId was a 64-bit
long, its value was effectively capped at the
maximum value of Int32 (2,147,483,647). If a
primary key exceeded this value, the value of
LastInsertedId was wrong. This mismatch could
be an issue for tables with large numbers of rows.
(Bug #14171960, Bug #65452)
When using Entity Framework with Connector/Net, the association
property OnDelete was not taken into account
in the CreateDatabaseScript function of the
ObjectContext, leading to an error message
System.Data.UpdateException was unhandled.
The SQL generated by the CreateDatabaseScript
function was missing ON DELETE and
ON UPDATE clauses. These clauses were filled
in correctly by the DDL generation wizard.
(Bug #14008752, Bug #64779)
A call to a stored procedure or function in an application using the Code First entity framework could result in an error:
Unhandled Exception: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; ...
The code change allows syntax such as the following to invoke a
stored procedure, without using the
CALL statement and without using
CommandType.StoredProcedure.
int count = myContext.Database.SqlQuery<int>("GetCount").First();
(Bug #14008699, Bug #64999)
A System.InvalidCastException exception could
occur when calling a stored function. A workaround was to
specify the CheckParameters=false connection
option.
(Bug #13864627, Bug #64633)
When using the Entity Framework Code First approach, the generated code could be incorrect:
Missing length specifier for data types, such as
VARBINARY instead of
VARBINARY(.
n)
ALTER TABLE statements
referring to nonexistent tables, when private members were
specified inside the main class.
(Bug #13900091, Bug #64216)
When using the MySqlProfileProvider, calling
the function ProfileManager.DeleteProfiles
could throw an InvalidCastException
exception.
(Bug #13790123, Bug #64470)
In Visual Studio Table Designer, the name of a new index was always derived from the name of the table and could not be changed. (Bug #13613801)
When using the Entity Framework Code First approach, the
generated code could be use the
MEDIUMTEXT data type in contexts
where other types such as VARCHAR
were more appropriate, leading to errors such as:
error 0064: Facet 'MaxLength' must not be specified for type 'mediumtext'.
(Bug #13582335, Bug #63920)
In Visual Studio 2005, adding a new data connection through the
Server Explorer produced an error message: Package Load
Failure. The Visual Studio plugin was dynamically
linked against VS2008 version of assembly
Microsoft.VisualStudio.Data (v9.0). The fixed
plugin links with the VS2005 version (v8.0) of that library
instead instead, which is upward compatible with later Visual
Studio versions.
(Bug #13491674, Bug #63073)
