github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/mo_cloud/information_schema.sql (about)

     1  select
     2      collation_name,
     3      character_set_name,
     4      lower(is_default) = 'yes' as is_default
     5  from
     6      information_schema.collations;
     7  
     8  select
     9       grantee,
    10       table_schema,
    11       privilege_type,
    12       is_grantable
    13  from
    14      information_schema.schema_privileges;
    15  
    16  select
    17       from_host,
    18       from_user,
    19       to_host,
    20       to_user,
    21       with_admin_option
    22  from
    23       mysql.role_edges
    24  order by
    25       to_user,
    26       to_host;
    27  
    28  select
    29       event_name,
    30       event_comment,
    31       definer,
    32       event_type = 'RECURRING' recurring,
    33       interval_value,
    34       interval_field,
    35       cast(coalesce(starts, execute_at) as char) starts,
    36       cast(ends as char) ends,
    37       status,
    38       on_completion = 'PRESERVE' preserve,
    39       last_executed
    40  from
    41       information_schema.events
    42  where
    43       event_schema = 'system';
    44  
    45  select
    46       c.constraint_name,
    47       c.constraint_schema,
    48       c.table_name,
    49       c.constraint_type,
    50       c.enforced = 'YES' enforced
    51  from
    52      information_schema.table_constraints c
    53  where
    54      c.table_schema = 'system';
    55  
    56  select
    57      from_host,
    58      from_user,
    59      to_host,
    60      to_user,
    61      with_admin_option
    62  from
    63      mysql.role_edges
    64  order by
    65      to_user,
    66      to_host;
    67  
    68  select
    69      grantee,
    70      table_name,
    71      column_name,
    72      privilege_type,
    73      is_grantable
    74  from
    75      information_schema.column_privileges
    76  where
    77      table_schema = 'system'
    78      union all
    79  select
    80      grantee,
    81      table_name,
    82      '' column_name,
    83      privilege_type,
    84      is_grantable
    85  from
    86      information_schema.table_privileges
    87  where
    88      table_schema = 'system'
    89  order by
    90      table_name,
    91      grantee,
    92      privilege_type;
    93  
    94  select
    95      grantee,
    96      table_name,
    97      column_name,
    98      privilege_type,
    99      is_grantable
   100  from
   101      information_schema.column_privileges
   102  where
   103      table_schema = 'system_metrics'
   104  union all
   105  select
   106      grantee,
   107      table_name,
   108      '' column_name,
   109      privilege_type,
   110      is_grantable
   111  from
   112      information_schema.table_privileges
   113  where
   114      table_schema = 'system_metrics'
   115  order by
   116      table_name,
   117      grantee,
   118      privilege_type;