Try quoting (' ') the 0 in your create:
CREATE TABLE TESTBADDUMP (
e_test enum('0','1') NOT NULL default '0' );
---------------------------------^
You should then get the result you want.
Have a great day...
John
On Monday 18 June 2001 08:54, [EMAIL PROTECTED] wrote:
> 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 ''
> );
>
> this new declaration is not correct and refused by MySQL.
> MySQL accept the value '' for insert but not for create table.
>
> I'm not sure if it's normal to authorize empty values in enum.
> If this is normal, the bug is in mysqldump.
>
> >Originator: Guillaume Fougnies
> >Organization: Profile For You Ltd.
> >MySQL support: licence
> >Severity: non-critical
> >Priority: low
> >Category: mysql
> >Class: sw-bug
> >Release: mysql-3.23.39 (Source distribution)
>
> System: Linux db-am-001 2.2.19 #3 SMP lun jun 18 10:53:11 CEST 2001 i686
> unknown Architecture: i686
>
> Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
> /usr/bin/cc GCC: Reading specs from
> /usr/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.66/specs gcc version
> egcs-2.91.66 19990314 (egcs-1.1.2 release)
> Compilation info: CC='gcc' CFLAGS='-O6 -mpentiumpro -s' CXX='c++'
> CXXFLAGS='-O6 -mpentiumpro -s' LDFLAGS='' LIBC:
> lrwxrwxrwx 1 root root 13 Jun 12 11:15 /lib/libc.so.6 ->
> libc-2.1.3.so -rwxr-xr-x 1 root root 4101005 Sep 3 2000
> /lib/libc-2.1.3.so -rw-r--r-- 1 root root 20268874 Sep 3 2000
> /usr/lib/libc.a -rw-r--r-- 1 root root 178 Sep 3 2000
> /usr/lib/libc.so Configure command: ./configure --with-libwrap
> --enable-thread-safe-client --enable-assembler --disable-large-files
> --without-debug --with-mysqld-user=db --without-raid --disable-large-files
> --prefix=/usr/local/mysql-3.23.39 --localstatedir=/usr/local/mysql_var
>
>
> ---------------------------------------------------------------------
> 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
--
Have a great day...
John
---------------------------------------------------------------------
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