summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc22
1 files changed, 8 insertions, 14 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index e481a961288..3e99704e80c 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -473,6 +473,8 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
field_list.push_back(item=new Item_empty_string("Name",NAME_LEN));
field_list.push_back(item=new Item_empty_string("Engine",10));
item->maybe_null=1;
+ field_list.push_back(item=new Item_int("Version", (longlong) 0, 21));
+ item->maybe_null=1;
field_list.push_back(item=new Item_empty_string("Row_format",10));
item->maybe_null=1;
field_list.push_back(item=new Item_int("Rows",(longlong) 1,21));
@@ -529,11 +531,11 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
}
else
{
- struct tm tm_tmp;
const char *str;
handler *file=table->file;
file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_NO_LOCK);
protocol->store(file->table_type(), system_charset_info);
+ protocol->store((ulonglong) table->frm_version);
str= ((table->db_options_in_use & HA_OPTION_COMPRESS_RECORD) ?
"Compressed" :
(table->db_options_in_use & HA_OPTION_PACK_RECORD) ?
@@ -562,24 +564,21 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
protocol->store_null();
else
{
- localtime_r(&file->create_time,&tm_tmp);
- localtime_to_TIME(&time, &tm_tmp);
+ thd->variables.time_zone->gmt_sec_to_TIME(&time, file->create_time);
protocol->store(&time);
}
if (!file->update_time)
protocol->store_null();
else
{
- localtime_r(&file->update_time,&tm_tmp);
- localtime_to_TIME(&time, &tm_tmp);
+ thd->variables.time_zone->gmt_sec_to_TIME(&time, file->update_time);
protocol->store(&time);
}
if (!file->check_time)
protocol->store_null();
else
{
- localtime_r(&file->check_time,&tm_tmp);
- localtime_to_TIME(&time, &tm_tmp);
+ thd->variables.time_zone->gmt_sec_to_TIME(&time, file->check_time);
protocol->store(&time);
}
str= (table->table_charset ? table->table_charset->name : "default");
@@ -1251,7 +1250,7 @@ store_create_info(THD *thd, TABLE *table, String *packet)
packet->append(' ');
// check for surprises from the previous call to Field::sql_type()
if (type.ptr() != tmp)
- type.set(tmp, sizeof(tmp),&my_charset_bin);
+ type.set(tmp, sizeof(tmp), system_charset_info);
field->sql_type(type);
packet->append(type.ptr(), type.length(), system_charset_info);
@@ -1540,13 +1539,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
while ((tmp=it++))
{
struct st_my_thread_var *mysys_var;
-#ifndef EMBEDDED_LIBRARY
- if ((tmp->net.vio || tmp->system_thread) &&
+ if ((tmp->vio_ok() || tmp->system_thread) &&
(!user || (tmp->user && !strcmp(tmp->user,user))))
-#else
- if (tmp->system_thread &&
- (!user || (tmp->user && !strcmp(tmp->user,user))))
-#endif
{
thread_info *thd_info=new thread_info;