vim-mysql-plugin icon indicating copy to clipboard operation
vim-mysql-plugin copied to clipboard

Deletes last rows of output - sometimes

Open artfulrobot opened this issue 2 years ago • 7 comments

I found myself getting a lot of truncated output.

Commenting out this line https://github.com/kezhenxu94/vim-mysql-plugin/blob/2f2120059b1b367390eac6a47b29b24551d434e4/plugin/vim-mysql-plugin.vim#L29

fixes it.

artfulrobot avatar Jan 04 '23 15:01 artfulrobot

How can I reproduce?

kezhenxu94 avatar Jan 04 '23 15:01 kezhenxu94

yeah, sorry, I've not figured that out either.

<leader>ds seems most sensitive to it. Here's screenshots of one table with the line present, and commented.

Current

image

Desired

image

Why

Ah! I've got it - I think. I think it's because the normal kdG line is assuming there's timing information at the bottom, but this is not output for describe table.

artfulrobot avatar Jan 04 '23 17:01 artfulrobot

@artfulrobot this looks weird tome, I can always see the timing information for describe table, can you do the raw query describe xxx in your mysql cli and see whether the timing information exists?

kezhenxu94 avatar Jan 05 '23 04:01 kezhenxu94

And if you remove normal kdG, what happened to the other commands? I think we can remove the normal kdG if it doesn't affect much to other commands.

kezhenxu94 avatar Jan 05 '23 04:01 kezhenxu94

The command in question is there just to delete the timing info from the output. So if it's not run, then the timing info is appended to the output, as it was before a recent PR that sought to move it to an echo/message command.

artfulrobot avatar Jan 05 '23 09:01 artfulrobot

I can confirm it occurs, I'm going to revert the related commit.

kezhenxu94 avatar Jan 05 '23 10:01 kezhenxu94

@artfulrobot please update and retry

kezhenxu94 avatar Jan 05 '23 10:01 kezhenxu94