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

Rewrite Stream queries that query by schema_name #11090

Merged

Commits on Sep 6, 2022

  1. tabletserver stream replace schema name bindvar

    Tabletserver Execute() replaces bindVars[BvSchemaName] with the tablet
    database name. In practice this means that queries like:
    
      SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'data';
    
    are rewritten to queries like:
    
      SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'vt_data';
    
    Tabletserver Stream() and StreamExecute() do not replicate this
    behavior, breaking queries like the one above when workload is OLAP.
    
    This PR applies the schema-name-replace logic to Stream() and
    StreamExecute().
    
    Signed-off-by: Max Englander <max@planetscale.com>
    maxenglander committed Sep 6, 2022
    Configuration menu
    Copy the full SHA
    093c12d View commit details
    Browse the repository at this point in the history
  2. tabletserver stream replace schema name bindvar: add e2e test

    Signed-off-by: Max Englander <max@planetscale.com>
    maxenglander committed Sep 6, 2022
    Configuration menu
    Copy the full SHA
    ee74889 View commit details
    Browse the repository at this point in the history