Thursday, March 22, 2007

MySQL Connector/Net 5.0.6 has been released.

MySQL Connector/Net 5.0.6 a new version of the all-managed .NET driver for MySQL has been released.
This is a bug fix release for the current production branch of Connector/Net.

 
Version 5.0.6 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-5.2 Falcon "Preview".
It is now available in source and binary form from the Connector/Net download pages at http://dev.mysql.com/downloads/connector/net/5.0.html and mirror sites (note that not all mirror sites may be up to date at this point of time - if you can't find this version on some mirror, please try again later or choose another download site.)

 
This release comes shortly after 5.0.5 due to an incompatibility with Tools for Visual Studio.  With 5.0.5, we changed how the connector respects binary data as reported by the server.  This resulted in some queries that now return data as byte arrays that before returned data as string. Unfortunately this is still the case with 5.0.6.  Current versions of MySQL incorrectly return some metadata as binary.  Queries such as 'SHOW CREATE TABLE' will often return data as binary.  You can work around this by using a MySqlDataReader and reading the desired columns using .GetString().

Functionality Changes or Enhancements
No functionality changes to report.

Bugs fixed:
Bug #27135 MySqlParameterCollection and parameters added with Insert Method
Bug #27253 Installer : Company info is different
Bug #27187 cmd.Parameters.RemoveAt("Id") will cause an error if the last item is requested
Bug #27093 Exception when using large values in IN UInt64 parameters
Bug #27221 describe SQL command returns all byte array on MySQL versions older than 4.1.15
Bug #26960 Connector .NET 5.0.5 / Visual Studio Plugin 1.1.2

As always we thank you for your use of our products and keep those bug reports coming!

Wednesday, March 14, 2007

Microsoft's update stupidity - SP1

I've blogged about this before but with the news of Apple's upcoming 10.4.9 release, it reminded me again of the lame way Microsoft handles updates.  Am I the only one that thinks regularly scheduled (think every 2-3 months) updates that include all hotfixes for that period along with all application updates should be bundled into a numbered update?

No more long lists of KB# patches in our Add/Remove program list.  Want to know if a particular patch has been applied?  Simply check the version of the OS.  Mac users can simply tell each other what version of the system they are running.  10.4.2 versus 10.4.5.  Windows users would have to say 'Oh, I'm running Vista with patches installed for KBxxxx and KByyyyy and KBzzzzz and the Broadcom update of 1/4/07.  And you?'

I'm on vacation so enough ranting. 

Friday, March 9, 2007

Connector/Net 5.0.5 has a problem

As many of you have already discovered, Connector/Net 5.0.5 does not work correctly with Tools for Visual Studio.  The symptom is that when the plugin tries to enumerate all the tables in the database, it reports that it gets back an improper data type.  The cause of this problem is somewhat involved so I thought I would blog on it.

Since the early days of the connector, binary data was not always handled correctly.  Specifically, columns that were reported to the connector as CHAR and VARCHAR were returned as System.String.  This is, of course, not always correct.  The case that prompted the changes was a bug report that SELECT _binary "foo" would return foo as a System.String instead of System.Byte[] as it should.

The fix is to always respect the binary markers that the server sends, which 5.0.5 does.  The problem is that MySQL incorrectly reports some columns as binary such as the name column from the output of 'SHOW TABLE STATUS'.  To work around this issue, much of my GetSchema code had to be reworked to use a datareader instead of a dataadapter.  This way I can use GetString() to get a string representation of the column even though it is binary.

All this would have been fine except I failed to test the plugin with 5.0.5 and apparently still have a case where a string column is being returned as binary.  I'm looking into it right now and we'll get a 5.0.6 out right away with this issue addressed.

Wednesday, March 7, 2007

Connector/Net 5.0.5 has been released.

MySQL Connector/Net 5.0.5 a new version of the all-managed .NET driver for MySQL has been released.


This is a bug fix release for the current production branch of Connector/Net.
Version 5.0.5 is suitable for use with any MySQL version including MySQL-4.1, MySQL-5.0, MySQL-5.1 beta or the MySQL-5.2 Falcon "Preview".


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

What happened to 5.0.4?
We had 5.0.4 packaged up and ready to go and then discovered that a previous bug fix was not complete.  Rather than release 5.0.4 and then follow that up with a quick release of 5.0.5, we decided to not release 5.0.4 at all.  This allowed us to roll in a couple of additional last minute bug fixes.

Functionality Changes or Enhancements
* Return parameters created with DeriveParameters now have the name
  RETURN_VALUE
* Fixed problem with parameter name hashing where the hashes were not
  getting updated when parameters were removed from the collection.
* Fixed problem with calling stored functions when a return parameter
  was not given
* Fixed problem that prevented use of SchemaOnly or SingleRow command
  behaviors with sprocs or prepared statements
* Assembly now properly appears in the Visual Studio 2005 Add/Remove
  Reference dialog
* Added MySqlParameterCollection.AddWithValue and marked the Add(name,
  value) method as obsolete
* Added "Use Procedure Bodies" connection string option to allow calling
  procedures without using procedure metadata. (see release notes)
* Reverted behavior that required parameter names to start with the
  parameter marker.  We apologize for this back and forth but we
  mistakenly changed the behavior to not match what SqlClient supports.
  We now support using either syntax for adding parameters however we
  also respond exactly like SqlClient in that if you ask for the
  index of a parameter using a syntax different than you added the
  parameter, the result will be -1.

Bugs fixed: 
  Bug #25443 ExecuteScalar() hangs when more than one bad result
  Bug #24802 Error Handling
  Bug #25614 After connection is closed, and opened again UTF-8
             characters are not read well
  Bug #25625 Crashes when calling with CommandType set to
             StoredProcedure
  Bug #25458 Opening connection hangs
  Bug #25651 SELECT does not work properly when WHERE contains UTF-8
             characters
  Bug #25726 MySqlConnection throws NullReferenceException and
             ArgumentNullException
  Bug #25609 MySqlDataAdapter.FillSchema
  Bug #25928 Invalid Registry Entries
  Bug #25912 selecting negative time values gets wrong results
  Bug #25906 Typo makes GetSchema with DataTypes collection throw an
             exception
  Bug #25907 DataType Column of DataTypes collection does'nt contain the
             correct CLR Datatype
  Bug #25950 DataSourceInformation collection contains incorrect values
  Bug #26430 Will not install under Vista
  Bug #26152 Opening a connection is really slow
  Bug #24373 High CPU utilization when no idle connection
  Bug #24957 MySql.Data.Types.MySqlConversionException is not marked as
             Serializable.
  Bug #25603 Critical ConnectionPool Error in Connector.Net 5.03
  Bug #26660 MySqlConnection.GetSchema fails with NullReferenceException
             for Foreign Keys
  Bug #25605 BINARY and VARBINARY is returned as a string
  Bug #25569 UpdateRowSource.FirstReturnedRecord does not work

Thursday, March 1, 2007

Testing Windows Home Server

I was fortunate enough to be invited to beta test Windows Home server.  This is the new Microsoft product that looks to provide centralized storage and backup for the ever-growing number of home networks.  I have been too busy to do much with it so far but here's what I can tell you so far.

  • The connector will complain that it can't install on Vista x64.  To fix this, simply move the .DAT file that is on the connector cd to your desktop and change it's extension to .MSI.  Then, open an elevated command prompt and run the MSI file.  It will install without trouble.  I did notice some oddity about shared folders so I'm not guaranteeing that it works perfectly but so far it's been ok here.
  • At first it seems like a lot of noise about nothing when you see the shared folders appear on your desktop.  I was thinking "crap, I can do that with XP".  Well, not so fast.  These shared folders support a technology called Folder Duplication.  This is like software RAID only much easier to setup.  As you copy or modify files in that shared folder, WHS will make sure that a copy of you file exists on other physical drives in the computer.  That way, if one disk goes down, you can just stick in a new disk and WHS will suck it into the disk pool.  Not rocket surgery (thanks Jim!) but nice.
  • It's a stripped down build using the Windows Server 2003 code base.  Things like the control panel are missing but you can install hard drives that are not part of the disk pool and you can install applications (though there is some concern that they might interfere with WHS).  I installed a couple of printers, one of them a multi-function OfficeJet.  I then proceeded to use the scanner wizard to scan in some photos.
  • IIS is present so you can install a web site to view your photos or video while away from home.  I really would like to see Microsoft include a default web site with gallery functionality with the final product.