List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:March 6 2006 3:01pm
Subject:bk commit into 5.0 tree (serg:1.2089)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of serg. When serg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2089 06/03/06 16:00:56 serg@stripped +3 -0
  kill (subquery) - three years old bugfix that never worked

  sql/sql_yacc.yy
    1.455 06/03/06 16:00:44 serg@stripped +5 -8
    kill (subquery) - three years old bugfix that never worked

  mysql-test/t/kill.test
    1.22 06/03/06 16:00:44 serg@stripped +4 -0
    kill (subquery) - three years old bugfix that never worked

  mysql-test/r/kill.result
    1.13 06/03/06 16:00:44 serg@stripped +2 -0
    kill (subquery) - three years old bugfix that never worked

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	serg
# Host:	serg.mylan
# Root:	/usr/home/serg/Abk/mysql-5.0

--- 1.454/sql/sql_yacc.yy	Tue Feb 21 23:19:07 2006
+++ 1.455/sql/sql_yacc.yy	Mon Mar  6 16:00:44 2006
@@ -5490,9 +5490,8 @@ select_derived2:
         {
 	  LEX *lex= Lex;
 	  lex->derived_tables|= DERIVED_SUBQUERY;
-	  if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN &&
-	       lex->sql_command <= (int)SQLCOM_HA_READ) ||
-	       lex->sql_command == (int)SQLCOM_KILL)
+	  if (lex->sql_command <= (int)SQLCOM_HA_READ ||
+	      lex->sql_command == (int)SQLCOM_KILL)
 	  {
 	    yyerror(ER(ER_SYNTAX_ERROR));
 	    YYABORT;
@@ -6891,12 +6890,11 @@ purge_option:
 /* kill threads */
 
 kill:
-	KILL_SYM kill_option expr
+	KILL_SYM { Lex->sql_command= SQLCOM_KILL; } kill_option expr
 	{
 	  LEX *lex=Lex;
 	  lex->value_list.empty();
-	  lex->value_list.push_front($3);
-          lex->sql_command= SQLCOM_KILL;
+	  lex->value_list.push_front($4);
 	};
 
 kill_option:
@@ -8939,8 +8937,7 @@ subselect_start:
 	'(' SELECT_SYM
 	{
 	  LEX *lex=Lex;
-	  if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN &&
-	       lex->sql_command <= (int)SQLCOM_HA_READ) ||
+	  if (lex->sql_command == (int)SQLCOM_HA_READ ||
 	       lex->sql_command == (int)SQLCOM_KILL)
 	  {
             yyerror(ER(ER_SYNTAX_ERROR));

--- 1.12/mysql-test/r/kill.result	Tue Feb  7 21:10:39 2006
+++ 1.13/mysql-test/r/kill.result	Mon Mar  6 16:00:44 2006
@@ -39,3 +39,5 @@ select 1;
 select RELEASE_LOCK("a");
 RELEASE_LOCK("a")
 1
+kill (select count(*) from mysql.user);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select count(*) from mysql.user)' at line 1

--- 1.21/mysql-test/t/kill.test	Tue Feb  7 21:03:05 2006
+++ 1.22/mysql-test/t/kill.test	Mon Mar  6 16:00:44 2006
@@ -111,3 +111,7 @@ reap;
 select 1;
 connection con1;
 select RELEASE_LOCK("a");
+
+--error 1064
+kill (select count(*) from mysql.user);
+
Thread
bk commit into 5.0 tree (serg:1.2089)Sergei Golubchik6 Mar