Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddl: correct comments mistake. #3119

Merged
merged 2 commits into from
Apr 25, 2017

Conversation

zhexuany
Copy link
Contributor

No description provided.

@@ -38,7 +38,7 @@ type testTableSuite struct {
d *ddl
}

// create a test table with num int columns and with no index.
// testTableInfo create a test table with num int columns and with no index.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create -> creates

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

ddl/ddl_api.go Outdated
@@ -684,12 +684,13 @@ func (d *ddl) CreateTable(ctx context.Context, ident ast.Ident, colDefs []*ast.C
return errors.Trace(err)
}

// If create table with auto_increment option, we should rebase tableAutoIncID value.
// handleAutoIncID increases AutoIncID by one. Rebase table's AutoIncID value, when table created with auto_increment option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleAutoIncID handles auto_increment option in DDL. It creates a ID counter for the table and initiates the counter to a proper value.
For example if the option sets auto_increment to 10. The counter will be set to 9. So the next allocated ID will be 10.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

ddl/ddl_api.go Outdated
@@ -704,7 +705,7 @@ func (d *ddl) handleAutoIncID(tbInfo *model.TableInfo, schemaID int64) error {
return nil
}

// Add create table options into TableInfo.
// handleTableOptions update tableInfo according to table options.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update -> updates

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

ddl/ddl.go Outdated
@@ -150,14 +150,15 @@ func (e *Event) String() string {
return ret
}

// ddl is data definition language which defines basic operation such as create, alter and select.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

select is not DDL, but DML.

ddl represents the statements which are used to define the database structure or schema.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

@XuHuaiyu
Copy link
Contributor

@zimulala PTAL

ddl/column.go Outdated
@@ -265,6 +265,7 @@ func (d *ddl) onDropColumn(t *meta.Meta, job *model.Job) error {
return errors.Trace(err)
}

// addTableColumn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addTableColumn adds a column to the table.

ddl/ddl.go Outdated
@@ -177,7 +178,7 @@ type ddl struct {
wait sync.WaitGroup
}

// BindStatsHandle will bind the stats handle with a DDL interface. It will be called after a handle has been initialized.
// RegisterEventCh registers passed channel for ddl Event
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add . at the end of a line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

// For every lease, we will re-update the whole schema, so we will wait 2 * lease time
// to guarantee that all servers have already updated schema.
// waitSchemaChanged wait for the completion of updating all servers' schemea. In order to make sure that happens,
// we wait 2 * lease time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/wait/waits

ddl/index.go Outdated
@@ -466,6 +466,8 @@ type indexTaskOpInfo struct {
nextCh chan int64 // It notifies to start the next task.
}

// addTableIndex adds index into table.
// TODO move this to doc or wiki
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/TODO/TODO:
s/move/Move
Add . at the end of a line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

@zhexuany
Copy link
Contributor Author

@XuHuaiyu @zimulala PTAL

@zhexuany zhexuany force-pushed the fixed_spelling_mistake_in_ddl branch from bca9774 to 6f90337 Compare April 24, 2017 11:18
@zimulala
Copy link
Contributor

LGTM

@@ -409,8 +409,8 @@ func toTError(err error) *terror.Error {
return terror.ClassDDL.New(terror.CodeUnknown, err.Error())
}

// For every lease, we will re-update the whole schema, so we will wait 2 * lease time
// to guarantee that all servers have already updated schema.
// waitSchemaChanged waits for the completion of updating all servers' schemea. In order to make sure that happens,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/schemea/schema

@zhexuany zhexuany force-pushed the fixed_spelling_mistake_in_ddl branch from 6f90337 to d0a0c01 Compare April 24, 2017 14:12
@zhexuany zhexuany force-pushed the fixed_spelling_mistake_in_ddl branch from d0a0c01 to 0f211a3 Compare April 24, 2017 17:31
@zhexuany
Copy link
Contributor Author

@XuHuaiyu PTAL

@zimulala zimulala added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 25, 2017
@XuHuaiyu
Copy link
Contributor

LGTM

@hanfei1991 hanfei1991 merged commit fcc34b7 into pingcap:master Apr 25, 2017
@zhexuany zhexuany deleted the fixed_spelling_mistake_in_ddl branch April 25, 2017 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants