Skip to content

Commit

Permalink
fix: show index from database
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Mar 26, 2024
1 parent 9ad45d5 commit 5e6a6c6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ show tables;
| triggers |
+---------------------------------------+

use public;

Affected Rows: 0

2 changes: 2 additions & 0 deletions tests/cases/standalone/common/show/show_databases_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ show databases;
use information_schema;

show tables;

use public;
9 changes: 7 additions & 2 deletions tests/cases/standalone/common/show/show_index.result
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ SHOW INDEX FROM system_metrics;

SHOW INDEX FROM system_metrics in public;

++
++
+----------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+----------------------------+---------+---------------+---------+------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Visible | Expression |
+----------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+----------------------------+---------+---------------+---------+------------+
| system_metrics | 1 | PRIMARY | 1 | host | A | | | | YES | greptime-inverted-index-v1 | | | YES | |
| system_metrics | 1 | PRIMARY | 2 | idc | A | | | | YES | greptime-inverted-index-v1 | | | YES | |
| system_metrics | 1 | TIME INDEX | 1 | ts | A | | | | NO | greptime-inverted-index-v1 | | | YES | |
+----------------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+----------------------------+---------+---------------+---------+------------+

SHOW INDEX FROM system_metrics like '%util%';

Expand Down

0 comments on commit 5e6a6c6

Please sign in to comment.