>Description:
It is possible to create a table which mysqldump can dump, but mysql cannot
undump.
>How-To-Repeat:
Create a table with a field named 'key':
CREATE TABLE `testthing` (
`key` TINYINT NOT NULL,
PRIMARY KEY (`key`)
);
When you run mysqldump, it gives this back:
CREATE TABLE testthing (
key tinyint(4) NOT NULL default '0',
PRIMARY KEY (key)
) TYPE=MyISAM;
Because key is no longer in quotes, it is rejected because it is a reserved word.
>Fix:
(1) Users: Don't name fields with reserved words
(2) mysql: Don't allow users to name fields with reserved words
>Submitter-Id: <submitter ID>
>Originator:
>Organization: 3edges
>MySQL support: none
>Synopsis: mysqldump allows reserved words as table names, but mysql does not
>Severity: non-critical
>Priority: low
>Category: mysql
>Class: sw-bug
>Release: mysql-3.23.44 (Official MySQL RPM)
>Environment:
System: Linux neuromancer.voxel.net 2.4.18-ac3 #1 SMP Wed Jun 19 14:45:16 EDT 2002
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/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
Compilation info: CC='gcc' CFLAGS='-O6 -fno-omit-frame-pointer -mpentium' CXX='gcc'
CXXFLAGS='-O6 -fno-omit-frame-pointer -felide-constructors
-fno-exceptions -fno-rtti -mpentium' LDFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 Oct 9 16:57 /lib/libc.so.6 -> libc-2.2.4.so
-rwxr-xr-x 1 root root 5735106 Sep 9 11:50 /lib/libc-2.2.4.so
-rw-r--r-- 1 root root 27336078 Sep 9 11:48 /usr/lib/libc.a
-rw-r--r-- 1 root root 178 Sep 9 11:48 /usr/lib/libc.so
Configure command: ./configure --disable-shared --with-mysqld-ldflags=-all-static
--with-client-ldflags=-all-static --without-berkeley-db --without-innodb
--enable-assembler --with-mysqld-user=mysql
--with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/
--with-extra-charsets=complex --exec-prefix=/usr --libexecdir=/usr/sbin
--sysconfdir=/etc --datadir=/usr/share --localstatedir=/var/lib/mysql
--infodir=/usr/info --includedir=/usr/include --mandir=/usr/man
'--with-comment=Official MySQL RPM'
---------------------------------------------------------------------
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