dbeaver
dbeaver copied to clipboard
string index out of range when using Sql-editor
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.
DBeaver Version
24.0.1
Operating System
windows 11
Database and driver
No response
Steps to reproduce
No response
Additional context
No response
What database do you use?
What database do you use?
mysql 5.6.29
Could you please provide the log files? You can find instructions here: https://dbeaver.com/docs/wiki/Log-files/. Thank you.
And what kind of connector do you use? MySQL or MySQL legacy? MySQL legacy is more compatible with MySQL 5.
Thanks for re. I'm using the mysql database connector and i will try the legacy. Here is the log.
Could you please provide your database name for testing? End encoding for this database.
Database name is "gem", and encoding is UTF-8.
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?
Sorry, maybe i'v misunderstood the meaning of name of database, here is my screenshot of test connection.
@tudoudaren233 You can find the database name here, in the Database Navigator inside Databases:
Could you please share it with us? Does it contain some special symbols or hieroglyphs?
here is the database name
@tudoudaren233 Hi is the database a original MySQL 8 or some forked version?
here is the mysql version, i've also tried changing the connector to 5.1.x but the problem still not fix.
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.
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.
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?
Please provide the query example, which fail. And the way you execute the query. Which button do you use?
No, it didn't work after i left the field empty, still showed this error.
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.
Thank you
Unfortunately, we are unable to reproduce the issue at this time.
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~
Here are my steps.
- Open a new sql-editor and write some normal sql. Make sure you can run these sql correctly.
- Save this editor and rename it with some Chinese characters like "测试sql保存报错.sql" and then close this editor.
- Reopen this editor, and it will pop up this error.
I followed the provided steps and everything is fine for me