For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > September 2007 > Re: [PEAR] MDB2_Schema & MDB2 with TEXT fields









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] MDB2_Schema & MDB2 with TEXT fields
brian

2007-09-29, 4:07 am

Christian Weiske wrote:
> Hello,
>
> I use MDB2_Schema to dump a database schema into an XML file.
> Loading back fails because of:
>
> Column length too big for column 'information' (max = 21845); use BLOB or TEXT instead]
>
> (SQL creation part was: "`information` VARCHAR(65532) DEFAULT '' NOT NULL)"
>
> The original schema uses TEXT as column type, and the xml also contains "text" as type.
> Why does MDB2 convert that to VARCHAR?
>


That just looks like several kinds of wrong.

BTW, 21845 * 3 = 65535 (64kb). Subtract 3 bytes to get 65532 (VARCHAR
adds one extra byte for itself). So it appears that the "SQL creation"
bit was stacking 3 mini-VARCHARs, with a third of the normal size limit,
to make one (?)

Out of curiosity (and maybe it's relevant), what database is this?

brian
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com