Skip to content

Studio 3.1.2: a function and a procedure are objects, not labels - #227

Merged
dmitrat merged 1 commit into
mainfrom
studio/3.1.2
Aug 19, 2026
Merged

dmitrat merged 1 commit into
mainfrom
studio/3.1.2

Conversation

@dmitrat

@dmitrat dmitrat commented Aug 19, 2026

Copy link
Copy Markdown
Owner

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 FUNCTION and DROP PROCEDURE since phase 9d and the catalogue already carried the body the inspector was showing.

The menu View definition and Drop, like every other kind of object.
The definition The whole CREATE, assembled from ROUTINES and PARAMETERS. A body without its parameters and return type parses, restores, and is a different routine; parameter types carry length and precision, because DECIMAL(18,2) coming back as DECIMAL rounds differently.
The dump ⚠️ It wrote views, indexes and triggers and no routines at all - a database with functions dumped to a script that restored without them and said nothing.
The summary line It named five folders while the tree drew six, so a database whose only objects are routines was summarised as having nothing in it.

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.

  • Red with the parameters removed from the definition.
  • Red with the routines removed from the dump.
  • Red with the sixth count reverted.
  • One case passed for the wrong reason until it was tightened: the parameter names also appear in the body, so "the definition contains Amount" holds for a definition with no parameters. It now reads the signature.

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 to Routines 0 and the status line said Function deleted: NetPrice.

Studio: 1040 green.

🤖 Generated with Claude Code

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>
@dmitrat
dmitrat merged commit ba00a08 into main Aug 19, 2026
1 check passed
@dmitrat
dmitrat deleted the studio/3.1.2 branch August 19, 2026 14:22
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.

1 participant