Bug #15213 [Opn->Fbk]: Error when restoring database (OCI8)
| From: | ifeghali@php.net | Date: | Sun, 22 Feb 2009 14:57:56 +0000 |
| Subject: | Bug #15213 [Opn->Fbk]: Error when restoring database (OCI8) | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-61@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=15213&edit=1
ID: 15213
Updated by: ifeghali@php.net
Reported By: ionut dot aivanesei at gmail dot com
Summary: Error when restoring database (OCI8)
-Status: Open
+Status: Feedback
Type: Bug
Package: MDB2_Schema
Operating System: Irrelevant
Package Version: 0.8.4
PHP Version: Irrelevant
Roadmap Versions:
New Comment:
<div id="changeset">
<span class="removed">-Status: Open</span>
<span class="added">+Status: Feedback</span>
</div>
Previous Comments:
------------------------------------------------------------------------
[2009-02-22 14:57:42] ifeghali
on your test XML set
<create>true</create>
try again and tell me if that fixes for you. I couldn't reproduce this
problem with MySQL so its probably something with OCI driver or a
previous definition of that databases that is not being overwritten.
------------------------------------------------------------------------
[2008-12-08 13:36:56] galiganu
TEST SCRIPT:
<?php
require_once 'MDB2/Schema.php';
$options = array(
'use_transactions' => false,
'fail_on_invalid_names' => true,
'quote_identifier' => false,
'force_defaults' => false,
'portability' => true,
'debug' => true
);
$dsn = 'oci8://sa:sa@localhost:1521/?service=test';
$schema =& MDB2_Schema::factory($dsn, $options);
if (PEAR::isError($schema))
{
echo 'schema error: ' . print_r($schema, true);
}
else
{
$disable_query = true;
$definition =
$schema->parseDatabaseDefinitionFile('test.xml');
if (PEAR::isError($definition))
{
echo 'definition error: ' . print_r($definition, true);
}
else
{
$op = $schema->createDatabase($definition, array(),
$disable_query);
if (PEAR::isError($op))
{
echo 'op error: ' . print_r($op, true);
}
}
}
$schema->disconnect();
exit();
?>
TEST XML:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<database>
<name>test</name>
<create>false</create>
<overwrite>true</overwrite>
<charset>latin1</charset>
<table>
<name>deliveries</name>
<declaration>
<field>
<name>id</name>
<type>integer</type>
<default>0</default>
<notnull>true</notnull>
<autoincrement>1</autoincrement>
<length>4</length>
</field>
<field>
<name>delivery_date</name>
<type>text</type>
<default></default>
<notnull>false</notnull>
<length>10</length>
</field>
<field>
<name>delivery_name</name>
<type>text</type>
<default></default>
<notnull>false</notnull>
<length>40</length>
</field>
</declaration>
<initialization>
<insert>
<field>
<name>id</name>
<value>1</value>
</field>
<field>
<name>delivery_date</name>
<value>2008-10-01</value>
</field>
<field>
<name>delivery_name</name>
<value>INITIAL</value>
</field>
</insert>
</initialization>
</table>
</database>
------------------------------------------------------------------------
[2008-12-08 04:10:32] doconnor
Executable test steps would be really handy!
------------------------------------------------------------------------
[2008-12-06 20:12:59] galiganu
I have a table declaration (the one above) with one insert. When i try
to use MDB2_Schema to import that xml into an oracle database i get the
error shown above.
If you need any othewr information please let me know. I will provide
it.
Thanks
------------------------------------------------------------------------
[2008-12-06 08:06:05] doconnor
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PEAR.
Without reproduce code this one is a bit tricky. Can you add some?
It could very well be the MDB2 oracle driver, rather than MDB_Schema.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=15213
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=15213&edit=1