Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
19f5a139
Commit
19f5a139
authored
Dec 25, 2014
by
Steve Müller
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #742 from nlegoff/mysql-version-detection
Take care about mariadb platform
parents
92f4f99d
7f89a783
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
AbstractMySQLDriver.php
lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
+4
-0
AbstractMySQLDriverTest.php
tests/Doctrine/Tests/DBAL/Driver/AbstractMySQLDriverTest.php
+3
-0
No files found.
lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php
View file @
19f5a139
...
...
@@ -127,6 +127,10 @@ abstract class AbstractMySQLDriver implements Driver, ExceptionConverterDriver,
);
}
if
(
false
!==
stripos
(
$version
,
'mariadb'
))
{
return
$this
->
getDatabasePlatform
();
}
$majorVersion
=
$versionParts
[
'major'
];
$minorVersion
=
isset
(
$versionParts
[
'minor'
])
?
$versionParts
[
'minor'
]
:
0
;
$patchVersion
=
isset
(
$versionParts
[
'patch'
])
?
$versionParts
[
'patch'
]
:
0
;
...
...
tests/Doctrine/Tests/DBAL/Driver/AbstractMySQLDriverTest.php
View file @
19f5a139
...
...
@@ -60,6 +60,9 @@ class AbstractMySQLDriverTest extends AbstractDriverTest
array
(
'5.7.0'
,
'Doctrine\DBAL\Platforms\MySQL57Platform'
),
array
(
'5.7.1'
,
'Doctrine\DBAL\Platforms\MySQL57Platform'
),
array
(
'6'
,
'Doctrine\DBAL\Platforms\MySQL57Platform'
),
array
(
'10.0.15-MariaDB-1~wheezy'
,
'Doctrine\DBAL\Platforms\MySqlPlatform'
),
array
(
'10.1.2a-MariaDB-a1~lenny-log'
,
'Doctrine\DBAL\Platforms\MySqlPlatform'
),
array
(
'5.5.40-MariaDB-1~wheezy'
,
'Doctrine\DBAL\Platforms\MySqlPlatform'
),
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment