Skip to content

Conversation

@ixcat
Copy link

@ixcat ixcat commented Aug 21, 2017

Recast the mysql InternalError to DataJointError in the specific case of extra columns given in insert-from-select queries.

@coveralls
Copy link

coveralls commented Aug 21, 2017

Coverage Status

Coverage decreased (-0.03%) to 92.583% when pulling 03fd892 on ixcat:sqlexcept-357 into fb34601 on datajoint:master.

except pymysql.err.InternalError as err:
if err.args[0] == server_error_codes['unknown column']:
# args[1] -> Unknown column 'extra' in 'field list'
raise DataJointError('%s : set ignore_extra_fields?' % err.args[1])
Copy link
Member

Choose a reason for hiding this comment

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

I would expand the suggestion into a full sentence, e.g. "To ignore extra fields, you may set the ignore_extra_fields argument in insert."

@coveralls
Copy link

coveralls commented Aug 25, 2017

Coverage Status

Coverage decreased (-0.03%) to 92.583% when pulling 0cb9b45 on ixcat:sqlexcept-357 into fb34601 on datajoint:master.

@dimitri-yatsenko dimitri-yatsenko merged commit 2158deb into datajoint:master Aug 25, 2017
@ixcat ixcat deleted the sqlexcept-357 branch October 20, 2017 15:37
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.

3 participants