-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Definition ========== Implement the SET PATH statement. The grammar differs from the Jira ticket where the equal sign is required: ``` SET PATH= 'schema1, schema2, schema3'; ``` Function -------- In MariaDB, the SQL-path will also be used to lookup packages in package routine invocations, so the following script: SET PATH='sys'; SELECT UTL_ENCODE.BASE64_DECODE('data'); invokes SYS.UTL_ENCODE.BASE64_DECODE('data'), i.e. the function BASE64_DECODE() in the packge UTL_ENCODE in the database SYS (if such package and package routine exist). MariaDB implementation details ------------------------------ The ticket's requirement stated the grammar should support delimited identifiers with backticks or double quotes within the string quote, ie: the single tick. A simple parser was implemented to handle this requirement in Sql_path::from_text. Only 16 schemas are supported per session - we do not want too many schemas in the path anyway since it will impact performance. This also means that the path cache is a simple static array for easier memory management. Internal schemas (mariadb_schema, oracle_schema) are supported in paths. Only the first internal schema in the path will be used to resolve native routines to their respective versions.
- Loading branch information
1 parent
9f5adf0
commit 9245539
Showing
53 changed files
with
12,229 additions
and
3,496 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Drop the current db. This de-selects any db. | ||
CREATE DATABASE deselect_db; | ||
USE deselect_db; | ||
DROP DATABASE deselect_db; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.