You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At PlanetScale we have a customer who uses Flyway to run schema migrations, and has some long-running migrations that are being killed by the query timeout. The customer is setting workload=olap to bypass the query timeouts, but some of the schema introspection queries performed by Flyway are failing.
For example, given a keyspace src, the following query fails in OLTP:
mysql> SET workload=olap; SELECT * FROM information_schema.schemata WHERE schema_name = 'src'\G
Query OK, 0 rows affected (0.00 sec)
ERROR 1105 (HY000): target: src.0.primary: vttablet: rpc error: code = InvalidArgument desc = missing bind var __vtschemaname (CallerID: userData1)
Compare this failure to an OLTP workload query.
mysql> SELECT * FROM information_schema.schemata WHERE schema_name = 'src'\G
*************************** 1. row ***************************
CATALOG_NAME: def
SCHEMA_NAME: vt_src
DEFAULT_CHARACTER_SET_NAME: utf8
DEFAULT_COLLATION_NAME: utf8_general_ci
SQL_PATH: NULL
1 row in set (0.01 sec)
Note how the underlying schema name is vt_src. VTTablet is re-writing these queries in OLTP workloads, but not in OLAP (streaming) workloads.
mysql> SELECT * FROM information_schema.schemata WHERE schema_name = 'src'\G
*************************** 1. row ***************************
CATALOG_NAME: def
SCHEMA_NAME: vt_src
DEFAULT_CHARACTER_SET_NAME: utf8
DEFAULT_COLLATION_NAME: utf8_general_ci
SQL_PATH: NULL
1 row in set (0.01 sec)
Next SET workload=olap and re-run query to see it failing:
mysql> SET workload=olap; SELECT * FROM information_schema.schemata WHERE schema_name = 'src'\G
Query OK, 0 rows affected (0.00 sec)
ERROR 1105 (HY000): target: src.0.primary: vttablet: rpc error: code = InvalidArgument desc = missing bind var __vtschemaname (CallerID: userData1)
Binary Version
Version: 15.0.0-SNAPSHOT (Git revision d1e7777c1e54fc20347e61df32617657e1199119 branch 'main') built on Tue Aug 23 12:29:35 UTC 2022 by vitess@buildkitsandbox using go1.18.4 linux/amd64
Operating System and Environment details
Debian GNU/Linux 10 (buster)
Linux 5.11.0-7620-generic
x86_64
Log Fragments
No response
The text was updated successfully, but these errors were encountered:
Overview of the Issue
At PlanetScale we have a customer who uses Flyway to run schema migrations, and has some long-running migrations that are being killed by the query timeout. The customer is setting
workload=olap
to bypass the query timeouts, but some of the schema introspection queries performed by Flyway are failing.For example, given a keyspace
src
, the following query fails in OLTP:Compare this failure to an OLTP workload query.
Note how the underlying schema name is
vt_src
. VTTablet is re-writing these queries in OLTP workloads, but not in OLAP (streaming) workloads.Reproduction Steps
Steps to reproduce this issue:
Set up vitess, for testing I used vttestserver:
Once Vitess is running connect to VTGate.
Confirm query works without OLAP:
Next
SET workload=olap
and re-run query to see it failing:Binary Version
Version: 15.0.0-SNAPSHOT (Git revision d1e7777c1e54fc20347e61df32617657e1199119 branch 'main') built on Tue Aug 23 12:29:35 UTC 2022 by vitess@buildkitsandbox using go1.18.4 linux/amd64
Operating System and Environment details
Log Fragments
No response
The text was updated successfully, but these errors were encountered: