Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-24.3: sql: use memo metadata to add routines and UDTs to statement bundles #136124

Open
wants to merge 3 commits into
base: release-24.3
Choose a base branch
from

Commits on Nov 25, 2024

  1. opt: replace "udf" with "routine" in the metadata

    This commit changes the naming of some methods and data structures used
    in query plan metadata to refer to "routines" instead of "udfs". This
    clarifies that stored procedures are also valid targets for metadata
    tracking.
    
    Epic: None
    
    Release note: None
    DrewKimball committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    4dc62d0 View commit details
    Browse the repository at this point in the history
  2. sql: use memo metadata to add routines to statement bundles

    This commit updates the statement bundle logic to take advantage of the
    information stored in the query plan metadata so that only relevant routines
    are shown in `schema.sql` for a statement bundle. In addition, stored
    procedures are now tracked in the metadata in addition to UDFs. This has
    no impact on query-plan caching, since we currently do not cache plans
    that invoke stored procedures.
    
    Fixes cockroachdb#132142
    Fixes cockroachdb#104976
    
    Release note (bug fix): Fixed a bug that prevented the create statement
    for a routine from being shown in a statement bundle. This happened when
    the routine was created on a schema other than `public`. The bug has
    existed since v23.1.
    DrewKimball committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    77781b6 View commit details
    Browse the repository at this point in the history
  3. sql: use memo metadata to add UDTs to statement bundle

    This commit modifies the statement bundle collection logic to use the
    query plan metadata to determine which types to display in `schema.sql`.
    This ensures that only types which are referenced by the query are shown.
    
    Informs cockroachdb#104976
    
    Release note: None
    DrewKimball committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    94bd2ea View commit details
    Browse the repository at this point in the history