Mysql for iPhone and OSX – Version 2.0

It has been a while since I released an update to my MysqlConnector but I wanted to get this and a few other things out before WWDC, but it didn’t happen. The zip file weighs in at about 11 MB.

Most updates will require no changes. Things will just work better.

MysqlConnection supports an idle loop that sends a periodic request to the MySQL server to keep the connection alive. However this wasn’t protected in multi threaded programs and could crash.

MysqlFetch was creating the name of the field on each row iteration. On large selects this resulted in a large amount of duplicated memory being allocated.

MysqlFetch now supports the DECIMAL type.

MysqlFetch now deals with negative LONG and LONGLONG values. Corrected the size of these types on 64 bit compiles to match the MySQL definition. Also fixed the use of TINY, FLOAT and DOUBLE. Thanks to Bill Allen for contributing this code.

Added support for connecting to multiple servers in a failover pattern. Connection are now created with a MysqlServer instance or array of the same. This will require a code change, and you will need to add MysqlServer to your project.

Fixed some debug messages. Two of them had bad formatting, and one was still using NSLog.

Added a method to check status of autocommit.

Add ability to ignore mysql error when a record is inserted that matches a previously inserted records unique value for 1 or more columns. I have to admit that I ended up not using this code, so it is of dubious value.

The length of data passed to mysql_stmt_prepare needs to be expressed in byte length, not character length. Thanks to Coupez Julien for pointing this out.

This entry was posted in MySQL. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Both comments and trackbacks are currently closed.
  • iChat Status