diff options
-rw-r--r-- | mysql-test/r/lowercase_table2.result | 2 | ||||
-rw-r--r-- | mysql-test/r/repair.result | 1 | ||||
-rw-r--r-- | mysql-test/t/repair.test | 1 | ||||
-rw-r--r-- | mysys/my_thr_init.c | 3 | ||||
-rw-r--r-- | sql/field.cc | 10 | ||||
-rw-r--r-- | sql/log.cc | 2 |
6 files changed, 15 insertions, 4 deletions
diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result index c29d52ffffc..d43a18c6a96 100644 --- a/mysql-test/r/lowercase_table2.result +++ b/mysql-test/r/lowercase_table2.result @@ -68,7 +68,7 @@ SHOW CREATE TABLE T1; Table Create Table T1 CREATE TABLE `T1` ( `a` int(11) default NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin +) ENGINE=InnoDB DEFAULT CHARSET=latin1 RENAME TABLE T1 TO T2; SHOW TABLES LIKE "T2"; Tables_in_test (T2) diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result index 2398e13b8e3..f81bbd063ea 100644 --- a/mysql-test/r/repair.result +++ b/mysql-test/r/repair.result @@ -28,6 +28,7 @@ repair table t1 use_frm; Table Op Msg_type Msg_text test.t1 repair error Table 'test.t1' doesn't exist create table t1 engine=myisam SELECT 1,"table 1"; +flush tables; repair table t1; Table Op Msg_type Msg_text test.t1 repair error Can't open file: 't1.MYI' (errno: 130) diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test index 83a302e6f29..ef7043febbc 100644 --- a/mysql-test/t/repair.test +++ b/mysql-test/t/repair.test @@ -28,6 +28,7 @@ drop table t1; repair table t1 use_frm; create table t1 engine=myisam SELECT 1,"table 1"; +flush tables; system echo 1 > $MYSQL_TEST_DIR/var/master-data/test/t1.MYI ; repair table t1; repair table t1 use_frm; diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index 445cef0cd6f..0ce59bee346 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -203,7 +203,8 @@ void my_thread_end(void) tmp->dbug=0; } #endif -#if !defined(__bsdi__) || defined(HAVE_mit_thread) /* bsdi dumps core here */ +#if !defined(__bsdi__) && !defined(__OpenBSD__) || defined(HAVE_mit_thread) + /* bsdi and openbsd 3.5 dumps core here */ pthread_cond_destroy(&tmp->suspend); #endif pthread_mutex_destroy(&tmp->mutex); diff --git a/sql/field.cc b/sql/field.cc index d865d2cc9e9..d5499eca075 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -2308,7 +2308,12 @@ int Field_float::store(double nr) else { max_value= (log_10[field_length]-1)/log_10[dec]; - nr= floor(nr*log_10[dec]+0.5)/log_10[dec]; + /* + The following comparison is needed to not get an overflow if nr + is close to FLT_MAX + */ + if (fabs(nr) < FLT_MAX/10.0e+32) + nr= floor(nr*log_10[dec]+0.5)/log_10[dec]; } if (nr < -max_value) { @@ -2603,7 +2608,8 @@ int Field_double::store(double nr) else { max_value= (log_10[field_length]-1)/log_10[dec]; - nr= floor(nr*log_10[dec]+0.5)/log_10[dec]; + if (fabs(nr) < DBL_MAX/10.0e+32) + nr= floor(nr*log_10[dec]+0.5)/log_10[dec]; } if (nr < -max_value) { diff --git a/sql/log.cc b/sql/log.cc index 0cd9e7172c3..8df5ea5096b 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -107,6 +107,7 @@ MYSQL_LOG::~MYSQL_LOG() void MYSQL_LOG::cleanup() { + DBUG_ENTER("cleanup"); if (inited) { inited= 0; @@ -115,6 +116,7 @@ void MYSQL_LOG::cleanup() (void) pthread_mutex_destroy(&LOCK_index); (void) pthread_cond_destroy(&update_cond); } + DBUG_VOID_RETURN; } |