Merge lp:~linuxjedi/drizzle/trunk-bug-680872 into lp:drizzle/7.0

Proposed by Andrew Hutchings
Status: Merged
Approved by: Brian Aker
Approved revision: 2089
Merged at revision: 2095
Proposed branch: lp:~linuxjedi/drizzle/trunk-bug-680872
Merge into: lp:drizzle/7.0
Diff against target: 174 lines (+0/-34)
6 files modified
drizzled/definitions.h (+0/-1)
drizzled/drizzled.cc (+0/-21)
drizzled/sys_var.cc (+0/-3)
drizzled/sys_var.h (+0/-1)
tests/r/variables.result (+0/-4)
tests/t/variables.test (+0/-4)
To merge this branch: bzr merge lp:~linuxjedi/drizzle/trunk-bug-680872
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+46408@code.launchpad.net

Description of the change

max-connect-errors is completely unused, this branch kills it.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'drizzled/definitions.h'
--- drizzled/definitions.h 2010-12-18 04:43:40 +0000
+++ drizzled/definitions.h 2011-01-16 11:24:59 +0000
@@ -197,7 +197,6 @@
197/* The following can also be changed from the command line */197/* The following can also be changed from the command line */
198#define DEFAULT_CONCURRENCY 10198#define DEFAULT_CONCURRENCY 10
199#define FLUSH_TIME 0 /**< Don't flush tables */199#define FLUSH_TIME 0 /**< Don't flush tables */
200#define MAX_CONNECT_ERRORS 10 ///< errors before disabling host
201200
202/* Bits from testflag */201/* Bits from testflag */
203enum test_flag_bit202enum test_flag_bit
204203
=== modified file 'drizzled/drizzled.cc'
--- drizzled/drizzled.cc 2011-01-11 07:12:09 +0000
+++ drizzled/drizzled.cc 2011-01-16 11:24:59 +0000
@@ -254,7 +254,6 @@
254uint32_t server_id;254uint32_t server_id;
255uint64_t table_cache_size;255uint64_t table_cache_size;
256size_t table_def_size;256size_t table_def_size;
257uint64_t max_connect_errors;
258uint32_t global_thread_id= 1UL;257uint32_t global_thread_id= 1UL;
259pid_t current_pid;258pid_t current_pid;
260259
@@ -814,17 +813,6 @@
814 global_system_variables.max_allowed_packet= in_max_allowed_packet;813 global_system_variables.max_allowed_packet= in_max_allowed_packet;
815}814}
816815
817static void check_limits_mce(uint64_t in_max_connect_errors)
818{
819 max_connect_errors= MAX_CONNECT_ERRORS;
820 if (in_max_connect_errors < 1 || in_max_connect_errors > ULONG_MAX)
821 {
822 cout << _("Error: Invalid Value for max_connect_errors");
823 exit(-1);
824 }
825 max_connect_errors= in_max_connect_errors;
826}
827
828static void check_limits_max_err_cnt(uint64_t in_max_error_count)816static void check_limits_max_err_cnt(uint64_t in_max_error_count)
829{817{
830 global_system_variables.max_error_count= DEFAULT_ERROR_COUNT;818 global_system_variables.max_error_count= DEFAULT_ERROR_COUNT;
@@ -1267,9 +1255,6 @@
1267 _("A global cap on the amount of memory that can be allocated by session join buffers (0 means unlimited)"))1255 _("A global cap on the amount of memory that can be allocated by session join buffers (0 means unlimited)"))
1268 ("max-allowed-packet", po::value<uint32_t>(&global_system_variables.max_allowed_packet)->default_value(64*1024*1024L)->notifier(&check_limits_map),1256 ("max-allowed-packet", po::value<uint32_t>(&global_system_variables.max_allowed_packet)->default_value(64*1024*1024L)->notifier(&check_limits_map),
1269 _("Max packetlength to send/receive from to server."))1257 _("Max packetlength to send/receive from to server."))
1270 ("max-connect-errors", po::value<uint64_t>(&max_connect_errors)->default_value(MAX_CONNECT_ERRORS)->notifier(&check_limits_mce),
1271 _("If there is more than this number of interrupted connections from a "
1272 "host this host will be blocked from further connections."))
1273 ("max-error-count", po::value<uint64_t>(&global_system_variables.max_error_count)->default_value(DEFAULT_ERROR_COUNT)->notifier(&check_limits_max_err_cnt),1258 ("max-error-count", po::value<uint64_t>(&global_system_variables.max_error_count)->default_value(DEFAULT_ERROR_COUNT)->notifier(&check_limits_max_err_cnt),
1274 _("Max number of errors/warnings to store for a statement."))1259 _("Max number of errors/warnings to store for a statement."))
1275 ("max-heap-table-size", po::value<uint64_t>(&global_system_variables.max_heap_table_size)->default_value(16*1024*1024L)->notifier(&check_limits_mhts),1260 ("max-heap-table-size", po::value<uint64_t>(&global_system_variables.max_heap_table_size)->default_value(16*1024*1024L)->notifier(&check_limits_mhts),
@@ -1703,7 +1688,6 @@
1703 OPT_BACK_LOG,1688 OPT_BACK_LOG,
1704 OPT_JOIN_BUFF_SIZE,1689 OPT_JOIN_BUFF_SIZE,
1705 OPT_MAX_ALLOWED_PACKET,1690 OPT_MAX_ALLOWED_PACKET,
1706 OPT_MAX_CONNECT_ERRORS,
1707 OPT_MAX_HEP_TABLE_SIZE,1691 OPT_MAX_HEP_TABLE_SIZE,
1708 OPT_MAX_JOIN_SIZE,1692 OPT_MAX_JOIN_SIZE,
1709 OPT_MAX_SORT_LENGTH,1693 OPT_MAX_SORT_LENGTH,
@@ -1882,11 +1866,6 @@
1882 (char**) &global_system_variables.max_allowed_packet,1866 (char**) &global_system_variables.max_allowed_packet,
1883 (char**) &max_system_variables.max_allowed_packet, 0, GET_UINT32,1867 (char**) &max_system_variables.max_allowed_packet, 0, GET_UINT32,
1884 REQUIRED_ARG, 64*1024*1024L, 1024, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},1868 REQUIRED_ARG, 64*1024*1024L, 1024, 1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
1885 {"max_connect_errors", OPT_MAX_CONNECT_ERRORS,
1886 N_("If there is more than this number of interrupted connections from a "
1887 "host this host will be blocked from further connections."),
1888 (char**) &max_connect_errors, (char**) &max_connect_errors, 0, GET_UINT64,
1889 REQUIRED_ARG, MAX_CONNECT_ERRORS, 1, ULONG_MAX, 0, 1, 0},
1890 {"max_heap_table_size", OPT_MAX_HEP_TABLE_SIZE,1869 {"max_heap_table_size", OPT_MAX_HEP_TABLE_SIZE,
1891 N_("Don't allow creation of heap tables bigger than this."),1870 N_("Don't allow creation of heap tables bigger than this."),
1892 (char**) &global_system_variables.max_heap_table_size,1871 (char**) &global_system_variables.max_heap_table_size,
18931872
=== modified file 'drizzled/sys_var.cc'
--- drizzled/sys_var.cc 2011-01-11 06:07:55 +0000
+++ drizzled/sys_var.cc 2011-01-16 11:24:59 +0000
@@ -149,8 +149,6 @@
149 &drizzle_system_variables::join_buff_size);149 &drizzle_system_variables::join_buff_size);
150static sys_var_session_uint32_t sys_max_allowed_packet("max_allowed_packet",150static sys_var_session_uint32_t sys_max_allowed_packet("max_allowed_packet",
151 &drizzle_system_variables::max_allowed_packet);151 &drizzle_system_variables::max_allowed_packet);
152static sys_var_uint64_t_ptr sys_max_connect_errors("max_connect_errors",
153 &max_connect_errors);
154static sys_var_session_uint64_t sys_max_error_count("max_error_count",152static sys_var_session_uint64_t sys_max_error_count("max_error_count",
155 &drizzle_system_variables::max_error_count);153 &drizzle_system_variables::max_error_count);
156static sys_var_session_uint64_t sys_max_heap_table_size("max_heap_table_size",154static sys_var_session_uint64_t sys_max_heap_table_size("max_heap_table_size",
@@ -1548,7 +1546,6 @@
1548 add_sys_var_to_list(&sys_last_insert_id, my_long_options);1546 add_sys_var_to_list(&sys_last_insert_id, my_long_options);
1549 add_sys_var_to_list(&sys_lc_time_names, my_long_options);1547 add_sys_var_to_list(&sys_lc_time_names, my_long_options);
1550 add_sys_var_to_list(&sys_max_allowed_packet, my_long_options);1548 add_sys_var_to_list(&sys_max_allowed_packet, my_long_options);
1551 add_sys_var_to_list(&sys_max_connect_errors, my_long_options);
1552 add_sys_var_to_list(&sys_max_error_count, my_long_options);1549 add_sys_var_to_list(&sys_max_error_count, my_long_options);
1553 add_sys_var_to_list(&sys_max_heap_table_size, my_long_options);1550 add_sys_var_to_list(&sys_max_heap_table_size, my_long_options);
1554 add_sys_var_to_list(&sys_max_join_size, my_long_options);1551 add_sys_var_to_list(&sys_max_join_size, my_long_options);
15551552
=== modified file 'drizzled/sys_var.h'
--- drizzled/sys_var.h 2011-01-11 06:07:55 +0000
+++ drizzled/sys_var.h 2011-01-16 11:24:59 +0000
@@ -65,7 +65,6 @@
65extern uint64_t session_startup_options;65extern uint64_t session_startup_options;
66extern uint32_t global_thread_id;66extern uint32_t global_thread_id;
67extern uint64_t table_cache_size;67extern uint64_t table_cache_size;
68extern uint64_t max_connect_errors;
69extern back_log_constraints back_log;68extern back_log_constraints back_log;
70extern uint32_t ha_open_options;69extern uint32_t ha_open_options;
71extern char *drizzled_bind_host;70extern char *drizzled_bind_host;
7271
=== modified file 'tests/r/variables.result'
--- tests/r/variables.result 2010-12-03 23:18:06 +0000
+++ tests/r/variables.result 2011-01-16 11:24:59 +0000
@@ -1,5 +1,4 @@
1drop table if exists t1,t2;1drop table if exists t1,t2;
2set @my_max_connect_errors =@@global.max_connect_errors;
3set @my_max_heap_table_size =@@global.max_heap_table_size;2set @my_max_heap_table_size =@@global.max_heap_table_size;
4set @my_max_join_size =@@global.max_join_size;3set @my_max_join_size =@@global.max_join_size;
5set @my_mysql_protocol_buffer_length =@@global.mysql_protocol_buffer_length;4set @my_mysql_protocol_buffer_length =@@global.mysql_protocol_buffer_length;
@@ -286,7 +285,6 @@
286set max_allowed_packet=100;285set max_allowed_packet=100;
287Warnings:286Warnings:
288Error 1292 Truncated incorrect max_allowed_packet value: '100'287Error 1292 Truncated incorrect max_allowed_packet value: '100'
289set global max_connect_errors=100;
290set max_heap_table_size=100;288set max_heap_table_size=100;
291Warnings:289Warnings:
292Error 1292 Truncated incorrect max_heap_table_size value: '100'290Error 1292 Truncated incorrect max_heap_table_size value: '100'
@@ -533,7 +531,6 @@
533End of 5.0 tests531End of 5.0 tests
534set global flush_time =@my_flush_time;532set global flush_time =@my_flush_time;
535ERROR HY000: Unknown system variable 'flush_time'533ERROR HY000: Unknown system variable 'flush_time'
536set global max_connect_errors =@my_max_connect_errors;
537set global max_heap_table_size =@my_max_heap_table_size;534set global max_heap_table_size =@my_max_heap_table_size;
538set global max_join_size =@my_max_join_size;535set global max_join_size =@my_max_join_size;
539set global max_write_lock_count =default;536set global max_write_lock_count =default;
@@ -552,7 +549,6 @@
552set GLOBAL bulk_insert_buffer_size=DEFAULT;549set GLOBAL bulk_insert_buffer_size=DEFAULT;
553set GLOBAL join_buffer_size=DEFAULT;550set GLOBAL join_buffer_size=DEFAULT;
554set GLOBAL max_allowed_packet=DEFAULT;551set GLOBAL max_allowed_packet=DEFAULT;
555set GLOBAL max_connect_errors=DEFAULT;
556set GLOBAL max_heap_table_size=DEFAULT;552set GLOBAL max_heap_table_size=DEFAULT;
557set GLOBAL max_join_size=DEFAULT;553set GLOBAL max_join_size=DEFAULT;
558set GLOBAL max_sort_length=DEFAULT;554set GLOBAL max_sort_length=DEFAULT;
559555
=== modified file 'tests/t/variables.test'
--- tests/t/variables.test 2010-08-26 21:56:15 +0000
+++ tests/t/variables.test 2011-01-16 11:24:59 +0000
@@ -8,7 +8,6 @@
8#8#
9# Bug #19263: variables.test doesn't clean up after itself (I/II -- save)9# Bug #19263: variables.test doesn't clean up after itself (I/II -- save)
10#10#
11set @my_max_connect_errors =@@global.max_connect_errors;
12set @my_max_heap_table_size =@@global.max_heap_table_size;11set @my_max_heap_table_size =@@global.max_heap_table_size;
13set @my_max_join_size =@@global.max_join_size;12set @my_max_join_size =@@global.max_join_size;
14set @my_mysql_protocol_buffer_length =@@global.mysql_protocol_buffer_length;13set @my_mysql_protocol_buffer_length =@@global.mysql_protocol_buffer_length;
@@ -173,7 +172,6 @@
173set join_buffer_size=100;172set join_buffer_size=100;
174set last_insert_id=1;173set last_insert_id=1;
175set max_allowed_packet=100;174set max_allowed_packet=100;
176set global max_connect_errors=100;
177set max_heap_table_size=100;175set max_heap_table_size=100;
178set max_join_size=100;176set max_join_size=100;
179set max_sort_length=100;177set max_sort_length=100;
@@ -467,7 +465,6 @@
467#465#
468--error ER_UNKNOWN_SYSTEM_VARIABLE466--error ER_UNKNOWN_SYSTEM_VARIABLE
469set global flush_time =@my_flush_time;467set global flush_time =@my_flush_time;
470set global max_connect_errors =@my_max_connect_errors;
471set global max_heap_table_size =@my_max_heap_table_size;468set global max_heap_table_size =@my_max_heap_table_size;
472set global max_join_size =@my_max_join_size;469set global max_join_size =@my_max_join_size;
473# No default470# No default
@@ -485,7 +482,6 @@
485set GLOBAL bulk_insert_buffer_size=DEFAULT;482set GLOBAL bulk_insert_buffer_size=DEFAULT;
486set GLOBAL join_buffer_size=DEFAULT;483set GLOBAL join_buffer_size=DEFAULT;
487set GLOBAL max_allowed_packet=DEFAULT;484set GLOBAL max_allowed_packet=DEFAULT;
488set GLOBAL max_connect_errors=DEFAULT;
489set GLOBAL max_heap_table_size=DEFAULT;485set GLOBAL max_heap_table_size=DEFAULT;
490set GLOBAL max_join_size=DEFAULT;486set GLOBAL max_join_size=DEFAULT;
491set GLOBAL max_sort_length=DEFAULT;487set GLOBAL max_sort_length=DEFAULT;

Subscribers

People subscribed via source and target branches