Today, I found the function in Innodb which maps Mysql data types
to innodb data types. It is get_innobase_type_from_mysql_type
which is located in the file ha_innodb.cc. The function takes an
input parameter of type Field from mysql classes. This filed is
then analyzed to set an output function paremeter that indicates
whether the field is signed or unsigned and then the return value
of the function is a macro integer code. The codes are defined in
data0type.h as follows:
/*-------------------------------------------*/
/* The 'MAIN TYPE' of a column */
#define DATA_VARCHAR 1
#define DATA_CHAR 2
#define DATA_FIXBINARY 3
#define DATA_BINARY 4
#define DATA_BLOB 5
#define DATA_INT 6
#define DATA_SYS_CHILD 7
#define DATA_SYS 8
#define DATA_FLOAT 9
#define DATA_DOUBLE 10
#define DATA_DECIMAL 11
#define DATA_VARMYSQL 12
#define DATA_MYSQL …
Yes please, schedule this event in your calendar or heck set up
an event in your MySQL 5.1 server ;) (yeah yeah, stupid joke).
I'll be in Boston next week, Wednesday, February 4th, talking to
the MySQL Meetup which will be held at MIT. The topic on hand
will be the MySQL 5.1 Event Scheduler. Please come down,
I'd love to meet you and talk to you, whether it's about the
MySQL Event Scheduler or anything else about MySQL (or PHP or
whatever other knowledge that is hidden in my mind).
Here are the details:
Wednesday February 4th - MySQL Meetup - Conference Room
298 in building E40 (Red brick building) The main
conference room is right in front of the Elevators on the second
floor. Come by around 6:45-7pm. As I understand it the room
is booked until 9pm.
Thanks greatly to …
This is Zak Greant's weekly report on his activities for the Mozilla Foundation from January 19th to 25th, 2009.
Wading through heaps of Mozilla email and feeds last week paid off this week. Instead of worrying about what I hadn't read or wondering where I was duplicating other's work, I was able to focus on program development with most of my effort going into developing the Mozilla Social Movement Program Concept, working on the Mozilla Manifesto Stories experiment and catching up with my peers. At 54 hours, the week was a bit long but I was glad to be able to focus. …
[Read more]With MySQL 5.1, getting and analyzing all the queries hitting the database is very easy even if you don’t have access to the MySQL enterprise Monitor. You can either activate the general log or, my favourite option, activate the slow query log with a sub millisecond long query time. Long query time below one second is an option introduced in MySQL 5.1. In order to catch all the queries, you will also need to disable the query cache. The main advantages of the slow query log over the general log is that you have access to more information like the query time, the lock time, the number of rows examined and the number of rows sent back. All the options surrounding the slow query log in MySQL 5.1 are dynamic so it is easy to turn the logging ON and OFF. Once you have the queries, tools, like mysqlsla, can be used to anlyzed the queries and group them by type.
All these tips are nice if you are using MySQL 5.1 but what if …
[Read more]
During the past year, we have been developing a write set
replication system for MySQL/innodb engine, called Galera. Now,
our project has reached milestone where we can run benchmarks to
get performance metrics and also give out releases for public
evaluation. In this blog, I'll give a short introduction to
Galera and related projects.
Some Technology
Galera is generic multi-master synchronous replication system,
which replicates transaction write sets at the commit time and
resolves conflicts by comparing keys in write sets. Replication
happens through group communication system, which (among other
tasks) defines the order of committing transactions in the
cluster. The write sets can carry original SQL statements or for
best performance: row based replication events, available in
MySQL 5.1 and onwards.
Galera replication method leaves the actual SQL statement
processing to happen uninterrupted, and quite close …
It is not hard to agree with a statement about No new global mutexes!. This has been
something we have been preaching since day one when Drizzle was
started. I have lost count on how many we have been able to get
rid of along the way.
Looking through his blog entry I thought I would comment a bit on
some of his points in context for Drizzle:
LOCK_mdl We never had this lock in the first place. It
must have been added in the last year. I suspect this is some
sort of meta-data lock. If we had a good MVCC in-memory engine
sitting around I suspect you could get rid of this lock and
similar cache locks (Drizzle's design doesn't currently require
this sort of shared information, but we are looking for an
in-memory style engine for when we do).
…
Developing websites, social applications, and scripts in PHP for more than 6 years now, I found a number of utility functions helpful in development. I am going to write a series of tutorials writing such functions and describing their use. Using these functions I have created a library of dynamically loadable classes but you are free to use them as you wish.
I am going to discuss the currentURL function in this tutorial.
Developing websites, social applications, and scripts in PHP for more than 6 years now, I found a number of utility functions helpful in development. I am going to write a series of tutorials writing such functions and describing their use. Using these functions I have created a library of dynamically loadable classes but you are free to use them as you wish.
Are you running MySQL on Debian or Ubuntu with InnoDB? You might want to disable /etc/mysql/debian-start. When you run /etc/init.d/mysql start it runs this script, which runs mysqlcheck, which can destroy performance.
It can happen on a server with MyISAM tables, if there are enough tables, but it is far worse on InnoDB. There are a few reasons why this happens -- access to open an InnoDB table is serialized by a mutex, for one thing, and the mysqlcheck script opens all tables. One at a time.
It's pretty easy to get into a "perfect storm" scenario. For example, I'm working with one client right now who has a hosted multi-tenanting application that keeps each customer in its own database. So they have a lot of databases and a lot of tables. And they're running on Amazon EC2 with 8G of RAM and EBS storage, which is slower than typical directly-attached server-grade RAID storage. Since they have a lot of tables, InnoDB uses …
[Read more]Dear Mac users,
There have been a number of issues with configuring XAMP on the
Mac for use with NetBeans IDE, most significantly that XAMP sets
the owners of MySQL databases to "nobody", blocking Apache
access. Therefore I have changed the Mac OS setup tutorial to use MAMP instead of
XAMP. In my opinion, the MAMP setup is more straightforward than
the one for XAMP, anyway.