SOURCES (MYSQL_5_0): mysql-userstats.patch, mysql-microslow.patch (NEW), my...

arekm arekm at pld-linux.org
Sat Dec 6 21:46:16 CET 2008


Author: arekm                        Date: Sat Dec  6 20:46:16 2008 GMT
Module: SOURCES                       Tag: MYSQL_5_0
---- Log message:
- percona patches

---- Files affected:
SOURCES:
   mysql-userstats.patch (1.1.2.1 -> 1.1.2.2) , mysql-microslow.patch (NONE -> 1.1)  (NEW), mysql-acc-pslist.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/mysql-userstats.patch
diff -u SOURCES/mysql-userstats.patch:1.1.2.1 SOURCES/mysql-userstats.patch:1.1.2.2
--- SOURCES/mysql-userstats.patch:1.1.2.1	Wed Sep 17 16:22:43 2008
+++ SOURCES/mysql-userstats.patch	Sat Dec  6 21:46:10 2008
@@ -1,7 +1,7 @@
-diff -r a910f1746b0c include/mysql_com.h
---- a/include/mysql_com.h	Mon Sep 08 16:38:46 2008 -0700
-+++ b/include/mysql_com.h	Mon Sep 08 16:38:54 2008 -0700
-@@ -106,6 +106,8 @@
+diff -r ab66c8ca382a include/mysql_com.h
+--- a/include/mysql_com.h	Thu Sep 04 12:08:00 2008 -0700
++++ b/include/mysql_com.h	Thu Sep 04 12:12:44 2008 -0700
+@@ -115,6 +115,8 @@
  					   thread */
  #define REFRESH_MASTER          128     /* Remove all bin logs in the index
  					   and truncate the index */
@@ -10,9 +10,9 @@
  
  /* The following can't be set with mysql_refresh() */
  #define REFRESH_READ_LOCK	16384	/* Lock tables for read */
-diff -r a910f1746b0c patch_info/userstats.info
+diff -r ab66c8ca382a patch_info/userstats.info
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/userstats.info	Mon Sep 08 16:38:54 2008 -0700
++++ b/patch_info/userstats.info	Thu Sep 04 12:12:44 2008 -0700
 @@ -0,0 +1,6 @@
 +File=userstats.patch
 +Name=SHOW USER/TABLE/INDEX statistics
@@ -20,274 +20,61 @@
 +Author=Google
 +License=GPL
 +Comment=Added INFORMATION_SCHEMA.*_STATISTICS
-diff -r a910f1746b0c sql/ha_innodb.cc
---- a/sql/ha_innodb.cc	Mon Sep 08 16:38:46 2008 -0700
-+++ b/sql/ha_innodb.cc	Mon Sep 08 16:38:54 2008 -0700
-@@ -3289,6 +3289,8 @@
- 
- 	error = row_insert_for_mysql((byte*) record, prebuilt);
- 
-+        if (error == DB_SUCCESS) rows_changed++;
-+
- 	if (error == DB_SUCCESS && auto_inc_used) {
- 
-         	/* Fetch the value that was set in the autoincrement field */
-@@ -3561,6 +3563,8 @@
- 		}
- 	}
- 
-+	if (error == DB_SUCCESS) rows_changed++;
-+
- 	innodb_srv_conc_exit_innodb(prebuilt->trx);
- 
- 	error = convert_error_code_to_mysql(error, user_thd);
-@@ -3608,6 +3612,8 @@
- 	innodb_srv_conc_enter_innodb(prebuilt->trx);
- 
- 	error = row_update_for_mysql((byte*) record, prebuilt);
-+
-+	if (error == DB_SUCCESS) rows_changed++;
- 
- 	innodb_srv_conc_exit_innodb(prebuilt->trx);
- 
-@@ -3888,6 +3894,9 @@
- 	if (ret == DB_SUCCESS) {
- 		error = 0;
- 		table->status = 0;
-+                rows_read++;
-+                if (active_index >= 0 && active_index < MAX_KEY)
-+                        index_rows_read[active_index]++;
- 
- 	} else if (ret == DB_RECORD_NOT_FOUND) {
- 		error = HA_ERR_KEY_NOT_FOUND;
-@@ -4041,6 +4050,9 @@
- 	if (ret == DB_SUCCESS) {
- 		error = 0;
- 		table->status = 0;
-+                rows_read++;
-+                if (active_index >= 0 && active_index < MAX_KEY)
-+                        index_rows_read[active_index]++;
- 
- 	} else if (ret == DB_RECORD_NOT_FOUND) {
- 		error = HA_ERR_END_OF_FILE;
-diff -r a910f1746b0c sql/ha_myisam.cc
---- a/sql/ha_myisam.cc	Mon Sep 08 16:38:46 2008 -0700
-+++ b/sql/ha_myisam.cc	Mon Sep 08 16:38:54 2008 -0700
-@@ -670,7 +670,9 @@
-     if ((error= update_auto_increment()))
-       return error;
-   }
--  return mi_write(file,buf);
-+  int error=mi_write(file,buf);
-+  if (!error) rows_changed++;
-+  return error;
- }
- 
- int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
-@@ -1518,13 +1520,17 @@
-   statistic_increment(table->in_use->status_var.ha_update_count,&LOCK_status);
-   if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
-     table->timestamp_field->set_time();
--  return mi_update(file,old_data,new_data);
-+  int error=mi_update(file,old_data,new_data);
-+  if (!error) rows_changed++;
-+  return error;
- }
- 
- int ha_myisam::delete_row(const byte * buf)
- {
-   statistic_increment(table->in_use->status_var.ha_delete_count,&LOCK_status);
--  return mi_delete(file,buf);
-+  int error=mi_delete(file,buf);
-+  if (!error) rows_changed++;
-+  return error;
- }
- 
- int ha_myisam::index_read(byte * buf, const byte * key,
-@@ -1535,6 +1541,13 @@
- 		      &LOCK_status);
-   int error=mi_rkey(file,buf,active_index, key, key_len, find_flag);
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) {
-+    rows_read++;
-+
-+    int inx = (active_index == -1) ? file->lastinx : active_index;
-+    if (inx >= 0 && inx < MAX_KEY)
-+      index_rows_read[inx]++;
-+  }
-   return error;
- }
- 
-@@ -1545,6 +1558,14 @@
- 		      &LOCK_status);
-   int error=mi_rkey(file,buf,index, key, key_len, find_flag);
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) {
-+    rows_read++;
-+
-+//    int inx = (active_index == -1) ? file->lastinx : active_index;
-+    int inx = index;
-+    if (inx >= 0 && inx < MAX_KEY)
-+      index_rows_read[inx]++;
-+  }
-   return error;
- }
- 
-@@ -1555,6 +1576,13 @@
- 		      &LOCK_status);
-   int error=mi_rkey(file,buf,active_index, key, key_len, HA_READ_PREFIX_LAST);
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) {
-+    rows_read++;
-+
-+    int inx = (active_index == -1) ? file->lastinx : active_index;
-+    if (inx >= 0 && inx < MAX_KEY)
-+      index_rows_read[inx]++;
-+  }
-   return error;
- }
- 
-@@ -1565,6 +1593,13 @@
- 		      &LOCK_status);
-   int error=mi_rnext(file,buf,active_index);
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) {
-+    rows_read++;
-+
-+    int inx = (active_index == -1) ? file->lastinx : active_index;
-+    if (inx >= 0 && inx < MAX_KEY)
-+      index_rows_read[inx]++;
-+  }
-   return error;
- }
- 
-@@ -1575,6 +1610,13 @@
- 		      &LOCK_status);
-   int error=mi_rprev(file,buf, active_index);
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) {
-+    rows_read++;
-+
-+    int inx = (active_index == -1) ? file->lastinx : active_index;
-+    if (inx >= 0 && inx < MAX_KEY)
-+      index_rows_read[inx]++;
-+  }
-   return error;
- }
- 
-@@ -1585,6 +1627,13 @@
- 		      &LOCK_status);
-   int error=mi_rfirst(file, buf, active_index);
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) {
-+    rows_read++;
-+
-+    int inx = (active_index == -1) ? file->lastinx : active_index;
-+    if (inx >= 0 && inx < MAX_KEY)
-+      index_rows_read[inx]++;
-+  }
-   return error;
- }
- 
-@@ -1595,6 +1644,13 @@
- 		      &LOCK_status);
-   int error=mi_rlast(file, buf, active_index);
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) {
-+    rows_read++;
-+
-+    int inx = (active_index == -1) ? file->lastinx : active_index;
-+    if (inx >= 0 && inx < MAX_KEY)
-+      index_rows_read[inx]++;
-+  }
-   return error;
- }
- 
-@@ -1611,6 +1667,13 @@
-     error= mi_rnext_same(file,buf);
-   } while (error == HA_ERR_RECORD_DELETED);
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) {
-+    rows_read++;
-+
-+    int inx = (active_index == -1) ? file->lastinx : active_index;
-+    if (inx >= 0 && inx < MAX_KEY)
-+      index_rows_read[inx]++;
-+  }
-   return error;
- }
- 
-@@ -1628,6 +1691,7 @@
- 		      &LOCK_status);
-   int error=mi_scan(file, buf);
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) rows_read++;
-   return error;
- }
- 
-@@ -1642,6 +1706,7 @@
- 		      &LOCK_status);
-   int error=mi_rrnd(file, buf, my_get_ptr(pos,ref_length));
-   table->status=error ? STATUS_NOT_FOUND: 0;
-+  if (!error) rows_read++;
-   return error;
- }
- 
-diff -r a910f1746b0c sql/handler.cc
---- a/sql/handler.cc	Mon Sep 08 16:38:46 2008 -0700
-+++ b/sql/handler.cc	Mon Sep 08 16:38:54 2008 -0700
-@@ -756,6 +756,7 @@
+diff -r ab66c8ca382a sql/handler.cc
+--- a/sql/handler.cc	Thu Sep 04 12:08:00 2008 -0700
++++ b/sql/handler.cc	Thu Sep 04 12:12:44 2008 -0700
+@@ -1168,6 +1168,7 @@
          error=1;
        }
-       statistic_increment(thd->status_var.ha_commit_count,&LOCK_status);
+       status_var_increment(thd->status_var.ha_commit_count);
 +      thd->diff_commit_trans++;
-       *ht= 0;
+       ha_info_next= ha_info->next();
+       ha_info->reset(); /* keep it conveniently zero-filled */
      }
-     trans->nht=0;
-@@ -812,6 +813,7 @@
+@@ -1235,6 +1236,7 @@
          error=1;
        }
-       statistic_increment(thd->status_var.ha_rollback_count,&LOCK_status);
+       status_var_increment(thd->status_var.ha_rollback_count);
 +      thd->diff_rollback_trans++;
-       *ht= 0;
+       ha_info_next= ha_info->next();
+       ha_info->reset(); /* keep it conveniently zero-filled */
      }
-     trans->nht=0;
-@@ -1205,6 +1207,7 @@
+@@ -1682,6 +1684,7 @@
        error=1;
      }
-     statistic_increment(thd->status_var.ha_rollback_count,&LOCK_status);
+     status_var_increment(thd->status_var.ha_rollback_count);
 +    thd->diff_rollback_trans++;
-     *ht=0; // keep it conveniently zero-filled
+     ha_info_next= ha_info->next();
+     ha_info->reset(); /* keep it conveniently zero-filled */
    }
-   DBUG_RETURN(error);
-@@ -1437,6 +1440,8 @@
-     else
-       dupp_ref=ref+ALIGN_SIZE(ref_length);
+@@ -2016,6 +2019,8 @@
+       dup_ref=ref+ALIGN_SIZE(ref_length);
+     cached_table_flags= table_flags();
    }
 +  rows_read = rows_changed = 0;
 +  memset(index_rows_read, 0, sizeof(index_rows_read));
    DBUG_RETURN(error);
  }
  
-@@ -2222,6 +2227,97 @@
-   return error;
+@@ -3448,6 +3453,97 @@
+   return;
  }
  
 +// Updates the global table stats with the TABLE this handler represents.
 +void handler::update_global_table_stats() {
 +  if (!rows_read && !rows_changed) return;  // Nothing to update.
 +  // table_cache_key is db_name + '\0' + table_name + '\0'.
-+  if (!table->s || !table->s->table_cache_key || !table->s->table_name) return;
++  if (!table->s || !table->s->table_cache_key.str || !table->s->table_name.str) return;
 +
 +  TABLE_STATS* table_stats;
 +  char key[NAME_LEN * 2 + 2];
 +  // [db] + '.' + [table]
-+  sprintf(key, "%s.%s", table->s->table_cache_key, table->s->table_name);
++  sprintf(key, "%s.%s", table->s->table_cache_key.str, table->s->table_name.str);
 +
 +  pthread_mutex_lock(&LOCK_global_table_stats);
 +  // Gets the global table stats, creating one if necessary.
 +  if (!(table_stats = (TABLE_STATS*)hash_search(&global_table_stats,
-+                                                (byte*)key,
++                                                (uchar*)key,
 +                                                strlen(key)))) {
 +    if (!(table_stats = ((TABLE_STATS*)
 +                         my_malloc(sizeof(TABLE_STATS), MYF(MY_WME))))) {
@@ -300,7 +87,7 @@
 +    table_stats->rows_changed = 0;
 +    table_stats->rows_changed_x_indexes = 0;
 +
-+    if (my_hash_insert(&global_table_stats, (byte*)table_stats)) {
++    if (my_hash_insert(&global_table_stats, (uchar*)table_stats)) {
 +      // Out of memory.
 +      sql_print_error("Inserting table stats failed.");
 +      my_free((char*)table_stats, 0);
@@ -320,7 +107,7 @@
 +// Updates the global index stats with this handler's accumulated index reads.
 +void handler::update_global_index_stats() {
 +  // table_cache_key is db_name + '\0' + table_name + '\0'.
-+  if (!table->s || !table->s->table_cache_key || !table->s->table_name) return;
++  if (!table->s || !table->s->table_cache_key.str || !table->s->table_name.str) return;
 +
 +  for (int x = 0; x < table->s->keys; x++) {
 +    if (index_rows_read[x]) {
@@ -332,13 +119,13 @@
 +      INDEX_STATS* index_stats;
 +      char key[NAME_LEN * 3 + 3];
 +      // [db] + '.' + [table] + '.' + [index]
-+      sprintf(key, "%s.%s.%s",  table->s->table_cache_key,
-+              table->s->table_name, key_info->name);
++      sprintf(key, "%s.%s.%s",  table->s->table_cache_key.str,
++              table->s->table_name.str, key_info->name);
 +
 +      pthread_mutex_lock(&LOCK_global_index_stats);
 +      // Gets the global index stats, creating one if necessary.
 +      if (!(index_stats = (INDEX_STATS*)hash_search(&global_index_stats,
-+                                                    (byte*)key,
++                                                    (uchar*)key,
 +                                                    strlen(key)))) {
 +        if (!(index_stats = ((INDEX_STATS*)
 +                             my_malloc(sizeof(INDEX_STATS), MYF(MY_WME))))) {
@@ -349,7 +136,7 @@
 +        strncpy(index_stats->index, key, sizeof(index_stats->index));
 +        index_stats->rows_read = 0;
 +
-+        if (my_hash_insert(&global_index_stats, (byte*)index_stats)) {
++        if (my_hash_insert(&global_index_stats, (uchar*)index_stats)) {
 +          // Out of memory.
 +          sql_print_error("Inserting index stats failed.");
 +          my_free((char*)index_stats, 0);
@@ -367,86 +154,86 @@
  
  /****************************************************************************
  ** Some general functions that isn't in the handler class
-diff -r a910f1746b0c sql/handler.h
---- a/sql/handler.h	Mon Sep 08 16:38:46 2008 -0700
-+++ b/sql/handler.h	Mon Sep 08 16:38:54 2008 -0700
-@@ -30,6 +30,10 @@
- #if defined(HAVE_BERKELEY_DB) || defined(HAVE_INNOBASE_DB) || \
-     defined(HAVE_NDBCLUSTER_DB)
+diff -r ab66c8ca382a sql/handler.h
+--- a/sql/handler.h	Thu Sep 04 12:08:00 2008 -0700
++++ b/sql/handler.h	Thu Sep 04 12:12:44 2008 -0700
+@@ -29,6 +29,10 @@
+ #endif
+ 
  #define USING_TRANSACTIONS
-+#endif
 +
 +#if MAX_KEY > 128
 +#error MAX_KEY is too large.  Values up to 128 are supported.
- #endif
++#endif
  
  // the following is for checking tables
-@@ -604,6 +608,9 @@
-   bool  auto_increment_column_changed;
-   bool implicit_emptied;                /* Can be !=0 only if HEAP */
-   const COND *pushed_cond;
-+  ulonglong rows_read;
-+  ulonglong rows_changed;
-+  ulonglong index_rows_read[MAX_KEY];
  
-   handler(const handlerton *ht_arg, TABLE *table_arg) :table(table_arg),
-     ht(ht_arg),
-@@ -615,8 +622,10 @@
-     ref_length(sizeof(my_off_t)), block_size(0),
-     raid_type(0), ft_handler(0), inited(NONE),
+@@ -690,6 +694,7 @@
+    */
+    enum log_status (*get_log_status)(handlerton *hton, char *log);
+ 
++
+    /*
+      Iterators creator.
+      Presence of the pointer should be checked before using
+@@ -1130,6 +1135,10 @@
+   */
+   Discrete_interval auto_inc_interval_for_cur_row;
+ 
++   ulonglong rows_read;
++   ulonglong rows_changed;
++   ulonglong index_rows_read[MAX_KEY];
++
+   handler(handlerton *ht_arg, TABLE_SHARE *share_arg)
+     :table_share(share_arg), table(0),
+     estimation_rows_to_insert(0), ht(ht_arg),
+@@ -1154,8 +1154,10 @@
+     ft_handler(0), inited(NONE),
      locked(FALSE), implicit_emptied(0),
--    pushed_cond(NULL)
+     pushed_cond(0), next_insert_id(0), insert_id_for_cur_row(0),
+-    auto_inc_intervals_count(0)
 -    {}
-+    pushed_cond(NULL), rows_read(0), rows_changed(0)
++    auto_inc_intervals_count(0), rows_read(0), rows_changed(0)
 +    {
 +      memset(index_rows_read, 0, sizeof(index_rows_read));
 +    }
-   virtual ~handler(void) { DBUG_ASSERT(locked == FALSE); /* TODO: DBUG_ASSERT(inited == NONE); */ }
-   virtual handler *clone(MEM_ROOT *mem_root);
-   int ha_open(const char *name, int mode, int test_if_locked);
-@@ -625,7 +634,11 @@
-   virtual void print_error(int error, myf errflag);
-   virtual bool get_error_message(int error, String *buf);
-   uint get_dup_key(int error);
--  void change_table_ptr(TABLE *table_arg) { table=table_arg; }
-+  void change_table_ptr(TABLE *table_arg) {
-+    table=table_arg;
+   virtual ~handler(void)
+   {
+     DBUG_ASSERT(locked == FALSE);
+@@ -1262,7 +1273,13 @@
+   {
+     table= table_arg;
+     table_share= share;
 +    rows_read = rows_changed = 0;
 +    memset(index_rows_read, 0, sizeof(index_rows_read));
-+  }
-   virtual double scan_time()
-     { return ulonglong2double(data_file_length) / IO_SIZE + 2; }
-   virtual double read_time(uint index, uint ranges, ha_rows rows)
-@@ -885,6 +898,9 @@
-   virtual bool is_crashed() const  { return 0; }
-   virtual bool auto_repair() const { return 0; }
- 
+   }
++  
 +  void update_global_table_stats();
 +  void update_global_index_stats();
 +
-   /*
-     default rename_table() and delete_table() rename/delete files with a
-     given name and extensions from bas_ext()
-diff -r a910f1746b0c sql/lex.h
---- a/sql/lex.h	Mon Sep 08 16:38:46 2008 -0700
-+++ b/sql/lex.h	Mon Sep 08 16:38:54 2008 -0700
-@@ -234,6 +234,7 @@
+   virtual double scan_time()
+   { return ulonglong2double(stats.data_file_length) / IO_SIZE + 2; }
+   virtual double read_time(uint index, uint ranges, ha_rows rows)
+diff -r ab66c8ca382a sql/lex.h
+--- a/sql/lex.h	Thu Sep 04 12:08:00 2008 -0700
++++ b/sql/lex.h	Thu Sep 04 12:12:44 2008 -0700
+@@ -245,6 +245,7 @@
    { "IN",		SYM(IN_SYM)},
    { "INDEX",		SYM(INDEX_SYM)},
    { "INDEXES",		SYM(INDEXES)},
 +  { "INDEX_STATISTICS",	SYM(INDEX_STATS_SYM)},
    { "INFILE",		SYM(INFILE)},
+   { "INITIAL_SIZE",	SYM(INITIAL_SIZE_SYM)},
    { "INNER",		SYM(INNER_SYM)},
-   { "INNOBASE",		SYM(INNOBASE_SYM)},
-@@ -475,6 +476,7 @@
-   { "TABLE",		SYM(TABLE_SYM)},
+@@ -528,6 +529,7 @@
    { "TABLES",		SYM(TABLES)},
-   { "TABLESPACE",	SYM(TABLESPACE)},
+   { "TABLESPACE",	        SYM(TABLESPACE)},
+   { "TABLE_CHECKSUM",	SYM(TABLE_CHECKSUM_SYM)},
 +  { "TABLE_STATISTICS",	SYM(TABLE_STATS_SYM)},
    { "TEMPORARY",	SYM(TEMPORARY)},
    { "TEMPTABLE",	SYM(TEMPTABLE_SYM)},
    { "TERMINATED",	SYM(TERMINATED)},
-@@ -512,6 +514,7 @@
+@@ -570,6 +572,7 @@
    { "USE",		SYM(USE_SYM)},
    { "USER",		SYM(USER)},
    { "USER_RESOURCES",	SYM(RESOURCES)},
@@ -454,10 +241,10 @@
    { "USE_FRM",		SYM(USE_FRM)},
    { "USING",		SYM(USING)},
    { "UTC_DATE",         SYM(UTC_DATE_SYM)},
-diff -r a910f1746b0c sql/mysql_priv.h
---- a/sql/mysql_priv.h	Mon Sep 08 16:38:46 2008 -0700
-+++ b/sql/mysql_priv.h	Mon Sep 08 16:38:54 2008 -0700
-@@ -798,7 +798,15 @@
+diff -r ab66c8ca382a sql/mysql_priv.h
+--- a/sql/mysql_priv.h	Thu Sep 04 12:08:00 2008 -0700
++++ b/sql/mysql_priv.h	Thu Sep 04 12:12:44 2008 -0700
+@@ -1058,7 +1058,19 @@
  bool multi_delete_set_locks_and_link_aux_tables(LEX *lex);
  void init_max_user_conn(void);
  void init_update_queries(void);
@@ -468,12 +255,16 @@
 +void free_global_user_stats(void);
 +void free_global_table_stats(void);
 +void free_global_index_stats(void);
++// Uses the THD to update the global stats.
++void update_global_user_stats(THD* thd);
 +// Set stats for concurrent connections displayed by mysqld_show().
 +void set_concurrent_connections_stats();
- pthread_handler_t handle_one_connection(void *arg);
++// Increments connection count for user.
++int increment_connection_count(THD* thd, bool use_lock);
  pthread_handler_t handle_bootstrap(void *arg);
- void end_thread(THD *thd,bool put_in_cache);
-@@ -1445,6 +1453,12 @@
+ int mysql_execute_command(THD *thd);
+ bool do_command(THD *thd);
+@@ -2009,6 +2021,12 @@
  extern struct system_variables max_system_variables;
  extern struct system_status_var global_status_var;
  extern struct rand_struct sql_rand;
@@ -486,20 +277,22 @@
  
  extern const char *opt_date_time_formats[];
  extern KNOWN_DATE_TIME_FORMAT known_date_time_formats[];
-diff -r a910f1746b0c sql/mysqld.cc
---- a/sql/mysqld.cc	Mon Sep 08 16:38:46 2008 -0700
-+++ b/sql/mysqld.cc	Mon Sep 08 16:38:54 2008 -0700
-@@ -545,6 +545,9 @@
- 		LOCK_crypt, LOCK_bytes_sent, LOCK_bytes_received,
+diff -r ab66c8ca382a sql/mysqld.cc
+--- a/sql/mysqld.cc	Thu Sep 04 12:08:00 2008 -0700
++++ b/sql/mysqld.cc	Thu Sep 04 12:12:44 2008 -0700
+@@ -588,6 +588,11 @@
  	        LOCK_global_system_variables,
- 		LOCK_user_conn, LOCK_slave_list, LOCK_active_mi;
+ 		LOCK_user_conn, LOCK_slave_list, LOCK_active_mi,
+                 LOCK_connection_count;
++
 +pthread_mutex_t LOCK_global_user_stats;
 +pthread_mutex_t LOCK_global_table_stats;
 +pthread_mutex_t LOCK_global_index_stats;
- /*
++
+ /**
    The below lock protects access to two global server variables:
    max_prepared_stmt_count and prepared_stmt_count. These variables
-@@ -1186,6 +1189,9 @@
+@@ -1265,6 +1270,9 @@
    x_free(opt_secure_file_priv);
    bitmap_free(&temp_pool);
    free_max_user_conn();
@@ -508,8 +301,8 @@
 +  free_global_index_stats();
  #ifdef HAVE_REPLICATION
    end_slave_list();
-   free_list(&replicate_do_db);
-@@ -1300,6 +1306,9 @@
+ #endif
+@@ -1377,6 +1385,9 @@
    (void) pthread_cond_destroy(&COND_thread_cache);
    (void) pthread_cond_destroy(&COND_flush_thread_cache);
    (void) pthread_cond_destroy(&COND_manager);
@@ -519,28 +312,47 @@
  }
  
  #endif /*EMBEDDED_LIBRARY*/
-@@ -3145,6 +3154,9 @@
-   (void) pthread_mutex_init(&LOCK_rpl_status, MY_MUTEX_INIT_FAST);
-   (void) pthread_cond_init(&COND_rpl_status, NULL);
+@@ -3069,6 +3080,7 @@
+   {"show_function_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS_FUNC]), SHOW_LONG_STATUS},
+   {"show_grants",          (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_GRANTS]), SHOW_LONG_STATUS},
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-userstats.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-acc-pslist.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list