Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Text Editor 258 character limit

AlexK's profile image AlexK posted 3 months ago in General Permalink

Hello, firstly, I love HeidiSQL. Thanks to everyone who has developed it!

I've just updated to 12.0.0.6468 and the editor now only shows me the first 258 characters of a text field.

I see from the forums that this is a problem that's been an issue for many years, but it's just occurred after upgrading from v11 to v12 today.

What is different to some people is that hovering over the field and saving as BLOB are also truncated.

A workaround is to write and run a SELECT query in the SQL editor, find the row that needs to be edited and then the Heidi editor shows the complete text. It also allows me to update it.

One forum post suggested changing the font in the editor to courier, but this didn't work for me.

My system is Windows 11, heidi reporting envrionment Windows v10.0.

Here is my table structure:


-- Server version: 5.5.58-0+deb7u1 - (Debian) -- Server OS: debian-linux-gnu -- HeidiSQL Version: 12.0.0.6468


-- Dumping structure for table spacenode.app_tests CREATE TABLE IF NOT EXISTS app_tests ( test_id int(10) unsigned NOT NULL AUTO_INCREMENT, pass_message text COLLATE utf8mb4_unicode_ci, PRIMARY KEY (test_id), ) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

I'm connecting via an SSH Tunnel.

Any ideas?

Thanks!

ansgar's profile image ansgar posted 3 months ago Permalink

I suppose you mean the tooltip in the grid on the data tab?

Description

Yes, in normal tables, the grid loads the first 256 characters of text fields. This is done to make the loading quicker, and to save bandwidth. But as soon as you edit a row, or delete a row, HeidiSQL loads the full contents of all fields in the row.

Also, when you save a BLOB field, it should be saved from the full contents.

AlexK's profile image AlexK posted 3 months ago Permalink

Thanks for your reply :)

I mean, in the table grid, when you double click on a TEXT field an editor pops up. In the window bar, it says the name of the field and then ' - Text editor'.

In my case that's "pass_message - Text editor".

This only shows the first 257 characters of the field with the rest being truncated.

(I'm not allowed to post screenshots, so I'll try attachment under editor_one.jpg)

As mentioned in my question, both the 'Save BLOB' and the tooltip preview display the same truncated field as the editor.

As a work around, I can do a select query such as...

select pass_message from app_tests;

I can then find the row I need to edit, double click on the TEXT field 'pass_message' and this then shows me the complete value of that field. Heidi then lets me update the TEXT field from this editor.

Here is a screenshot of that editor which includes the whole untruncated field:

(I'm not allowed to post screenshots, so I'll try attachment under editor_two.jpg)

It's interesting you said that the grid loads the first 256 characters. Perhaps I can get Heidi working by increasing that value to something like 10,000 so that I can edit most of my fields. Is that a setting I can change?

2 attachment(s):
  • editor_one
  • editor_two
ansgar's profile image ansgar posted 3 months ago Permalink

That's strange, should definitely not be truncated in the popup editor.

Probably you can post the CREATE TABLE code of the underlying table here, so I can try to reproduce and fix the issue?

AlexK's profile image AlexK posted 3 months ago Permalink

Thanks Ansgar,

Yeah sure, here you go - I'll attach it to keep the forum pretty.

It includes a row of table data and it's the pass_message field that I'm having problems with.

If you get the result that I do, you'll see that in the grid editor the field is being truncated, but if you do a query...

select * from app_tests;

You should be able to see/edit/update the whole field.

:) Alex

1 attachment(s):
ansgar's profile image ansgar posted 3 months ago Permalink

No problem here, at least on MySQL 5.7.35 (yours is 5.5.58?)

First when the data loads, the log panel shows the truncated field, but when editing the field it loads the full row:

Description

ansgar's profile image ansgar posted 3 months ago Permalink

Even on MySQL 5.5.58 it works for me. However, your server OS is Debian while mine is Windows, so this may still make a difference.

Is there some other noticable difference? Which Windows version is it on your side?

AlexK's profile image AlexK posted 3 months ago Permalink

How strange. This truncated editor error is the only noticeable difference, and it's even stranger that a select query works as expected.

My version of windows is...

OS Name Microsoft Windows 11 Home Version 10.0.22000 Build 22000

ansgar's profile image ansgar posted 3 months ago Permalink

Got it. That happens due to an encoding issue. Could be the emoji in it is counted as one byte too much (and that emoji is broken in my test, as you can see in my screenshot, so the byte number is correct there). However, Heidi counts 257 characters when starting the editor, not 256, and the logic says in such cases the row was already fully loaded.

I'll fix that.

Code modification/commit bb608ff from Ansgar Becker <anse@heidisql.com>, 3 months ago, revision 6505
Make counting characters in TDBQuery.HasFullData more precise for diacritical characters. Fixes EnsureFullRow not doing its work when a cell contains some emoji. Reported in the forum: https://www.heidisql.com/forum.php?t=39239
ansgar's profile image ansgar posted 3 months ago Permalink

Just for references: this was also reported in issue #1351

AlexK's profile image AlexK posted 3 months ago Permalink

Oooh, I love emojis - that issue sounds very familiar.

Strange though that you couldn't replicate the problem, even though I gave you the create and insert code that includes emojis...

AlexK's profile image AlexK posted 3 months ago Permalink

My apologies, I didn't see your above post when you did manage to replicate the problem :)

AlexK's profile image AlexK posted 3 months ago Permalink

Just tried out the nightly build and my problem is solved, thanks so much 🙏

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.