13
Javascript Helpers
Combined with my old favorites of Dynamic Drive, DHTML Goodies and Brain Jar, I’ve added the following to my list of Javascript sources.
Combined with my old favorites of Dynamic Drive, DHTML Goodies and Brain Jar, I’ve added the following to my list of Javascript sources.
I needed a rest from my opening keynote review NY Tech 1995-2008. Opening Web 2.0 Expo NY Keynote but a few siginificant points from The Death of the Grand Gesture by Deb Schultz.
I was surprised to find yesterday when using MySQL 5.1.26-rc with a client I’m recommending 5.1 to, some information not seen in the EXPLAIN plan before while reviewing SQL Statements.
Using join buffer
+----+-------------+-------+--------+---------------+--------------+---------+------------------------+-------+----------------------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+--------+---------------+--------------+---------+------------------------+-------+----------------------------------------------+ | 1 | SIMPLE | lr | ALL | NULL | NULL | NULL | NULL | 1084 | Using where; Using temporary; Using filesort | | 1 | SIMPLE | ca | ref | update_check | update_check | 4 | XXXXXXXXXXXXXXXXX | 4 | Using where; Using index | | 1 | SIMPLE | ce | ALL | NULL | NULL | NULL | NULL | 13319 | Using where; Using join buffer | | 1 | SIMPLE | co | eq_ref | PRIMARY | PRIMARY | 4 | XXXXXXXXXXXXXXXXX | 1 | Using where | +—-+————-+——-+——–+—————+————–+———+————————+——-+———————————————-+ 4 rows in set (0.00 sec) mysql> select version(); +———–+ | version() | +———–+ | 5.1.26-rc | +———–+ 1 row in set (0.00 sec)
Sergey Petrunia of the MySQL Optimizer team writes about this in Use of join buffer is now visible in EXPLAIN.
So I managed to find all dependencies after some trial and error for compiling VirtualBox 1.6.4 under Ubuntu 8.0.4, then finding the Linux build instructions to confirm.
It was not successful however in building, throwing the following error:
kBuild: Compiling dyngen - dyngen.c kBuild: Linking dyngen kmk[2]: Leaving directory `/usr/local/VirtualBox-1.6.4/src/recompiler’ kmk[2]: Entering directory `/usr/local/VirtualBox-1.6.4/src/apps’ kmk[2]: pass_bldprogs: No such file or directory kmk[2]: *** No rule to make target `pass_bldprogs’. Stop. kmk[2]: Leaving directory `/usr/local/VirtualBox-1.6.4/src/apps’ kmk[1]: *** [pass_bldprogs_before] Error 2 kmk[1]: Leaving directory `/usr/local/Virtu
More searching, I needed to add two more files manually. Read More Here.
A long wait, compiling for 20+ minutes, and a necessary reboot as upgraded images threw another error, I got 1.6.4 running, and able to boot Fedora Core 9 image created under 1.5.6
But the real test, and the need for this version was to install Intrepid.
This also failed with a Kernel panic during boot. More info to see this reported as a Ubuntu Bug and Virtual Box Bug.
More work still needed.
I successfully installed Virtual box via a few simply apt-get commands under Ubuntu 8.04 via these instructions.
It started fine, after two small annoying, install this module, add this group messages. I was even able to install Ubuntu Intrepid from .iso. But from here it was down hill.
Attempting to start VM gives the error.
This kernel requires the following features not present on the CPU: pae Unable to boot - please use a kernel appropriate for the CPU
Some digging around, and confirmation that the current packaged version of Virtual Box doesn’t support PAE. You think they could tell you before successfully installing an OS. I’m running 1.5.6, I need 1.6.x
$ dpkg -l | grep virtualbox ii virtualbox-ose 1.5.6-dfsg-6ubuntu1 x86 virtualization solution - binaries ii virtualbox-ose-modules-2.6.24-19-generic 24.0.4 virtualbox-ose module for linux-image-2.6.24 ii virtualbox-ose-source 1.5.6-dfsg-6ubuntu1 x86 virtualization solution - kernel module
Off to the Virtual Box Downloads to get 1.6.4
Don’t make the same mistake as I did and use the first download link, that’s the commercial version that doesn’t install what you expect, you need the OSE. Of course this is not packaged, it’s only source.
./configure Checking for environment: Determined build machine: linux.x86, target machine: linux.x86, OK. Checking for kBuild: found, OK. Checking for gcc: found version 4.2.3, OK. Checking for as86: ** as86 (variable AS86) not found!
Ok, well I go through this step like 4 times, installing one package at a time, I wish they could do a pre-check and give you all missing requirements. I installed bin86, bcc, iasl.
Then I got to the following error.
$ ./configure ... Checking for libxml2: ** not found!
Well it’s installed, all too hard. Throw Virtual Box away for virtualization software. And why am I using it anyway. Because VMWare Server doesn’t work under Ubuntu 8.04 either because of some ancient gcc dependency. Sees I may have to go back to that. I just want a working virtualization people on the most popular Linux distro to install other current distros. It’s not a difficult request.
$ dpkg -l | grep libxml ii libxml-parser-perl 2.34-4.3 Perl module for parsing XML files ii libxml-twig-perl 1:3.32-1 Perl module for processing huge XML document ii libxml2 2.6.31.dfsg-2ubuntu1 GNOME XML library ii libxml2-utils 2.6.31.dfsg-2ubuntu1 XML utilities ii python-libxml2 2.6.31.dfsg-2ubuntu1 Python bindings for the GNOME XML library
For those that have been using Planet MySQL to follow the progress of Drizzle, we now have our own Planet Drizzle.
You can also get a RSS feed directly from http://feeds.feedburner.com/drizzle ![]()
I have been asked twice this week what version of MySQL I would choose for a new project.
As with most questions in life the answer is: It Depends?
In general I would now recommend for a new project to select 5.1, and he is why.
There are some concerns where I don’t have answers? For example, if you have MySQL Support , is 5.1 supported? I know a common answer to problems in pre 5.0 versions is, have you tried upgrading to 5.1
Why is not released? This is good question, the answer is obviously a level of quality, however it is generally discussed that 5.1 is of better quality in existing features then 5.0. It is 5.1 specific features you need to be careful of. It’s important that you do read carefully the 5.1 Release Notes to see where bug fixes or compatibility changes are still occuring.
As with any choice in the Open Source world, some level of risk assessment is necessary. If you have good metrics and measurement in place for your system, and you adequately test your software, there is no reason not to now consider 5.1 as a viable alternative for new development.
As I post this I note, I see the yet unreleased 5.1.28 list of bugs still shows issues of concern.
It may sound like either a astronomical research project or a Star Wars spin- off, but Project Darkstar is an open source infrastructure from Sun Microsystems that states “simplify the development and operation of massively scalable online games, virtual worlds, and social networking applications.”
The advertising sounds promising like many sites, the emphasis seems to be on gaming throughout the material, interesting they threw in the term “social networking applications” specifically in opening descriptions.
I believe worthy of investigation, if only to see how that solve some classic problems. So, Learn some more, Start your rockets and Participate.
Tonight I provided a scope in Best Design Practices for MySQL Applications - Part A of just how much there is to consider with a successful application. I only scratched the surface in some detail, a topic one could easily write a book on, and definitely provide a number more presentations.
At 42SQL we follow the “Scale 2 Success” (tm) approach covering Architecture, Availability, Scalability and Accountability. With this we are able to clearly provide a strategy towards building successful scalable enterprise solutions. For more information on how we may be able to help your organization with any performance and scalability needs, please use the Contact Form.
You can find a copy of my slides for this presentation at here.

Image courtesy of Wordle
I came across www.problogger.net by accident. Like many sites and information these days, you simply don’t find via search engines because your normally searching for something specific. I did find it via several levels of hyperlinks. I really wish there was firefox plugin that would track every site you visited, often I’d like to plot how I got to where I am, but that’s another story.
Considering the author is Australian, a top Plurker and Photographer got me intrigued enough to delve for a few moments. What I found is some good information, such as 10 Ways to Optimize a Popular Post on Your Blog and Is Your Blog a Networking Tool?.
Some more reading, Five Ways That Strategic Bullet Points Make You a Stronger Blogger, which leads to a site that includes articles such as Seal the Deal: 10 Tips for Writing the Ultimate Landing Page, which is exactly what I’m looking for with an upcoming Ad Words campaign, but wasn’t searching at the time.
You never know sometimes where good information comes from.
I attended the Ultra light startup’s meeting last night for the first time. I found it most productive for the 2 hours of time to see a different approach talking about startups, to see a variety of approaches, concepts, ideas, ventures all at various stages and generally people with different and interesting ideas and goal.
The start included a 1-2 min elevator pitch by every person with a few questions of feedback. Some interesting projects included, Rose Tech Ventures Incubator, Home Shop Technologies, New York City Co-working, Wiki Streets, Robots for Planet Earth, Festival Travel Channel, Sunshine Suites, Peek You and Wiki Pages. Two presenters put forth their ideas,concepts, and intentions with domains registered within the last 2 days.
The main discussion was on Co-Working, a concept I’ve not heard of before. It’s a different approach to the Telecommuting approach, companies moving from attendance based to performance based. Another term mentioned as ROW - Results Only Work environment.
I think some improvements in the “elevator pitch” would be.
References
Facebook Group
Subscribe to mailing list
I came across this error recently when trying to modify the data type of a column.
ERROR 1025 (HY000): Error on rename of './sakila/#sql-1d91_5' to './sakila/inventory' (errno: 150)
Not the first time, and not the last time. A common problem with InnoDB tables, is the lack of information, you need to dig deeper with the following command (and appropriate security a well organized security profile will NOT have).
mysql> SHOW ENGINE INNODB STATUS;
...
------------------------
LATEST FOREIGN KEY ERROR
------------------------
080717 20:00:28 Error in foreign key constraint of table sakila/inventory:
there is no index in the table which would contain
the columns as the first columns, or the data types in the
table do not match the ones in the referenced table
or one of the ON ... SET NULL columns is declared NOT NULL. Constraint:
,
CONSTRAINT "fk_inventory_film" FOREIGN KEY ("film_id") REFERENCES "film" ("film_id") ON UPDATE CASCADE
...
You also need to dig though the output of the command to find this, on a larger system this can be quite a lot of information just to find the details of the error. (It would be nice if there was an easier way.)
The result of this error is the columns in a foreign key relationship need to be of the same data type. This is actually a good thing, and MySQL generally operates much better in joins when the join columns are consistent.
On the assumption that you use surrogate primary keys for tables, this is a candidate for a naming standard for primary keys should be the primary key name is unique column name within your schema.
For example, if you call all your primary key’s ‘id’, your foreign key’s are normally ‘table_id’. While this is a common approach that I promoted myself for many years, it’s easy to read and consistent, actually naming every primary key uniquely provides two great benefits.
First, you can easily identify relationships in your entire schema without even knowing about the schema in detail. Second, you can leverage the benefit of the INFORMATION_SCHEMA to in the case of this post, confirm the data types are consistent for all matching columns, even when Referential Integrity is not used.
So, instead of using ‘id’, use ‘actor_id’, ‘film_id’, ‘user_id’ etc. For any self join keys, I normally prefix with parent, so ‘parent_user_id’ for example if you have a hierarchy within a table.
Before I get to post my OSCON reflection I see I didn’t post this (which I reference).
At OSCON opening keynotes Tim O’Reilly Interviews Monty Widenius & Brian Aker. This provided some interesting answers in a Q & A session. Here is some of the discussion.
TO: So 6 months in. How is it with Sun?
BA: Really rewarding environment. My first question was? You are going to send me free H/W. No H/W has been delivered yet, or access to the masses, still hoping. Sun is a very engineering driven company.
MW. Thanks God we didn’t go public. Starting to do closed sourced components, going public this would have continued.
TO: Sun saved MySQL from public market/ insulated from market.
MW: 6 months in, Sun still trying to figure out what they bought. Sun has made a commitment to open source throughout the organization. Engineers who have been working in closed environments, now seeing this all in public, and opens yourself up to more inputs and exposure.
TO: You have your own projects within sun, how does that affect with the main line of development of MySQL, Monty you with the Maria Storage Engine, Brian you with Drizzle.
TO: What is the Support like in Sun?
BA: My boss got it. We are looking at going after different market area, niche and ecosystem. There is certain direction the main codebase is heading such as enterprise features, oracle like replacements. There is a core set of environments what they aren’t needed. Additional new requirements like a proximity data storage, historically Postgres has been good for this type of GIS data. This is a new type of data store. location/time and proximity of objects.
Sun has given us more free hands to work for best features of MySQL. For Drizzle, to strip it down into more components architecture and extensibility. It’s a micro-kernel there will be an interface for large parts of the code.
TO: What do you think about Google?
BA: Happy opening up more of their data, and trying to turn the world into their own 20% of time project.
TO: What do you think about Amazon?
BA: Interesting position, secretive company. At the beginning how little anybody though of Amazon in a service marketplace.
TO : What do you think about Microsoft?
MW: less and less things are good.
BA: Irrelevant.
TO: What do you think about Apple?
NW: More afraid of Apple then Microsoft
BA: Really want an iPhone, but hoping Google will get Android out and it works.
TO: What are the cool things MySQL can do on the Sun field, and reverse?
BA: Both Sun and MySQL Engineers thought about open source differently. MySQL has created a set of steps of evolution, e.g. employees contributing to open source projects. MySQL’s DNA was very small, it’s interesting how fast this is influencing Sun’s approach
MW: MySQL has become to management driven in previous years, Sun has enabled us to get back to our roots.
Eric of Proven Scaling commented on a lack of IRC action in the normal mysql channels today when he visited the #drizzle channel on irc.freenode.net.
ebergen: I'm still in #mysql-dev and #planet.mysql but they are hardly active these days [1:51pm] rbradfor: ebergen: funny, #drizzle is where the action is. [1:51pm]
There is active movement on the Drizzle project. Why is this? Well, I think most importantly is that there is active contribution from the community, at least 5 different companies and more individuals are pushing code to Drizzle, and it’s being accepted and incorporated. Something you can not say about the MySQL Community branch.
As I write this, there are 35 active people on the #drizzle channel now, and 137 members of the Drizzle Discuss list.
My contribution is as Monty put’s it, “Your the build team”. I am managing the Build Master for Drizzle and my company 42SQL is providing the hosting and support. I’ve even managed to push my first small code changes to the project using the very simple Contributing Code instructions. No fuss, no pain, and I don’t care if it doesn’t get included, but it’s available for all to see and use.
In 2 days we now have 15 build slaves covering Ubuntu 8.04 32 & 64bit, Debian 32 & 64 bit, CentOS 5 64 bit, Gentoo 32 & 64 bit, and Mac OS/X 10.5, with definitely some color at times in the waterfall display.
Jay has a good article on Drizzle Buildbot Now Accepting BuildSlaves.
We need your help! There are plenty of Linux/Unix OS’s out there, and we want to know Drizzle can be compiled as broadly as possible. Most of the contributors of build slaves to date are not names I know well in the MySQL community, which is excellent. What I’d like to see is more names I do know.
It’s easy, just check out Instructions for setting up a BuildSlave for Drizzle.
BuildBot is a system to automate the compile/test cycle required by most software projects to validate code changes.
Here is my environment.
$ uname -a Linux app.example.com 2.6.18-53.el5 #1 SMP Mon Nov 12 02:14:55 EST 2007 x86_64 x86_64 x86_64 GNU/Linux $ python Python 2.4.3 (#1, May 24 2008, 13:57:05)
Here is what I did to get it installed successfully.
CentOS
$ yum install python-devel $ yum install zope
Ubuntu
$ apt-get install python-dev $ apt-get install python-zopeinterface
$ cd /tmp # installation of Twisted $ wget http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2 $ bunzip2 Twisted-8.1.0.tar.bz2 $ tar xvf Twisted-8.1.0.tar $ cd Twisted-8.1.0 $ sudo python setup.py install # installation of BuildBot $ cd /tmp $ wget http://downloads.sourceforge.net/buildbot/buildbot-0.7.8.tar.gz $ tar xvfz buildbot-0.7.8.tar.gz $ cd buildbot-0.7.8 $ sudo python setup.py install And a confirmation.
$ buildbot --version Buildbot version: 0.7.8 Twisted version: 8.1.0
You will notice a few dependencies. I found these out from the following errors.
$ python setup.py install .... gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtun e=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c conftest.c -o conftest.o building 'twisted.runner.portmap' extension creating build/temp.linux-x86_64-2.4 creating build/temp.linux-x86_64-2.4/twisted creating build/temp.linux-x86_64-2.4/twisted/runner gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtun e=generic -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.4 -c twisted/runner/portmap.c -o build/temp.linux-x86_64-2.4/twisted/runner/portmap.o twisted/runner/portmap.c:10:20: error: Python.h: No such file or directory twisted/runner/portmap.c:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token twisted/runner/portmap.c:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token twisted/runner/portmap.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PortmapMethods’
$ buildbot start /home/buildbot/master/
Traceback (most recent call last):
File "/usr/bin/buildbot", line 4, in ?
runner.run()
File "/usr/lib/python2.4/site-packages/buildbot/scripts/runner.py", line 939, in run
start(so)
File "/usr/lib/python2.4/site-packages/buildbot/scripts/startup.py", line 85, in start
rc = Follower().follow()
File "/usr/lib/python2.4/site-packages/buildbot/scripts/startup.py", line 6, in follow
from twisted.internet import reactor
File "/usr/lib64/python2.4/site-packages/twisted/internet/reactor.py", line 11, in ?
from twisted.internet import selectreactor
File "/usr/lib64/python2.4/site-packages/twisted/internet/selectreactor.py", line 17, in ?
from zope.interface import implements
ImportError: No module named zope.interface
Installation was the easy part, configuration a little more complex.