[Commits] Rev 3165: Merge MySQL 5.1.66 -> MariaDB 5.1.65 in file:///home/tsk/mprog/src/5.1-merge/

timour at askmonty.org timour at askmonty.org
Fri Nov 2 14:35:45 EET 2012


At file:///home/tsk/mprog/src/5.1-merge/

------------------------------------------------------------
revno: 3165 [merge]
revision-id: timour at askmonty.org-20121102123525-kq5kpo3kfhaivbxw
parent: timour at askmonty.org-20121102080320-pgzavnzexi290c4m
parent: venkata.sidagam at oracle.com-20120719082234-5uuwm1msnkzqt3sk
committer: timour at askmonty.org
branch nick: 5.1-merge
timestamp: Fri 2012-11-02 14:35:25 +0200
message:
  Merge MySQL 5.1.66 -> MariaDB 5.1.65
   
  (step 2)
modified:
  client/mysql.cc                sp1f-mysql.cc-19700101030959-5sipizk7ehvbsi3tywrkdords5qy5zdl
  mysql-test/r/subselect.result  sp1f-subselect.result-20020512204640-zgegcsgavnfd7t7eyrf7ibuqomsw7uzo
  sql/sql_select.cc              sp1f-sql_select.cc-19700101030959-egb7whpkh76zzvikycs5nsnuviu4fdlb
-------------- next part --------------
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	2011-11-23 17:32:14 +0000
+++ b/client/mysql.cc	2012-11-02 12:35:25 +0000
@@ -2826,7 +2826,7 @@ static int com_server_help(String *buffe
                            char *line __attribute__((unused)), char *help_arg)
 {
   MYSQL_ROW cur;
-  const char *server_cmd= buffer->ptr();
+  const char *server_cmd;
   char cmd_buf[100 + 1];
   MYSQL_RES *result;
   int error;
@@ -2841,9 +2841,12 @@ static int com_server_help(String *buffe
                 *++end_arg= '\0';
         }
         (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
-    server_cmd= cmd_buf;
   }
-  
+  else
+    (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help ", help_arg, NullS);
+
+  server_cmd= cmd_buf;
+
   if (!status.batch)
   {
     old_buffer= *buffer;
@@ -2911,6 +2914,11 @@ static int com_server_help(String *buffe
     else
     {
       put_info("\nNothing found", INFO_INFO);
+      if (strncasecmp(server_cmd, "help 'contents'", 15) == 0)
+      {
+         put_info("\nPlease check if 'help tables' are loaded.\n", INFO_INFO); 
+         goto err;
+      }
       put_info("Please try to run 'help contents' for a list of all accessible topics\n", INFO_INFO);
     }
   }

=== modified file 'mysql-test/r/subselect.result'
--- a/mysql-test/r/subselect.result	2012-05-17 10:12:33 +0000
+++ b/mysql-test/r/subselect.result	2012-11-02 12:35:25 +0000
@@ -4555,8 +4555,6 @@ SELECT * FROM t1
 WHERE EXISTS (SELECT DISTINCT a FROM t2 WHERE t1.a < t2.a ORDER BY b);
 pk      a
 1       10
-3       30
-2       20
 DROP TABLE t1,t2;
 CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), KEY b (b));
 INSERT INTO t1 VALUES (1,NULL), (9,NULL);

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2012-08-22 09:40:39 +0000
+++ b/sql/sql_select.cc	2012-11-02 12:35:25 +0000
@@ -1467,12 +1467,19 @@ JOIN::optimize()
         DBUG_RETURN(1);
       }
     }
-    
+    /*
+      Calculate a possible 'limit' of table rows for 'GROUP BY': 'need_tmp'
+      implies that there will be more postprocessing so the specified
+      'limit' should not be enforced yet in the call to
+      'test_if_skip_sort_order'.
+    */
+    const ha_rows limit = need_tmp ? HA_POS_ERROR : unit->select_limit_cnt;
+
     if (!(select_options & SELECT_BIG_RESULT) &&
         ((group_list &&
           (!simple_group ||
            !test_if_skip_sort_order(&join_tab[const_tables], group_list,
-                                    unit->select_limit_cnt, 0, 
+                                    limit, 0,
                                     &join_tab[const_tables].table->
                                     keys_in_use_for_group_by))) ||
          select_distinct) &&



More information about the commits mailing list