Hi All,

I use MySQL 3.23.53 and mysqldump 8.22 and there is a behaviour in mysqldump I consider a bug. Anyone agrees?

% mysql test
mysql> create table doubletest (d double not null);
mysql> insert into doubletest values("inf");
mysql> insert into doubletest values("-inf");
mysql> exit
% mysqldump test doubletest > d1.sql
% mysql test
mysql> drop table doubletest
mysql> source d1.sql
ERROR 1048: Column 'd' cannot be null
ERROR 1054: Unknown column 'inf' in 'field list'
mysql> exit
% cat felix.sql
CREATE TABLE doubletest (
  d double NOT NULL default '0'
) TYPE=MyISAM;
INSERT INTO doubletest VALUES (NULL);
INSERT INTO doubletest VALUES (-inf);

The problem seems to be as follows:
Apparently, mysqldump checks the value of the fields using "isalpha". If isalpha returns true, the value is mapped to NULL (which is problematic if the column is defined NOT NULL). In the instance of "-inf", isalpha returns false so mysqldump believes "-inf" to be a really numeric value and will dump the value unquoted.


Questions:

Is there a good workaround? I have found no option of mysqldump to force quoting on values of all colunm types.
What possible values can be stored in a column of type double that are not merely numeric?


Thanks,

Thomas

--
SIGOS Systemintegration GmbH
 - TESTING IS OUR COMPETENCE -
Fon +49 911 95168-0
www.sigos.de


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



Reply via email to