List:Commits« Previous MessageNext Message »
From:Marc Alff Date:February 6 2012 9:14am
Subject:bzr push into mysql-trunk-wl5259 branch (marc.alff:3371 to 3372)
View as plain text  
 3372 Marc Alff	2012-02-06
      Misc cleanup

    modified:
      mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
      mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test
      mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test
      scripts/mysql_system_tables.sql
      sql/hostname.cc
      sql/hostname.h
      sql/mysqld.cc
      sql/sql_acl.cc
      sql/sql_connect.cc
      storage/perfschema/table_host_cache.cc
      storage/perfschema/table_host_cache.h
 3371 Marc Alff	2012-02-03 [merge]
      Merge mysql-trunk --> mysql-trunk-wl5259

    added:
      mysql-test/r/eq_range_idx_stat.result
      mysql-test/t/eq_range_idx_stat.test
    modified:
      include/myisam.h
      mysql-test/r/myisam.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/type_temporal_fractional.result
      mysql-test/suite/engines/funcs/r/date_function.result
      mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
      mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
      mysql-test/suite/innodb/r/innodb-index.result
      mysql-test/suite/innodb/r/innodb_monitor.result
      mysql-test/suite/innodb/t/innodb-index.test
      mysql-test/suite/innodb/t/innodb_bug34300.test
      mysql-test/suite/opt_trace/r/eq_range_statistics.result
      mysql-test/suite/opt_trace/t/eq_range_statistics.test
      mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
      mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
      mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
      mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
      mysql-test/t/myisam.test
      mysql-test/t/type_temporal_fractional.test
      sql/handler.cc
      sql/opt_range.cc
      sql/sql_time.cc
      sql/sys_vars.cc
      storage/innobase/btr/btr0btr.cc
      storage/innobase/btr/btr0sea.cc
      storage/innobase/buf/buf0buf.cc
      storage/innobase/buf/buf0dblwr.cc
      storage/innobase/ibuf/ibuf0ibuf.cc
      storage/innobase/include/btr0btr.ic
      storage/innobase/include/buf0buf.h
      storage/innobase/include/page0page.ic
      storage/innobase/lock/lock0lock.cc
      storage/innobase/page/page0cur.cc
      storage/innobase/page/page0page.cc
      storage/innobase/row/row0merge.cc
      storage/innobase/row/row0sel.cc
      storage/innobase/srv/srv0mon.cc
      storage/myisam/ha_myisam.cc
      storage/myisam/ha_myisam.h
      storage/myisam/mi_check.c
      storage/myisam/myisamchk.c
      storage/myisam/myisamdef.h
      storage/myisam/sort.c
=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result	2012-02-02 18:37:22 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result	2012-02-06 09:13:43 +0000
@@ -918,6 +918,7 @@ FIRST_ERROR_SEEN	set
 LAST_ERROR_SEEN	set
 set global max_user_connections = 0;
 set global max_connections = 3;
+flush user_resources;
 select "Con4a is alive";
 Con4a is alive
 Con4a is alive

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result	2012-02-02 18:37:22 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result	2012-02-06 09:13:43 +0000
@@ -918,6 +918,7 @@ FIRST_ERROR_SEEN	set
 LAST_ERROR_SEEN	set
 set global max_user_connections = 0;
 set global max_connections = 3;
+flush user_resources;
 select "Con4a is alive";
 Con4a is alive
 Con4a is alive

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test	2012-02-02 18:37:22 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test	2012-02-06 09:13:43 +0000
@@ -76,6 +76,9 @@ connect (con2e,"127.0.0.1",quota,,test,$
 --connection default
 --source ../include/hostcache_dump.inc
 
+# Wait for all disconnects
+--source ../include/wait_for_pfs_thread_count.inc
+
 grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
   with max_connections_per_hour 0;
 grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
@@ -123,6 +126,9 @@ disconnect con3a;
 disconnect con3b;
 disconnect con3c;
 
+# Wait for all disconnects
+--source ../include/wait_for_pfs_thread_count.inc
+
 grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
   with max_user_connections 0;
 flush user_resources;
@@ -170,8 +176,12 @@ disconnect con4a;
 disconnect con4b;
 disconnect con4c;
 
+# Wait for all disconnects
+--source ../include/wait_for_pfs_thread_count.inc
+
 set global max_user_connections = 0;
 set global max_connections = 3;
+flush user_resources;
 
 connect (con5a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
 select "Con4a is alive";
@@ -206,6 +216,9 @@ connect (con5d,"127.0.0.1",quota,,test,$
 disconnect con5a;
 disconnect con5b;
 
+# Wait for all disconnects
+--source ../include/wait_for_pfs_thread_count.inc
+
 set global max_connections = @saved_max_connections;
 
 # revoke all privileges on test.* from 'quota'@'santa.claus.ipv4.example.com';

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test	2012-02-02 18:37:22 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test	2012-02-06 09:13:43 +0000
@@ -77,6 +77,9 @@ connect (con2e,"::1",quota,,test,$MASTER
 --connection default
 --source ../include/hostcache_dump.inc
 
+# Wait for all disconnects
+--source ../include/wait_for_pfs_thread_count.inc
+
 grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
   with max_connections_per_hour 0;
 grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
@@ -124,6 +127,9 @@ disconnect con3a;
 disconnect con3b;
 disconnect con3c;
 
+# Wait for all disconnects
+--source ../include/wait_for_pfs_thread_count.inc
+
 grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
   with max_user_connections 0;
 flush user_resources;
@@ -171,8 +177,12 @@ disconnect con4a;
 disconnect con4b;
 disconnect con4c;
 
+# Wait for all disconnects
+--source ../include/wait_for_pfs_thread_count.inc
+
 set global max_user_connections = 0;
 set global max_connections = 3;
+flush user_resources;
 
 connect (con5a,"::1",quota,,test,$MASTER_MYPORT,);
 select "Con4a is alive";
@@ -207,6 +217,9 @@ connect (con5d,"::1",quota,,test,$MASTER
 disconnect con5a;
 disconnect con5b;
 
+# Wait for all disconnects
+--source ../include/wait_for_pfs_thread_count.inc
+
 set global max_connections = @saved_max_connections;
 
 # revoke all privileges on test.* from 'quota'@'santa.claus.ipv6.example.com';

=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql	2012-02-02 18:37:22 +0000
+++ b/scripts/mysql_system_tables.sql	2012-02-06 09:13:43 +0000
@@ -629,7 +629,6 @@ SET @cmd="CREATE TABLE performance_schem
   "COUNT_SSL_ERRORS BIGINT not null,"
   "COUNT_MAX_USER_CONNECTION_ERRORS BIGINT not null,"
   "COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS BIGINT not null,"
-  "COUNT_MAX_CONNECTION_ERRORS BIGINT not null,"
   "COUNT_DEFAULT_DATABASE_ERRORS BIGINT not null,"
   "COUNT_INIT_CONNECT_ERRORS BIGINT not null,"
   "COUNT_LOCAL_ERRORS BIGINT not null,"

=== modified file 'sql/hostname.cc'
--- a/sql/hostname.cc	2012-02-02 18:37:22 +0000
+++ b/sql/hostname.cc	2012-02-06 09:13:43 +0000
@@ -65,7 +65,6 @@ Host_errors::Host_errors()
   m_ssl(0),
   m_max_user_connection(0),
   m_max_user_connection_per_hour(0),
-  m_max_connection(0),
   m_default_database(0),
   m_init_connect(0),
   m_local(0)
@@ -94,7 +93,6 @@ void Host_errors::reset()
   m_ssl= 0;
   m_max_user_connection= 0;
   m_max_user_connection_per_hour= 0;
-  m_max_connection= 0;
   m_default_database= 0;
   m_init_connect= 0;
   m_local= 0;
@@ -120,7 +118,6 @@ void Host_errors::aggregate(const Host_e
   m_ssl+= errors->m_ssl;
   m_max_user_connection+= errors->m_max_user_connection;
   m_max_user_connection_per_hour+= errors->m_max_user_connection_per_hour;
-  m_max_connection+= errors->m_max_connection;
   m_default_database+= errors->m_default_database;
   m_init_connect+= errors->m_init_connect;
   m_local+= errors->m_local;

=== modified file 'sql/hostname.h'
--- a/sql/hostname.h	2012-02-02 18:37:22 +0000
+++ b/sql/hostname.h	2012-02-06 09:13:43 +0000
@@ -69,8 +69,6 @@ public:
   ulong m_max_user_connection;
   /** Number of errors from max user connection per hour. */
   ulong m_max_user_connection_per_hour;
-  /** Number of errors from max connection. */
-  ulong m_max_connection;
   /** Number of errors from the default database. */
   ulong m_default_database;
   /** Number of errors from init_connect. */
@@ -97,7 +95,6 @@ public:
       || (m_ssl != 0)
       || (m_max_user_connection != 0)
       || (m_max_user_connection_per_hour != 0)
-      || (m_max_connection != 0)
       || (m_default_database != 0)
       || (m_init_connect != 0)
       || (m_local != 0));

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2012-02-01 17:24:09 +0000
+++ b/sql/mysqld.cc	2012-02-06 09:13:43 +0000
@@ -5406,6 +5406,7 @@ void create_thread_to_handle_connection(
       mysql_mutex_unlock(&LOCK_connection_count);
 
       statistic_increment(aborted_connects,&LOCK_status);
+      statistic_increment(connection_internal_errors, &LOCK_status);
       /* Can't use my_error() since store_globals has not been called. */
       my_snprintf(error_message_buff, sizeof(error_message_buff),
                   ER_THD(thd, ER_CANT_CREATE_THREAD), error);
@@ -5414,7 +5415,6 @@ void create_thread_to_handle_connection(
       mysql_mutex_lock(&LOCK_thread_count);
       delete thd;
       mysql_mutex_unlock(&LOCK_thread_count);
-      connection_internal_errors++;
       return;
       /* purecov: end */
     }
@@ -5455,7 +5455,7 @@ static void create_new_thread(THD *thd)
     DBUG_PRINT("error",("Too many connections"));
     close_connection(thd, ER_CON_COUNT_ERROR);
     delete thd;
-    connection_max_connection_errors++;
+    statistic_increment(connection_max_connection_errors, &LOCK_status);
     DBUG_VOID_RETURN;
   }
 
@@ -5585,7 +5585,7 @@ void handle_connections_sockets()
           There is not much details to report about the client,
           increment the server global status variable.
         */
-        connection_select_errors++;
+        statistic_increment(connection_select_errors, &LOCK_status);
         if (!select_errors++ && !abort_loop)  /* purecov: inspected */
           sql_print_error("mysqld: Got error %d from select",socket_errno); /* purecov: inspected */
       }
@@ -5667,7 +5667,7 @@ void handle_connections_sockets()
         There is not much details to report about the client,
         increment the server global status variable.
       */
-      connection_accept_errors++;
+      statistic_increment(connection_accept_errors, &LOCK_status);
       if ((error_count++ & 255) == 0)   // This can happen often
         sql_perror("Error in accept");
       MAYBE_BROKEN_SYSCALL;
@@ -5710,7 +5710,7 @@ void handle_connections_sockets()
             The connection was refused by TCP wrappers.
             There are no details (by client IP) available to update the host_cache.
           */
-          connection_tcpwrap_errors++;
+          statistic_increment(connection_tcpwrap_errors, &LOCK_status);
           continue;
         }
       }
@@ -5725,7 +5725,7 @@ void handle_connections_sockets()
     {
       (void) mysql_socket_shutdown(new_sock, SHUT_RDWR);
       (void) mysql_socket_close(new_sock);
-      connection_internal_errors++;
+      statistic_increment(connection_internal_errors, &LOCK_status);
       continue;
     }
 
@@ -5750,7 +5750,7 @@ void handle_connections_sockets()
         (void) mysql_socket_close(new_sock);
       }
       delete thd;
-      connection_internal_errors++;
+      statistic_increment(connection_internal_errors, &LOCK_status);
       continue;
     }
     init_net_server_extension(thd);

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2012-02-02 18:37:22 +0000
+++ b/sql/sql_acl.cc	2012-02-06 09:13:43 +0000
@@ -9640,9 +9640,7 @@ acl_authenticate(THD *thd, uint com_chan
     mysql_mutex_unlock(&LOCK_connection_count);
     if (!count_ok)
     {                                         // too many connections
-      Host_errors errors;
-      errors.m_max_connection= 1;
-      inc_host_errors(mpvio.ip, &errors);
+      statistic_increment(connection_max_connection_errors, &LOCK_status);
       my_error(ER_CON_COUNT_ERROR, MYF(0));
       DBUG_RETURN(1);
     }

=== modified file 'sql/sql_connect.cc'
--- a/sql/sql_connect.cc	2012-02-02 18:37:22 +0000
+++ b/sql/sql_connect.cc	2012-02-06 09:13:43 +0000
@@ -444,7 +444,7 @@ bool init_new_connection_handler_thread(
   pthread_detach_this_thread();
   if (my_thread_init())
   {
-    connection_internal_errors++;
+    statistic_increment(connection_internal_errors, &LOCK_status);
     return 1;
   }
   return 0;
@@ -562,7 +562,7 @@ static int check_connection(THD *thd)
         this is treated as a global server OOM error.
         TODO: remove the need for my_strdup.
       */
-      connection_internal_errors++;
+      statistic_increment(connection_internal_errors, &LOCK_status);
       return 1; /* The error is set by my_strdup(). */
     }
     thd->main_security_ctx.host_or_ip= thd->main_security_ctx.ip;
@@ -627,7 +627,7 @@ static int check_connection(THD *thd)
       Hence, there is no reason to account on OOM conditions per client IP,
       we count failures in the global server status instead.
     */
-    connection_internal_errors++;
+    statistic_increment(connection_internal_errors, &LOCK_status);
     return 1; /* The error is set by alloc(). */
   }
 

=== modified file 'storage/perfschema/table_host_cache.cc'
--- a/storage/perfschema/table_host_cache.cc	2012-02-02 18:37:22 +0000
+++ b/storage/perfschema/table_host_cache.cc	2012-02-06 09:13:43 +0000
@@ -133,11 +133,6 @@ static const TABLE_FIELD_TYPE field_type
     { NULL, 0}
   },
   {
-    { C_STRING_WITH_LEN("COUNT_MAX_CONNECTION_ERRORS") },
-    { C_STRING_WITH_LEN("bigint(20)") },
-    { NULL, 0}
-  },
-  {
     { C_STRING_WITH_LEN("COUNT_DEFAULT_DATABASE_ERRORS") },
     { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
@@ -181,7 +176,7 @@ static const TABLE_FIELD_TYPE field_type
 
 TABLE_FIELD_DEF
 table_host_cache::m_field_def=
-{ 30, field_types };
+{ 29, field_types };
 
 PFS_engine_table_share
 table_host_cache::m_share=
@@ -301,7 +296,6 @@ void table_host_cache::make_row(Host_ent
   row->m_count_ssl_errors= entry->m_errors.m_ssl;
   row->m_count_max_user_connection_errors= entry->m_errors.m_max_user_connection;
   row->m_count_max_user_connection_per_hour_errors= entry->m_errors.m_max_user_connection_per_hour;
-  row->m_count_max_connection_errors= entry->m_errors.m_max_connection;
   row->m_count_default_database_errors= entry->m_errors.m_default_database;
   row->m_count_init_connect_errors= entry->m_errors.m_init_connect;
   row->m_count_local_errors= entry->m_errors.m_local;
@@ -440,34 +434,31 @@ int table_host_cache::read_row_values(TA
       case 20: /* COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS */
         set_field_ulonglong(f, m_row->m_count_max_user_connection_per_hour_errors);
         break;
-      case 21: /* COUNT_MAX_CONNECTION_ERRORS */
-        set_field_ulonglong(f, m_row->m_count_max_connection_errors);
-        break;
-      case 22: /* COUNT_DEFAULT_DATABASE_ERRORS */
+      case 21: /* COUNT_DEFAULT_DATABASE_ERRORS */
         set_field_ulonglong(f, m_row->m_count_default_database_errors);
         break;
-      case 23: /* COUNT_INIT_CONNECT_ERRORS */
+      case 22: /* COUNT_INIT_CONNECT_ERRORS */
         set_field_ulonglong(f, m_row->m_count_init_connect_errors);
         break;
-      case 24: /* COUNT_LOCAL_ERRORS */
+      case 23: /* COUNT_LOCAL_ERRORS */
         set_field_ulonglong(f, m_row->m_count_local_errors);
         break;
-      case 25: /* COUNT_UNKNOWN_ERRORS */
+      case 24: /* COUNT_UNKNOWN_ERRORS */
         set_field_ulonglong(f, m_row->m_count_unknown_errors);
         break;
-      case 26: /* FIRST_SEEN */
+      case 25: /* FIRST_SEEN */
         set_field_timestamp(f, m_row->m_first_seen);
         break;
-      case 27: /* LAST_SEEN */
+      case 26: /* LAST_SEEN */
         set_field_timestamp(f, m_row->m_last_seen);
         break;
-      case 28: /* FIRST_ERROR_SEEN */
+      case 27: /* FIRST_ERROR_SEEN */
         if (m_row->m_first_error_seen != 0)
           set_field_timestamp(f, m_row->m_first_error_seen);
         else
           f->set_null();
         break;
-      case 29: /* LAST_ERROR_SEEN */
+      case 28: /* LAST_ERROR_SEEN */
         if (m_row->m_last_error_seen != 0)
           set_field_timestamp(f, m_row->m_last_error_seen);
         else

=== modified file 'storage/perfschema/table_host_cache.h'
--- a/storage/perfschema/table_host_cache.h	2012-02-02 18:37:22 +0000
+++ b/storage/perfschema/table_host_cache.h	2012-02-06 09:13:43 +0000
@@ -78,8 +78,6 @@ struct row_host_cache
   ulonglong m_count_max_user_connection_errors;
   /** Column COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS. */
   ulonglong m_count_max_user_connection_per_hour_errors;
-  /** Column COUNT_MAX_CONNECTION_ERRORS. */
-  ulonglong m_count_max_connection_errors;
   /** Column COUNT_DEFAULT_DATABASE_ERRORS. */
   ulonglong m_count_default_database_errors;
   /** Column COUNT_INIT_CONNECT_ERRORS. */

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5259 branch (marc.alff:3371 to 3372) Marc Alff6 Feb