
#At lp:maria based on revid:monty@mysql.com-20100810132950-34mofgm1l87b1rf5 2899 Michael Widenius 2010-08-10 Fixed typo that caused compile failure on Mac Added straight_join to make results predicatable modified: mysql-test/suite/pbxt/r/range.result mysql-test/suite/pbxt/t/range.test mysys/my_sync.c per-file messages: mysql-test/suite/pbxt/r/range.result Added straight_join to make results predicatable mysql-test/suite/pbxt/t/range.test Added straight_join to make results predicatable mysys/my_sync.c Fixed typo === modified file 'mysql-test/suite/pbxt/r/range.result' --- a/mysql-test/suite/pbxt/r/range.result 2010-05-06 12:43:19 +0000 +++ b/mysql-test/suite/pbxt/r/range.result 2010-08-10 16:06:34 +0000 @@ -420,19 +420,19 @@ analyze table t1,t2; Table Op Msg_type Msg_text test.t1 analyze status OK test.t2 analyze status OK -explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0; +explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range uid_index uid_index 4 NULL 1 Using where 1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1 -explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0; +explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range uid_index uid_index 4 NULL 1 Using where 1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1 -explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0; +explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range uid_index uid_index 4 NULL 2 Using where 1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1 -explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0; +explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range uid_index uid_index 4 NULL 2 Using where 1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1 === modified file 'mysql-test/suite/pbxt/t/range.test' --- a/mysql-test/suite/pbxt/t/range.test 2009-04-03 09:12:59 +0000 +++ b/mysql-test/suite/pbxt/t/range.test 2010-08-10 16:06:34 +0000 @@ -380,10 +380,13 @@ select count(*) from t2; analyze table t1,t2; -explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0; -explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0; -explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0; -explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0; +# This part doesn't make sense for pbxt as the result may vary becasue +# records_in_range() gives same results for t1 and t2. +# Added straight_join to get predictable results +explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0; +explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0; +explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0; +explain select straight_join * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0; select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0; select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0; === modified file 'mysys/my_sync.c' --- a/mysys/my_sync.c 2010-08-09 17:54:58 +0000 +++ b/mysys/my_sync.c 2010-08-10 16:06:34 +0000 @@ -68,7 +68,7 @@ int my_sync(File fd, myf my_flags) res= fdatasync(fd); #elif defined(HAVE_FSYNC) res= fsync(fd); - if (res == -1 and errno == ENOLCK) + if (res == -1 && errno == ENOLCK) res= 0; /* Result Bug in Old FreeBSD */ #elif defined(__WIN__) res= _commit(fd);