Bug #81351 | switching session type from classic to JS fails | ||
---|---|---|---|
Submitted: | 9 May 2016 9:26 | Modified: | 1 Jun 2016 11:57 |
Reporter: | Giuseppe Maxia (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Document Store: MySQL Shell | Severity: | S1 (Critical) |
Version: | 1.0.3 | OS: | Any |
Assigned to: | Juan Rene Ramirez Monarrez | CPU Architecture: | Any |
[9 May 2016 9:26]
Giuseppe Maxia
[10 May 2016 4:09]
MySQL Verification Team
Hello Giuseppe, Thank you for the report. Verified as described. Thanks, Umesh
[31 May 2016 13:15]
Erlend Dahl
Posted by devloper: This is not a bug, what happens is that you are connecting using a classic session, the API is very very limited when you do that. CRUD operations are only available when you use a session through the XProtocol (XSession or NodeSession) Here you can see the error is caused because you are trying to use a function that does not exist on a Classic Table http://dev.mysql.com/doc/dev/mysqlsh-devapi/classmysh_1_1mysql_1_1_classic_table.html
[31 May 2016 13:28]
Giuseppe Maxia
Thanks for your explanation, but I don't think you got my point. The issue is that switching to JS from a classic session should generate a meaningful error, while now the user is kept wondering why. If a proper connection in JS mode is impossible, the switch command should not work at all.
[2 Jun 2016 4:39]
Alfredo Kojima
session.getTable() should indeed just return an error. The way to use JS in a classic session is through session.runSql()