mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: Works with mysql 5.5
This commit is contained in:
parent
9d5affe984
commit
91d710f8db
|
|
@ -85,6 +85,7 @@ For developers:
|
|||
- New: Enhance a lot of internal function to build external modules
|
||||
more easily.
|
||||
- New: Local user timezone is saved into session (not used yet).
|
||||
- New: Works with Mysql 5.5.
|
||||
- Qual: Menu system code is simpler.
|
||||
- Qual: Mutualize some duplicate code.
|
||||
- Qual: Renamed some fields into database to be more internationnal.
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ 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);
|
||||
|
|
@ -183,6 +184,11 @@ 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 (sizeof($versionarray) && versioncompare($versionarray,$versionmysql550) >= 0) $buffer=preg_replace('/type=innodb/i','',$buffer);
|
||||
}
|
||||
|
||||
//print "<tr><td>Creation de la table $name/td>";
|
||||
$requestnb++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user