Skip to content

fix(mysql): translate column access error 1143 - #1587

Open
Bhanu73120 wants to merge 1 commit into
datajoint:masterfrom
Bhanu73120:fix/mysql-error-1143
Open

Bhanu73120 wants to merge 1 commit into
datajoint:masterfrom
Bhanu73120:fix/mysql-error-1143

Conversation

@Bhanu73120

Copy link
Copy Markdown

Summary

Fixes #1586.

This PR updates the MySQL adapter's translate_error() method to recognize MySQL error code 1143 (column-level permission denied) and translate it into DataJoint's AccessError.

Changes

  • Added MySQL error code 1143 to the existing access-error handling.
  • Added a regression test in tests/unit/test_adapters.py.

Testing

  • Verified the regression test fails without the fix and passes with it.
  • Ran the adapter unit tests: 67 passed.
  • Ruff lint checks passed.
  • Ruff formatting checks passed.

Notes

The regression test simulates MySQL error 1143 without requiring a live database. A real MySQL permission-denial integration test has not been performed.

This branch has not been deployed

No deployments
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.

MySQL error 1143 (column-level SELECT denied) is not translated to AccessError

1 participant