Today I was asked about this bit of code that appears in some of
the examples MySQL has for engine designers:
memcpy(record, ptr, table->s->null_bytes);
What is exactly going on here?
Whenever we read a row, or write a row the method looks something
like this:
int ha_example::write_row(byte *record)
"record" is a byte array of data that makes up the row. The first
bytes of it store whether fields are null or not. Values for
columns are then stored in order after the null bytes. Most
engines never look at "record" directly, and instead use Field
objects to look at, or set the current record. To do this you
typically setup a for loop like so:
for (Field **field=table->field ; *field ; field++)
Field has both store and value functions that allow you to
manipulate the data. When storing a field you typically
call:
…
Just for reference, here are some previous posts I did for the
2005 MySQL User Conference:
Not that these are particularly awesome or anything, but there
are a few travels notes which may possibly be useful if you
decide to go this year, since it's in the same location.
If you have the time, and you are from outside The Valley, catch …
On Server and Storage Engines
Q from Alessandro: What about the filesystem for
MyISAM in a small company? Better ReiserFS or
EXT3?
As Anders said, it's a matter of taste. XFS is a good alternative
too. Ext3 is stable, but sometimes slow and a bit outdated. Many
like Reiser, but it is sometimes difficult to manage. XFS often
gives you good performance and reliability out of the box.
Q from Florian: MySQL 5.1 ==
Falcon?
Falcon is available for download today. The current version
refers to 5.2 and it's an alpha version. We may change plans, but
so far Falcon is related to version 5.2
Q from Henk: Will InnoDB ultimately be replaced by
Falcon?
No, it will not. Falcon is an alternative to InnoDB and willl be
especially excellent for online applications, but we will
continue to support InnoDB for many …
Today, FSF released the third GPLv3 draft on http://gplv3.fsf.org/gpl3-dd3-guide . It’s great that the entire, complex process now has completed its next milestone, and I can fully understand why the FSF has seen it necessary to proceed at a pace somewhat slower than originally intended.
My thoughts go back well over a year to the Free Software Foundation’s first conference on GPLv3, at the end of January 2006. It was a great meeting, and as a Committee B member and representative of MySQL, I was asked by China Martens of IDG for my input. My reply “I think there was a good balance between different hair and beard lengths” ended up on China’s compilation “2006: The IT …
[Read more]
Last august, I started wanting a new API for MySQL Cluster that
could solve a few problems. Frist, if you were to use MySQL
Cluster in a LAMP application, you would be turning a two-layer
architecture (Apache and MySQL) into three layers (Apache, MySQL,
and NDB). Adding that extra tier requires more hardware and means
slower response times. Second, the one way around this was to
write native NDB API code in C++, but learning the API and
developing low-level code can require a big commitment of time. I
wanted an easier way to eliminate the extra layer.
My solution is called mod_ndb, and it is an Apache module that
runs inside a web server and connects directly to the MySQL
Cluster data nodes. It supports a "RESTful" API -- applications
make GET, POST, and DELETE requests over HTTP, and mod_ndb
provides appropriate HTTP responses. Because it is HTTP,
responses can be cached by proxies in a well-defined way, and
data can be delivered …
Evans Data Group has recently released the results of their latest developer survey showing that MySQL usage is up by 25%. In fact, 40% of developers surveyed are using MySQL. According to Evans:
"In an increasing number of ratings categories, we're seeing open-source databases meeting or exceeding proprietary databases."
Evans indicated that MySQL was growing in popularity due to its adoption as part of the open source LAMP stack (Linux / Apache / MySQL / PHP). With more developers using open source (65% in North America) MySQL usage is expected to continue to grow in the future.
- Evans Data: MySQL Gains 25% Market Share of Database Usage
- CNet: …
I blogged some months ago about an article written by Mr Puhakka on how to build a billion dollar business around open source software. Last Friday I attended Mr Puhakka’s presentation where he analyzed MySQL’s possibilities on becoming so (copied from his slides):
- Find or create a great value proposition. The price vs. quality ratio of MySQL is in place or even superior as MySQL has this with its database offering costing a fraction of competing incumbents.
- Find a quickly growing market. Rapidly growing markets tend to be much more forgiving of mistakes than …
This is a good read for anyone who has ever tried
to pivot data from a table in MySQL using client side code like
PHP when you can with some careful query construction do it in
MySQL.
--
Copyright 2006-2008 Andrew Rose [rose.andrew@gmail.com] [andrewrose.co.uk]
I’ve used OfflineIMAP for quite a while now. On the whole I’m fairly happy with it. Today I sent this to the list:
Forgive the potentially bad python, not my native tongue :)
This patch is motivated by three things:
- offlineimap is extremely slow at syncing lots of locally
deleted
messages
- offlineimap uses lots of memory
- LocalStatus files aren’t written safely (a hard crash can
cause
corruption)
- I’ve been
bitten by this in the past, causing a complete resync of
the folder… so I get duplicate messages.
I am currently using 4.0.14 (from Debian) with this patch. I used
it to
convert the files and everything. Seems quite reliable and quick.
In my tests, execution time for a normal sync is relatively the same.
Execution …
[Read more]Having taken a look at the 35 MySQL Summer of Code applications, I can now say that we have several very strong applications, such as:
- IPv6: Enabling MySQL to connect over IPv6 internet
- MySQL Based Atom Store (storing Google GDATA in MySQL)
- Test case development / Load testing
- Test suite development
- MySQL Auditing Software
- The “anti-profiler” - a performance analysis tool for database engines
For several of the above, we have multiple good applications. The applicants come from recognised universities across the world, not just the US and Europe. Some have extensive experience from professional software development. Sadly, we will end up having to reject several …
[Read more]