List:Commits« Previous MessageNext Message »
From:gluh Date:May 29 2007 9:02am
Subject:bk commit into 4.1 tree (gluh:1.2660) BUG#28553
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of gluh. When gluh 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@stripped, 2007-05-29 14:02:48+05:00, gluh@stripped +3 -0
  Bug#28553 mysqld crash in "purge master log before(select time from information_schema)"
  forbid use of subselect in PURGE LOGS BEFORE command

  mysql-test/r/subselect.result@stripped, 2007-05-29 14:02:47+05:00, gluh@stripped +2 -0
    test result

  mysql-test/t/subselect.test@stripped, 2007-05-29 14:02:47+05:00, gluh@stripped +4 -3
    test case

  sql/sql_yacc.yy@stripped, 2007-05-29 14:02:48+05:00, gluh@stripped +5 -3
    Bug#28553 mysqld crash in "purge master log before(select time from information_schema)"
    forbid use of subselect in PURGE LOGS BEFORE command

# 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:	gluh
# Host:	eagle.(none)
# Root:	/home/gluh/MySQL/Bugs/4.1.28553

--- 1.404/sql/sql_yacc.yy	2007-03-29 17:12:31 +05:00
+++ 1.405/sql/sql_yacc.yy	2007-05-29 14:02:48 +05:00
@@ -3567,7 +3567,8 @@ select_derived2:
 	  LEX *lex= Lex;
 	  lex->derived_tables= 1;
           if (lex->sql_command == (int)SQLCOM_HA_READ ||
-              lex->sql_command == (int)SQLCOM_KILL)
+              lex->sql_command == (int)SQLCOM_KILL ||
+              lex->sql_command == (int)SQLCOM_PURGE_BEFORE)
 	  {
 	    yyerror(ER(ER_SYNTAX_ERROR));
 	    YYABORT;
@@ -4748,6 +4749,7 @@ purge:
 	{
 	  LEX *lex=Lex;
 	  lex->type=0;
+          lex->sql_command = SQLCOM_PURGE_BEFORE;
 	} purge_options
 	{}
 	;
@@ -4778,7 +4780,6 @@ purge_option:
             value of constant
 	  */
 	  tmp->quick_fix_field();
-	  Lex->sql_command = SQLCOM_PURGE_BEFORE;
 	  Lex->purge_time= (ulong) tmp->val_int();
 	}
 	;
@@ -6212,7 +6213,8 @@ subselect_start:
 	{
 	  LEX *lex=Lex;
           if (lex->sql_command == (int)SQLCOM_HA_READ ||
-              lex->sql_command == (int)SQLCOM_KILL)
+              lex->sql_command == (int)SQLCOM_KILL ||
+              lex->sql_command ==  SQLCOM_PURGE_BEFORE)
 	  {
             yyerror(ER(ER_SYNTAX_ERROR));
 	    YYABORT;

--- 1.188/mysql-test/r/subselect.result	2007-04-20 15:11:23 +05:00
+++ 1.189/mysql-test/r/subselect.result	2007-05-29 14:02:47 +05:00
@@ -2834,6 +2834,8 @@ a
 4
 DROP TABLE t1,t2,t3;
 purge master logs before (select adddate(current_timestamp(), interval -4 day));
+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 adddate(current_timestamp(), interval -4 day))' at line 1
+purge master logs before adddate(current_timestamp(), interval -4 day);
 CREATE TABLE t1 (f1 INT);
 CREATE TABLE t2 (f2 INT);
 INSERT INTO t1 VALUES (1);

--- 1.164/mysql-test/t/subselect.test	2007-01-26 06:44:31 +04:00
+++ 1.165/mysql-test/t/subselect.test	2007-05-29 14:02:47 +05:00
@@ -1815,11 +1815,12 @@ SELECT * FROM t1
 DROP TABLE t1,t2,t3;
 
 #
-# BUG #10308: purge log with subselect
+# BUG#10308: purge log with subselect
+# Bug#28553: mysqld crash in "purge master log before(select time from information_schema)"
 #
-
+--error 1064
 purge master logs before (select adddate(current_timestamp(), interval -4 day));
-
+purge master logs before adddate(current_timestamp(), interval -4 day);
 
 #
 # Bug#18503: Queries with a quantified subquery returning empty set may
Thread
bk commit into 4.1 tree (gluh:1.2660) BUG#28553gluh29 May