Francesco Dalla Ca' wrote:
I have a database on a mysql server (version 4.0.20-max) with this table:

mysql> show create table Dsmaccnt\G
*************************** 1. row ***************************
      Table: Dsmaccnt
Create Table: CREATE TABLE `Dsmaccnt` (
...
...
 `Termination ` tinyint(3) unsigned NOT NULL default '0',
...
...
) TYPE=MyISAM
1 row in set (0.01 sec)
mysql>

The field `Termination ` cause me some trouble:
If i try to recreate from dump (mysqldump from 4.0) the table 'Dsmaccnt', on another server (version 4.1), i've got this error:
ERROR 1166: Incorrect column name 'Termination '

On the same server (4.0.20-max) if i try to create a dummy table with same blank-added field i've got same error:
mysql> create table prova (`Termination ` int);
ERROR 1166: Incorrect column name 'Termination '
mysql>

How is possible that i have this table with this field? (The database was created by others admin, not by me).
There are some particular SQL mode that permit this?

Thank in advance. Francesco.

There was a bug (See <http://bugs.mysql.com/bug.php?id=3914> and <http://bugs.mysql.com/bug.php?id=2985>) that allowed such names. It was fixed in 4.1.19 <http://dev.mysql.com/doc/mysql/en/news-4-0-19.html>. I expect this column was created while you were running 4.1.18 or earlier, before you upgraded.

I suppose your best bet is to fix the column name.  Something like

  ALTER TABLE Dsmaccnt
  CHANGE `Termination `
          Termination tinyint(3) unsigned NOT NULL default '0';

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to