Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
f02b3743
Commit
f02b3743
authored
14 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Works with mysql 5.5
parent
1c2d166b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/install/etape2.php
+2
-4
2 additions, 4 deletions
htdocs/install/etape2.php
htdocs/install/mysql/migration/2.9.0-3.0.0.sql
+1
-1
1 addition, 1 deletion
htdocs/install/mysql/migration/2.9.0-3.0.0.sql
with
3 additions
and
5 deletions
htdocs/install/etape2.php
+
2
−
4
View file @
f02b3743
...
@@ -143,7 +143,6 @@ if ($_POST["action"] == "set")
...
@@ -143,7 +143,6 @@ if ($_POST["action"] == "set")
{
{
// We always choose in mysql directory (Conversion is done by driver to translate SQL syntax)
// We always choose in mysql directory (Conversion is done by driver to translate SQL syntax)
$dir
=
"mysql/tables/"
;
$dir
=
"mysql/tables/"
;
$versionmysql550
=
explode
(
'.'
,
'5.5.0'
);
$ok
=
0
;
$ok
=
0
;
$handle
=
opendir
(
$dir
);
$handle
=
opendir
(
$dir
);
...
@@ -184,10 +183,9 @@ if ($_POST["action"] == "set")
...
@@ -184,10 +183,9 @@ if ($_POST["action"] == "set")
fclose
(
$fp
);
fclose
(
$fp
);
$buffer
=
trim
(
$buffer
);
$buffer
=
trim
(
$buffer
);
// For Mysql 5.5+, we must removed type=innodb
if
(
$conf
->
db
->
type
==
'mysql'
||
$conf
->
db
->
type
==
'mysqli'
)
// For Mysql 5.5+, we must replace 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
);
$buffer
=
preg_replace
(
'/type=innodb/i'
,
'
ENGINE=innodb
'
,
$buffer
);
}
}
//print "<tr><td>Creation de la table $name/td>";
//print "<tr><td>Creation de la table $name/td>";
...
...
This diff is collapsed.
Click to expand it.
htdocs/install/mysql/migration/2.9.0-3.0.0.sql
+
1
−
1
View file @
f02b3743
...
@@ -88,7 +88,7 @@ CREATE TABLE llx_c_ziptown
...
@@ -88,7 +88,7 @@ CREATE TABLE llx_c_ziptown
zip
varchar
(
10
)
NOT
NULL
,
zip
varchar
(
10
)
NOT
NULL
,
town
varchar
(
255
)
NOT
NULL
,
town
varchar
(
255
)
NOT
NULL
,
active
tinyint
NOT
NULL
DEFAULT
1
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
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
);
ALTER
TABLE
llx_c_ziptown
ADD
CONSTRAINT
fk_c_ziptown_fk_county
FOREIGN
KEY
(
fk_county
)
REFERENCES
llx_c_departements
(
rowid
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment