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

importccl: Improve error messages when importing mysql dump. #45958

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

miretskiy
Copy link
Contributor

Improve error reporting when importing mysql tables
using unsupported features (such as fulltext index).

Prior to this change, if we attempt to import:
CREATE TABLE posts (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(255) NOT NULL,
body TEXT,
PRIMARY KEY (id),
FULLTEXT KEY (body )
)

We would receive an error message:
error executing 'IMPORT TABLE posts FROM MYSQLDUMP ($1)':
pq: could not read definition for table "posts" (possible unsupported type?)

After this change, the error reporting improves to:
error executing 'IMPORT TABLE posts FROM MYSQLDUMP ($1)': pq: mysql parse error:
syntax error at position 914 near 'fulltext'

Release justification: Bug fix; minor, low/no impact formatting
change in the error messages.

@miretskiy miretskiy requested a review from dt March 10, 2020 19:21
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@miretskiy
Copy link
Contributor Author

Fixes #29625

@dt
Copy link
Member

dt commented Mar 10, 2020

Fixes line has to be in PR text -- comments don't count for issue-linking.

Copy link
Member

@dt dt left a comment

Choose a reason for hiding this comment

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

commit message needs a Release Note

Improve error reporting when importing mysql tables
using unsupported features (such as fulltext index).

Prior to this change, if we attempt to import:
CREATE TABLE posts (
  id INT NOT NULL AUTO_INCREMENT,
  title VARCHAR(255) NOT NULL,
  body TEXT,
  PRIMARY KEY (id),
  FULLTEXT KEY (body )
)

We would receive an error message:
  error executing 'IMPORT TABLE posts FROM MYSQLDUMP ($1)':
     pq: could not read definition for table "posts" (possible unsupported type?)

After this change, the error reporting improves to:
  error executing 'IMPORT TABLE posts FROM MYSQLDUMP ($1)': pq: mysql parse error:
    syntax error at position 914 near 'fulltext'

Release justification: Bug fix; minor, low/no impact formatting
change in the error messages.
Release note: improve error messages when importing mysql dump data.
@miretskiy
Copy link
Contributor Author

miretskiy commented Mar 10, 2020 via email

@dt
Copy link
Member

dt commented Mar 10, 2020

Release note requires a category parenthetical

@miretskiy
Copy link
Contributor Author

bors r+

@dt
Copy link
Member

dt commented Mar 10, 2020

@miretskiy the release note here still looks malformed (it needs the categorization field for the script to group it).

@craig
Copy link
Contributor

craig bot commented Mar 10, 2020

Build succeeded

@craig craig bot merged commit f430d20 into cockroachdb:master Mar 10, 2020
@miretskiy miretskiy deleted the fulltext branch April 27, 2020 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants