Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/patches/059.engines.php
| Show All 9 Lines | "SELECT TABLE_SCHEMA db, TABLE_NAME tbl | ||||
| AND s.TABLE_NAME != 'search_documentfield' | AND s.TABLE_NAME != 'search_documentfield' | ||||
| AND s.ENGINE != 'InnoDB'", | AND s.ENGINE != 'InnoDB'", | ||||
| '{$NAMESPACE}_'); | '{$NAMESPACE}_'); | ||||
| if (!$tables) { | if (!$tables) { | ||||
| return; | return; | ||||
| } | } | ||||
| echo "There are ".count($tables)." tables using the MyISAM engine. These will ". | echo pht( | ||||
| "now be converted to InnoDB. This process may take a few minutes, please ". | "There are %d tables using the MyISAM engine. These will now be converted ". | ||||
| "be patient.\n"; | "to InnoDB. This process may take a few minutes, please be patient.\n", | ||||
| count($tables)); | |||||
| foreach ($tables as $table) { | foreach ($tables as $table) { | ||||
| $name = $table['db'].'.'.$table['tbl']; | $name = $table['db'].'.'.$table['tbl']; | ||||
| echo "Converting {$name}...\n"; | echo pht('Converting %s...', $name)."\n"; | ||||
| queryfx( | queryfx( | ||||
| $conn, | $conn, | ||||
| 'ALTER TABLE %T.%T ENGINE=InnoDB', | 'ALTER TABLE %T.%T ENGINE=InnoDB', | ||||
| $table['db'], | $table['db'], | ||||
| $table['tbl']); | $table['tbl']); | ||||
| } | } | ||||
| echo "Done!\n"; | echo pht('Done!')."\n"; | ||||