Skip to content

Commit

Permalink
Create system-database.md (pingcap#201)
Browse files Browse the repository at this point in the history
* Create system-database.md

* Address comments

* Update format

* Add description

* Add link for system database
  • Loading branch information
lilin90 authored and QueenyJin committed Sep 27, 2017
1 parent 2643809 commit 74ce128
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ TiDB supports the SQL-92 standard and is compatible with MySQL. To help you easi
+ TiDB Server Administration
- The TiDB Server
- The TiDB Data Directory
- The TiDB System Database
- [The TiDB System Database](system-database.md)
- [The Proprietary System Variables and Syntax in TiDB](tidb-specific.md)
- TiDB Server Logs
+ Security
Expand Down
36 changes: 36 additions & 0 deletions sql/system-database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: The TiDB System Database
category: user guide
---

# The TiDB System Database

The TiDB System Database is similar to MySQL, which contains tables that store information required by the server when it runs.

## Grant System Tables

These system tables contain grant information about user accounts and their privileges:

- `user`: user accounts, global privileges, and other non-privilege columns
- `db`: database-level privileges
- `tables_priv`: table-level privileges
- `columns_priv`: column-level privileges

## Server-Side Help System Tables

Currently, the `help_topic` is NULL.

## Statistics System Tables

- `stats_buckets`: the buckets of statistics
- `stats_histograms`: the histograms of statistics
- `stats_meta`: the meta information of tables, such as the total number of rows and updated rows

## GC Worker System Tables

- `gc_delete_range`: to record the data to be deleted

## Miscellaneous System Tables

- `GLOBAL_VARIABLES`: global system variable table
- `tidb`: to record the version information when TiDB executes `bootstrap`

0 comments on commit 74ce128

Please sign in to comment.