List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:October 19 2009 2:48pm
Subject:bzr push into mysql-5.5.0-next-mr-bugfixing branch (serg:2901 to 2903)
Bug#34374
View as plain text  
 2903 Sergei Golubchik	2009-10-19
      Bug#34374 mysql generates incorrect warning
      backport to next-mr

    modified:
      mysql-test/r/fulltext.result
      mysql-test/t/fulltext.test
      sql/sql_select.cc
 2902 Sergei Golubchik	2009-10-19
      bug#34741 prepared show master logs without binlogging debug assert
      
      s/return/DBUG_RETURN/

    modified:
      sql/sql_repl.cc
 2901 Evgeny Potemkin	2009-10-19 [merge]
      Auto-merged fix for the bug#30302.

    modified:
      mysql-test/r/explain.result
      mysql-test/r/func_default.result
      mysql-test/r/func_regexp.result
      mysql-test/r/func_test.result
      mysql-test/r/having.result
      mysql-test/r/select.result
      mysql-test/r/subselect.result
      mysql-test/r/subselect3.result
      mysql-test/r/type_datetime.result
      mysql-test/t/explain.test
      sql/sql_select.cc
      sql/table.h
=== modified file 'mysql-test/r/fulltext.result'
--- a/mysql-test/r/fulltext.result	2009-07-15 10:13:45 +0000
+++ b/mysql-test/r/fulltext.result	2009-10-19 13:13:45 +0000
@@ -494,6 +494,14 @@ SELECT a FROM t1 WHERE MATCH a AGAINST (
 a
 City Of God
 DROP TABLE t1;
+create table t1(a text,b date,fulltext index(a))engine=myisam;
+insert into t1 set a='water',b='2008-08-04';
+select 1 from t1 where match(a) against ('water' in boolean mode) and b>='2008-08-01';
+1
+1
+drop table t1;
+show warnings;
+Level	Code	Message
 CREATE TABLE t1 (a VARCHAR(255), b INT, FULLTEXT(a), KEY(b));
 INSERT INTO t1 VALUES('test', 1),('test', 1),('test', 1),('test', 1),
 ('test', 1),('test', 2),('test', 3),('test', 4);

=== modified file 'mysql-test/t/fulltext.test'
--- a/mysql-test/t/fulltext.test	2009-07-15 10:13:45 +0000
+++ b/mysql-test/t/fulltext.test	2009-10-19 13:13:45 +0000
@@ -420,6 +420,15 @@ DROP TABLE t1;
 # End of 4.1 tests
 
 #
+# bug#34374 - mysql generates incorrect warning
+#
+create table t1(a text,b date,fulltext index(a))engine=myisam;
+insert into t1 set a='water',b='2008-08-04';
+select 1 from t1 where match(a) against ('water' in boolean mode) and b>='2008-08-01';
+drop table t1;
+show warnings;
+
+#
 # BUG#38842 - Fix for 25951 seems incorrect
 #
 CREATE TABLE t1 (a VARCHAR(255), b INT, FULLTEXT(a), KEY(b));

=== modified file 'sql/sql_repl.cc'
--- a/sql/sql_repl.cc	2009-09-10 09:18:29 +0000
+++ b/sql/sql_repl.cc	2009-10-19 13:04:27 +0000
@@ -1609,7 +1609,7 @@ bool show_binlogs(THD* thd)
   if (!mysql_bin_log.is_open())
   {
     my_message(ER_NO_BINARY_LOGGING, ER(ER_NO_BINARY_LOGGING), MYF(0));
-    return 1;
+    DBUG_RETURN(TRUE);
   }
 
   field_list.push_back(new Item_empty_string("Log_name", 255));

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2009-10-19 11:13:26 +0000
+++ b/sql/sql_select.cc	2009-10-19 13:13:45 +0000
@@ -3613,16 +3613,16 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
       Item_func *arg0=(Item_func *)(func->arguments()[0]),
                 *arg1=(Item_func *)(func->arguments()[1]);
       if (arg1->const_item()  &&
-          ((functype == Item_func::GE_FUNC && arg1->val_real() > 0) ||
-           (functype == Item_func::GT_FUNC && arg1->val_real() >=0))  &&
            arg0->type() == Item::FUNC_ITEM            &&
-           arg0->functype() == Item_func::FT_FUNC)
+           arg0->functype() == Item_func::FT_FUNC     &&
+          ((functype == Item_func::GE_FUNC && arg1->val_real() > 0) ||
+           (functype == Item_func::GT_FUNC && arg1->val_real() >=0)))
         cond_func=(Item_func_match *) arg0;
       else if (arg0->const_item() &&
-               ((functype == Item_func::LE_FUNC && arg0->val_real() > 0) ||
-                (functype == Item_func::LT_FUNC && arg0->val_real() >=0)) &&
                 arg1->type() == Item::FUNC_ITEM          &&
-                arg1->functype() == Item_func::FT_FUNC)
+                arg1->functype() == Item_func::FT_FUNC   &&
+               ((functype == Item_func::LE_FUNC && arg0->val_real() > 0) ||
+                (functype == Item_func::LT_FUNC && arg0->val_real() >=0)))
         cond_func=(Item_func_match *) arg1;
     }
   }


Attachment: [text/bzr-bundle] bzr/serg@mysql.com-20091019131345-sceqg1tacbfwr74f.bundle
Thread
bzr push into mysql-5.5.0-next-mr-bugfixing branch (serg:2901 to 2903)Bug#34374Sergei Golubchik19 Oct