Version 6.6.6 has no changelog entries.
Functionality Added or Changed
When defining an entity with a
DatabaseGeneratedOption.Identity value with
Entity Framework Code First, you can now leave this column out
of the column list for an INSERT
or UPDATE statement. This feature
is especially useful for defining a column with a default value
corresponding to the CURRENT_TIMESTAMP()
return value:
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public DateTime DateCreated { get; set; }
(Bug #15935094)
Connector/Net now supports the MySQL 5.6 feature to store
connection-specific data in the server. A Connector/Net
application can supply to the server a list of key/value pairs
at login time. When you specify the connection option
Connect_Attrs, a predefined set of attribute
values is sent to the server.
Connector/Net automatically transmits the following attributes:
_pid
_client_version
_platform
_program_name
_os
_thread
To examine these connection-specific attributes on the server, query the Performance Schema tables described in Performance Schema Connection Attribute Tables. (Bug #15935112)
Connector/Net now supports the MySQL 5.6 password expiration
protocol. See ALTER USER for the
syntax to expire the password for a user. When you open a
connection through Connection/Net that logs in as a user with an
expired password, any statement issued through the connection
produces a SET PASSWORD exception. When you
create a connection in Visual Studio Server Explorer to a user
with an expired password, a dialog prompts for a new password,
after which the connection succeeds.
(Bug #15935104)
Connector/Net now supports SHA-256 hashing for user account passwords. After you create an account following the steps outlined in The SHA-256 Authentication Plugin, just open a Connector/Net connection passing user and password. This feature works in both SSL and non-SSL secured connections. (Bug #15935128)
Bugs Fixed
If a DateTime type in MySQL 5.6
was defined with milliseconds precision using Entity Framework
Code First or EF Model First, the expected
DateTime( column
did not include the precision specification.
(Bug #15972773)n)
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)
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)
Continued improvements and fixes to the 6.6 feature set. In particular, enhancements to partial trust support allow hosting services to deploy applications without installing the Connector/Net library in the GAC. This is the first release candidate for the 6.6 series.
Functionality Added or Changed
The medium trust support using the
MySQLClientPermissions class is now more
flexible: in addition to the original deployment method, where
the library is installed in the Global Assembly Cache (GAC), you
can also install the library within a bin or
lib folder inside the project or solution.
When the library is deployed somewhere other than the GAC, the
only protocol supported is TCP/IP. Existing applications that
use the library installed in the GAC must now include an extra
connection option,
includesecurityasserts=true. For details, see
Working with Partial Trust / Medium Trust.
(Bug #14668820, Bug #65036)
Bugs Fixed
Since Connector/Net 6.5, TIMESTAMP values
have been returned as DateTime objects with a
kind property of Local rather than
Unspecified.
MySqlDataReader.GetDateTime() should have
returned a date with a kind property of UTC
when the time_zone connection property was
utc. With this fix, if
time_zone is UTC,
Kind is also UTC;
otherwise, Kind is Local.
To work with multiple servers with different timezones, change
the time_zone setting to UTC in all
MySqlConnection objects. For example, if you
issue the command:
set @@global.time_zone = '+0:00',
With Kind = UTC, you can use .NET standard
APIs to translate between time zones for frontend applications
when required.
(Bug #14740705, Bug #66964)
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)
Continued improvements and fixes to the 6.6 feature set. The support for pluggable authentication, with the ability to write you own authentication plugin, is now ready for use.
Functionality Added or Changed
You can now write a custom authentication plugin, taking advantage of the pluggable authentication feature available in MySQL 5.5.16 and higher. See Writing a Custom Authentication Plugin for details.
Bugs Fixed
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 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)
Continued improvements and fixes to the 6.6 feature set.
Stored Procedure Debugging
This beta release removes several of the earlier limitations on stored procedure debugging:
Functions and triggers can now be debugged.
Intellisense is enabled in the debugger window.
The debugger supports the SQL grammar for all MySQL versions from 5.0 to 5.6.
When a debugging session is finished, stored routines that were instrumented are now restored to their original form.
You can now evaluate and change session variables, in addition to local variables in the procedure.
Conditional breakpoints are supported now.
When debugging a routine that has parameters, the debugger prompts for values to use for the parameters. These prompted values no longer overwrite session variables that have the same names.
You do not need to check the Save password checkbox when creating a new connection in Server Explorer.
These limitations remain:
Some MySQL functions cannot be debugged currently
(get_lock,
release_lock, begin,
commit, rollback,
set transaction level).
Only one debug session may be active on a given server.
Continued improvements and fixes to the 6.6 feature set.
Version 6.6.1 has no changelog entries.
First alpha release for Connector/NET 6.6. Major features of Connector/Net 6.6:
Stored procedure debugging in Microsoft Visual Studio.
Entity Framework 4.3 Code First support.
Pluggable authentication (not available in this alpha).
Entity Framework Code First Support
To support the Entity Framework 4.3.1, Connector/Net can now use the Code First approach when developing against a model, and keep track of the changes in the Entity Model and in the Database. This new Entity Framework 4.3.1 feature is focused in allowing your database to be updated along with your Code First Model changes.
Stored Procedure Debugging
The Connector/Net integration with Visual Studio now includes stored procedure debugging. It works in a very intuitive manner, by simply clicking Debug Routine from Server Explorer. The limitations in this preliminary alpha release include:
Can only debug stored procedures. Functions and triggers cannot be debugged yet.
Intellisense is currently not enabled in the debugger window.
Some MySQL functions cannot be debugged currently
(get_lock,
release_lock, begin,
commit, rollback,
set transaction level).
Only 5.1 grammar is currently supported.
Only one debug session may be active on a given server.
The debugger instruments your procedures automatically. The original procedure might not be not restored correctly.
Evaluating and changing session variables are not supported. Local variables in the procedure are supported.
Conditional breakpoints are not supported.
When debugging a routine that has parameters, the debugger will prompt for those values. It will create session variables out of them, so be careful to not use your own session variables that have the same name.
When creating a new connection in Server Explorer, please check the Save password checkbox.
Bugs Fixed
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)
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)
