~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_stats/status_tool.cc

  • Committer: Prafulla Tekawade
  • Date: 2010-06-30 16:55:32 UTC
  • mto: (1643.1.3 build) (1662.1.4 rollup)
  • mto: This revision was merged to the branch mainline in revision 1644.
  • Revision ID: prafulla_t@users.sourceforge.net-20100630165532-3og7y5biaqrsqg4s
Reverting the fix for 592473

I checked with mysql source code.
In Join::Optimize code, whenever where condition is optimized, number of
tables to be read this->table needs to be set to zero. This avoided
later code to go over join->join_tab and creating problem such as the bug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
 
117
117
    if (scoreboard_slot != NULL)
118
118
    {
119
 
      /* A copy of the current status vars for a particular session */ 
120
 
      status_var_to_display= new StatusVars(*scoreboard_slot->getStatusVars());
121
 
 
122
 
      /* Sum the current scoreboard this will give us a value for any variables that have global meaning */
123
 
      StatusVars current_scoreboard_status_vars;
124
 
      CumulativeStats *cumulativeStats= logging_stats->getCumulativeStats();
125
 
      cumulativeStats->sumCurrentScoreboard(logging_stats->getCurrentScoreboard(), &current_scoreboard_status_vars, NULL);
126
 
 
127
 
      /* Copy the above to get a value for any variables that have global meaning */  
128
 
      status_var_to_display->copyGlobalVariables(logging_stats->getCumulativeStats()->getGlobalStatusVars());
129
 
      status_var_to_display->copyGlobalVariables(&current_scoreboard_status_vars); 
 
119
      status_var_to_display= scoreboard_slot->getStatusVars();
130
120
    } 
131
121
    else 
132
122
    {
144
134
 
145
135
StatusTool::Generator::~Generator()
146
136
{
147
 
  delete status_var_to_display;
 
137
  if (! isLocal) 
 
138
  {
 
139
    delete status_var_to_display;
 
140
  }
148
141
}
149
142
 
150
143
bool StatusTool::Generator::populate()