Logger is disabled!

Turn on!

Clear logs


Treads count: 2 Rows: 11, Pages: 1

Thread ID Command type Argument Event time Server ID User host
136409 Query
set 
  global general_log = "off"
Roll up Roll up
0 root[root] @ localhost []
another thread
136410 Quit
0 root[root] @ localhost []
136410 Query
set 
  names utf8
Roll up Roll up
0 root[root] @ localhost []
136410 Query
show variables 
where 
  Variable_name in ('log_output', 'general_log')
Roll up Roll up
0 root[root] @ localhost []
136410 Query
show keys 
from 
  general_log
Roll up Roll up
0 root[root] @ localhost []
136410 Query
show databases
Roll up Roll up
0 root[root] @ localhost []
136410 Query
select 
  distinct command_type 
from 
  general_log
Roll up Roll up
0 root[root] @ localhost []
136410 Query
select 
  count(*) 
from 
  general_log t 
  inner join (
    select 
      thread_id, 
      concat(
        UNIX_TIMESTAMP(
          max(event_time)
        ), 
        ' ', 
        thread_id
      ) as maxTime 
    from 
      general_log 
    group by 
      thread_id
  ) t2 on t.thread_id = t2.thread_id 
  left join (
    select 
      s1.thread_id, 
      s1.command_type, 
      s1.argument 
    from 
      general_log s1 
      inner join (
        select 
          thread_id, 
          max(event_time) as event_time 
        from 
          general_log 
        where 
          command_type in ('Connect', 'Init DB') 
        group by 
          thread_id
      ) s2 on s1.thread_id = s2.thread_id 
      and s1.event_time = s2.event_time 
    where 
      s1.command_type in ('Connect', 'Init DB') 
    group by 
      s1.thread_id 
    order by 
      s1.event_time desc
  ) as currentDb on currentDb.thread_id = t.thread_id
Roll up Roll up
0 root[root] @ localhost []
136410 Query
select 
  count(distinct t.thread_id) 
from 
  general_log t 
  inner join (
    select 
      thread_id, 
      concat(
        UNIX_TIMESTAMP(
          max(event_time)
        ), 
        ' ', 
        thread_id
      ) as maxTime 
    from 
      general_log 
    group by 
      thread_id
  ) t2 on t.thread_id = t2.thread_id 
  left join (
    select 
      s1.thread_id, 
      s1.command_type, 
      s1.argument 
    from 
      general_log s1 
      inner join (
        select 
          thread_id, 
          max(event_time) as event_time 
        from 
          general_log 
        where 
          command_type in ('Connect', 'Init DB') 
        group by 
          thread_id
      ) s2 on s1.thread_id = s2.thread_id 
      and s1.event_time = s2.event_time 
    where 
      s1.command_type in ('Connect', 'Init DB') 
    group by 
      s1.thread_id 
    order by 
      s1.event_time desc
  ) as currentDb on currentDb.thread_id = t.thread_id
Roll up Roll up
0 root[root] @ localhost []
136410 Query
select 
  t.*, 
  if (
    t.command_type = 'Connect', 
    0, 
    if (t.command_type = 'Quit', 2, 1)
  ) as orderTypeKey, 
  currentDb.command_type as db_command_type, 
  currentDb.argument as db_argument 
from 
  general_log t 
  inner join (
    select 
      thread_id, 
      concat(
        UNIX_TIMESTAMP(
          max(event_time)
        ), 
        ' ', 
        thread_id
      ) as maxTime 
    from 
      general_log 
    group by 
      thread_id
  ) t2 on t.thread_id = t2.thread_id 
  left join (
    select 
      s1.thread_id, 
      s1.command_type, 
      s1.argument 
    from 
      general_log s1 
      inner join (
        select 
          thread_id, 
          max(event_time) as event_time 
        from 
          general_log 
        where 
          command_type in ('Connect', 'Init DB') 
        group by 
          thread_id
      ) s2 on s1.thread_id = s2.thread_id 
      and s1.event_time = s2.event_time 
    where 
      s1.command_type in ('Connect', 'Init DB') 
    group by 
      s1.thread_id 
    order by 
      s1.event_time desc
  ) as currentDb on currentDb.thread_id = t.thread_id 
order by 
  t2.maxTime desc, 
  t.event_time desc, 
  orderTypeKey desc 
LIMIT 
  100 OFFSET 0
Roll up Roll up
0 root[root] @ localhost []
136410 Connect
root@localhost on mysql
Roll up Roll up
0 [root] @ localhost []

Treads count: 2 Rows: 11, Pages: 1

Loading...