Uh oh!
There was an error while loading. Please reload this page.
Error happened when open a view in DBeaver - #4778
Conversation
imay
commented
Oct 22, 2020
It is best to talk about the cause of the problem and the idea of PR change. |
| // table(view)'s comment | ||
| protected String comment = ""; | ||
| protected String ddlSql = ""; |
There was a problem hiding this comment.
Add comment for this new field
| if (NULL == str_slot->ptr) { | ||
| return Status::InternalError("Allocate memcpy failed."); | ||
| } | ||
| memcpy(str_slot->ptr, definer.c_str(), str_slot->len); |
There was a problem hiding this comment.
length always 6 and definer always "root@%" ? why ?
There was a problem hiding this comment.
this is column for table views in mysql, palo has no this information, we can only set a default one
| .column("CHECK_OPTION", ScalarType.createVarchar(8)) | ||
| .column("IS_UPDATABLE", ScalarType.createVarchar(3)) | ||
| .column("DEFINER", ScalarType.createVarchar(77)) | ||
| .column("SECURITY_TYPE", ScalarType.createVarchar(7)) |
There was a problem hiding this comment.
why this column length is 77, you should add a comment, this column in mysql is 288
There was a problem hiding this comment.
Maybe you get another version of mysql. the sql I got is like this.
| .column("DEFINER", ScalarType.createVarchar(77)) | ||
| .column("SECURITY_TYPE", ScalarType.createVarchar(7)) | ||
| .column("CHARACTER_SET_CLIENT", ScalarType.createVarchar(32)) | ||
| .column("COLLATION_CONNECTION", ScalarType.createVarchar(32)) |
There was a problem hiding this comment.
the sql I got is like this.
| default: | ||
| tables = db.getTables(); | ||
| } | ||
| } |
There was a problem hiding this comment.
| } | |
| List<Table> tables = db.getTables(); | |
| if (params.isSetType() && "VIEW".equals(params.getType())) { | |
| tables = db. getViews(); | |
| } |
There was a problem hiding this comment.
If type is view, this will call getTables() which is not required. When the count of tables in this db is too many, this will take more time.
Uh oh!
There was an error while loading. Please reload this page.
Proposed changes
Fix bug #4777:Error happened when open a view in DBeaver
Types of changes
What types of changes does your code introduce to Doris?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
Fix bug #4777