the ?generally available? (or production-ready) version of
mysql 5.0 was
officially released today, and kai voigt, one of the mysql
trainers, has posted a sudoku solver written as an sql stored
procedure. the solver was actually written by per-erik
marten, the main implementor of mysql?s stored procedure
support.
it?s probably not the best showcase of stored procedures, but it
is a nifty little hack.
You all know this number puzzle called Sudoku.
You get small applications to create and to solve them. It's like
the tetris of the 21. century.
I'm sure there is software written in C, Perl, Lisp, Assembler,
Java to implement all those. But as you know, I work for a
database
company which delivered the new and great 5.0 version almost
in time.
Our favourite language is SQL and we are able to write stored
procedures now which enable us to port almost any existing
software into plain SQL!
Per-Erik Martin, a collegue of mine, once wrote a Sodoku solver
in C and now ported it to SQL. Enjoy!
Continue reading "Sudoku with MySQL"
Second Munich week in a row, Cluster class. New training room,
flaky network cables and evil SuSE firewalls. Well, we survived
somehow. Here are some open questions.
Static or Dynamic Binaries on Linux, when to use which
one?
On modern Linux systems, the shipped glibc comes with a new POSIX
threads library (NPTL) which should work just fine in most cases.
Use the dynamic binaries then.
The static binaries include a patched version of the glibc
library that is able to create up to 4096 threads. If the default
of 1024 threads is not enough for you, use the static
binaries.
How to load balance the layer of mysqld servers in a
cluster?
Use some load balancing solution, like Linux Virtual Server or
some hardware based product. If you have a lot of small queries
that a simple round robin system will do fine. Otherwise, you
have to build your own metrics.
…
This past week Burlingame, California was host to the first Zend/PHP conference. The keynotes included presentations by the founders of Zend (Andi, Zeev and Doron), as well as Marc Andreessen (Netscape wunderkind), Rod Smith (IBM's open source guru), Ken Jacobs (Oracle's Dr DBA) and Adam Bosworth (Google) among others.
Zend also announced their initiatives around a collaboration platform for PHP that involves many vendors including MySQL, Oracle, IBM, Actuate and SugarCRM as well as the PHP community at large to develop the Zend PHP framework as well as integration with Eclipse.
Marc Andreessen's keynote was particularly interesting as he made the case that PHP is really the language going forward. For those who missed the 1990's (or are still trying to forget it) this is an amazing endorsement both for PHP and for Zend. …
[Read more]We at MySQL AB have unleased MySQL 5.0 upon the world. It’s now declared GA (stable) and recommended for use everywhere you can possibly fit it (yes, this means brain implants and other things we dare not mention).
On DevZone there’s also a photo titled “MySQL 5.0 Development Team” taken at the DevConf earlier this year in Prague (you can see the pretty buildings in the background). I have a bunh of nice photos from there. I plan to put the scenic ones up somewhere at some point.
There’s even a poll for your favourite new feature. There isn’t an option for “version number divisible by 5″, but hey :)
I am going to get up and dance.
This does mean I will look stupid, but it’s dancing towards ice cream. Everybody deservers ice cream. Especially those with MySQL 5.0. In fact, if you don’t have it - …
[Read more]
Download from the usual location.
The moment that so many have long waited for is finally here. MySQL 5.0 GA is now available for download. Get your copy here.
Welcome to the MySQL monitor. Commands end with ; or
\g.
Your MySQL connection id is 2 to server version:
5.0.15-nt
There you have it, a production version of MySQL 5 — no -alpha, -beta, or -rc.
This has represented a lot of work by a lot of talented people, congratulations to all for pulling it off.
Triggers are something that you should use with caution. If
abused, they could bring your application to its knees. However,
they are also a wonderful tool to fine tune your control on a
difficult situation.
As for SQL standards, triggers can be set on modifying statements
only (INSERT, DELETE, UPDATE).
What about SELECTs, though? Would it be nice if you could have a
trigger for each SELECT statement?
Let's suppose that you have a table books and you want to create
a customized access log to that table only. Here is how you can
do it:
- Create a table db_counter which will hold the number of accesses, and a table db_log that will get the access details;
- Create a function containing all the statements you want to
execute at each SELECT. Such function should always return a
positive integer;
- Create a updatable view for your table, adding a WHERE clause testing your function …