Studio 3.1.2: a function and a procedure are objects, not labels - #227
Merged
Merged
Conversation
Engine 14.0.1, which is the first reason for this release: two planner defects found by using Studio were fixed in the engine the same day, and Studio needed no change for either - it needed the engine. Known issue 27. The sixth folder arrived with WS-21 and nothing else did: a routine's context menu offered one item, Refresh, while the engine has had DROP FUNCTION and DROP PROCEDURE since phase 9d and the catalogue already carried the body the inspector was showing. It now offers View definition and Drop, like every other kind of object. The definition is the whole CREATE, assembled from INFORMATION_SCHEMA.ROUTINES and PARAMETERS: a body without its parameters and return type parses, restores, and is a DIFFERENT routine. The parameter types carry their length and precision for the same reason - DECIMAL(18,2) coming back as DECIMAL is a routine that rounds differently. What the catalogue cannot render is NAMED rather than half-written. TWO THINGS FOUND BESIDE IT, and both were worse than the missing menu item: - the DUMP wrote views, indexes and triggers and no routines at all, so a database with functions dumped to a script that restored without them and said nothing; - the summary line under the tree named five folders while the tree drew six, so a database whose only objects are routines was summarised as having nothing in it. The test that matters is not that a definition appears but that it RUNS BACK: each routine is dropped and the text Studio wrote is executed, and the routine is there again. Red with the parameters removed, red with the dump's routines removed, red with the sixth count reverted. Driven against a fresh build: the menu, the definition tab, the confirmation naming the FUNCTION rather than "routine", and the drop itself. Studio: 1040 green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Engine 14.0.1, which is the first reason for this release: two planner defects found by using Studio were fixed in the engine the same day (#226). Studio needed no change for either - it needed the engine.
Known issue 27, and two things found beside it
The sixth folder arrived with WS-21 and nothing else did. A routine's context menu offered one item, Refresh, while the engine has had
DROP FUNCTIONandDROP PROCEDUREsince phase 9d and the catalogue already carried the body the inspector was showing.CREATE, assembled fromROUTINESandPARAMETERS. A body without its parameters and return type parses, restores, and is a different routine; parameter types carry length and precision, becauseDECIMAL(18,2)coming back asDECIMALrounds differently.The dump and the summary were found while fixing the menu, and both are worse than the menu was.
The guard
ARoutineIsAnObjectLikeAnyOtherTests, ten cases. The one that matters does not assert that a definition appears but that it runs back: the routine is dropped, the text Studio wrote is executed, and the routine is there again - for a function and for a procedure.Driven against a fresh build
The menu, the definition tab (
CREATE FUNCTION DiscountedTotal(Amount DECIMAL, Percent INTEGER) RETURNS DECIMAL …), the confirmation naming the function rather than "routine", and the drop itself - the tree went toRoutines 0and the status line said Function deleted: NetPrice.Studio: 1040 green.
🤖 Generated with Claude Code