In MySQL tables are locked as part of the MySQL Server code
during each
statement. For a SELECT statement each table in the SELECT
statement is
locked using a read lock. For UPDATE/INSERT/DELETE statements a
write
lock is used. For ALTER TABLE a special lock that excludes
writers but
allows readers to be processed is taken.
However what these locks actually do is dependent on the
underlying
engine. For MyISAM, a read lock means no updater is allowed
during the
statement and a write lock means that no other writers is allowed
and
also no other readers.
For other engines such as NDB and InnoDB that employs row-level
locking
internally these locks are mostly ignored except for the special
ALTER
TABLE lock that ensures that no writers is allowed during the
ALTER TABLE
statement.
(There is quite a lot more details to locking in MySQL …
I've been a MySQL Cluster hobbyist for some time now. I say that because over the years I've followed what's happening with MySQL Cluster and have run it on various personal computers (and laptops). I threw a chapter into Pro MySQL about setting up and managing a cluster and am off to PHP Quebec on Wednesday to give a presentation on getting a cluster up and running. But I've have yet to work with the cluster in a setting other than for personal intrigue.
The other day at work I was telling a few folks about the upcoming trip and mentioned my presentation. The CTO was along for lunch and had a slew of questions about the MySQL Cluster. To my delight one of the next things on the infrastructure list is to research alternatives to slicing data across many standalone machines and implement a …
[Read more]I've returned from vacation and will be posting the blog drafts I've got stuffed in my outbox. The snaps below are from the farewell dinner at the end of our Dev Con in Sorrento, Italy. Great music, great food, and fun!
Tomorrow my family and I are attending the Pompeii excursion (I've already blogged about the running water there!). We are going to follow that with 3 days in Rome and 3 days in Venice (blogs to follow).
And, of course, the night would not have been complete without a number from Patrick!
It's been a while since I've written. Sorry to all 1 of my fans
:). I am just very busy with work. So, two things.
First is a blog my friend Joel started: http://www.browserlessweb.com/ . I suggest reading
it, it's not PHP or MySQL centric, but the things he talks about
should affect anyone who reads this blog.
Second item: My Employer is looking to hire some
people
-
- You need to be in Herndon, Virginia, or within driving
distance. (no telecommuters, no relocation package)
- You must have good working experience with PHP in an
enterprise environment (very high visibility site).
- We will not hold your hand in a linux environment. You must
be comfortable with vim, emacs nano, joe,jed, pico
whatever.
- Some experience with teams larger …
In my environment, I like to install the server software on the
server and install a client version of the software in a common
area. If you need to link to certain libraries or use programs to
connect to the database, I'll put them in /usr/local for
everybody to use. My authentication is in the database, so I
don't care if you can run a program but not connect to the
database.
It's no secret that I'm a MySQL newbie and I've had my share of
issues installing the MySQL client. That was
kind of a special case since I wasn't using a mainstream
compiler, but even so, I was able to get the problem fixed in
relatively short order.
One of my tasks lately has been to upgrade the Oracle client to
version 10.2. I've installed the client software a couple dozen
times and the server software maybe 100 times if I want to …
OK, I'm sufficiently recovered from a fabulous few days at EclipseCon 2006, where I got to meet a great bunch of enthusiastic, talented developers who, I am sure, will push the Eclipse project into new realms of productivity and platform stability. I got a chance to talk with Andi Gutmans from Zend shortly after his presentation on the PHP IDE project and I'm excited to see what MySQL can bring to the table with both the DTP project and the PHP IDE endeavour. The next few months will indeed be very interesting.
A Full Slate
But, no rest for the weary. I've got a full slate of conferences and meetings coming in the next three months, including next week at …
[Read more]
OS X Panther and Tiger come with built-in multicast dns host name
resolving.
...In Panther client, I could just use ssh admin@xmysql and it
worked, however in Panther server and Tiger client/server I have
to correctly use ssh admin@xmysql.local to resolve the host
name.
For WO https development, you can use your dev machine name as
the host name for the ssl certificate.
...Bonjour is available as a download from Apple (just google
"Bonjour for Windows" to find it) so that your Windows PC's can
easily access your mac services and in particular your
development WO app on your dev machine using mymac.local as the
host.
OS X Panther and Tiger come with built-in multicast dns host name
resolving.
...In Panther client, I could just use ssh admin@xmysql and it
worked, however in Panther server and Tiger client/server I have
to correctly use ssh admin@xmysql.local to resolve the host
name.
For WO https development, you can use your dev machine name as
the host name for the ssl certificate.
...Bonjour is available as a download from Apple (just google
"Bonjour for Windows" to find it) so that your Windows PC's can
easily access your mac services and in particular your
development WO app on your dev machine using mymac.local as the
host.
Recently I had occasion to delete a couple of rows from a MySQL
table using the Access interface. This is not something I make a
habit of doing. Normally with an Access database you highlight
some rows, press Delete, the rows disappear, it asks you do you
really want to do that, and if you say "No" the rows magically
reappear again.
The first thing that happened was an error. I did not have Delete
privilege granted to me on this database. I quickly corrected
that, noting that the error messages appeared before it asked me
for confirmation that I really meant to do this operation.
So, again selecting and electing to delete these rows, as it
prompted me with it's readback of what I am about to do to my
database that I cannot undo, and do I really want to do it?
message, I elected to say "No" just for grins. My rows came back—
sort of. They had the #Deleted text in every column, and I
had this feeling that they …
Given a new Linux Installation, the following is my recommendation for installation of MySQL for a experienced software developer giving flexibility in a development environment.
1. Under normal circumstances, most distros include MySQL either in a default server installation or on the distribution CD’s. You should first ensure MySQL is not installed.
2. All products can be downloaded from the MySQL Downloads page.
3. Download MySQL 5.1 Beta - Linux (non RPM, Intel C/C++ compiled, glibc-2.3), this product is close to production release and stable. This also includes both Server and Client as well as provides flexibility in installation location and …
[Read more]