Fix: Works with mysql 5.5
This commit is contained in:
parent
1c2d166b14
commit
f02b3743b6
@ -143,7 +143,6 @@ if ($_POST["action"] == "set")
|
||||
{
|
||||
// We always choose in mysql directory (Conversion is done by driver to translate SQL syntax)
|
||||
$dir = "mysql/tables/";
|
||||
$versionmysql550=explode('.','5.5.0');
|
||||
|
||||
$ok = 0;
|
||||
$handle=opendir($dir);
|
||||
@ -184,10 +183,9 @@ if ($_POST["action"] == "set")
|
||||
fclose($fp);
|
||||
|
||||
$buffer=trim($buffer);
|
||||
// For Mysql 5.5+, we must removed type=innodb
|
||||
if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli')
|
||||
if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') // For Mysql 5.5+, we must replace type=innodb
|
||||
{
|
||||
if (sizeof($versionarray) && versioncompare($versionarray,$versionmysql550) >= 0) $buffer=preg_replace('/type=innodb/i','',$buffer);
|
||||
$buffer=preg_replace('/type=innodb/i','ENGINE=innodb',$buffer);
|
||||
}
|
||||
|
||||
//print "<tr><td>Creation de la table $name/td>";
|
||||
|
||||
@ -88,7 +88,7 @@ CREATE TABLE llx_c_ziptown
|
||||
zip varchar(10) NOT NULL,
|
||||
town varchar(255) NOT NULL,
|
||||
active tinyint NOT NULL DEFAULT 1
|
||||
)type=innodb;
|
||||
) ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_c_ziptown ADD INDEX idx_c_ziptown_fk_county (fk_county);
|
||||
ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_county FOREIGN KEY (fk_county) REFERENCES llx_c_departements (rowid);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user