Repository navigation
examples/jdbc.load: SQL Server, MySQL and MariaDB read as a whole and as the clerk sees them - #105
Merged
stbischof merged 1 commit intoDec 2, 2026
Conversation
… as the clerk sees them The same shop is created in SQL Server, MySQL and MariaDB and read by the same code: as a whole by a catalog reader holding just the rights the database wants for it, and by the clerk of the shop, who sees its part. SQL Server wants VIEW DEFINITION on the database. Without it a user sees no definition: the clerk's catalog holds the checks without their condition and the trigger without its body, each another one than in the whole catalog, the routines without their bodies and the view without its query. MySQL wants SELECT, SHOW VIEW and TRIGGER on every object, MariaDB these and EXECUTE, as it opens a view to find its columns. Unlike the rights on Oracle and SQL Server, these let the reader read every row of every table as well, and on MariaDB run every routine; neither database has a right that shows the whole structure without them. MySQL does not tell a role from a user, so its parties carry neither stereotype. Its clerk sees no trigger, not the query of the view and neither routine nor their grants, as information_schema leaves out a routine whose EXECUTE comes through a role granted on that routine alone. MariaDB shows its clerk no check and no definition. The tests of the three databases say where a database shows the clerk less than it may use, and why. The README names the right each database wants and what it costs; the documentation of the goal cwm-jdbc:import names these rights beside Oracle's. The metadata provider of H2, which reads its catalog one way only, now names the scope it is asked for: the tests of the import and of the goal read H2 in USER and find the catalog tagged USER. Signed-off-by: Stefan Bischof <stbischof@bipolis.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #104 and builds on eclipse-daanse/org.eclipse.daanse.sql#113: the shop of
examples/jdbc.loadis created in SQL Server, MySQL and MariaDB too and read by the same code, as a whole and as its clerk sees it.The right for the whole database
The whole database is read by a catalog reader holding just the rights the database wants for it:
VIEW DEFINITIONon the database.SELECT, SHOW VIEW, TRIGGER ON *.*.EXECUTE, as it opens a view to find its columns.Unlike the rights on Oracle and SQL Server, those of MySQL and MariaDB let the reader read every row of every table as well, and on MariaDB run every routine; neither database has a right that shows the whole structure without them.
What the clerk sees
The tests of each database say where it shows the clerk less than it may use, and why:
Besides
cwm-jdbc:importnames these rights beside Oracle's.USERand find the catalog taggedUSER.