Search This Blog

Showing posts with label review. Show all posts
Showing posts with label review. Show all posts

12 February 2009

WTF worthy man page suggestion...

I encountered the following text in a man page. Please tell me that I am not alone in thinking that the "typical" solution suggested is WTF worthy...

After calling "commit" or "rollback" many drivers will not let you
fetch from a previously active "SELECT" statement handle that's a child
of the same database handle. A typical way round this is to connect the
the database twice and use one connection for "SELECT" statements.


If the programmer really wants to reuse values from a SELECT statement which occurred within a transaction after the transaction is closed, they should cache those values themselves by populating some variable within their application. IMO, they definitely should not be using multiple connections to the same database from one unit of work unless they are perfectly happy to accept inconsistent data and potentially corrupted inserts and updates.

No wonder many software developers are so confused when supposedly "authoritative" manuals give them screwball advice.

30 May 2007

Book Review: Understanding MySQL Internals.

I actually received this book about a month ago but from necessity, I had to put it to one side and deal with more important issues. It is not a big book, only 235 pages, but it has an easy to read conversational style, unlike similarly titled technical books on the internals of other software.

If you're looking for a book about database theory, this book is not for you. It conveys to the reader a good overview as how MySQL functions without delving into the theories as to how the algorithms work or the rationale behind their design. The book does a good job of at least giving a drive-by look at most of the significant components of MySQL. libmysys, MySQL's platform library which allows MySQL to work on a very wide range of operating systems is mentioned only under the subsection titles 'Core API' and 'Utility API' and only lists about 30 of the functions available: libmysys provides the important glue between MySQL and the operating system, comparable with Netscape's NSPR or Apache's APR. The only omission within this book is information of MySQL's string-handling and character-set functions and data structures.

As the author acknowledged in his introduction, the bleeding-edge of MySQL development does move quite fast - so for a reader to make use of this book, I would recommend using the MySQL 4.1 or 5.0 source code for reference. There are many significant changes within the 5.1 beta source code which are not covered - which is perfectly reasonable as 5.1 is still in beta. I do hope that Sasha Pachev has a "2nd Edition" in the works which will cover 5.1 when it is finally released as stable and the plug-ins infrastructure as that would lie the greatest avenue for users and 3rd party ISVs to develop extensions for MySQL. There are also several exciting new components, such as the Falcon storage engine, which would be worthy of mention and perhaps an overview of their operation.

This book would be valuable to anyone unfamiliar with the MySQL source code and provides a foundation which can be built upon. It is informative and does not dazzle the reader with techo-jargon and theories.

If you're interested in this book, it is published by O'Reilly.
http://www.oreilly.com/catalog/9780596009571/index.html