Chat2DB icon indicating copy to clipboard operation
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)

Open MSK-USER opened this issue 1 year ago • 13 comments

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. image

MSK-USER avatar Feb 08 '24 14:02 MSK-USER

image

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}

MSK-USER avatar Feb 08 '24 14:02 MSK-USER

image datagrip opens table log

MSK-USER avatar Feb 08 '24 14:02 MSK-USER

  1. 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. image After selecting the schema, I just tried it on version 3.1.17 and there was no problem. image

  2. 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.

miahemu avatar Feb 27 '24 00:02 miahemu

Ok, I see. polite.

miahemu avatar Feb 27 '24 01:02 miahemu

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}
image image

MSK-USER avatar Feb 27 '24 01:02 MSK-USER

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? image

tmlx1990 avatar Feb 27 '24 02:02 tmlx1990

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.

MSK-USER avatar Feb 27 '24 03:02 MSK-USER

Okay, I'll try to reproduce it.

tmlx1990 avatar Feb 27 '24 03:02 tmlx1990

Okay, I'll try to reproduce it.

OK, thanks.

MSK-USER avatar Feb 27 '24 03:02 MSK-USER

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. image

tmlx1990 avatar Feb 27 '24 03:02 tmlx1990

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.

MSK-USER avatar Feb 27 '24 03:02 MSK-USER

datagrip

My datagrip can be opened with the same link method, but datagrip takes up too much memory. I prefer chat2db.

MSK-USER avatar Feb 27 '24 03:02 MSK-USER

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

tmlx1990 avatar Feb 27 '24 03:02 tmlx1990

The new version 3.1.22 has solved the problem, try it

miahemu avatar May 22 '24 13:05 miahemu