[BUG] Duplicate row ignores empty columns

[expired user #8023]'s profile image [expired user #8023] posted 7 years ago in General Permalink

Hello, i have a table with a varchar column (not null, no default defined).

The table contains a row with an empty string in that column.

If i duplicate the row and do not change that column i get "SQL 1364: column does not have a default value".

Andi

ansgar's profile image ansgar posted 7 years ago Permalink

You should post the version of HeidiSQL you are using (or even better, ensure you're on the latest build), and then please post the INSERT query fired internally by HeidiSQL.

[expired user #8023]'s profile image [expired user #8023] posted 7 years ago Permalink

Version: 9.4.0.5141

INSERT INTO schema.table (did, aid, checkboxtext, buttontext) VALUES ('1716', '1', 'xx', 'xx'); / SQL Fehler (1364): Field 'bestaetigungstext' doesn't have a default value /

Workaround: insert ' ' and update INSERT INTO schema.table (did, aid, bestaetigungstext, checkboxtext, buttontext) VALUES ('1716', '1', ' ', 'xx', 'xx');

UPDATE schema.table SET bestaetigungstext='' WHERE mdaid=1075;

[expired user #8023]'s profile image [expired user #8023] posted 7 years ago Permalink

Can you reproduce the bug or do you need more information?

ansgar's profile image ansgar posted 7 years ago Permalink

No, I can confirm the issue. Quite easy to work around though, by putting some string the relevant field manually. But I'll check why Heidi does not show the red "modified" triangle on such a field when duplicating a row.

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