Your database has tables using Antelope as the file format. You are recommended to convert the tables to the Barracuda file format.
Moodle users see this warning message about the database format during an upgrade.
It asks the user to convert the file format used by the MySQL 5.7 or earlier, to Barracuda.
At Bobcares, we often get requests to fix Moodle errors, as part of our Server Management Services.
To know more about the error message, read on.
Antelope vs Barracuda in MySQL
The error message specifies two file formats used by the MySQL database server. One, that is already in use and other, a recommended one. Let’s have a look at both of them.
A popular database used today is MySQL. Antelope is the original file format used in MySQL. It supports COMPACT and REDUNDANT row formats for InnoDB tables. But this has a disadvantage. It cannot handle more than 10 text columns. Hence it affects the management of larger websites.
That is why Moodle recommends the users to convert the file format to Barracuda. This is the latest file format in MySQL. It additionally supports COMPRESSED and DYNAMIC row formats. The advantage of this is compressed tablets, efficient storage of off-page columns, and index key prefixes up to 3072 bytes.
Is there a need to convert Antelope to Barracuda?
Moodle update always shows the recommendation to convert the file format used by MySQL versions 5.7 or before. And this appears as,
If the Moodle uses the latest MySQL versions like 8, file format does not matter. So instead of changing the file format, the user can upgrade the database.
Even in older versions, the Antelope file format does not cause trouble on smaller websites. But for larger websites, this is not the situation. In such websites, we recommend a change in file format, because, restoration of courses in such websites shows the following error.
Row size too large (>8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help.
To avoid this, it is always better to change the file format or upgrade the MySQL. Now, let’s see how our Support Engineers convert Antelope to the Barracuda file format.
How to convert the MySQL file format?
Here are the steps we use to convert the file format in MySQL.
1. First, we login to the MySQL server as the root user.
2. Next, we check the MySQL version in the prompt. For this, we use the command,
mysql> select version();
This results in the output,
+------------+
| version() |
+------------+
| 5.5.24-cll |
+------------+
3. Then we check the current file format using the command,
mysql> show variables like "%innodb_file%";
The result appears as,
+--------------------------+----------+
| Variable_name | Value |
+--------------------------+----------+
| innodb_file_format | Antelope |
| innodb_file_format_check | ON |
| innodb_file_format_max | Antelope |
| innodb_file_per_table | ON |
+--------------------------+----------+
So the file format currently in use is Antelope.
4. Next, we change the file format to Barracuda. For this we use,
mysql> SET GLOBAL innodb_file_format = barracuda;
mysql> SET GLOBAL innodb_file_format_max = barracuda;
5. Finally, we verify the file format.
mysql> show variables like "%innodb_file%";
+--------------------------+-----------+
| Variable_name | Value |
+--------------------------+-----------+
| innodb_file_format | Barracuda |
| innodb_file_format_check | ON |
| innodb_file_format_max | Barracuda |
| innodb_file_per_table | ON |
+--------------------------+-----------+
6. Then, we restart the MySQL service.
service mysqld restart
Thus the file format is Barracuda and Moodle can now use it.
[Still having the problem with file format in a Moodle website?- We’re available 24/7.]
Conclusion
In short, Moodle upgrade often shows the warning ‘Your database has tables using Antelope as the file format’ if it uses MySQL version 5.7 or earlier. Today, we saw how our Support Engineers converted Antelope to Barracuda file format in MySQL via the command line.
0 Comments