Hi,
> mysqldump regenerates a bad sql statement from a bad initial create table.
>
> When you create this table for example (ok it's not a really nice definition):
>
> CREATE TABLE TESTBADDUMP (
> e_test enum('0','1') NOT NULL default 0
> );
>
> desc TESTBADDUMP;
> +--------+---------------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +--------+---------------+------+-----+---------+-------+
> | e_test | enum('0','1') | | | | |
> +--------+---------------+------+-----+---------+-------+
>
> and use mysqldump to regenerate the sql statement, you obtain:
>
> CREATE TABLE TESTBADDUMP (
> e_test enum('0','1') NOT NULL default ''
> );
If you use "default 0", "0" is an integer. But ENUM only accept strings,
so try to use "default '0'" when you create the table.
Have a nice day,
Thomas Karcher
---------------------------------------------------------------------
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