From: Anton Krasovsky Date: March 29 1999 6:15pm Subject: SIGFPE coredump inserting maximum bigint value List-Archive: http://lists.mysql.com/mysql/1152 Message-Id: <199903291815.VAA28830@pekod.trans-m-radio.com> >Description: I'v getting coredump because of receiveing SIGFPE when I try to insert maximum possible value 18446744073709551615 to unsigned bigint column this not happens with hex value (0xffffffffffffffff) >How-To-Repeat: # # Table structure for table 'ad' # CREATE TABLE ad ( id bigint(20) unsigned DEFAULT '0' NOT NULL auto_increment, client bigint(20) DEFAULT '0' NOT NULL, target bigint(20) unsigned DEFAULT '0' NOT NULL, category bigint(20) unsigned DEFAULT '0' NOT NULL, image varchar(255) DEFAULT 'UNKNOWN' NOT NULL, reference varchar(255) DEFAULT 'UNKNOWN' NOT NULL, impressions int(10) unsigned DEFAULT '0' NOT NULL, clicks bigint(20) unsigned DEFAULT '0' NOT NULL, status enum('on','off','pending') DEFAULT 'pending' NOT NULL, PRIMARY KEY (id) ); # # Dumping data for table 'ad' # INSERT INTO ad VALUES (1,1,18446744073709551615,1,'http://pekod.trans-m-radio.com/banners/bannerd10652.gif','http://www.one.com',30,0,'on'); INSERT INTO ad VALUES (2,2,18446744073709551615,1,'http://pekod.trans-m-radio.com/banners/bannero10648.gif','http://www.two.com',94,0,'on'); This program have the same effect: (tested under FreeBSD 3.0 and RedHat 5.1) #include void main (void) { unsigned long long ull=18446744073709551615ULL; double d; d = (double) ull; printf("double value %f\n", d); printf("longlong value %qu\n", ull); ull = (unsigned long long) d; } >Fix: ??? It happpens on line 1361 of sql/field.cc >Submitter-Id: >Originator: Anton Krasovsky >Organization: Trans-M-radio >MySQL support: none >Synopsis: >Severity: serious >Priority: high >Category: mysql >Class: sw-bug >Release: mysql-3.22.20a (Source distribution) >Environment: System: FreeBSD pekod.trans-m-radio.com 3.0-RELEASE FreeBSD 3.0-RELEASE #1: Wed Dec 23 00:10:58 EET 1998 anton@stripped:/usr/src/sys/compile/PEKOD i386 Some paths: /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: gcc version 2.7.2.1 Compilation info: CC='gcc' CFLAGS='' CXX='gcc' CXXFLAGS='' LDFLAGS='' Configure command: ./configure --with-unix-socket-path=/var/tmp/mysql.sock --with-low-memory --with-mit-threads=yes Perl: This is perl, version 5.005_02 built for i386-freebsd