databases/Notes/Aria.md
2016-09-30 14:00:29 +02:00

1.8 KiB

There are also some new options to CREATE TABLE:

TRANSACTIONAL= 0 | 1 : Off by default, if set to 1, all changes are logged to a transaction log, synced at the end of the statement. This will marginally slow down writes and updates, but makes the table crash-proof, so that if the server dies before the statement ends, all changes will roll back to the state at the beginning of the statement. TRANSACTIONAL=1 also needs up to 6 bytes more for each row and key to store the transaction id (to allow concurrent insert's and selects).

PAGE_CHECKSUM= 0 | 1 : If index and data should use page checksums for extra safety.

TABLE_CHECKSUM= 0 | 1 : Same as CHECKSUM in MySQL 5.1

ROW_FORMAT=PAGE : Default row format for Aria data tables and only row format that can be used if TRANSACTIONAL=1. To emulate MyISAM, use ROW_FORMAT=FIXED or ROW_FORMAT=DYNAMIC

CHECKSUM TABLE now ignores values in NULL fields. This makes CHECKSUM TABLE faster and fixes some cases where same table definition could give different checksum values depending on row format. The disadvantage is that the value is now different compared to other MySQL installations. The new checksum calculation is fixed for all table engines that uses the default way to calculate and MyISAM which does the calculation internally. Note: Old MyISAM tables with internal checksum will return the same checksum as before. To fix them to calculate according to new rules you have to do an ALTER TABLE. You can use the old ways to calculate checksums by using the option --old to mysqld or set the system variable '@@old' to 1 when you do CHECKSUM TABLE ... EXTENDED;

At startup Aria will check the Aria logs and automatically recover the tables from the last checkpoint if mysqld was not taken down correctly.

ALTER TABLE indiscores ENGINE = ARIA TRANSACTIONAL = 0 PAGE_CHECKSUM = 0;