Open
Description
Overview of the Issue
An Unknown database 'db_name'
error is returned when a table is created with the CREATE TABLE
statement specifying both db_name.table_name
(assuming the keyspace db_name
exists) for the table name and at least one column is of type TEXT(m)
, where m
is the optional maximum lenght used to determine which kind of text type the column is as described in the mysql docs. If either the lenght or the database name is removed, then it works as expected.
Reproduction Steps
After creating a keyspace, run the following query:
CREATE TABLE keyspace_name.table (col TEXT(1024));
.
Observe the error.
Binary Version
vitess/lite:v21.0.0
Operating System and Environment details
Deployed with the vitess operator
Log Fragments
ERROR 1049 (42000): target: db_name.-.primary: vttablet: rpc error: code = InvalidArgument desc = Unknown database 'db_name' (errno 1049) (sqlstate 42000) (CallerID: db_name): Sql: "create table db_name.table (col TEXT(256))", BindVars: {}