~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Brian Aker
  • Date: 2009-03-25 22:52:34 UTC
  • mfrom: (934.2.28 small-cleanups)
  • Revision ID: brian@tangent.org-20090325225234-2ewmv7ma3kh858jk
Merge with Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
1052
1052
    {
1053
1053
      Security_context *tmp_sctx= &tmp->security_ctx;
1054
1054
      struct st_my_thread_var *mysys_var;
1055
 
      if ((tmp->drizzleclient_vio_ok() || tmp->system_thread) && (!user || (tmp_sctx->user.c_str() && !strcmp(tmp_sctx->user.c_str(), user))))
 
1055
      if (tmp->drizzleclient_vio_ok() && (!user || (tmp_sctx->user.c_str() && !strcmp(tmp_sctx->user.c_str(), user))))
1056
1056
      {
1057
1057
        thread_info *session_info= new thread_info;
1058
1058
 
1059
1059
        session_info->thread_id=tmp->thread_id;
1060
 
        session_info->user= session->strdup(tmp_sctx->user.c_str() ? tmp_sctx->user.c_str() :
1061
 
                                    (tmp->system_thread ?
1062
 
                                     "system user" : "unauthenticated user"));
 
1060
        session_info->user= session->strdup(tmp_sctx->user.c_str() ? tmp_sctx->user.c_str() : "unauthenticated user");
1063
1061
        session_info->host= session->strdup(tmp_sctx->ip.c_str());
1064
1062
        if ((session_info->db=tmp->db))             // Safe test
1065
1063
          session_info->db=session->strdup(session_info->db);
1147
1145
      struct st_my_thread_var *mysys_var;
1148
1146
      const char *val;
1149
1147
 
1150
 
      if ((!tmp->drizzleclient_vio_ok() && !tmp->system_thread))
 
1148
      if (! tmp->drizzleclient_vio_ok())
1151
1149
        continue;
1152
1150
 
1153
1151
      restore_record(table, s->default_values);
1154
1152
      /* ID */
1155
1153
      table->field[0]->store((int64_t) tmp->thread_id, true);
1156
1154
      /* USER */
1157
 
      val= tmp_sctx->user.c_str() ? tmp_sctx->user.c_str() :
1158
 
            (tmp->system_thread ? "system user" : "unauthenticated user");
 
1155
      val= tmp_sctx->user.c_str() ? tmp_sctx->user.c_str() : "unauthenticated user";
1159
1156
      table->field[1]->store(val, strlen(val), cs);
1160
1157
      /* HOST */
1161
1158
      table->field[2]->store(tmp_sctx->ip.c_str(), strlen(tmp_sctx->ip.c_str()), cs);