Pages

Thursday, March 22, 2007

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.

Wednesday, March 14, 2007

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?'

Friday, March 9, 2007

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

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.

Thursday, March 1, 2007

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.