GoogleCloudPlatform / GoogleCloudPlatform/spanner-migration-tool

Fix : mysqldump parser not able to parse ordering of the index key

Open
#96 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PLpgSQL
Stars
155
Forks
83
Avg merge
3d 7h
Merged PRs (30d)
6

Description

## Expected Behavior

We should be able to get the ordering (i.e, ascending/descending) of the key columns involved in the index.

## Actual Behavior

The mysqldump parser has no attribute in *ast.IndexPartSpecification which can be mapped to the ordering of the key column.

Find alternative way to get the ordering of the key column in the index. currently default ordering is kept to ascending.
The fix is needed in mysql/mysqldump.go in toSchemaKeys function.

```
func toSchemaKeys(columns []*ast.IndexPartSpecification) (keys []schema.Key) {
for _, colname := range columns {
keys = append(keys, schema.Key{Column: colname.Column.Name.String()})
}
return keys
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.