Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-ALPHA2
-
Fix Version/s: 2.0-ALPHA3
-
Component/s: None
-
Security Level: All
-
Labels:None
Description
The column identifiers are not quoted in the SchemaTool/Platform.
Funny is Doctrine\Tests\ORM\Functional\SchemaTool\MysqlSchemaToolTest::testGetCreateSchemaSql2() suffers from this "problem" by asserting mysql invalid syntax as correct creation code.
All identifiers should be escaped by the Platform.
Activity
Roman S. Borschel
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Closed [ 6 ] |
| Fix Version/s | 2.0-ALPHA3 [ 10029 ] | |
| Resolution | Fixed [ 1 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 10289 ] | jira-feedback [ 15457 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback [ 15457 ] | jira-feedback2 [ 17321 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 17321 ] | jira-feedback3 [ 19578 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-88, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
This is actually intended, I mean not the wrong test case but the fact that the DBAL itself does not escape anything. If someone is using the DBAL directly he can quote problematic names himself ($platform->quoteIdentifier(...)). Identifier quoting is discouraged and not even a 100% reliable solution for reserved words.
There is also no global switch anymore like in D1 to "quote all identifiers" as this is like breaking a butterfly on the wheel if there is just 1 problematic column name.
How quoting a specific column works from the ORM is described here:
http://www.doctrine-project.org/documentation/manual/2_0/en/basic-mapping#quoting-reserved-words
So, the ORM applies quoting on individual columns that have been marked as such. Apart from that, there is no quoting going on, neither in the ORM, nor in the DBAL.
The test case needs to be fixed, of course.