MySQL for Visual Studio – Rollback during installation/uninstallation

A number of reports have been raised against versions 1.2.7 and 2.0.5 where the installation/uninstallation of MySQL for Visual Studio would rollback in Windows 7 environments preventing the operation from completing. We are glad to announce this has been addressed in the upcoming 1.2.8 version.

 

What is causing the failure?

It’s been identified that in most cases the rollback occurs when Visual Studio fails to execute the “devenv /updateconfiguration /log” command. Said command signals Visual Studio to merge the Visual Studio packages on the system and to check the MEF cache for any changes allowing it to register/unregister MySQL for Visual Studio. The failure is caused by faulty permissions when trying to execute any “devenv” command and is attributed to a known issue in Windows 7 environments with Visual Studio 2017 as indicated by several online reports such as:

 

Changes applied to MySQL for Visual Studio installer

MySQL for Visual Studio 1.2.8 msi installer has been updated to attempt to execute the command and to display a warning in the event that the execution fails, preventing the installation/uninstallation from rolling back. However, when said warning is raised, users are recommended to manually execute the command via the Developer Command Prompt for VS2017 to ensure the changes are reflected in Visual Studio.

The Developer Command Prompt for VS2017 is a tool included as part of the installation of Visual Studio 2017. It can be easily accessed by going to All Programs -> Visual Studio 2017 -> Visual Studio Tools. Alternatively the user can open any command prompt window and navigate to “<drive>:\Program Files (x86)\Microsoft Visual Studio\2017\<vs_version>\Common7\IDE” from where the “devenv /updateconfiguration /log” command can be executed as well.

 

Installation/uninstallation of MySQL for Visual Studio 1.2.7 / 2.0.5 workaround

As previously stated, the released versions of MySQL for Visual Studio 1.2.7 and 2.0.5 are affected by this issue, however there is a known workaround which is detailed below:

  1. If the user has custom settings set in the Visual Studio environment, proceed to export them via the Tools->Import and Export Settings option as they will be lost when executing step 2.
  2. Go to “%localappdata%\Microsoft\VisualStudio\15.0_<instance_id>” and delete the “privateregistry.bin” file.
  3. Attempt the installation/uninstallation again, it should succeed.
  4. Open Visual Studio. If for any reason Visual Studio fails to start with an “Unknown error” or any other error, again delete the “privateregistry.bin” file and then open Visual Studio.
  5. Import settings if applicable.

MySQL for Visual Studio 1.2.8 has been released

Dear MySQL users,

The MySQL Windows Experience Team is proud to announce the release
of MySQL for Visual Studio 1.2.8.

This is a maintenance release for 1.2.x. It can be used for
production environments.

MySQL for Visual Studio is a product that includes all of the
Visual Studio integration functionality to create and manage
MySQL databases when developing .NET applications.

MySQL for Visual Studio is installed using the MySQL Installer
for Windows which comes in 2 versions:
* Full (386.6 MB) which includes a complete set of MySQL products
with their binaries included in the downloaded bundle.
* Web (1.7 MB – a network install) which will just pull MySQL
for Visual Studio over the web and install it when run.

You can download MySQL Installer from our official Downloads page at
http://dev.mysql.com/downloads/installer/.

MySQL for Visual Studio can also be downloaded by using the product
standalone installer found at
http://dev.mysql.com/downloads/windows/visualstudio/.

Changes in MySQL for Visual Studio 1.2.8 (2018-05-04, General
Availability)

* Functionality Added or Changed

* Bugs Fixed

Functionality Added or Changed

* When Microsoft Visual Studio receives a request to
register (or unregister) MySQL for Visual Studio within
the IDE during the installation, Visual Studio might not
execute the command properly if the host is running
Windows 7. This fix identifies when Visual Studio does
not register MySQL for Visual Studio as requested and
then provides an alert to perform the registration
manually from the Developer Command Prompt for Visual
Studio using the following command:

devenv /updateconfiguration /log

(Bug #27365261, Bug #87902)

* MySQL for Visual Studio now supports the MySQL 8.0
release series (requires Connector/Net 6.9.12, 6.10.7, or
8.0.11) including:

+ MySQL data dictionary, which uses INFORMATION_SCHEMA
tables rather than tables in the mysql database (see
MySQL Data Dictionary
(http://dev.mysql.com/doc/refman/8.0/en/data-dictionary.html)).

+ The caching_sha2_password authentication plugin
introduced in MySQL 8.0 (see Caching SHA-2 Pluggable
Authentication
(http://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html)).
In addition, MySQL for Visual Studio now requires that
.NET Framework 4.5.2 (or later) be installed for use
within Visual Studio 2012 and Visual Studio 2013.

Bugs Fixed

* The Website Configuration Tool was unable to add an
ADO.NET entity data model to an ADO.NET web application
successfully. In addition to aligning the web.config file
with the installed version of Connector/Net, this fix
also disables the Entity Framework 5 selection when the
installed connector no longer includes a provider for EF5
(Connector/Net 6.10 and higher). (Bug #27593219)

* Queries made with a valid MySQL connection received no
response from the server. (Bug #27584991)

* When the MySQL for Visual Studio parser was unable to
parse an SQL statement, it generated an unhandled
exception that caused Visual Studio to exit unexpectedly.
This fix enables the parser to handle exceptions properly
and updates the parser to include support for CREATE USER
syntax in the MySQL 8.0 release series. (Bug #27580303)

* The version for the MySql.Web assembly was incorrectly
extracted, which prevented the assembly from loading
properly and the MySQL Website Configuration Tool from
launching. (Bug #27450530)

* Attempting to open the MySQL Web Configuration Tool, with
MySQL Connector/Net and MySQL for Visual Studio
prerequisites installed properly, displayed an error
message instead of opening the tool. (Bug #27365141, Bug
#88570)

On Behalf of MySQL Release Engineering Team,
Surabhi Bhat

MySQL Connector/NET 8.0.11 has been released

Dear MySQL users,

MySQL Connector/NET 8.0.11 is the first general availability release of
MySQL Connector/NET to add support for the new X DevAPI. The X DevAPI
enables application developers to write code that combines the strengths
of the relational and document models using a modern, NoSQL-like syntax
that does not assume previous experience writing traditional SQL.

To learn more about how to write applications using the X DevAPI, see
http://dev.mysql.com/doc/x-devapi-userguide/en/index.html. For more
information about how the X DevAPI is implemented in Connector/NET, see
http://dev.mysql.com/doc/dev/connector-net.

Please note that the X DevAPI requires at least MySQL Server version
5.7.12 or higher with the X Plugin enabled. For general documentation
about how to get started using MySQL as a document store, see
http://dev.mysql.com/doc/refman/5.7/en/document-store.html.

To download MySQL Connector/NET 8.0.11, see
http://dev.mysql.com/downloads/connector/net/


Changes in MySQL Connector/NET 8.0.11 (2018-04-19)

   Functionality Added or Changed

     * X DevAPI: Connector/NET now supports the NOWAIT and
       SKIP_LOCKED locking options introduced in the MySQL 8.0
       release series (see SELECT Syntax
       (http://dev.mysql.com/doc/refman/5.7/en/select.html)).
       The following changes were made to the Connector/NET API:

          + The LockContention enumeration (with values
            Default=0, NoWait=1 and SkipLocked=2) was added. The
            Default enumeration member represents the previous
            behavior of waiting for the row locks to be
            released.

          + The existing LockShared() and LockExclusive() method
            signatures were modified to include the new
            LockContention parameter. Both methods are members
            of the MySqlX.XdevAPI.CRUD.FindStatement and
            MySqlX.XdevAPI.Relational.TableSelectStatement
            classes.

          + Usage examples:
// Default behavior - waits for the row locks to release
LockShared()
LockShared(LockContention.Default)

LockExclusive()
LockExclusive(LockContention.Default)

// New - fails if the rows are locked
LockShared(LockContention.NoWait)
LockExclusive(LockContention.NoWait)

// New - succeeds excluding the locked rows from the result
LockShared(LockContention.SkipLocked)
LockExclusive(LockContention.SkipLocked)


     * X DevAPI: Previously, when documents without an _id
       attribute were added to a collection, Connector/NET
       automatically generated IDs for them. Now the server
       generates the _id attribute, unless a document already
       contains one. The generated IDs resulting from a
       document-add operation can be obtained using the new
       Result.GeneratedIds property, which returns a list.
       This capability requires a MySQL 8.0 GA server. If the
       server does not support document ID generation, the
       document-add operation returns an error indicating that
       document IDs were missing.
       Incompatibility: The GeneratedIds property replaces the
       DocumentId and DocumentIds properties, which are now
       removed.

     * X DevAPI: Support for the SHA256_MEMORY authentication
       mechanism was added to enable non-PLAIN insecure
       connections (without SSL) for user accounts with
       caching_sha2_password, which is the default
       authentication plugin introduced in the MySQL 8.0 release
       series. The changes related to this support include:

          + New synonyms for the auth connection string option:
            authentication and authentication mode (see General
            Options
           (http://dev.mysql.com/doc/connector-net/en/connector-net-connection-options.
          html#connector-net-connection-options-general)).

          + A new authentication mode for the
            MySqlAuthenticationMode enumeration: SHA256_MEMORY.
            In addition, the Default member now has a new
            synonym: Auto=0.

          + A new class:
            MySql.Data.MySqlClient.Authentication.Sha256MemoryAu
            thenticationPlugin.

     * Support was added for the new caching_sha2_password
       padding mechanism introduced in the MySQL 8.0 release
       series. The new padding mechanism is enabled when all of
       the following conditions apply:

          + The user account is set with the
            caching_sha2_password authentication plugin.

          + SSL is disabled explicitly (SslMode=none).

          + The AllowPublicKeyRetrieval connection option is
            enabled (AllowPublicKeyRetrieval=true).
       When enabled, the new padding mechanism is used to encode
       the password during RSA key encryption, which applies the
       correct padding to match the server.

   Bugs Fixed

     * Attempting to open the MySQL Web Configuration Tool, with
       Connector/NET and MySQL for Visual Studio prerequisites
       installed properly, displayed an error message instead of
       opening the tool. (Bug #27457398, Bug #88544)

     * MySQL Installer could not be installed with NuGet
       packages from Microsoft Visual Studio 2015. (Bug
       #27251839, Bug #88838)

     * When a decimal column was defined with a scale of zero,
       such as DECIMAL(8, 0), the value of the NumericPrecision
       field returned by the MySqlDataReader.GetSchemaTable
       method was lower by one. For example, it returned 7
       instead of 8 as expected. (Bug #26954812, Bug #88058)

     * The data table returned by the
       MySqlDataReader.GetSchemaTable method had an inaccurate
       value of zero assigned to the ColumnSize field for
       LONGTEXT and LONGBLOB data types, and also indicated that
       the IsLong field value was false when it should have
       returned true. (Bug #26876592, Bug #87876)

     * The MySqlDataReader.GetSchemaTable method returned
       different column-size values when used with different
       character sets. (Bug #26876582, Bug #87868)

     * Support for making a secure connection to a server
       configured to use TLSv1.2 was limited by external
       factors. (Bug #25689154)

     * Connection strings that included TLS/SSL connection
       parameters in URI type-string format generated an
       exception instead of making a connection with the X
       Protocol. (Bug #24510329)

     * Attempting to generate an Entity Framework model from a
       MySQL 5.7 database using either EF5 or EF6 produced an
       exception that prevented the operation from generating
       the expected model. (Bug #22173048, Bug #79163)

Introducing Connector/NET with full support for MySQL 8.0

Members of the .NET and MySQL communities and anyone interested in the subject, we are glad to announce the release of Connector/NET 8.0.11. This is the first GA release in the 8.0 series and it comes with full support for MySQL 8.0 (also now a GA) including its main feature… the MySQL Document Store!

 

What is new in MySQL 8.0?

X Protocol / X Plugin

The X Protocol is a new, highly extensible protocol optimized for SQL and CRUD API operations. It is based on the popular open source protocol definition language and provides a common interface for connectors to communicate with MySQL server through the X Plugin. The X Plugin serves as the server-side implementation of the document store among other features such as pipelining, protocol buffers, etc.

MySQL Document Store and the X DevAPI

MySQL Document Store is a flexible storage system that allows developers to work with relational tables and schema-less JSON collections in parallel. When being used to create documents you do not need to know and define all possible attributes before storing and operating with them, allowing for future customization with minimal effort.

The document store can be accessed and manipulated with the X DevAPI which is implemented by MySQL connectors that support the X Protocol, including Connector/NET. The X DevAPI is a fluent CRUD API that allows to work with JSON documents and relational data alike.

Implementation of the X DevAPI has been standardized across MySQL connectors allowing to switch to the language of choice with minimal effort. Be sure to check out the following links for additional information on the MySQL Document Store and its benefits:

A new default authentication plugin

MySQL 8.0 also introduces caching_sha2_password as the default authentication plugin. caching_sha2_password implements SHA_256 hashing as opposed to SHA_1 used by the old mysql_native_password. It also results in faster reauthentication for known users. Check out its documentation for additional details.

 

What is new in Connector/NET 8.0.11?

Security changes

Connector/NET comes with important security changes that will prove relevant and useful for newcomers and seasoned users alike:

  • Connections are now secure by default, meaning the default SSL Mode is now set to Required (sslmode=required).
  • Support for the new caching_sha2_password authentication plugin based on SHA_256 has been included. Note that to connect to the server using the caching_sha2_password plugin, a secure connection or an unencrypted connection that supports password exchange using an RSA key pair must be used.
  • Non-SSL connections for users set with the caching_sha2_password or sha256_password authentication plugins require that the AllowPublicKeyRetrieval connection option is set to True. This option will signal the server the need to return its public key required during RSA key encryption.

Connector/NET and the X DevAPI

Connector/NET implements the X DevAPI and exposes its features for .NET Developers. Let’s begin by showcasing how to setup the development environment.

Set Up

Setting up the environment is quick and simple, first make sure that the following requirements are met:

  • Visual Studio 2013+
  • .NET Framework 4.5.2+ / .NET Core 1.1 / .NET Core 2.0
  • MySQL Server 8.0+ with the X Plugin enabled

Then install/obtain Connector/NET 8.0.11+ via one of the following options:

  • MSI Installer
  • No-Install package
  • NuGet Package Manager (only the MySql.Data 8.0.11+ package is required)
  • Source code (for advanced users)

Note: MSI Installer, No-Install package and Source code options are all available in the main downloads page and can be selected through the “Select Operating System” drop down.

When ready to start coding simply create a .NET Framework/ .NET Core project such as a Console Project and reference the relevant assemblies as follows:

  • No-Install Package: Add a reference to the MySql.Data and Google.Protobuf assemblies by browsing to the said files within the downloaded package.
  • MSI Installer: Add a reference to the MySql.Data available in the Assemblies->Extensions section of the Reference Manager. No need to add a reference to Google.Protobuf as this is done automatically.
  • NuGet Package Manager: Simply search and install the MySql.Data package.

CRUD Example

A simple CRUD example will be used to demonstrate CRUD operations being applied to JSON documents through the use of the X DevAPI and to cover the basics:

1. Import the namespaces relevant for this code example:

Typically the MySqlX.XDevAPI and MySqlX.XDevAPI.Common namespaces will be required as they provide the basic functionality. When working on documents and collections use MySqlX.XDevAPI.CRUD, use MySqlX.XDevAPI.Relational for relational data.

2. Create a session

A session in the X DevAPI is a high-level database session concept that is different from working with traditional low-level MySQL connections. Sessions encapsulate one or more actual MySQL connections.

The X Protocol defines the connection URL which is an alternative syntax to the widely known connection strings. Connection strings are also supported when using the MySQLX.GetSession methods or any other methods that accept the connection URL such as the Session’s class constructor.

MySQLX.GetSession initiates a session ready to receive commands, no need to call the Open method as done with classic MySQL connections.

A Schema is used to store collections of documents. It can be considered the counterpart to a database within the relational model.

3. Insert a document into a collection

Collections reside within a Schema and are used to store documents. Documents can be declared in multiple ways, as .NET anonymous objects, plain JSON strings or as DbDoc instances which are the representation of a document within Connector/NET‘s implementation of the X DevAPI. DbDocs have the advantage of providing easier means to set or get properties associated to them.

Calling the Add method on a collection will mark a document as ready to be added into a collection, however it will actually be added into the collection upon calling the Execute method. This allows to keep adding documents to a queue and to add them into the collection via a single and final operation. A similar approach can be used with other CRUD operations. The Add method is overloaded to also support an array of documents.

4. Find a row within a collection

The Find method is used for retrieving documents from a collection and receives the condition for matching documents. The condition can receive parameters which can later be given a value with the Bind method. The Bind method supports receiving a DbDoc instance or a pair of strings signifying the key and value of the property being matched.

The operation returns a DocResult object containing the results of the execution and allowing to iterate through them via the Next, FetchOne, FetchAll and other methods.

5. Modify an existing document

Modify will allow updating documents based on the provided condition. Note that in this case the overload of Bind is being used to provide a value to the name1 parameter. Set method will allow setting the values to modify, in this case a new field is added into matching documents, showcasing the advantages of working with documents as opposed to the relational model! Additionally, notice the method chaining which allows for intuitive and simpler syntax for performing operations.

6. Remove a specific document

The Remove method as expected, will remove matching documents from the collection.

7. Close the session

Finally, be sure to close the session. Alternatively, taking the advantages of .NET into account, you can opt for handling sessions with a using statement which will grant the benefit of not having to explicitly close the session.

Even though this example focuses on collections and documents, similar operations can be applied to relational data as well. Refer to the reference documentation for more details.

Additional features

Raw SQL

Sometimes, you will encounter scenarios where CRUD operations are not the best option, where a specific feature isn’t supported by the X DevAPI or simply where your preference is to use raw SQL. The X DevAPI implements the Session.SQL method allowing exactly that. Method chaining is also supported for multiple Session.SQL method calls in the same statement and upon calling the Execute method the results of the operation are returned:

Transaction Save Points

When data consistency is essential, transactions and transaction save points are the key. Methods pertaining to transaction handling are implemented through the Session class.

Transactions can be initiated with the StartTransaction method and terminated with the Rollback and Commit methods. Transaction save points allow to jump to a specific point within a transaction. Methods SetSavepoint, RollbackTo and ReleaseSavepoint will aid in this regard:

Row Locking

An additional feature for ensuring data consistency and for avoiding deadlocks comes in the form of row locking. The LockShared and LockExclusive methods allow multiple transactions to modify the same set of data concurrently. More info on row locking can be found here.

Above code snippet makes use of the LockShared method to prevent rows from being modified by other transactions. In this case, session 2 isn’t allowed to modify rows locked by session 1 until they are released.

LockShared and LockExclusive are overloaded to also receive a parameter representing the lock mode to use, providing more control over waiting actions for locked rows. Refer to the LockContention enumeration in the reference documentation for the list of lock modes available.

Document Patching

The Patch method is a yet more powerful means for modifying matching documents. By providing a JSON-like object the user can describe the changes to be applied to matching documents, those changes being new fields, removing fields, setting fields by simply providing the value or by defining a calculated value such as the result of a function:

 

These are just a few of the features that MySQL 8.0 and Connector/NET 8.0.11 can offer through the use of the MySQL Document Store and the X DevAPI, more are yet to come. Additional examples, code snippets and features not covered in this blog post can be found in the X DevAPI User Guide as well as in the Developer Guide and Reference documentation.

Feedback is always welcome

We are very excited to find out what our users will be able to accomplish when taking advantage of these new offerings, so please try it out and rest assured that you’ll be guided along the way. If you happen to have any questions about this or any other Connector/NET related topic you can always post them in the product’s main forum. Additionally, bugs can be reported in MySQL Bugs.

We hope to hear from you soon!

Useful links

MySQL Connector/Net 6.9.10 has been released

Dear MySQL users,

MySQL Connector/Net 6.9.10 is a maintenance release for the 6.9.x
series of the .NET driver for MySQL. It can be used for production
environments.

It is appropriate for use with MySQL server versions 5.5-5.7.

It is now available in source and binary form from
http://dev.mysql.com/downloads/connector/net/#downloadsandmirrorsites
(note that not all mirror sites may be up to date at this point-if you
can’t find this version on some mirror, please try again later or choose
another download site.)


Changes in MySQL Connector/Net 6.9.10 (2017-10-23, General Availability)

   Bugs Fixed

     * Executing MySql.Web.Security.CreateUserAndAccount with
       valid arguments returned an out-of-range exception.
       Thanks to Stein Setvik for contributing to the fix.
       (Bug #25046364)

     * The default character set and encoding were not set
       properly when making a connection to MySQL 5.6 and 5.7
       servers configured to use the utf8 character set.
       (Bug #23257011)

The documentation is available at:
http://dev.mysql.com/doc/connector-net/en/

Nuget packages are available at:
https://www.nuget.org/packages/MySql.Data/6.9.10
https://www.nuget.org/packages/MySql.Data.Entity/6.9.10
https://www.nuget.org/packages/MySql.Fabric/6.9.10
https://www.nuget.org/packages/MySql.Web/6.9.10


Enjoy and thanks for the support!

On behalf of the MySQL Connector/NET and the MySQL/ORACLE RE Team
Gipson Pulla

MySQL Connector/Net 8.0.9-dmr has been released

Dear MySQL users,

MySQL Connector/Net 8.0.9 is the sixth development release that expands
cross-platform support to Linux and macOS when using Microsoft’s .NET Core
framework. Now, .NET developers can use the X DevAPI with .NET Core and
Entity Framework Core (EF Core) 1.0 to create server applications that run
on Windows, Linux and macOS. We are very excited about this change and
really look forward to your feedback on it!

MySQL Connector/Net 8.0.9 is also the eighth development release of MySQL
Connector/Net to add support for the new X DevAPI.  The X DevAPI enables
application developers to write code that combines the strengths of the
relational and document models using a modern, NoSQL-like syntax that
does not assume previous experience writing traditional SQL.

To learn more about how to write applications using the X DevAPI, see
http://dev.mysql.com/doc/x-devapi-userguide/en/index.html. For more
information about how the X DevAPI is implemented in Connector/Net, see
http://dev.mysql.com/doc/dev/connector-net.

Please note that the X DevAPI requires at least MySQL Server version
5.7.12 or higher with the X Plugin enabled. For general documentation
about how to get started using MySQL as a document store, see
http://dev.mysql.com/doc/refman/5.7/en/document-store.html.

To download MySQL Connector/Net 8.0.9-dmr, see the “Development
Releases” tab at http://dev.mysql.com/downloads/connector/net/


Changes in MySQL Connector/Net 8.0.9 (2017-09-28, Development Milestone)


* Functionality Added or Changed

* Bugs Fixed

Functionality Added or Changed

* For accuracy, the following Entity Framework 6 items were
renamed:

+ NuGet package - MySql.Data.EntityFramework (was
MySql.Data.Entity)

+ Namespace - MySql.Data.EntityFramework (was
MySql.Data.Entity)

+ Assembly - MySql.Data.EntityFramework.dll (was
MySql.Data.Entity.EF6.dll)
(Bug #26396260)

* X DevAPI: The SessionConfigManager.Update method was
removed and the SessionConfigManager.Save method now
always overwrites the data with the given key. For
example:
SessionConfigManager.Save(
"mysess",
"{ \"uri\": \"mysqlx://myuser@localhost/mysess\", \"appdata\": { \"biz\": \"quux\" } }"
);

SessionConfigManager.Save(
"mysess",
"{ \"uri\": \"mysqlx://test@localhost/mysess\", \"appdata\": { \"tar\": \"zzzz\" } }"
);

The mysess.uri and mysess.appdata values set by the first
statement are replaced with the new values set by the
second statement. (Bug #25829054, Bug #25860579)

* MySQL Connector/Net now supports MySQL servers configured
to use utf8mb4 as the default character set.

* The following methods are available for use with EF Core
in asynchronous command and connection operations:

+ Microsoft.EntityFrameworkCore.DbContext.AddAsync

+ Microsoft.EntityFrameworkCore.DbContext.AddRangeAsync

+ Microsoft.EntityFrameworkCore.DbContext.FindAsync

+ Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync

+ Microsoft.EntityFrameworkCore.Infrastructure.Databas
eFacade.EnsureDeletedAsync

+ Microsoft.EntityFrameworkCore.Infrastructure.Databas
eFacade.EnsureCreatedAsync

+ Microsoft.EntityFrameworkCore.DbContext.ToListAsync

* X DevAPI: The following methods execute directly, whereas
each method previously required .execute() as the final
item in the method chain:

+ BaseSession.DropSchema

+ Collection.DropIndex

+ Schema.DropCollection

+ Schema.DropView
In addition, the methods now succeed even if the objects
to be dropped do not exist.

* The AutoEnlist and IncludeSecurityAsserts
connection-string options are not appropriate for use by
applications that target .NET Core and now return an
error when used.

* EF Core: Support for explicit loading was added. Explicit
loading is an object-relational mapper (O/RM) pattern
introduced in EF Core 1.1.0, which enables .NET
developers to explicitly load related data from the
database at a later time.

* The following connection-string options are not currently
supported for use by applications that target .NET Core
and now return an error when used:

+ SharedMemoryName

+ IntegratedSecurity

+ PipeName

+ Logging

+ UseUsageAdvisor

+ UsePerformanceMonitor

+ InteractiveSession

+ Replication

* X DevAPI: To provide safe transactional document and row
updates, the following new methods were added:

+ FindStatement.LockShared

+ FindStatement.LockExclusive

+ TableSelectStatement.LockShared

+ TableSelectStatement.LockExclusive
The LockShared() and LockExclusive() methods can be
called any number of times with either the
Collection.Find() or Table.Select() method chains and in
any combination. If multiple calls to the methods are
made, only the final method is invoked. For additional
information about the two types of locking, see Shared
and Exclusive Locks
(http://dev.mysql.com/doc/refman/5.7/en/innodb-locking.html#innodb-shared-exclusive-locks).

* X DevAPI: When creating a new session, multiple hosts can
be tried until a successful connection is established. A
list of hosts can be given in a connection string or as
session creation options, with or without priorities.
var mySession = MySQLX.GetSession(
"mysqlx://dbuser:password@[" +
"(address=localhost:33060, priority=90)," +
"(address=192.1.10.10:33060, priority=100)," +
"(address=[2001:db8:85a3:8d3:1319:8a2e:370:7348]:33060, priority=30)
" +
"]"
);

var mySession = MySQLX.GetSession(
"user=dbuser;" +
"password=dbpassword;" +
"server=" +
"(address=192.1.10.10, priority=90)," +
"(address=server.example.com, priority=100)," +
"(address=localhost, priority=30);" +
"port=33060;"
);


* X DevAPI: The IN and NOT IN operators have been updated
to expand the range of operands that can be evaluated by
the Find(), Modify(), and Remove() methods for
collections and the Select(), Update(), and Delete()
methods for tables. This update provides support for
expressions using the following syntax:
compExpr ["NOT"] "IN" compExpr

The previous syntax used with IN and NOT IN operators is
still valid and it takes precedence over the new syntax
when both are present.

* X DevAPI: Several new direct-execution methods were added
to the Collection class that operate at a single document
level, unlike the other CRUD methods that operate on all
documents that match a filter. The new methods are:
ReplaceOne(), AddOrReplaceOne(), GetOne(), and
RemoveOne().

* Support for connections using Unix domain socket files
was extended to include MySQL servers deployed on Linux
hosts.
X DevAPI connection example:
"server=/path/to/socket;protocol=unix;user=root;password=mypass;ssl-mode=none"

Classic MySQL connection example:
"server=/path/to/socket;protocol=unix;user=root;password=mypass"

* Connections to the MySQL server now can be made using
accounts that authenticate with the sha256_password
plugin. For more information, see SHA-256 Pluggable
Authentication
(http://dev.mysql.com/doc/refman/5.7/en/sha256-pluggable-authentication.html).
In addition, a new connection option was added to extend
authentication support for connections made using the X
Protocol with either basic or URI connection strings and
as an anonymous type. The auth connection option enables
the MYSQL41, PLAIN, or EXTERNAL authentication mechanism
if supported by the server. For a description of the auth
option, see Connector/Net Connection-String Options
Reference
(http://dev.mysql.com/doc/connector-net/en/connector-net-connection-options.html).

Bugs Fixed

* Assemblies within NuGet packages were not fully signed.
(Bug #26739307)

* EF Core: Some methods in the DbContext class were not
supported for use with asynchronous operations. (Bug
#26448321, Bug #84814)

* X DevAPI: Priority assignment when connecting to the
server in client-side failover situations was not
supported in earlier versions of the connector by design.
Priority-based failover is now available. (Bug #26198794)

* EF Core: When attempting to commit a transaction in which
the FirstOrDefaultAsync method was called, the connector
returned "System.InvalidOperationException: Connection
must be valid and open to commit transaction." instead of
committing the transaction. (Bug #26026972, Bug #86199)

* X DevAPI: Passing in a value of 0 or lower to the Limit
method now produces a more relevant error message
indicating that the argument is out of range. (Bug
#24384660)

* X DevAPI: Passing in the NULL value as a parameter to the
DbDoc.SetValue method resulted in an exception. This fix
ensures that NULL is accepted for this method. (Bug
#23542093)

Nuget packages are available at:

https://www.nuget.org/packages/MySql.Data/8.0.9-dmr
https://www.nuget.org/packages/MySql.Web/8.0.9-dmr
https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore/8.0.9-dmr
https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore.Design/8.0.9-dmr

Enjoy and thanks for the support!

On Behalf of the MySQL/ORACLE RE Team
Gipson Pulla

MySQL for Excel 1.3.7 has been released

Dear MySQL users,

The MySQL Windows Experience Team is proud to announce the release of MySQL for Excel version 1.3.7. This is a maintenance release for 1.3.x. It can be used for production environments.

MySQL for Excel is an application plug-in enabling data analysts to very easily access and manipulate MySQL data within Microsoft Excel. It enables you to directly work with a MySQL database from within Microsoft Excel so you can easily do tasks such as:

  • Importing MySQL data into Excel
  • Exporting Excel data directly into MySQL to a new or existing table
  • Editing MySQL data directly within Excel

MySQL for Excel is installed using the MySQL Installer for Windows.The MySQL Installer comes in 2 versions:

  • Full which includes a complete set of MySQL products with their binaries included in the download.
  • Web (network install) which will just pull the MySQL for Excel over the web and install it when run.

You can download MySQL Installer from our official Downloads page at http://dev.mysql.com/downloads/installer/

The MySQL for Excel product can also be downloaded by using the product standalone installer found at this link: http://dev.mysql.com/downloads/windows/excel/

Changes in MySQL for Excel 1.3.7 (2017-05-24)

Functionality Added or Changed

  • The way MySQL for Excel shares data-editing sessions among users and between computers was improved. (Bug #25509085, Bug #73314)
  • The Append Excel Data to Table operation was updated with new advanced options to manage the behavior of rows containing unique key values that are duplicates of those in the database. (Bug #25479653, Bug #83801)
  • Added a new global option that specifies how to format spatial data as text: Well-Known Text, Keyhole Markup Language, Geography Markup Language, or GeoJSON. (Bug #22081263)
  • Enhanced the logic that migrates stored MySQL connections to the MySQL Workbench connections.xml file. In previous versions, the migration was offered and if not done at that moment, the dialog to migrate was shown every time MySQL for Excel was launched. There was no way to choose to continue storing MySQL connections in the MySQL for Excel configuration folder, instead of merging them with MySQL Workbench. Now, the Connections Migration dialog offers a way to postpone the migration by one hour, one day, one week, one month, or indefinitely. If the migration is postponed, the dialog is shown again after that time elapses. If the migration is postponed indefinitely, then an option is added to the Options dialog that permits the migration of connections to be done manually, as long as MySQL Workbench is installed.
  • Support for MySQL Fabric was removed.

Bugs Fixed

  • SSL connections when created with MySQL Workbench should be inactive within MySQL for Excel, which does not support SSL connections. (Bug #25962564)
  • Selecting a schema containing at least one stored procedure for a MySQL 8.0 or 8.1 connection emitted an error. (Bug #25962347)
  • Empty string values within Excel column data that were used in an export or append-data operation caused the generated SQL queries to have no value, instead of an empty value corresponding to the data type of the target column (for example: 0 for Integer; false for Bool if the column does not allow NULL values, or NULL otherwise). (Bug #25509312, Bug #84851)
  • MySQL data could not be refreshed or edited directly in an Excel worksheet by different users or from different computers, which reduced the ability to share data-editing sessions among users or between computers. This fix alters the way connection information is stored by migrating the connection details for related import and edit-data operations from the user settings file to the XML parts of a workbook when the workbook is opened, and if the workbook supports XML parts and the connection information related to that workbook is found in the user settings file. (Bug #25509085, Bug #73314)
  • User-selected data types that replaced the detected values of a column were lost when the First Row Contains Column Names check box was selected or deselected in preparation for an export-data operation. This fix retains the selected value when the data type is set manually to override the automatically detected type and the check box is selected or deselected. It further adds a new action to reset the column back to automatic detection. (Bug #25492772, Bug #84802)
  • A portion of the preview area that should be displayed during import, export, and append data operations was concealed by other fields. (Bug #25325457, Bug #84351)
  • Attempting to refresh MySQL data in an Excel worksheet while the MySQL for Excel task pane was closed generated an error. (Bug #25301136, Bug #84291)
  • Edit-data operations in which the SQL query used optimistic updates, and the data contained empty strings, produced errors during the commit to MySQL. Enhanced mapping of character sets and clearer error-message text were added to identify the use of client character sets that are unsupported in MySQL. (Bug #25236221, Bug #76287)
  • A mismatch between the current schema and the current connection caused the refresh action to fail when a worksheet with imported data was created as an Excel table, saved, closed, and then reopened. (Bug #25233309, Bug #84154)
  • Inactive connections and unsaved passwords caused the refresh action to generate errors for worksheets with imported MySQL data in Excel tables. (Bug #25227226, Bug #84136)
  • Excel worksheets that had currency values with comma separators produced errors when the data was exported to a MySQL table. (Bug #25214984, Bug #84049)
  • MySQL connection passwords were not saved to the secure password vault and produced a password request every time an existing connection was opened. (Bug #25108196, Bug #83855)
  • Excel cells containing empty strings, which are not actually blank, generated errors with export, append, or edit data operations. With this fix, an empty string is now equivalent to a blank cell. (Bug #24431935, Bug #82497)
  • Although the Refresh All action in the Data ribbon refreshed all MySQL connections, it did not refresh the other connections associated with a workbook when the MySQL for Excel add-in was enabled. (Bug #23605635, Bug #81901)
  • Clearing numeric parameter values within a stored procedure, or setting any of the initial values to NULL, during an Import MySQL Data operation emitted an error. (Bug #23281495, Bug #81417)
  • Type TinyInt was mapped as type Bool when data was imported to Excel from MySQL. (Bug #23022665, Bug #80880)
  • MySQL columns of type DATE and DATETIME produced errors during import-data operations. This fix improves the way MySQL for Excel handles these types for all operations: import data, export data, append data, and edit data. (Bug #22627266, Bug #80139)
  • Excel data of type Date could not be exported to a MySQL table. (Bug #22585674, Bug #80079)
  • Tables and views imported to Excel without the Include Column Names as Headers option first being selected omitted the expected default column names (Column1, Column2, and so on). (Bug #22373140)
  • Creating a new schema with the binary – binary collation produced an error. (Bug #22371690)
  • Saved edit-data sessions could not be restored after a workbook was closed and then reopened. (Bug #22138958)
  • Connection sharing between MySQL for Excel and MySQL Workbench resulted in some incorrect connection information being passed to the MySQL Server Connection dialog. (Bug #22079779)
  • The default schema of the current MySQL connection changed unexpectedly when a table in a different schema was edited. (Bug #22074426)
  • With a cursor positioned at the bottom of a worksheet and with the Add Summary Fields check box selected, the import-data operation failed despite having enough space to fill the cells. (Bug #19652840)

Quick links:

Enjoy and thanks for the support!

MySQL for Visual Studio 2.0.5 has been released

The MySQL Windows Experience Team is proud to announce the release of  MySQL for Visual Studio 2.0.5 m4. Note that this is a development preview release and not intended for production usage.

MySQL for Visual Studio 2.0.5 m4 is the fourth development release of the MySQL for Visual Studio 2.0 series. This series adds support for the new X DevAPI. The X DevAPI enables application developers to write code that combines the strengths of the relational and document models using a modern, NoSQL-like syntax that does not assume previous experience writing traditional SQL.

To learn more about how to write applications using the X DevAPI, see http://dev.mysql.com/doc/x-devapi-userguide/en/. For more information about how the X DevAPI is implemented in MySQL for Visual Studio, and its usage, see http://dev.mysql.com/doc/refman/5.7/en/mysql-shell-visual-studio.html.

Please note that the X DevAPI requires at least MySQL Server version 5.7.12 or higher with the X Plugin enabled. For general documentation about how to get started using MySQL as a document store, see http://dev.mysql.com/doc/refman/5.7/en/document-store.html.

You can download MySQL Installer from our official Downloads page at http://dev.mysql.com/downloads/installer/.

MySQL for Visual Studio can also be downloaded by using the product standalone installer found at http://dev.mysql.com/downloads/windows/visualstudio/, under the tab “Development Releases”.

 

Changes in MySQL for Visual Studio 2.0.5 (2017-04-24)

Known limitation of this release: MySQL Connections Manager does not save the changes made to the default schema when editing a connection. Use one of the following workarounds to resolve this limitation:

  • For new connections created with MySQL Connections Manager in which a default schema is specified, close MySQL Connections Manager and then reopen it. After performing this action, you can add the connection to the Microsoft Visual Studio Server Explorer.
  • For existing connections, set the default schema with MySQL Workbench.

Functionality Added or Changed

  • Removed Support for Microsoft Visual Studio 2010.
  • Added support for Microsoft Visual Studio 2017.
  • Added an output pane to the MySQL SQL Editor window. The new MySQL Output pane includes the information that previously appeared in the Messages tab.

Bugs Fixed

  • The MySQL Data Export Tool exported data from the wrong schema when a second schema was selected and then deselected. In addition, all selected schemas were deselected when a single schema was deselected. (Bug #23666666)
  • Script files did not accept most keyboard input after the file was saved for the first time. (Bug #24751945)
  • The Field Type view in the result tab of an executed SQL query did not display field information correctly when the query included a schema name explicitly. (Bug #24601948)
  • The bit() data type was incorrectly implemented as bit(10) for MySQL tables in the Table Designer window.  (Bug #13477821)

 

Quick links

MySQL for Visual Studio 1.2.7 has been released

The MySQL Windows Experience Team is proud to announce the release of MySQL for Visual Studio 1.2.7. This is a maintenance release for 1.2.x. It can be used for production environments.

MySQL for Visual Studio is a product that includes all of the Visual Studio integration functionality to create and manage MySQL databases when developing .NET applications.

MySQL for Visual Studio is installed using the MySQL Installer for Windows which comes in 2 versions:

  • Full (352.8 MB) which includes a complete set of MySQL products with their binaries included in the downloaded bundle.
  • Web (1.7 MB – a network install) which will just pull MySQL for Visual Studio over the web and install it when run.

You can download MySQL Installer from our official Downloads page at http://dev.mysql.com/downloads/installer/.

MySQL for Visual Studio can also be downloaded by using the product standalone installer found at http://dev.mysql.com/downloads/windows/visualstudio/.

 

Changes in MySQL for Visual Studio 1.2.7 (2017-04-10)

Functionality Added or Changed

  • Removed Support for Microsoft Visual Studio 2010.
  • Added support for Microsoft Visual Studio 2017.

Bugs Fixed

  • The MySQL Data Export Tool exported data from the wrong
    schema when a second schema was selected and then deselected.
    In addition, all selected schemas were deselected when a single
    schema was deselected. (Bug #25713981)
  • Script files did not accept most keyboard input after the
    file was saved for the first time. (Bug #25713638)

 

What Is New In MySQL for Visual Studio 1.2

  • New MySQL Project Items for creating data views in Windows Forms and ASP.NET MVC web applications.
  • A new option in web configuration tool for the ASP.NET Personalization Provider (this feature requires MySQL Connector/NET 6.9 or newer).
  • A new option in web configuration tool for the ASP.NET Site Map Provider (this feature requires MySQL Connector/NET 6.9 or newer).
  • A new option for the MySQLSimpleMembership provider in the web configuration tool. (This feature requires MySQL Connector/NET or newer).

 

MySQL Windows Forms Project Item
——————————————————————————————-
This Project Item is available on the Add New Item dialog in Visual Studio when adding a new item to an existing project.

The dialog presented to create the MySQL Windows Forms Project Item automates the generation of a Windows Form, representing a view for MySQL data available through an existing Entity Framework’s model entity containing a MySQL table or view. Different view types are available to present the data:

  • Single-column: A form that contains one control by each existing column in the table with navigation controls and that allows CRUD operations.All controls can include validations for numeric and DateTime data types.
  • Grid: A form with a data grid view that contains navigation controls.
  • Master-detail: A form with a single control layout for the Parent table and a data grid view to navigate through child table’s data.

Supported with C# or Visual Basic language. This feature requires Connector/NET 6.7.5, 6.8.3 or 6.9.x.

For more details on the features included check the documentation at: https://dev.mysql.com/doc/connector-net/en/visual-studio-project-items-forms.html

 

MySQL ASP.NET MVC Project Item
——————————————————————————————-
This Project Item is available on the Add New Item dialog in Visual Studio when adding a new item to an existing project.

The dialog presented to create the MySQL ASP.NET MVC Item automates the generation of a controller and its corresponding view, representing a view for MySQL data available through an existing Entity Framework’s model entity containing a MySQL table or view. The MVC versions supported by this wizard are 3 when using Visual Studio 2010 or 2012, and 4 when using Visual Studio 2013 or greater.

The generation of the MVC items is done by creating an Entity Framework data model either with Entity Framework version 5 or 6 depending on the user’s selection.

Supported with C# or Visual Basic language. This feature requires Connector/NET 6.7.5, 6.8.3 or 6.9.x.

For more details on the features included check the documentation at: https://dev.mysql.com/doc/connector-net/en/visual-studio-project-items-mvc.html

 

New option in web configuration tool for the ASP.NET Personalization Provider
——————————————————————————————-
Personalization provider allows to store personalization state-state data regarding the content and layout of Web Parts pages-generated by the Web Parts personalization service using MySQL as a data source. This feature requires Connector/NET 6.9.x or greater.

https://dev.mysql.com/doc/connector-net/en/connector-net-tutorials-web-personalization-provider.html

 

New option in web configuration tool for the ASP.NET Site Map Provider
——————————————————————————————-
Site Map provider allows to show a hierarchical list of links that describe the structure of a site. This feature requires Connector/NET 6.9.x or greater.

http://dev.mysql.com/doc/connector-net/en/connector-net-website-config.html

 

New option in web configuration tool for the ASP.NET Simple Membership provider
——————————————————————————————-
The latest provider added to handle web site membership tasks with ASP.NET. This feature requires Connector/Net 6.9.x or greater.

http://dev.mysql.com/doc/connector-net/en/connector-net-simple-membership-tutorial.html

 

 

Quick links:

Enjoy and thanks for the support!

MySQL for Visual Studio 2.0.4 has been released

The MySQL Windows Experience Team is proud to announce the release of MySQL for Visual Studio 2.0.4 m3. Note that this is a development preview release and not intended for production usage.

MySQL for Visual Studio 2.0.4 m3 is the third development preview release of the MySQL for Visual Studio 2.0 series.  This series adds support for the new X DevAPI. The X DevAPI enables application developers to write code that combines the strengths of the relational and document models using a modern, NoSQL-like syntax that does not assume previous experience writing traditional SQL.

To learn more about how to write applications using the X DevAPI, see http://dev.mysql.com/doc/x-devapi-userguide/en/. For more information about how the X DevAPI is implemented in MySQL for Visual Studio, and its usage, see http://dev.mysql.com/doc/refman/5.7/en/mysql-shell-visual-studio.html.

Please note that the X DevAPI requires at least MySQL Server version 5.7.12 or higher with the X Plugin enabled. For general documentation about how to get started using MySQL as a document store, see http://dev.mysql.com/doc/refman/5.7/en/document-store.html.

You can download MySQL Installer from our official Downloads page at http://dev.mysql.com/downloads/installer/.

MySQL for Visual Studio 2.0.4 m3 can also be downloaded by using the product standalone installer found at http://dev.mysql.com/downloads/windows/visualstudio/, under the tab “Development Releases”.

Changes in MySQL for Visual Studio 2.0.4 m3

What’s new in 2.0.4 m3

  • Enhanced the logic that migrates stored MySQL connections to the MySQL Workbench connections.xml file. In previous versions, the migration was offered and if not done at that moment, the dialog to migrate was shown every time the MySQL Connections Manager dialog was shown, but there was no way to choose to remain storing MySQL connections in the MySQL for Visual Studio configuration folder instead of merging them with MySQL Workbench.  Now, the connection migration dialog offers a way to postpone the migration by either 1 hour, 1 day, 1 week, 1       month or indefinitely. If the migration is postponed, the dialog is shown again after that time elapses. If it is postponed indefinitely, then an option is added to the MySQL Connections Manager dialog that permits the connection migration to be done manually, as long as MySQL Workbench is installed.
  • When the MySQL Script Editor window is opened (either by selecting SQL, JavaScript, or Python from the New MySQL Script menu), the Results area was visible showing a big gray area in the editor, despite having nothing to display. Now, this area is hidden until results are ready to display, which happens after clicking Run.
  • The SQL syntax parser was updated to handle the optimizer hints that were introduced in MySQL 5.7.7.
  • The SQL editor was updated to check the syntax of a script before sending the statements to the server. If syntax errors are present, the Visual Studio Output pane displays the errors and the script is not executed.
  • A drop-down list of connections was added in the MySQL editor toolbar to enable fast switching among connections while editing SQL, JavaScript, and Python scripts. The list, located next to the Connect to MySQL button, shows all Server Explorer connections for the MySQL data provider with compatible protocol       support.  Note JavaScript and Python editors show only the connections that support the X Protocol.

Bugs Fixed

  • MySQL Workbench was unable to open connections added from the MySQL Connection Manager, as executing them would emit the following error: “Cannot connect to Database Server”. This is because an invalid “socket=.” value was added to the connection definition. To solve this, MySQL for Visual Studio was updated to use the latest MySQL.Utility version, which fixes code in the MySQL Workbench class to only write the socket value into the XML nodes if the connection is of type Sockets or Pipe.
    • Bug #24666952
  • After connections were added to the Server Explorer through the MySQL Connections Manager, clicking Refresh on the Server Explorer toolbar caused the refresh operation to hang, and nothing else could be done within the Server Explorer pane. Clicking Cancel Refresh was required to fix this.
    • Bug #24666931
  • SHOW statements executed from the SQL editor failed to display the expected output.
    • Bug #24622881
  • Queries executed from the SQL editor against nonunique data in NoSQL tables emitted error messages and failed to return result sets.
    • Bug #24462707
  • The main XML element in %APPDATA%\Oracle\MySQL For Visual Studio\settings.config was renamed to MySQLforVisualStudio from MySQLForExcel. Indentations were added to improve the overall readability of configuration settings.
    • Bug #24291264
  • JavaScript and Python editors permitted connections to versions of MySQL that did not support the X Protocol if those connections were unnamed or temporary, but the scripts did not work properly. This fix adds validation to ensure that all connections related to JavaScript and Python scripts are to servers with the X Plugin enabled.
    • Bug #24290570
  • Selecting the New MySQL Script context-menu option by right-clicking a Server Explorer connection in Visual Studio emitted an error if the connection was first closed and then opened.
    • Bug #24064816
  • Visual Studio was unable to open a design window for any selected table in a MySQL database.
    • Bug #23642010
  • Opening a new MySQL script file from the Visual Studio File > New menu displayed the following error: “Object reference not set to an instance of an object”.
    • Bug #23619311
  • Processing a Result object from the X Protocol substituted an error or information message in place of some collection output.
    • Bug #22983803
  • Advanced, Connect, and Cancel buttons were missing from the Connect to MySQL dialog for connections made from the script editor window.
    • Bug #22114315
  • Dragging and dropping a table from the Server Explorer in Visual Studio to a project would fail with the following error: “Some updating commands could not be generated automatically. The database returned the following error: You have a usable connection already”. After clicking OK, Visual Studio would emit the following error “Mouse drag operation failed. Could not retrieve schema information from table or view”. To solve this issue, MySql.Data was updated to version 6.9.9.
  • From the Query Designer, selecting Verify SQL Syntax would always display “Not supported by the provider” instead of verifying the SQL syntax.
  • The Python code editor displayed session options for JavaScript instead of options for the Python language.
  • In some cases, selecting Retrieve Data for a table with a valid connection failed to populate the table with data.

Quick links

Enjoy and thanks for the support!

MySQL for Visual Studio Team.