From: Tor Didriksen Date: December 13 2010 4:17pm Subject: bzr push into mysql-5.1-bugteam branch (tor.didriksen:3518 to 3519) Bug#58426 List-Archive: http://lists.mysql.com/commits/126686 X-Bug: 58426 Message-Id: <20101213161730.57CC133E6@atum07.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3519 Tor Didriksen 2010-12-13 Bug #58426 Crashing tests not failing as they are supposed to on Solaris 10 debug On this platform we seem to get lots of other signals while waiting for SIGKILL to be delivered. Solution: use sigsuspend() @ dbug/dbug.c New function _db_suicide_() which does kill(myself, -9) and then waits forever. @ include/my_dbug.h Let DBUG_SUICE wait forever until the KILL signal is delivered, and process dies. modified: dbug/dbug.c include/my_dbug.h 3518 Sergey Glukhov 2010-12-13 Bug#39828 : Autoinc wraps around when offset and increment > 1 Auto increment value wraps when performing a bulk insert with auto_increment_increment and auto_increment_offset greater than one. The fix: If overflow happened then return MAX_ULONGLONG value as an indication of overflow and check this before storing the value into the field in update_auto_increment(). @ mysql-test/r/auto_increment.result test case @ mysql-test/suite/innodb/r/innodb-autoinc.result test case fix @ mysql-test/suite/innodb/t/innodb-autoinc.test test case fix @ mysql-test/suite/innodb_plugin/r/innodb-autoinc.result test case fix @ mysql-test/suite/innodb_plugin/t/innodb-autoinc.test test case fix @ mysql-test/t/auto_increment.test test case @ sql/handler.cc If overflow happened then return MAX_ULONGLONG value as an indication of overflow and check this before storing the value into the field in update_auto_increment(). modified: mysql-test/r/auto_increment.result mysql-test/suite/innodb/r/innodb-autoinc.result mysql-test/suite/innodb/t/innodb-autoinc.test mysql-test/suite/innodb_plugin/r/innodb-autoinc.result mysql-test/suite/innodb_plugin/t/innodb-autoinc.test mysql-test/t/auto_increment.test sql/handler.cc === modified file 'dbug/dbug.c' --- a/dbug/dbug.c 2010-10-19 08:19:57 +0000 +++ b/dbug/dbug.c 2010-12-13 16:13:01 +0000 @@ -2276,6 +2276,25 @@ void _db_flush_() } +#ifndef __WIN__ +void _db_suicide_() +{ + int retval; + sigset_t new_mask; + sigfillset(&new_mask); + + fprintf(stderr, "SIGKILL myself\n"); + fflush(stderr); + + retval= kill(getpid(), SIGKILL); + assert(retval == 0); + retval= sigsuspend(&new_mask); + fprintf(stderr, "sigsuspend returned %d errno %d \n", retval, errno); + assert(FALSE); /* With full signal mask, we should never return here. */ +} +#endif /* ! __WIN__ */ + + void _db_lock_file_() { CODE_STATE *cs=0; === modified file 'include/my_dbug.h' --- a/include/my_dbug.h 2010-10-18 11:24:34 +0000 +++ b/include/my_dbug.h 2010-12-13 16:13:01 +0000 @@ -160,7 +160,8 @@ extern void _db_flush_(); #ifdef __WIN__ #define DBUG_SUICIDE() DBUG_ABORT() #else -#define DBUG_SUICIDE() (_db_flush_(), kill(getpid(), SIGKILL), pause()) +extern void _db_suicide_(); +#define DBUG_SUICIDE() (_db_flush_(), _db_suicide_()) #endif #else /* No debugger */ No bundle (reason: useless for push emails).