List:General Discussion« Previous MessageNext Message »
From:AESYS S.p.A. [Enzo Arlati] Date:November 4 2005 1:30pm
Subject:MySQL 5.0 : error using max(idrow) on a null value
View as plain text  
Hi, I'm trying to migrate from MySQL 4.1.11 to MySQL 5.0 and I get a problem
with the new release.
I have this table...

provasql
 CREATE TABLE `provasql`

`idrow` bigint(20) unsigned NOT NULL default '0',
`descr` varchar(50) default NULL,
PRIMARY KEY (`idrow`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1


...this is the SQL command...

insert into provasql ( idrow, descr )
select ( select max(c.idrow)+1 from provasql c ) , 'This is only a test';


...and this is the error:

ERROR 1263 (22004): Column set to default value; NULL supplied to NOT NULL
colum
n 'idrow' at row 1


With MySQL 4.1.11 I'd never get this error message, but it happens with the
5.0.15 version.
Can anyone help me?


Bye, Stefano.

Thread
MySQL 5.0 : error using max(idrow) on a null valueAESYS S.p.A. [Enzo Arlati]4 Nov
  • Re: MySQL 5.0 : error using max(idrow) on a null valueJeff Smelser4 Nov
    • R: MySQL 5.0 : error using max(idrow) on a null valueAESYS S.p.A. [Enzo Arlati]4 Nov
      • Re: R: MySQL 5.0 : error using max(idrow) on a null value(Pete Harlan)4 Nov