<
From version < 72.1 >
edited by Thomas Mortagne
on 2021/10/28
To version < 72.2 >
edited by Beat Burgener
on 2021/11/16
>
Change comment: Note to drop indexes to be able to convert to mb4 in case of FK constraint

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ThomasMortagne
1 +XWiki.BeatBurgener
Content
... ... @@ -11,7 +11,7 @@
11 11  MyISAM (the default storage engine for MySQL until release 5.5.5 in 2010) does not support transactions. If there is an error while data is being saved to the database, XWiki will attempt to roll back the transaction to its previous known good state. If you use MyISAM, it will do nothing, leaving the database in whatever state it was in when the error occurred.
12 12  
13 13  {{warning}}
14 -If you use MySQL with any engine that does not support transactions, you will most likely corrupt your database.** We highly recommend using a storage engine such as InnoDB which supports transactions.**
14 +If you use MySQL with any engine that does not support transactions, you will most likely corrupt your database.** We highly recommend using a storage engine such as InnoDB which supports transactions.**
15 15  {{/warning}}
16 16  
17 17  == MySQL versions older than 5.0 ==
... ... @@ -157,6 +157,11 @@
157 157  $mysql_cmd -e "USE $db;SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=DATABASE();"
158 158  {{/code}}
159 159  
160 +(% class="box infomessage" %)
161 +(((
162 +In case the above script fails to convert some rows with "ERROR 1833 (HY000) at line 1: Cannot change column 'columnname': used in a foreign key constraint 'FK2bj2ghquiq79toomkvugw7iie' of table 'xwiki.tablename', you can drop the foreign keys, convert the columns and then restart xWiki. Hibernate will re-create the dropped indexes automatically.
163 +)))
164 +
160 160  You can also look at [[this snippet to perform this conversion inside XWiki>>snippets:Extension.Migrate MySQL databases to utf8mb4]].
161 161  
162 162  == Convert from MyISAM to InnoDB ==

Get Connected