~knielsen/ourdelta/bug_484127_484120_2

« back to all changes in this revision

Viewing changes to mysql/5.0/google/if_idlev2/if_idlev2.patch

  • Committer: Arjen Lentz
  • Date: 2009-03-22 22:21:19 UTC
  • Revision ID: arjen@openquery.com-20090322222119-zxextcp4eoe0g8ax
Update of KILL_IF patch for 5.0.77

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: mysql-5.0.67/patch_info/if_idlev2.info
 
1
Index: mysql-5.0.77/patch_info/if_idlev2.info
2
2
===================================================================
3
3
--- /dev/null
4
 
+++ mysql-5.0.67/patch_info/if_idlev2.info
 
4
+++ mysql-5.0.77/patch_info/if_idlev2.info
5
5
@@ -0,0 +1,6 @@
6
6
+File=if_idlev2.patch
7
7
+Name=Kill connection but only if idle
9
9
+Author=Google
10
10
+License=GPL
11
11
+Comment=Extracted by David Stainton (david@spinn3r.com), fixes by Arjen Lentz <arjen@openquery.com.au>
12
 
Index: mysql-5.0.67/include/mysql_com.h
 
12
Index: mysql-5.0.77/include/mysql_com.h
13
13
===================================================================
14
 
--- mysql-5.0.67.orig/include/mysql_com.h
15
 
+++ mysql-5.0.67/include/mysql_com.h
16
 
@@ -169,6 +169,7 @@ enum enum_server_command
 
14
--- mysql-5.0.77.orig/include/mysql_com.h
 
15
+++ mysql-5.0.77/include/mysql_com.h
 
16
@@ -172,6 +172,7 @@ enum enum_server_command
17
17
 #define NET_WAIT_TIMEOUT       8*60*60         /* Wait for new query */
18
18
 
19
19
 #define ONLY_KILL_QUERY         1
21
21
 
22
22
 struct st_vio;                                 /* Only C */
23
23
 typedef struct st_vio Vio;
24
 
Index: mysql-5.0.67/sql/lex.h
 
24
Index: mysql-5.0.77/sql/lex.h
25
25
===================================================================
26
 
--- mysql-5.0.67.orig/sql/lex.h
27
 
+++ mysql-5.0.67/sql/lex.h
 
26
--- mysql-5.0.77.orig/sql/lex.h
 
27
+++ mysql-5.0.77/sql/lex.h
28
28
@@ -234,6 +234,7 @@ static SYMBOL symbols[] = {
29
29
   { "HOUR_SECOND",     SYM(HOUR_SECOND_SYM)},
30
30
   { "IDENTIFIED",      SYM(IDENTIFIED_SYM)},
33
33
   { "IGNORE",          SYM(IGNORE_SYM)},
34
34
   { "IMPORT",          SYM(IMPORT)},
35
35
   { "IN",              SYM(IN_SYM)},
36
 
Index: mysql-5.0.67/sql/mysql_priv.h
 
36
Index: mysql-5.0.77/sql/mysql_priv.h
37
37
===================================================================
38
 
--- mysql-5.0.67.orig/sql/mysql_priv.h
39
 
+++ mysql-5.0.67/sql/mysql_priv.h
 
38
--- mysql-5.0.77.orig/sql/mysql_priv.h
 
39
+++ mysql-5.0.77/sql/mysql_priv.h
40
40
@@ -86,7 +86,8 @@ char *sql_strmake_with_convert(const cha
41
41
                               CHARSET_INFO *from_cs,
42
42
                               uint32 max_res_length,
47
47
 bool net_request_file(NET* net, const char* fname);
48
48
 char* query_table_status(THD *thd,const char *db,const char *table_name);
49
49
 
50
 
Index: mysql-5.0.67/sql/sql_parse.cc
 
50
Index: mysql-5.0.77/sql/sql_parse.cc
51
51
===================================================================
52
 
--- mysql-5.0.67.orig/sql/sql_parse.cc
53
 
+++ mysql-5.0.67/sql/sql_parse.cc
54
 
@@ -2659,7 +2659,7 @@ bool dispatch_command(enum enum_server_c
 
52
--- mysql-5.0.77.orig/sql/sql_parse.cc
 
53
+++ mysql-5.0.77/sql/sql_parse.cc
 
54
@@ -2736,7 +2736,7 @@ bool dispatch_command(enum enum_server_c
55
55
   {
56
56
     statistic_increment(thd->status_var.com_stat[SQLCOM_KILL], &LOCK_status);
57
57
     ulong id=(ulong) uint4korr(packet);
60
60
     break;
61
61
   }
62
62
   case COM_SET_OPTION:
63
 
@@ -4864,7 +4864,8 @@ end_with_restore_list:
 
63
@@ -4964,7 +4964,8 @@ end_with_restore_list:
64
64
                 MYF(0));
65
65
       goto error;
66
66
     }
70
70
     break;
71
71
   }
72
72
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
73
 
@@ -7897,8 +7898,8 @@ bool reload_acl_and_cache(THD *thd, ulon
 
73
@@ -8043,8 +8044,8 @@ bool reload_acl_and_cache(THD *thd, ulon
74
74
   NOTES
75
75
     This is written such that we have a short lock on LOCK_thread_count
76
76
 */
81
81
 {
82
82
   THD *tmp;
83
83
   uint error=ER_NO_SUCH_THREAD;
84
 
@@ -7918,7 +7919,11 @@ void kill_one_thread(THD *thd, ulong id,
 
84
@@ -8064,7 +8065,11 @@ void kill_one_thread(THD *thd, ulong id,
85
85
     if ((thd->security_ctx->master_access & SUPER_ACL) ||
86
86
        !strcmp(thd->security_ctx->user, tmp->security_ctx->user))
87
87
     {
94
94
       error=0;
95
95
     }
96
96
     else
97
 
Index: mysql-5.0.67/sql/sql_yacc.yy
 
97
Index: mysql-5.0.77/sql/sql_yacc.yy
98
98
===================================================================
99
 
--- mysql-5.0.67.orig/sql/sql_yacc.yy
100
 
+++ mysql-5.0.67/sql/sql_yacc.yy
101
 
@@ -460,8 +460,9 @@ bool my_yyoverflow(short **a, YYSTYPE **
 
99
--- mysql-5.0.77.orig/sql/sql_yacc.yy
 
100
+++ mysql-5.0.77/sql/sql_yacc.yy
 
101
@@ -461,8 +461,9 @@ bool my_yyoverflow(short **a, YYSTYPE **
102
102
 /*
103
103
   Currently there are 240 shift/reduce conflicts.
104
104
   We should not introduce new conflicts any more.
109
109
 
110
110
 %token  END_OF_INPUT
111
111
 
112
 
@@ -676,6 +677,7 @@ bool my_yyoverflow(short **a, YYSTYPE **
 
112
@@ -677,6 +678,7 @@ bool my_yyoverflow(short **a, YYSTYPE **
113
113
 %token  IDENTIFIED_SYM
114
114
 %token  IDENT_QUOTED
115
115
 %token  IF
117
117
 %token  IGNORE_SYM
118
118
 %token  IMPORT
119
119
 %token  INDEXES
120
 
@@ -7693,6 +7695,7 @@ kill_option:
 
120
@@ -8615,6 +8617,7 @@ kill_option:
121
121
        /* empty */      { Lex->type= 0; }
122
122
        | CONNECTION_SYM { Lex->type= 0; }
123
123
        | QUERY_SYM      { Lex->type= ONLY_KILL_QUERY; }
125
125
         ;
126
126
 
127
127
 /* change database */
128
 
@@ -8555,6 +8558,7 @@ keyword_sp:
 
128
@@ -9592,6 +9595,7 @@ keyword_sp:
129
129
        | HOSTS_SYM             {}
130
130
        | HOUR_SYM              {}
131
131
        | IDENTIFIED_SYM        {}
132
 
+       | IF_IDLE_SYM           {}
133
 
        | INDEX_STATS_SYM       {}
 
132
+       | IF_IDLE_SYM           {}
 
133
        | INDEX_STATS_SYM       {}
134
134
        | INVOKER_SYM           {}
135
135
        | IMPORT                {}