<
From version < 71.1 >
edited by Ricardo Rodríguez
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.rrodriguez
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 ==
... ... @@ -88,13 +88,7 @@
88 88  create index xwd_parent on xwikidoc (xwd_parent(50));
89 89  create index xwd_class_xml on xwikidoc (xwd_class_xml(20));
90 90  create index xda_docid1 on xwikiattrecyclebin (xda_docid);
91 -create index ase_page_date on activitystream_events (ase_page, ase_date);
92 -create index ase_param1 on activitystream_events (ase_param1(200));
93 -create index ase_param2 on activitystream_events (ase_param2(200));
94 -create index ase_param3 on activitystream_events (ase_param3(200));
95 -create index ase_param4 on activitystream_events (ase_param4(200));
96 -create index ase_param5 on activitystream_events (ase_param5(200));
97 -create index solr_iterate_all_documents on xwikidoc (XWD_WEB, XWD_NAME, XWD_LANGUAGE, XWD_VERSION);
91 +create index solr_iterate_all_documents on xwikidoc (XWD_WEB(500), XWD_NAME(253), XWD_LANGUAGE(5), XWD_VERSION(10));
98 98  // Only required if you use stats (feature is off by default)
99 99  create index xws_number on xwikistatsdoc (XWS_NUMBER);
100 100  create index xws_classname on xwikistatsdoc (XWS_CLASSNAME);
... ... @@ -163,6 +163,11 @@
163 163  $mysql_cmd -e "USE $db;SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=DATABASE();"
164 164  {{/code}}
165 165  
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 +
166 166  You can also look at [[this snippet to perform this conversion inside XWiki>>snippets:Extension.Migrate MySQL databases to utf8mb4]].
167 167  
168 168  == Convert from MyISAM to InnoDB ==

Get Connected