Merge innodb-tablas-nuevas: las tablas nuevas del CMS nacen en InnoDB
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -74,7 +74,12 @@ function createMissingSchemaTablesAndFields() {
|
|||||||
$mysqlTableName = $TABLE_PREFIX . $tableName;
|
$mysqlTableName = $TABLE_PREFIX . $tableName;
|
||||||
if (!in_array($mysqlTableName, $mysqlTables)) {
|
if (!in_array($mysqlTableName, $mysqlTables)) {
|
||||||
notice("Creating MySQL table for schema table: $tableName<br/>\n");
|
notice("Creating MySQL table for schema table: $tableName<br/>\n");
|
||||||
$result = mysql_query("CREATE TABLE `".mysql_real_escape_string($mysqlTableName)."` (num int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (num)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;");
|
// InnoDB (antes MyISAM): las tablas nuevas nacen con recuperacion
|
||||||
|
// ante caida y bloqueo por fila. El sql_mode de Forge no es
|
||||||
|
// estricto, asi que los INSERT parciales del CMS (AcaiAPI no
|
||||||
|
// rellena dragSortOrder ni los checkboxes) siguen colando igual
|
||||||
|
// que con MyISAM. Ver docs/motor-innodb.md del repo de Forge.
|
||||||
|
$result = mysql_query("CREATE TABLE `".mysql_real_escape_string($mysqlTableName)."` (num int(10) unsigned NOT NULL auto_increment, PRIMARY KEY (num)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;");
|
||||||
if (!$result) { alert("Error creating MySQL table: $mysqlTableName<br/>\MySQL error was: ". htmlspecialchars(mysql_error()) . "\n"); }
|
if (!$result) { alert("Error creating MySQL table: $mysqlTableName<br/>\MySQL error was: ". htmlspecialchars(mysql_error()) . "\n"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ function addTablePlugin($path,$file) {
|
|||||||
$result = mysql_query("CREATE TABLE `".mysql_real_escape_string($tableNameWithPrefix)."` (
|
$result = mysql_query("CREATE TABLE `".mysql_real_escape_string($tableNameWithPrefix)."` (
|
||||||
num int(10) unsigned NOT NULL auto_increment,
|
num int(10) unsigned NOT NULL auto_increment,
|
||||||
PRIMARY KEY (num)
|
PRIMARY KEY (num)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
print "Error creating MySQL table.\n\nMySQL error was: ". htmlspecialchars(mysql_error()) . "\n";
|
print "Error creating MySQL table.\n\nMySQL error was: ". htmlspecialchars(mysql_error()) . "\n";
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
Reference in New Issue
Block a user