~tsarev/percona-server/5.5-processlist_rows_stats-sporadic_fails-fix

« back to all changes in this revision

Viewing changes to processlist_row_stats.patch

  • Committer: Oleg Tsarev
  • Date: 2011-05-11 13:27:33 UTC
  • mto: This revision was merged to the branch mainline in revision 110.
  • Revision ID: oleg.tsarev@percona.com-20110511132733-hvqta1d712hp9ozr
port to 5.5.12 second part

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
20
20
--- a/sql/sql_show.cc   2011-03-09 17:07:26.251706801 +0200
21
21
+++ b/sql/sql_show.cc   2011-03-09 17:07:44.904163954 +0200
22
 
@@ -1759,7 +1759,8 @@
 
22
@@ -1766,7 +1766,8 @@
23
23
 
24
24
 /****************************************************************************
25
25
   Return info about all processes
29
29
 ****************************************************************************/
30
30
 
31
31
 class thread_info :public ilink {
32
 
@@ -1777,6 +1778,7 @@
 
32
@@ -1784,6 +1785,7 @@
33
33
   uint   command;
34
34
   const char *user,*host,*db,*proc_info,*state_info;
35
35
   CSET_STRING query_string;
37
37
 };
38
38
 
39
39
 #ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
40
 
@@ -1829,6 +1831,15 @@
 
40
@@ -1836,6 +1838,15 @@
41
41
   field->maybe_null=1;
42
42
   field_list.push_back(field=new Item_empty_string("Info",max_query_length));
43
43
   field->maybe_null=1;
53
53
   if (protocol->send_result_set_metadata(&field_list,
54
54
                             Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
55
55
     DBUG_VOID_RETURN;
56
 
@@ -1882,6 +1893,9 @@
 
56
@@ -1889,6 +1900,9 @@
57
57
           thd_info->query_string=
58
58
             CSET_STRING(q, q ? length : 0, tmp->query_charset());
59
59
         }
63
63
         mysql_mutex_unlock(&tmp->LOCK_thd_data);
64
64
         thd_info->start_time= tmp->start_time;
65
65
         thread_infos.append(thd_info);
66
 
@@ -1910,6 +1924,9 @@
 
66
@@ -1917,6 +1931,9 @@
67
67
     protocol->store(thd_info->state_info, system_charset_info);
68
68
     protocol->store(thd_info->query_string.str(),
69
69
                     thd_info->query_string.charset());
73
73
     if (protocol->write())
74
74
       break; /* purecov: inspected */
75
75
   }
76
 
@@ -2020,6 +2037,15 @@
 
76
@@ -2027,6 +2044,15 @@
77
77
       table->field[8]->store(((tmp->start_utime ?
78
78
                                now_utime - tmp->start_utime : 0)/ 1000));
79
79
 
89
89
       if (schema_table_store_record(thd, table))
90
90
       {
91
91
         mysql_mutex_unlock(&LOCK_thread_count);
92
 
@@ -7941,6 +7967,12 @@
 
92
@@ -7947,6 +7973,12 @@
93
93
    SKIP_OPEN_TABLE},
94
94
   {"TIME_MS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG,
95
95
    0, 0, "Time_ms", SKIP_OPEN_TABLE},