You are here

InnoDB in self-compiled MySQL 5.1

MySQL Performance Blog - Thu, 13/09/2007 - 7:47am

If you like to compile MySQL from sources by yourself, for different needs, like debugging, testing etc, you probably can face this issue.

What I usually do to fast compile and test is

PLAIN TEXT SQL:
  1. ./configure --prefix=/dir/to/mysql
  2. make
  3. make install

and then, for example, load the dump of InnoDB from previous version:

mysql testdatabase < dump.sql

I bet you will not notice all your tables now is MyISAM. Why?

PLAIN TEXT SQL:
  1. Welcome TO the MySQL monitor.  Commands end WITH ; OR \g.
  2. Your MySQL connection id IS 1
  3. Server version: 5.1.21-beta-log Source distribution
  4.  
  5. Type 'help;' OR '\h' FOR help. Type '\c' TO clear the buffer.
  6.  
  7. mysql> SHOW engines;
  8. +------------+---------+-----------------------------------------------------------+--------------+----+------------+
  9. | Engine     | Support | Comment                                                   | Transactions | XA | Savepoints |
  10. +------------+---------+-----------------------------------------------------------+--------------+----+------------+
  11. | CSV        | YES     | CSV storage engine                                        | NO           | NO | NO         |
  12. | MRG_MYISAM | YES     | Collection of identical MyISAM TABLES                     | NO           | NO | NO         |
  13. | MEMORY     | YES     | Hash based, stored IN memory, useful FOR TEMPORARY TABLES | NO           | NO | NO         |
  14. | MyISAM     | DEFAULT | DEFAULT engine AS of MySQL 3.23 WITH great performance    | NO           | NO | NO         |
  15. +------------+---------+-----------------------------------------------------------+--------------+----+------------+
  16. 4 rows IN SET (0.00 sec)

By default InnoDB is not compiled as storage engines.

Perhaps it is related to new pluginable architecture and all engines are equal to be not included by default.

It is not too hard to fix, you just need to use --with-plugins=innodb (or max, or max-no-ndb, which includes set of more engines)

PLAIN TEXT SQL:
  1. ./configure ---prefix=/dir/to/mysql --with-plugins=innodb
  2. make
  3. make install

But what I would want to see is BIG Warning or even Error that InnoDB table can't be created instead of calm converting to MyISAM