Chat2DB
Chat2DB copied to clipboard
Bug: Table lookup failed in some databases, and schema information was not added to the query conditions (only DM has been tested so far)
Chat2DB Version
3.1.17
Describe the bug
I mentioned two issues before, and today I accidentally discovered the cause of the error. Taking DM as an example, the query statement did not add a specific schema, resulting in the table not being found. By default, it went to SYSDBA to find the table information, but the actual table was in the schema B. , the table can be found correctly by adding the schema information. The sql of the error log does not add the schema.
This bug is that when opening a table with a non-default schema, an error will be reported.
{"getApplicationMessage":{"env":"desktop","versions":"3.1.19","buildTime":1704272050850,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) chat2db/3.1.19 Chrome/108.0.5359.215 Electron/22.3.27 Safari/537.36"},"requestUrl":"http://127.0.0.1:10824/api/rdb/dml/execute_table","requestParams":"{"sql":"select * from \"ny_aa_a_399833\"","tableName":"ny_aa_a_399833","pageNo":1,"pageSize":200,"total":0,"hasNextPage":true,"dataSourceId":3,"databaseType":"DM","schemaName":"B","type":"DM"}","errorCode":null,"errorMessage":"第1 行附近出现错误:\n无效的表或视图名[ny_aa_a_399833]","errorDetail":null,"solutionLink":null}
-
Hello, which schema have you specified here? The default query statement of Dameng database is directly followed by the table name. If no schema is specified, the corresponding table will be found in the current user's default schema.
After selecting the schema, I just tried it on version 3.1.17 and there was no problem.
-
Also, you said that when opening a table with a non-default schema, an error occurs and the table cannot be opened. I no longer have this problem after changing to version 3.1.19. You can try it first.
Ok, I see. polite.
Ok, I see. polite.
Hello, I have always used version 3.1.19. I just reinstalled it and it still doesn't work. It is macos system and arm version.
{"getApplicationMessage":{"env":"desktop","versions":"3.1.19","buildTime":1704272050850,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) chat2db/3.1.19 Chrome/108.0.5359.215 Electron/22.3.27 Safari/537.36"},"requestUrl":"http://127.0.0.1:10824/api/rdb/dml/execute_table","requestParams":"{\"sql\":\"select * from \\\"ny_aa_a_399833\\\"\",\"tableName\":\"ny_aa_a_399833\",\"pageNo\":1,\"pageSize\":200,\"total\":0,\"hasNextPage\":true,\"dataSourceId\":3,\"databaseType\":\"DM\",\"schemaName\":\"B\",\"type\":\"DM\"}","errorCode":null,"errorMessage":"第1 行附近出现错误:\n无效的表或视图名[ny_aa_a_399833]","errorDetail":null,"solutionLink":null}
Hello, I have always used version 3.1.19. I just reinstalled it and it still doesn't work. It is macos system and arm version.
When reporting an error, is there a choice for the schema in the lower right corner?
An error is reported when double-clicking to open a table with a non-default schema. It is not an error reported when querying SQL on the console.
Okay, I'll try to reproduce it.
Okay, I'll try to reproduce it.
OK, thanks.
Hello, was your schema also created by this current user? I used sysdba locally and created two schemas. You can open the table. Nor is it the default.
default
I created a new schema and it can be opened, but other schemas cannot be opened. The same link method can be opened on datagrip. Is it convenient to contact us for price? Let’s check the cause of the problem.
datagrip
My datagrip can be opened with the same link method, but datagrip takes up too much memory. I prefer chat2db.
default
I created a new schema and it can be opened, but other schemas cannot be opened. The same link method can be opened on datagrip. Is it convenient to contact us for price? Let’s check the cause of the problem.
WeChat: yanxin613 please add me
The new version 3.1.22 has solved the problem, try it