Download - All IT eBooks

Transcript
XA: NO
Savepoints: NO
*************************** 6. row ***************************
Engine: FEDERATED
Support: NO
Comment: Federated MySQL storage engine
Transactions: NULL
XA: NULL
Savepoints: NULL
*************************** 7. row ***************************
Engine: ARCHIVE
Support: YES
Comment: Archive storage engine
Transactions: NO
XA: NO
Savepoints: NO
*************************** 8. row ***************************
Engine: MyISAM
Support: DEFAULT
Comment: Default engine as of MySQL 3.23 with great performance
Transactions: NO
XA: NO
Savepoints: NO
8 rows in set (0.00 sec)
I turned the error logfile off so that we could see the error on the console, but in
production, the error log would be the place to look for the error message. Therefore,
if you find out that one of the features you need does not exist, check the error logfile
first.
It is very important to understand how a desired feature affects the work a server does.
For example, when InnoDB is not available, we still can create tables successfully if the
SQL mode does not contain NO_ENGINE_SUBSTITUTION:
mysql> CREATE TABLE t1(f1 INT) ENGINE=InnoDB;
Query OK, 0 rows affected, 2 warnings (0.01 sec)
This example shows that it’s always important to check warnings. In this case, the table
was created using the wrong storage engine because we had an error trying to start
InnoDB:
mysql> SHOW WARNINGS;
+---------+------+--------------------------------------------+
| Level
| Code | Message
|
+---------+------+--------------------------------------------+
| Warning | 1286 | Unknown table engine 'InnoDB'
|
| Warning | 1266 | Using storage engine MyISAM for table 't1' |
+---------+------+--------------------------------------------+
2 rows in set (0.00 sec)
If you don’t check the warnings, a user might start using this table and discover the
problem only when your whole application is affected. As you know from the previous
chapter, MyISAM and InnoDB use different locking methods, so an application written
110 | Chapter 3: Effects of Server Options