dbeaver icon indicating copy to clipboard operation
dbeaver copied to clipboard

string index out of range when using Sql-editor

Open tudoudaren233 opened this issue 10 months ago • 19 comments

Description

when i'm using sql editor i can run my sql successfully but after i change to this same editor to another same structure of database,it jumped out this error,and i can't even change to the database which i changed from. Idk if it's a bug or something, because i didn't met this question before this version. image

DBeaver Version

24.0.1

Operating System

windows 11

Database and driver

No response

Steps to reproduce

No response

Additional context

No response

tudoudaren233 avatar Apr 01 '24 05:04 tudoudaren233

What database do you use?

E1izabeth avatar Apr 01 '24 05:04 E1izabeth

What database do you use?

mysql 5.6.29

tudoudaren233 avatar Apr 01 '24 06:04 tudoudaren233

Could you please provide the log files? You can find instructions here: https://dbeaver.com/docs/wiki/Log-files/. Thank you.

LonwoLonwo avatar Apr 01 '24 09:04 LonwoLonwo

image

And what kind of connector do you use? MySQL or MySQL legacy? MySQL legacy is more compatible with MySQL 5.

LonwoLonwo avatar Apr 01 '24 09:04 LonwoLonwo

Thanks for re. I'm using the mysql database connector and i will try the legacy. Here is the log. image

tudoudaren233 avatar Apr 01 '24 09:04 tudoudaren233

Could you please provide your database name for testing? End encoding for this database.

LonwoLonwo avatar Apr 02 '24 07:04 LonwoLonwo

Database name is "gem", and encoding is UTF-8.

tudoudaren233 avatar Apr 02 '24 09:04 tudoudaren233

What is the "gem" database? Is this a fork of MySQL, a MySQL-compatible database, or the name of your database?

What driver version are you using? Can you please provide a screenshot of the "Test Connection" dialog?

ShadelessFox avatar Apr 04 '24 13:04 ShadelessFox

Sorry, maybe i'v misunderstood the meaning of name of database, here is my screenshot of test connection. image

tudoudaren233 avatar Apr 07 '24 02:04 tudoudaren233

@tudoudaren233 You can find the database name here, in the Database Navigator inside Databases: Screenshot 2024-04-11 at 18 23 15

Could you please share it with us? Does it contain some special symbols or hieroglyphs?

arhayka avatar Apr 11 '24 16:04 arhayka

here is the database name 4fdc5a282dbc9e91147f39c1c288b5e

tudoudaren233 avatar Apr 15 '24 13:04 tudoudaren233

@tudoudaren233 Hi is the database a original MySQL 8 or some forked version?

Destrolaric avatar Apr 18 '24 13:04 Destrolaric

here is the mysql version, i've also tried changing the connector to 5.1.x but the problem still not fix. image image

tudoudaren233 avatar May 07 '24 02:05 tudoudaren233

Hello @tudoudaren233, Can you connect to MySQL DB with an empty field of the database name, please provide steps on how you use SQL Editor.

serjiokov avatar May 09 '24 12:05 serjiokov

Now i found that in new version, Although the SQL editor shows error, If i execute one of the right sql, the error will disappear.

tudoudaren233 avatar May 14 '24 03:05 tudoudaren233

Hello @tudoudaren233, Can you connect to MySQL DB with an empty field of the database name, please provide steps on how you use SQL Editor.

So does it work if you left Database field empty in the Connection Settings? image

Please provide the query example, which fail. And the way you execute the query. Which button do you use? image

E1izabeth avatar May 14 '24 07:05 E1izabeth

No, it didn't work after i left the field empty, still showed this error. image I use the first button to execute. But it is wired that this error did not affect my code execution, it just made everything red. image

tudoudaren233 avatar May 14 '24 08:05 tudoudaren233

Thank you

E1izabeth avatar May 14 '24 08:05 E1izabeth

Unfortunately, we are unable to reproduce the issue at this time.

MashaKorax avatar May 16 '24 13:05 MashaKorax

I found the way to reproduce the problem. When i rename the SQL Editor, i added some Chinese characters in the new name and then i changed to another database it will lead to this problem (i dk if other characters will also have this problems). Hope to fix it~ image image

tudoudaren233 avatar Sep 03 '24 06:09 tudoudaren233

Here are my steps.

  1. Open a new sql-editor and write some normal sql. Make sure you can run these sql correctly.
  2. Save this editor and rename it with some Chinese characters like "测试sql保存报错.sql" and then close this editor.
  3. Reopen this editor, and it will pop up this error.

tudoudaren233 avatar Sep 18 '24 03:09 tudoudaren233

I followed the provided steps and everything is fine for me

E1izabeth avatar Oct 04 '24 19:10 E1izabeth