vitess: vtgate throws invalid table name while table can be queried through mysql

Overview of the Issue

Migrated some dbs to a vitess cluster (mysql 5.7). When I query through the vtgate I get ERROR: vtgate: http://db-zone1-vtgate-xxxxxxxxxxx: invalid table name: db.Language

When connecting to the mysql client with user vt_dba directly I get the proper response.

$ mysql -uvt_dba -S /vt/socket/mysql.sock
mysql> use vt_db;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from Language;
+--------+--------------+
| langID | languageText |
+--------+--------------+
|      1 | normal       |
|      2 | no           |
|      3 | en           |
+--------+--------------+
3 rows in set (0.00 sec)

Is it due to Language actually being a reserved keyword in mysql that vtgate fails calling the query?

Reproduction Steps

Steps to reproduce this issue, example:

  1. Deploying an unsharded keyspace with helm chart using the :latest image tags

  2. Create a table named Language

   CREATE TABLE `Language` (
 `langID` int(11) NOT NULL AUTO_INCREMENT,
 `languageText` varchar(50) NOT NULL,
 PRIMARY KEY (`langID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
  1. Run SELECT * FROM Language

Operating system and Environment details

vitess installed via helm chart on kubernetes images: all using latest tag

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (11 by maintainers)

Most upvoted comments

We have found the issue. The fix is here: https://github.com/vitessio/vitess/pull/7511

In that case, I’ll invoke the experts for a drill down.