Re: MDB2_Schema & MDB2 with TEXT fields

From: Date: Sat, 29 Sep 2007 04:30:32 +0000
Subject: Re: MDB2_Schema & MDB2 with TEXT fields
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28008@lists.php.net to get a copy of this message
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

« previous php.pear.general (#28008) next »