code: func (m *Meta) ListTables(dbID int64) ([]*model.TableInfo, error) {
  	dbKey := m.dbKey(dbID)
  	if err := m.checkDBExists(dbKey); err != nil {
  		return nil, errors.Trace(err)
  	}
  
  	res, err := m.txn.HGetAll(dbKey)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  
  	tables := make([]*model.TableInfo, 0, len(res)/2)
  	for _, r := range res {
  		// only handle table meta
  		tableKey := string(r.Field)
  		if !strings.HasPrefix(tableKey, mTablePrefix) {
  			continue
  		}
  
  		tbInfo := &model.TableInfo{}
  		err = json.Unmarshal(r.Value, tbInfo)
  		if err != nil {
  			return nil, errors.Trace(err)
  		}
  
  		tables = append(tables, tbInfo)
  	}
  
  	return tables, nil
  }
docs: // ListTables shows all tables in database.