> > > In order to save space in our database, we designed our tables to use
> > > enumerated datatypes.  For one column, we have about 2,800
> > > different values,
> > > each of which is about 30-40 text characters long.  Now, all the MySQL
> > > documentation I have read states that the limit for the number of
> > > ENUM keys
> > > is 65535 (2 byte representation), and nowhere does it mention a
> > > maximum size
> > > for the key values.  Is this a bug?  We are using the version
> > distributed
> > > with Red Hat 7.0 (3.23.32).  Any advice is appreciated.  Thanks!
>
> Good God man!!!! Is this some kind of masochistic or sick joke?
>
> use another table!

It's not like we haven't thought of this, but I'd really prefer to address
the orignal problem.  Simply put, the ENUM datatype does not appear to
conform to spec.  We are writing a Perl front-end (using the DBI) to create
a database based on dynamically changing configuration files, and I would
prefer not to code special cases into it.

We have approximately 50 columns of data to track for each record in the
database, split into about 30 tables (some of the 50 variables are related,
some are not).  The possible key values for each column can and will change
over time.  Using the published specs for MySQL's datatypes and
capabilities, we designed a system to build the database from the set on
config files, but it dies on _one_ of the variables.

I don't need a workaround, so much as I need a clarification on the ENUM
type.  Can it actually handle 65535 keys?  Judging by the number of entries
it died after (approx 2500), it only seems to have around 64K or 128K of
storage for the keys.  So, will it handle a max of 65535 if they are all
only one or two bytes long each?  Is this something I can change and
recompile?

--
Dave


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to