Skip to content

MDEV-39347: Referred databases are not present in the context#4951

Open
bsrikanth-mariadb wants to merge 1 commit intobb-12.3-MDEV-38805-dev-sprint-work-2from
12.3-MDEV-39347-referred-db-create-stmt-not-written-to-ctx
Open

MDEV-39347: Referred databases are not present in the context#4951
bsrikanth-mariadb wants to merge 1 commit intobb-12.3-MDEV-38805-dev-sprint-work-2from
12.3-MDEV-39347-referred-db-create-stmt-not-written-to-ctx

Conversation

@bsrikanth-mariadb
Copy link
Copy Markdown
Contributor

Currently, only create/use DDLs for the database that is in the current thread is stored in the context.
However, we do store CREATE DDL statements of other database tables in the context, if they are referred by the query. So, while replaying the context, if the other database is not present in the system, then we get an error.

== SOLUTION ==
Store CREATE DATABASE DDLs of the databases to the context, if any of those database tables are referred by the original query.

Currently, only create/use DDLs for the database that is in the
current thread is stored in the context.
However, we do store CREATE DDL statements of other database tables
in the context, if they are referred by the query.
So, while replaying the context, if the other database is not present
in the system, then we get an error.

== SOLUTION ==
Store CREATE DATABASE DDLs of the databases to the context, if any of those database tables are referred by the original query.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant