[DBAL-444] OraclePlatform getSequenceNextValSQL not handling case/quoting properly on 11g Created: 10/Feb/13 Updated: 04/Apr/13 |
|
| Status: | In Progress |
| Project: | Doctrine DBAL |
| Component/s: | Platforms |
| Affects Version/s: | 2.3.2 |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Max Milaney | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | oci8, oracle, sequence | ||
| Environment: |
PHP version 5.4.11 |
||
| Attachments: |
|
| Description |
|
I have an installer script that uses ORM SchemaTool to create the entities in the DB and then populates with basic data using basic EM->persist calls via ORM. Sequence objects are created, and when using the 10g Instant Client everything worked correctly, however, upon upgrade to latest version of the Instant Client Oracle seems to be expecting consistent case for these schema objects. It appears as if they are being created with a quoted name as they are created in lowercase. OraclePlatform::getSequenceNextValSQL, however, generates "SELECT entity_id_seq.nextval FROM DUAL" and this fails with error "General error: 2289 OCIStmtExecute: ORA-02289: sequence does not exist". Executing "SELECT "entity_id_seq".nextval FROM DUAL" directly on the DB returns the correct value. I believe this may also impact the code in http://www.doctrine-project.org/jira/browse/DBAL-278 |
| Comments |
| Comment by Max Milaney [ 10/Mar/13 ] |
|
Hi there, |
| Comment by Benjamin Eberlei [ 14/Mar/13 ] |
|
Can you maybe show an entity definition with its sequence mapping? |
| Comment by Max Milaney [ 17/Mar/13 ] |
|
Here you are mate. Please see attachment. |
| Comment by Benjamin Eberlei [ 04/Apr/13 ] |
|
I cant seem to find the problem, in DBAL "lib/Doctrine/DBAL/Platforms/OraclePlatform.php" on line 171, the sequence statement is created with $sequence->getQuotedName($platform), but this only works if quoting is requrested for the sequence. How do you actually create the sequence? Your entity doesnt have @GeneratedValue. What does the create schema command say with "--dump-sql" flag? Is the SQL quoted? |
[DBAL-131] Remove Static Types Created: 19/Jun/11 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | Drivers |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
the static types should be removed and made to instances of types that can differ between platforms. Following reasons: 1. Some vendors already convert values to PHP types, for example integers. Not converting again could save about 15% wall-time for integers for example. |
[DBAL-96] Make approach towards identifier quoting consistent Created: 26/Feb/11 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | Platforms, Schema Managers |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
Problem: Schema is independent of a vendor, this means we have to pick a behavior, i propose SQL-92
This means:
In conjunction with the SQL reserved keywords tickets we can then improve the DatabaseDriver considerably to detect identifier casings |
[DBAL-81] Add support for auto-commit = NO accross databases Created: 02/Jan/11 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Currently all databases are running in AUTO-COMMIT = Yes Mode. This means that you have to explicitly open a transaction to be able to use transactional features. There should be support to run in auto-commit = no mode, which means after connect and after each commit a new transaction is opened automatically. |
Length of a string column cannot exceed 255
(DBAL-62)
|
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | 2.0.0-RC1-RC3 |
| Fix Version/s: | 2.4 |
| Type: | Sub-task | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In the future we would probably allow arbitrary large sizes here and switch to a CLOB definition automatically if the specifed string length is larger than max length. |
[DBAL-163] Upsert support in DBAL Created: 10/Sep/11 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Upsert support in DBAL (replace, insert into usw..) |
| Comments |
| Comment by Miha Vrhovnik [ 11/Jun/12 ] |
|
FYI: http://www.depesz.com/2012/06/10/why-is-upsert-so-complicated/ |
[DBAL-162] BeforeInsertID & AfterInsertID emulation workflow, wie bei MDB2 Created: 10/Sep/11 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | Drivers |
| Affects Version/s: | 2.1 |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The following workflow is necessary for portable code to work on all platforms: $nextId = $conn->nextSequenceId();
$query = "INSERT INTO (id) VALUES (?)";
$conn->executeUpdate($query, array($nextId));
$nextId = $conn->lastInsertId();
|
[DBAL-225] Add events for onBeginTransaction, onCommit, onCommitFailure Created: 13/Feb/12 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | 2.2 |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Allow to switch a CommitFailure into a successful event. This could be done by saving all insert/update/delete statements starting from begin transaction and then replaying them N-times until success is achieved. |
[DBAL-221] Schema toSQL() and toDropSQL() both need to delegete creation/drop of schema-level elements Created: 13/Feb/12 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The following schema-level changes have to be done before tables are created:
We should add the following APIs: array $sql AbstractPlatform::getCreateSchemaAdditionalStatements(Schema $schema);
$object = new SQLObject($sqlUpCommand, $sqlDropCommand);
$schema->addSQLObject($object);
|
[DBAL-217] Introduction Interface for Connection Created: 05/Feb/12 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | Task | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
[DBAL-218] Add Object for BulkInsert Abstraction Created: 05/Feb/12 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | Task | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
[DBAL-182] Insert and Merge Query Objects Created: 18/Nov/11 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
We are missing Insert and Merge Query Objects. See Drupal DBTNG: Merge: http://drupal.org/node/310085 |
| Comments |
| Comment by Benjamin Eberlei [ 18/Nov/11 ] |
|
From the first glance: Drupal API has some problems in that it assumes literal values are the default, which makes working with them simple if no expression is necessary. But inconsistent otherwise. Implementation Details:
$conn->createInsertQuery(); $conn->createMergeQuery();{conn} Sample API: $conn->createInsertQuery($tbl)->fields(array('foo', 'bar'))->values(array('?', '?'))->(array(1, 2))->execute();
$conn->createInsertQuery($tbl)->fields(array('foo', 'bar'))->params(array(1, 2))->execute(); // values(?, ?) is implicit.
$conn->createInsertQuery($tbl)->fields(array('foo', 'bar'))->params(array('NOW()', '1'))->execute(); // if no "params" set assume execute once.
$conn->createInsertQuery($tbl)->fields(array('foo', 'bar'))->value('foo', 'NOW())->params(array(1))->params(array(2))->execute();
$conn->createInsertQuery($tbl)->fields(array('foo', 'bar'))->select($queryBuilder)->execute();
Merge: I dont know yet: problem i see here is that people mistake values() for a "safe" method and pass values in there that should be quoted instead. |
[DBAL-242] Catch and re-throw exceptions with common messages + codes Created: 24/Mar/12 Updated: 20/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
[DBAL-325] [GH-186] Added third an optional argument `types` to use prepared statement Created: 18/Aug/12 Updated: 29/Aug/12 |
|
| Status: | Open |
| Project: | Doctrine DBAL |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.4 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of timoshenko: Url: https://github.com/doctrine/dbal/pull/186 Message: |