Merge lp:~percona-dev/percona-server/5.1.54-syslog-from-maria into lp:percona-server/release-5.1.54-12
- 5.1.54-syslog-from-maria
- Merge into 5.1.54
Proposed by
Oleg Tsarev
Status: | Merged |
---|---|
Approved by: | Alexey Kopytov |
Approved revision: | no longer in the source branch. |
Merged at revision: | 190 |
Proposed branch: | lp:~percona-dev/percona-server/5.1.54-syslog-from-maria |
Merge into: | lp:percona-server/release-5.1.54-12 |
Diff against target: |
521 lines (+117/-76) 8 files modified
COPYING.mysql-syslog.patch (+30/-0) mysql-syslog.patch (+53/-42) mysql_remove_eol_carret.patch (+4/-4) profiling_slow.patch (+2/-2) response-time-distribution.patch (+1/-1) show_slave_status_nolock.patch (+2/-2) show_temp_51.patch (+2/-2) userstat.patch (+23/-23) |
To merge this branch: | bzr merge lp:~percona-dev/percona-server/5.1.54-syslog-from-maria |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Approve | ||
Review via email: mp+45695@code.launchpad.net |
Commit message
Description of the change
Propogate updates from Oleksandr Byelkin for mysql-syslog.patch.
Just a code and code style fixes (without any functional changes).
Now patch should build on Window platform
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'COPYING.mysql-syslog.patch' |
2 | --- COPYING.mysql-syslog.patch 1970-01-01 00:00:00 +0000 |
3 | +++ COPYING.mysql-syslog.patch 2011-01-10 13:49:30 +0000 |
4 | @@ -0,0 +1,30 @@ |
5 | +Portions of this software contain modifications contributed by Oleksandr Byelkin |
6 | +These contributions are used with the following license: |
7 | + |
8 | +Copyright (c) 2010, Oleksandr Byelkin All rights reserved. |
9 | + |
10 | +Redistribution and use in source and binary forms, with or without |
11 | +modification, are permitted provided that the following conditions |
12 | +are met: |
13 | + * Redistributions of source code must retain the above copyright |
14 | + notice, this list of conditions and the following disclaimer. |
15 | + * Redistributions in binary form must reproduce the above |
16 | + copyright notice, this list of conditions and the following |
17 | + disclaimer in the documentation and/or other materials |
18 | + provided with the distribution. |
19 | + * Neither the name of the Oleksandr Byelkin nor the names of its |
20 | + contributors may be used to endorse or promote products |
21 | + derived from this software without specific prior written |
22 | + permission. |
23 | + |
24 | +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
25 | +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
26 | +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
27 | +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
28 | +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
29 | +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
30 | +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
31 | +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
32 | +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
33 | +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
34 | +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
35 | |
36 | === modified file 'mysql-syslog.patch' |
37 | --- mysql-syslog.patch 2010-12-14 20:03:02 +0000 |
38 | +++ mysql-syslog.patch 2011-01-10 13:49:30 +0000 |
39 | @@ -5,20 +5,22 @@ |
40 | #!!! notice !!! |
41 | # Any small change to this file in the main branch |
42 | # should be done or reviewed by the maintainer! |
43 | -diff -ruN a/client/client_priv.h b/client/client_priv.h |
44 | ---- a/client/client_priv.h 2010-08-08 14:12:42.229338865 +0400 |
45 | -+++ b/client/client_priv.h 2010-08-08 14:12:43.068089277 +0400 |
46 | -@@ -90,6 +90,7 @@ |
47 | +diff -ruN a/client/client_priv.h c/client/client_priv.h |
48 | +--- a/client/client_priv.h 2011-01-07 18:46:05.000000000 +0300 |
49 | ++++ c/client/client_priv.h 2011-01-07 18:53:03.000000000 +0300 |
50 | +@@ -90,6 +90,9 @@ |
51 | OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT, |
52 | OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, |
53 | OPT_WRITE_BINLOG, OPT_DUMP_DATE, |
54 | ++#ifndef __WIN__ |
55 | + OPT_SYSLOG, |
56 | ++#endif |
57 | OPT_FIRST_SLAVE, |
58 | OPT_ALL, |
59 | OPT_MAX_CLIENT_OPTION |
60 | -diff -ruN a/client/mysql.cc b/client/mysql.cc |
61 | ---- a/client/mysql.cc 2010-08-08 14:12:42.229338865 +0400 |
62 | -+++ b/client/mysql.cc 2010-08-08 14:12:43.488088866 +0400 |
63 | +diff -ruN a/client/mysql.cc c/client/mysql.cc |
64 | +--- a/client/mysql.cc 2010-11-29 13:37:59.000000000 +0300 |
65 | ++++ c/client/mysql.cc 2011-01-07 18:57:05.000000000 +0300 |
66 | @@ -43,6 +43,9 @@ |
67 | #include "my_readline.h" |
68 | #include <signal.h> |
69 | @@ -29,24 +31,33 @@ |
70 | |
71 | #if defined(USE_LIBEDIT_INTERFACE) && defined(HAVE_LOCALE_H) |
72 | #include <locale.h> |
73 | -@@ -151,7 +154,7 @@ |
74 | +@@ -62,6 +65,8 @@ |
75 | + /* Version numbers for deprecation messages */ |
76 | + #define VER_CELOSIA "5.6" |
77 | + |
78 | ++#define MAX_SYSLOG_MESSAGE 900 |
79 | ++ |
80 | + void* sql_alloc(unsigned size); // Don't use mysqld alloc for these |
81 | + void sql_element_free(void *ptr); |
82 | + #include "sql_string.h" |
83 | +@@ -151,7 +156,7 @@ |
84 | default_charset_used= 0, opt_secure_auth= 0, |
85 | default_pager_set= 0, opt_sigint_ignore= 0, |
86 | show_warnings= 0, executing_query= 0, interrupted_query= 0, |
87 | - ignore_spaces= 0; |
88 | -+ opt_syslog=0, ignore_spaces= 0; |
89 | ++ ignore_spaces= 0, opt_syslog= 0; |
90 | static my_bool debug_info_flag, debug_check_flag; |
91 | static my_bool column_types_flag; |
92 | static my_bool preserve_comments= 0; |
93 | -@@ -206,6 +209,7 @@ |
94 | +@@ -206,6 +211,7 @@ |
95 | void tee_fputs(const char *s, FILE *file); |
96 | void tee_puts(const char *s, FILE *file); |
97 | void tee_putc(int c, FILE *file); |
98 | -+void write_syslog(char *line); |
99 | ++void write_syslog(String *buffer); |
100 | static void tee_print_sized_data(const char *, unsigned int, unsigned int, bool); |
101 | /* The names of functions that actually do the manipulation. */ |
102 | static int get_options(int argc,char **argv); |
103 | -@@ -1561,6 +1565,10 @@ |
104 | +@@ -1561,6 +1567,10 @@ |
105 | {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.", |
106 | &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG, |
107 | 0, 0, 0, 0, 0, 0}, |
108 | @@ -57,66 +68,66 @@ |
109 | { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} |
110 | }; |
111 | |
112 | -@@ -1684,6 +1692,12 @@ |
113 | +@@ -1684,6 +1694,11 @@ |
114 | opt->name); |
115 | #endif |
116 | break; |
117 | ++#ifndef __WIN__ |
118 | + case OPT_SYSLOG: |
119 | -+ /*if (connect_flag == CLIENT_INTERACTIVE){ |
120 | -+ printf("Logging queries to syslog.\n"); |
121 | -+ }*/ |
122 | + opt_syslog = 1; |
123 | + break; |
124 | ++#endif |
125 | case OPT_SERVER_ARG: |
126 | #ifdef EMBEDDED_LIBRARY |
127 | /* |
128 | -@@ -2060,6 +2074,39 @@ |
129 | +@@ -2060,6 +2075,40 @@ |
130 | DBUG_RETURN((COMMANDS *) 0); |
131 | } |
132 | |
133 | -+void write_syslog(char *line){ |
134 | ++void write_syslog(String *line){ |
135 | +#ifndef __WIN__ |
136 | -+ char buff[901]; |
137 | -+ uint i, buff_pos=0; |
138 | -+ for (i=0;i < strlen(line); i++){ |
139 | -+ buff[buff_pos] = line[i]; |
140 | -+ buff_pos++; |
141 | -+ if (buff_pos >= 900){ |
142 | -+ buff[900] = 0; |
143 | -+ buff_pos = 0; |
144 | -+ syslog(LOG_INFO, "SYSTEM_USER:%s, MYSQL_USER:%s, CONNECTION_ID:%lu, DB_SERVER:%s, DB:%s, QUERY:%s", |
145 | -+ getenv("SUDO_USER") ? getenv("SUDO_USER") : |
146 | -+ getenv("USER") ? getenv("USER") : "--", |
147 | -+ current_user ? current_user : "--", |
148 | -+ mysql_thread_id(&mysql), |
149 | -+ current_host ? current_host : "--", |
150 | -+ current_db ? current_db : "--", |
151 | -+ buff); |
152 | ++ uint length= line->length(); |
153 | ++ uint chunk_len= min(MAX_SYSLOG_MESSAGE, length); |
154 | ++ char *ptr= line->c_ptr_safe(); |
155 | ++ char buff[MAX_SYSLOG_MESSAGE + 1]; |
156 | ++ |
157 | ++ for (; |
158 | ++ length; |
159 | ++ length-= chunk_len, ptr+= chunk_len, chunk_len= min(MAX_SYSLOG_MESSAGE, |
160 | ++ length)) |
161 | ++ { |
162 | ++ char *str; |
163 | ++ if (length == chunk_len) |
164 | ++ str= ptr; // last chunk => skip copy |
165 | ++ else |
166 | ++ { |
167 | ++ memcpy(buff, ptr, chunk_len); |
168 | ++ buff[chunk_len]= '\0'; |
169 | ++ str= buff; |
170 | + } |
171 | -+ } |
172 | -+ if (buff_pos > 0){ |
173 | -+ buff[buff_pos] = 0; |
174 | -+ syslog(LOG_INFO, "SYSTEM_USER:%s, MYSQL_USER:%s, CONNECTION_ID:%lu, DB_SERVER:%s, DB:%s, QUERY:%s", |
175 | -+ getenv("SUDO_USER") ? getenv("SUDO_USER") : |
176 | ++ syslog(LOG_INFO, |
177 | ++ "SYSTEM_USER:'%s', MYSQL_USER:'%s', CONNECTION_ID:%lu, " |
178 | ++ "DB_SERVER:'%s', DB:'%s', QUERY:'%s'", |
179 | ++ getenv("SUDO_USER") ? getenv("SUDO_USER") : |
180 | + getenv("USER") ? getenv("USER") : "--", |
181 | + current_user ? current_user : "--", |
182 | + mysql_thread_id(&mysql), |
183 | + current_host ? current_host : "--", |
184 | + current_db ? current_db : "--", |
185 | -+ buff); |
186 | ++ str); |
187 | + } |
188 | +#endif |
189 | +} |
190 | |
191 | static bool add_line(String &buffer,char *line,char *in_string, |
192 | bool *ml_comment, bool truncated) |
193 | -@@ -3031,6 +3078,11 @@ |
194 | +@@ -3031,6 +3080,11 @@ |
195 | fix_history(buffer); |
196 | } |
197 | #endif |
198 | +#ifndef __WIN__ |
199 | + if (opt_syslog && buffer->length() && connect_flag == CLIENT_INTERACTIVE){ |
200 | -+ write_syslog(buffer->c_ptr()); |
201 | ++ write_syslog(buffer); |
202 | + } |
203 | +#endif |
204 | |
205 | |
206 | === modified file 'mysql_remove_eol_carret.patch' |
207 | --- mysql_remove_eol_carret.patch 2010-12-14 20:03:02 +0000 |
208 | +++ mysql_remove_eol_carret.patch 2011-01-10 13:49:30 +0000 |
209 | @@ -8,8 +8,8 @@ |
210 | diff -ruN a/client/client_priv.h b/client/client_priv.h |
211 | --- a/client/client_priv.h 2010-07-06 15:06:50.000000000 -0700 |
212 | +++ b/client/client_priv.h 2010-07-06 15:07:18.000000000 -0700 |
213 | -@@ -93,5 +93,6 @@ |
214 | - OPT_SYSLOG, |
215 | +@@ -95,5 +95,6 @@ |
216 | + #endif |
217 | OPT_FIRST_SLAVE, |
218 | OPT_ALL, |
219 | + OPT_NO_REMOVE_EOL_CARRET, |
220 | @@ -18,7 +18,7 @@ |
221 | diff -ruN a/client/mysql.cc b/client/mysql.cc |
222 | --- a/client/mysql.cc 2010-06-03 08:50:02.000000000 -0700 |
223 | +++ b/client/mysql.cc 2010-07-06 15:07:18.000000000 -0700 |
224 | -@@ -143,6 +143,8 @@ |
225 | +@@ -145,6 +145,8 @@ |
226 | enum enum_info_type { INFO_INFO,INFO_ERROR,INFO_RESULT}; |
227 | typedef enum enum_info_type INFO_TYPE; |
228 | |
229 | @@ -27,7 +27,7 @@ |
230 | static MYSQL mysql; /* The connection */ |
231 | static my_bool ignore_errors=0,wait_flag=0,quick=0, |
232 | connected=0,opt_raw_data=0,unbuffered=0,output_tables=0, |
233 | -@@ -1437,6 +1439,10 @@ |
234 | +@@ -1439,6 +1441,10 @@ |
235 | NO_ARG, 1, 0, 0, 0, 0, 0}, |
236 | {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG, |
237 | NO_ARG, 0, 0, 0, 0, 0, 0}, |
238 | |
239 | === modified file 'profiling_slow.patch' |
240 | --- profiling_slow.patch 2010-12-22 20:15:33 +0000 |
241 | +++ profiling_slow.patch 2011-01-10 13:49:30 +0000 |
242 | @@ -95,9 +95,9 @@ |
243 | diff -ruN a/sql/log.cc b/sql/log.cc |
244 | --- a/sql/log.cc 2010-11-24 19:33:02.000000000 +0300 |
245 | +++ b/sql/log.cc 2010-11-24 19:36:29.000000000 +0300 |
246 | -@@ -2433,6 +2433,11 @@ |
247 | +@@ -2434,6 +2434,11 @@ |
248 | my_b_printf(&log_file,"# No InnoDB statistics available for this query\n") == (uint) -1) |
249 | - tmp_errno=errno; |
250 | + tmp_errno= errno; |
251 | } |
252 | + |
253 | +#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) |
254 | |
255 | === modified file 'response-time-distribution.patch' |
256 | --- response-time-distribution.patch 2010-12-22 20:15:33 +0000 |
257 | +++ response-time-distribution.patch 2011-01-10 13:49:30 +0000 |
258 | @@ -755,7 +755,7 @@ |
259 | case SCH_COLLATION_CHARACTER_SET_APPLICABILITY: |
260 | case SCH_USER_PRIVILEGES: |
261 | case SCH_SCHEMA_PRIVILEGES: |
262 | -@@ -7234,6 +7250,12 @@ |
263 | +@@ -7235,6 +7251,12 @@ |
264 | init_global_index_stats(); |
265 | pthread_mutex_unlock(&LOCK_global_index_stats); |
266 | } |
267 | |
268 | === modified file 'show_slave_status_nolock.patch' |
269 | --- show_slave_status_nolock.patch 2010-12-17 19:06:49 +0000 |
270 | +++ show_slave_status_nolock.patch 2011-01-10 13:49:30 +0000 |
271 | @@ -61,7 +61,7 @@ |
272 | sql_command_flags[SQLCOM_SHOW_CREATE_PROC]= CF_STATUS_COMMAND; |
273 | sql_command_flags[SQLCOM_SHOW_CREATE_FUNC]= CF_STATUS_COMMAND; |
274 | sql_command_flags[SQLCOM_SHOW_CREATE_TRIGGER]= CF_STATUS_COMMAND; |
275 | -@@ -2545,12 +2546,16 @@ |
276 | +@@ -2546,12 +2547,16 @@ |
277 | pthread_mutex_unlock(&LOCK_active_mi); |
278 | break; |
279 | } |
280 | @@ -79,7 +79,7 @@ |
281 | if (active_mi != NULL) |
282 | { |
283 | res = show_master_info(thd, active_mi); |
284 | -@@ -2561,7 +2566,10 @@ |
285 | +@@ -2562,7 +2567,10 @@ |
286 | WARN_NO_MASTER_INFO, ER(WARN_NO_MASTER_INFO)); |
287 | my_ok(thd); |
288 | } |
289 | |
290 | === modified file 'show_temp_51.patch' |
291 | --- show_temp_51.patch 2010-12-16 11:35:26 +0000 |
292 | +++ show_temp_51.patch 2011-01-10 13:49:30 +0000 |
293 | @@ -50,7 +50,7 @@ |
294 | case SCH_VIEWS: |
295 | case SCH_TRIGGERS: |
296 | case SCH_EVENTS: |
297 | -@@ -2317,6 +2322,7 @@ |
298 | +@@ -2318,6 +2323,7 @@ |
299 | } |
300 | case SQLCOM_SHOW_DATABASES: |
301 | case SQLCOM_SHOW_TABLES: |
302 | @@ -58,7 +58,7 @@ |
303 | case SQLCOM_SHOW_TRIGGERS: |
304 | case SQLCOM_SHOW_TABLE_STATUS: |
305 | case SQLCOM_SHOW_OPEN_TABLES: |
306 | -@@ -5457,6 +5463,8 @@ |
307 | +@@ -5458,6 +5464,8 @@ |
308 | |
309 | case SCH_TABLE_NAMES: |
310 | case SCH_TABLES: |
311 | |
312 | === modified file 'userstat.patch' |
313 | --- userstat.patch 2011-01-04 11:30:51 +0000 |
314 | +++ userstat.patch 2011-01-10 13:49:30 +0000 |
315 | @@ -436,7 +436,7 @@ |
316 | |
317 | /* |
318 | Log slow query with all enabled log event handlers |
319 | -@@ -4495,6 +4517,8 @@ |
320 | +@@ -4496,6 +4518,8 @@ |
321 | thd->first_successful_insert_id_in_prev_stmt_for_binlog); |
322 | if (e.write(file)) |
323 | goto err; |
324 | @@ -445,7 +445,7 @@ |
325 | } |
326 | if (thd->auto_inc_intervals_in_cur_stmt_for_binlog.nb_elements() > 0) |
327 | { |
328 | -@@ -4506,12 +4530,16 @@ |
329 | +@@ -4507,12 +4531,16 @@ |
330 | minimum()); |
331 | if (e.write(file)) |
332 | goto err; |
333 | @@ -462,7 +462,7 @@ |
334 | } |
335 | if (thd->user_var_events.elements) |
336 | { |
337 | -@@ -4527,6 +4555,8 @@ |
338 | +@@ -4528,6 +4556,8 @@ |
339 | user_var_event->charset_number); |
340 | if (e.write(file)) |
341 | goto err; |
342 | @@ -471,7 +471,7 @@ |
343 | } |
344 | } |
345 | } |
346 | -@@ -4539,6 +4569,8 @@ |
347 | +@@ -4540,6 +4570,8 @@ |
348 | if (event_info->write(file) || |
349 | DBUG_EVALUATE_IF("injecting_fault_writing", 1, 0)) |
350 | goto err; |
351 | @@ -480,7 +480,7 @@ |
352 | |
353 | if (file == &log_file) // we are writing to the real log (disk) |
354 | { |
355 | -@@ -4684,7 +4716,7 @@ |
356 | +@@ -4685,7 +4717,7 @@ |
357 | be reset as a READ_CACHE to be able to read the contents from it. |
358 | */ |
359 | |
360 | @@ -489,7 +489,7 @@ |
361 | { |
362 | Mutex_sentry sentry(lock_log ? &LOCK_log : NULL); |
363 | |
364 | -@@ -4732,6 +4764,7 @@ |
365 | +@@ -4733,6 +4765,7 @@ |
366 | /* write the first half of the split header */ |
367 | if (my_b_write(&log_file, header, carry)) |
368 | return ER_ERROR_ON_WRITE; |
369 | @@ -497,7 +497,7 @@ |
370 | |
371 | /* |
372 | copy fixed second half of header to cache so the correct |
373 | -@@ -4800,6 +4833,7 @@ |
374 | +@@ -4801,6 +4834,7 @@ |
375 | /* Write data to the binary log file */ |
376 | if (my_b_write(&log_file, cache->read_pos, length)) |
377 | return ER_ERROR_ON_WRITE; |
378 | @@ -505,7 +505,7 @@ |
379 | cache->read_pos=cache->read_end; // Mark buffer used up |
380 | } while ((length= my_b_fill(cache))); |
381 | |
382 | -@@ -4922,21 +4956,24 @@ |
383 | +@@ -4923,21 +4957,24 @@ |
384 | */ |
385 | if (qinfo.write(&log_file)) |
386 | goto err; |
387 | @@ -984,7 +984,7 @@ |
388 | uint32 server_id; |
389 | uint32 file_id; // for LOAD DATA INFILE |
390 | /* remote (peer) port */ |
391 | -@@ -1828,6 +1830,8 @@ |
392 | +@@ -1833,6 +1835,8 @@ |
393 | /* variables.transaction_isolation is reset to this after each commit */ |
394 | enum_tx_isolation session_tx_isolation; |
395 | enum_check_fields count_cuted_fields; |
396 | @@ -993,7 +993,7 @@ |
397 | |
398 | DYNAMIC_ARRAY user_var_events; /* For user variables replication */ |
399 | MEM_ROOT *user_var_events_alloc; /* Allocate above array elements here */ |
400 | -@@ -1916,6 +1920,49 @@ |
401 | +@@ -1921,6 +1925,49 @@ |
402 | */ |
403 | LOG_INFO* current_linfo; |
404 | NET* slave_net; // network connection from slave -> m. |
405 | @@ -1043,7 +1043,7 @@ |
406 | /* Used by the sys_var class to store temporary values */ |
407 | union |
408 | { |
409 | -@@ -1981,6 +2028,11 @@ |
410 | +@@ -1986,6 +2033,11 @@ |
411 | alloc_root. |
412 | */ |
413 | void init_for_queries(); |
414 | @@ -1055,7 +1055,7 @@ |
415 | void change_user(void); |
416 | void cleanup(void); |
417 | void cleanup_after_query(); |
418 | -@@ -2351,9 +2403,15 @@ |
419 | +@@ -2356,9 +2408,15 @@ |
420 | *p_db= strmake(db, db_length); |
421 | *p_db_length= db_length; |
422 | return FALSE; |
423 | @@ -1071,7 +1071,7 @@ |
424 | public: |
425 | inline Internal_error_handler *get_internal_handler() |
426 | { return m_internal_handler; } |
427 | -@@ -2437,6 +2495,9 @@ |
428 | +@@ -2442,6 +2500,9 @@ |
429 | LEX_STRING invoker_host; |
430 | }; |
431 | |
432 | @@ -1854,7 +1854,7 @@ |
433 | my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER"); |
434 | DBUG_RETURN(TRUE); |
435 | } |
436 | -@@ -5348,6 +5368,7 @@ |
437 | +@@ -5349,6 +5369,7 @@ |
438 | if (!no_errors) |
439 | { |
440 | const char *db_name= db ? db : thd->db; |
441 | @@ -1862,7 +1862,7 @@ |
442 | my_error(ER_DBACCESS_DENIED_ERROR, MYF(0), |
443 | sctx->priv_user, sctx->priv_host, db_name); |
444 | } |
445 | -@@ -5380,12 +5401,15 @@ |
446 | +@@ -5381,12 +5402,15 @@ |
447 | { // We can never grant this |
448 | DBUG_PRINT("error",("No possible access")); |
449 | if (!no_errors) |
450 | @@ -1878,7 +1878,7 @@ |
451 | DBUG_RETURN(TRUE); /* purecov: tested */ |
452 | } |
453 | |
454 | -@@ -5411,11 +5435,15 @@ |
455 | +@@ -5412,11 +5436,15 @@ |
456 | |
457 | DBUG_PRINT("error",("Access denied")); |
458 | if (!no_errors) |
459 | @@ -1894,7 +1894,7 @@ |
460 | DBUG_RETURN(TRUE); /* purecov: tested */ |
461 | } |
462 | |
463 | -@@ -5444,6 +5472,7 @@ |
464 | +@@ -5445,6 +5473,7 @@ |
465 | |
466 | if (!thd->col_access && check_grant_db(thd, dst_db_name)) |
467 | { |
468 | @@ -1902,7 +1902,7 @@ |
469 | my_error(ER_DBACCESS_DENIED_ERROR, MYF(0), |
470 | thd->security_ctx->priv_user, |
471 | thd->security_ctx->priv_host, |
472 | -@@ -5525,9 +5554,12 @@ |
473 | +@@ -5526,9 +5555,12 @@ |
474 | (want_access & ~(SELECT_ACL | EXTRA_ACL | FILE_ACL))) |
475 | { |
476 | if (!no_errors) |
477 | @@ -1915,7 +1915,7 @@ |
478 | return TRUE; |
479 | } |
480 | /* |
481 | -@@ -5690,6 +5722,7 @@ |
482 | +@@ -5691,6 +5723,7 @@ |
483 | if ((thd->security_ctx->master_access & want_access)) |
484 | return 0; |
485 | get_privilege_desc(command, sizeof(command), want_access); |
486 | @@ -1923,7 +1923,7 @@ |
487 | my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command); |
488 | return 1; |
489 | #else |
490 | -@@ -6071,6 +6104,30 @@ |
491 | +@@ -6072,6 +6105,30 @@ |
492 | lex_start(thd); |
493 | mysql_reset_thd_for_next_command(thd); |
494 | |
495 | @@ -1954,7 +1954,7 @@ |
496 | if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0) |
497 | { |
498 | LEX *lex= thd->lex; |
499 | -@@ -6151,6 +6208,43 @@ |
500 | +@@ -6152,6 +6209,43 @@ |
501 | *found_semicolon= NULL; |
502 | } |
503 | |
504 | @@ -1998,7 +1998,7 @@ |
505 | DBUG_VOID_RETURN; |
506 | } |
507 | |
508 | -@@ -7016,6 +7110,13 @@ |
509 | +@@ -7017,6 +7111,13 @@ |
510 | if (flush_error_log()) |
511 | result=1; |
512 | } |
513 | @@ -2012,7 +2012,7 @@ |
514 | #ifdef HAVE_QUERY_CACHE |
515 | if (options & REFRESH_QUERY_CACHE_FREE) |
516 | { |
517 | -@@ -7116,6 +7217,40 @@ |
518 | +@@ -7117,6 +7218,40 @@ |
519 | #endif |
520 | if (options & REFRESH_USER_RESOURCES) |
521 | reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */ |