Categorygithub.com/coderushing/tidb
modulepackage
1.1.0-beta
Repository: https://github.com/coderushing/tidb.git
Documentation: pkg.go.dev

# README

Build Status Go Report Card Project Status CircleCI Status Coverage Status

What is TiDB?

TiDB (The pronunciation is: /'taɪdiːbi:/ tai-D-B, etymology: titanium) is a Hybrid Transactional/Analytical Processing (HTAP) database. Inspired by the design of Google F1 and Google Spanner, TiDB features infinite horizontal scalability, strong consistency, and high availability. The goal of TiDB is to serve as a one-stop solution for online transactions and analyses.

  • Horizontal scalability

Grow TiDB as your business grows. You can increase the capacity for storage and computation simply by adding more machines.

  • Compatible with MySQL protocol

Use TiDB as MySQL. You can replace MySQL with TiDB to power your application without changing a single line of code in most cases.

  • Automatic Failover and high availability

Your data and applications are always-on. TiDB automatically handles malfunctions and protects your applications from machine failures or even downtime of an entire data-center.

  • Consistent distributed transactions

Think of TiDB as a single-machine RDBMS. You can start a transaction that crosses multiple machines without worrying about consistency. TiDB makes your application code simple and robust.

  • Online DDL

Evolve TiDB schemas as your requirement changes. You can add new columns and indexes without stopping or affecting the on-going operations.

  • Multiple storage engine support

Power TiDB with your most favorite engines. TiDB supports local storage engines such as GolevelDB, as well as TiKV, a distributed storage engine.

For more details, see How we build TiDB.

Roadmap

Read the Roadmap.

Quick start

Read the Quick Start.

Documentation

Architecture

architecture

Contributing

Contributions are welcomed and greatly appreciated. See CONTRIBUTING.md for details on submitting patches and the contribution workflow.

Connect with us

License

TiDB is under the Apache 2.0 license. See the LICENSE file for details.

Acknowledgments

# Packages

Package ast is the abstract syntax tree parsed from a SQL statement by parser.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

BootstrapSession runs the first time when the TiDB server start.
Compile is safe for concurrent use by multiple goroutines.
CreateSession creates a new session environment.
CreateSession4Test creates a new session environment for test.
DialPumpClientWithRetry tries to dial to binlogSocket, if any error happens, it will try to re-dial, or return this error when timeout.
GetDomain gets the associated domain for store.
GetHistory get all stmtHistory in current txn.
GetRows4Test gets all the rows from a RecordSet, only used for test.
IsQuery checks if a sql statement is a query statement.
NewStore creates a kv Storage with path.
Parse parses a query string to raw ast.StmtNode.
RegisterStore registers a kv storage with unique name and its associated Driver.
SetCommitRetryLimit setups the maximum number of retries when trying to recover from retryable errors.
SetSchemaLease changes the default schema lease time for DDL.
SetStatsLease changes the default stats lease time for loading stats info.

# Constants

CreateColumnPrivTable is the SQL statement creates column scope privilege table in system db.
CreateDBPrivTable is the SQL statement creates DB scope privilege table in system db.
CreateGCDeleteRangeTable stores schemas which can be deleted by DeleteRange.
CreateGloablVariablesTable is the SQL statement creates global variable table in system db.
CreateHelpTopic is the SQL statement creates help_topic table in system db.
CreateStatsBucketsTable stores the histogram info for every table columns.
CreateStatsColsTable stores the statistics of table columns.
CreateStatsMetaTable stores the meta of table statistics.
CreateTablePrivTable is the SQL statement creates table scope privilege table in system db.
CreateTiDBTable is the SQL statement creates a table in system db.
CreateUserTable is the SQL statement creates User table in system db.

# Variables

SchemaChangedWithoutRetry is used for testing.
SchemaOutOfDateRetryInterval is the sleeping time when we fail to try.
SchemaOutOfDateRetryTimes is upper bound of retry times when the schema is out of date.

# Structs

StmtHistory holds all histories of statements in a txn.
TxnState wraps kv.Transaction to provide a new kv.Transaction.

# Interfaces

Session context.