david_hudavy created DRILL-4290:
-----------------------------------

             Summary: Run select count(1) from mysql.user,it throws 
error.Error: PARSE ERROR: Encountered ". user" at line 1
                 Key: DRILL-4290
                 URL: https://issues.apache.org/jira/browse/DRILL-4290
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: 1.4.0
         Environment: drill1.4
            Reporter: david_hudavy



I have performing some select commands tests of drill.

Test case 1:  user is mysql table, it is error. 
0: jdbc:drill:zk=SC-1:6181,SC-2:6181,PL-3:618> select count(1) from mysql.user;
Error: PARSE ERROR: Encountered ". user" at line 1, column 32.
Was expecting one of:
    <EOF>
    "ORDER" ...
while parsing SQL query:
select count(1) from mysql.user
                               ^
[Error Id: 484485a4-6e0a-45cd-892a-099236319109 on SC-1:31010] (state=,code=0)

Test case 2:  user is mysql table, i add ` on user table. it is right. 
0: jdbc:drill:zk=SC-1:6181,SC-2:6181,PL-3:618> select count(1) from 
mysql.`user`;
+---------+
| EXPR$0  |
+---------+
| 2       |
+---------+
1 row selected (0.179 seconds)

Test case 3: other mysql table,i don't add ' on the table,but it is right.
0: jdbc:drill:zk=SC-1:6181,SC-2:6181,PL-3:618> select count(1) from mysql.event;
+---------+
| EXPR$0  |
+---------+
| 0       |
+---------+
1 row selected (0.128 seconds)
0: jdbc:drill:zk=SC-1:6181,SC-2:6181,PL-3:618> select * from 
performance_schema.users;
+-------+----------------------+--------------------+
| USER  | CURRENT_CONNECTIONS  | TOTAL_CONNECTIONS  |
+-------+----------------------+--------------------+
| null  | 18                   | 24                 |
| root  | 5                    | 130                |
+-------+----------------------+--------------------+
2 rows selected (0.117 seconds)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to