Bug #16798 [Fbk->NoF]: Validator choking on its own generated schema
| From: | danielc at analysisandsolutions dot com | Date: | Wed, 24 Oct 2012 15:41:24 +0000 |
| Subject: | Bug #16798 [Fbk->NoF]: Validator choking on its own generated schema | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9223@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=16798&edit=1
ID: 16798
Updated by: danielc@analysisandsolutions.com
Reported By: jan at horde dot org
Summary: Validator choking on its own generated schema
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: MDB2
PHP Version: Irrelevant
Roadmap Versions:
New Comment:
-Status: Feedback
+Status: No Feedback
Previous Comments:
------------------------------------------------------------------------
[2010-08-17 17:13:13] ifeghali
-Status: Open
+Status: Feedback
-Package: MDB2_Schema
+Package: MDB2
------------------------------------------------------------------------
[2009-12-31 15:34:54] hschletz
This looks like a bug in the pgsql driver, not in MDB2_Schema. This is
similar to Bug #16281.
Could you please test your schema against a recent SVN snapshot of
MDB2_driver_pgsql, or at least apply the patch from #16281?
------------------------------------------------------------------------
[2009-11-18 14:36:55] yunosh
Description:
------------
Excuse my laziness and let me quote from a mailing list conversation:
> Zitat von Gastón Sansó <gaston.sanso@gmail.com>:
>
>> On Fri, Nov 13, 2009 at 7:54 AM, Jan Schneider <jan@horde.org>
wrote:
>>> Zitat von Jan Schneider <jan@horde.org>:
>>>
>>>> Zitat von Gastón Sansó <gaston.sanso@gmail.com>:
>>>>
>>>>> Hi, I'm getting the following error while trying to upgrade
Horde
>>>>> Groupware Webmail Edition from version 1.2 to 1.2.4:
>>>>>
>>>>> [ ERROR! ] Reading the existing table structure failed. Error
messages:
>>>>> MDB2_Schema Error: schema validation error
>>>>> default value of "pref_scope" is incorrect:
>>>>> "''::character
varying" is
>>>>> larger than "16"
>>>>
>>>> This sounds like a bug in MDB2_Schema. I think this is what
happens: to
>>>> update the database mdb2 first reads the existing database schema.
>>>> As if it
>>>> doesn't trust its own generated data, it tries to validates the
parsed
>>>> schema. This is the point where it fails, because PostgreSQL
returns the
>>>> default value of the pref_scope tables as "''::character
>>>> varying".
This of
>>>> course only means '', the last part is just a casting instruction.
But the
>>>> validator doesn't know this, and counts the complete string as the
default
>>>> value, which exceeds the maximum size of 16 characters for that
column.
>>>> Boof.
>>>
>>> Try if upgrading MDB2 and MDB2_Schema fixes this. Should work with
the
>>> following from the horde directory:
>>>
>>> ./pear/pear -c pear/horde.ini -d preferred_state=beta upgrade mdb2
>>> mdb2_driver_pgsql mdb2_schema
>>>
>>> The run the upgrade script again. But first please make sure to
have
>>> backups.
>>>
>>> Jan.
>>>
>>> --
>>> Do you need professional PHP or Horde consulting?
>>> http://horde.org/consulting/
>>>
>>> --
>>> Horde mailing list - Join the hunt:
http://horde.org/bounties/#horde
>>> Frequently Asked Questions: http://horde.org/faq/
>>> To unsubscribe, mail: horde-unsubscribe@lists.horde.org
>>>
>>
>> Hi Jan, thanks for the reply. I did what you said , first I updated
>> PEAR by selecting option 4 in setup.php. then
>>
>> ./pear/pear -c pear/horde.ini -d preferred_state=beta upgrade mdb2
>> mdb2_driver_pgsql mdb2_schema
>>
>>
>> but when I run option 5 to do the upgrade I'm still getting the same
error:
>>
>> [ ERROR! ] Reading the existing table structure failed. Error
messages:
>> MDB2_Schema Error: schema validation error
>> default value of "pref_scope" is incorrect: "''::character
>> varying"
is
>> larger than "16"
>>
>
> So, the bug still exists in the latest version of MDB2_Schema and
> should be reported there.
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=16798&edit=1