Best practice forum (Archived)

Convert tables to Baracuda?

 
me
Re: Convert tables to Baracuda?
על ידי George Angus בתאריך 12/04/2016, 19:35
קבוצה Totara

Hi John,

Its ok to run the command. 

You may find the text below useful.

If you get an error message when installing Totara 2.9 using My SQL about Innodb file format not being correct the database will need to be converted to the format required to continue installing .

Converting InnoDB tables to Barracuda

Sites using MySQL with database tables using Antelope as the file format are recommended to convert the tables to the Barracuda file format.

This is because tables using Antelope as the file format cannot handle more than 10 text columns. This file formats only supports compact and redundant row formats for backward compatibility reasons. This may cause a problem on larger sites when restoring a course, in which case the following error will be displayed:

Row size too large (>8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help.

 

Barracuda is the newest innoDB file format. In addition to supporting compact and redundant row formats, Barracuda also supports compressed and dynamic row formats.

 

Tool for converting tables

A command line tool is included in Totara for converting tables to Barracuda.

To view tables requiring conversion, use the list option:

$ php admin/cli/mysql_compressed_rows.php --list

 

Here is an example output:

mdl_data                            Compact     (needs fixing) 
mdl_data_fields                     Compact     (needs fixing)
mdl_enrol_paypal                    Compact     (needs fixing)

 

To proceed with the conversion, run the command using the fix option:

$ php admin/cli/mysql_compressed_rows.php --fix

 

Successful table conversion will be reported in the output, for example:

mdl_data                   ... Compressed
mdl_data_fields            ... Compressed
mdl_enrol_paypal           ... Compressed

 

Please note that the commands must be executed on your moodle directory. Once tables are fixed, the warning message will no longer be displayed.

For further information on InnoDB file formats see the MySQL InnoDB glossary - Antelope and the MySQL InnoDB glossary - Barracuda.

 

Hope this is useful,

cheers,

George.