~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Brian Aker
  • Date: 2009-04-05 19:53:29 UTC
  • mfrom: (971.3.11 eday-dev)
  • Revision ID: brian@tangent.org-20090405195329-k2vpiwhlri9oaedq
MergeĀ fromĀ Eric.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1041
1041
    {
1042
1042
      Security_context *tmp_sctx= &tmp->security_ctx;
1043
1043
      struct st_my_thread_var *mysys_var;
1044
 
      if (tmp->drizzleclient_vio_ok() && (!user || (tmp_sctx->user.c_str() && !strcmp(tmp_sctx->user.c_str(), user))))
 
1044
      if (tmp->protocol->io_ok() && (!user || (tmp_sctx->user.c_str() && !strcmp(tmp_sctx->user.c_str(), user))))
1045
1045
      {
1046
1046
        thread_info *session_info= new thread_info;
1047
1047
 
1054
1054
        if ((mysys_var= tmp->mysys_var))
1055
1055
          pthread_mutex_lock(&mysys_var->mutex);
1056
1056
        session_info->proc_info= (char*) (tmp->killed == Session::KILL_CONNECTION? "Killed" : 0);
1057
 
        session_info->state_info= (char*) (tmp->net.reading_or_writing ?
1058
 
                                       (tmp->net.reading_or_writing == 2 ?
1059
 
                                        "Writing to net" :
1060
 
                                        session_info->command == COM_SLEEP ? NULL :
1061
 
                                        "Reading from net") :
 
1057
        session_info->state_info= (char*) (tmp->protocol->is_writing() ?
 
1058
                                           "Writing to net" :
 
1059
                                           tmp->protocol->is_reading() ?
 
1060
                                           (session_info->command == COM_SLEEP ?
 
1061
                                            NULL : "Reading from net") :
1062
1062
                                       tmp->get_proc_info() ? tmp->get_proc_info() :
1063
1063
                                       tmp->mysys_var &&
1064
1064
                                       tmp->mysys_var->current_cond ?
1134
1134
      struct st_my_thread_var *mysys_var;
1135
1135
      const char *val;
1136
1136
 
1137
 
      if (! tmp->drizzleclient_vio_ok())
 
1137
      if (! tmp->protocol->io_ok())
1138
1138
        continue;
1139
1139
 
1140
1140
      restore_record(table, s->default_values);
1164
1164
      table->field[5]->store((uint32_t)(tmp->start_time ?
1165
1165
                                      now - tmp->start_time : 0), true);
1166
1166
      /* STATE */
1167
 
      val= (char*) (tmp->net.reading_or_writing ?
1168
 
                    (tmp->net.reading_or_writing == 2 ?
1169
 
                     "Writing to net" :
1170
 
                     tmp->command == COM_SLEEP ? NULL :
1171
 
                     "Reading from net") :
 
1167
      val= (char*) (tmp->protocol->is_writing() ?
 
1168
                    "Writing to net" :
 
1169
                    tmp->protocol->is_reading() ?
 
1170
                    (tmp->command == COM_SLEEP ?
 
1171
                     NULL : "Reading from net") :
1172
1172
                    tmp->get_proc_info() ? tmp->get_proc_info() :
1173
1173
                    tmp->mysys_var &&
1174
1174
                    tmp->mysys_var->current_cond ?