Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.0b5

Bug #16798 Validator choking on its own generated schema
Submitted: 2009-11-18 19:36 UTC
From: yunosh Assigned:
Status: No Feedback Package: MDB2
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2009-11-18 19:36 UTC] yunosh (Jan Schneider)
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.

Comments

 [2009-12-31 20:34 UTC] hschletz (Holger Schletz)
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?
 [2010-08-17 21:13 UTC] ifeghali (Igor Feghali)
-Status: Open +Status: Feedback -Package: MDB2_Schema +Package: MDB2
 [2012-10-24 20:41 UTC] danielc (Daniel Convissor)
-Status: Feedback +Status: No Feedback