distal-attribute
distal-attribute
distal-attribute
distal-attribute

Tab "CREATE code" doesn´t shows charset information

User, date Message
Written by Plasm
3 years ago
Category: General
72 posts since Fri, 10 Sep 10
The "CREATE code"-tab in r3707 says:
CREATE TABLE `a_text` (
`aBaseId` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
`aTxtChgTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`aTxtChgUser` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
`aTxtText` MEDIUMTEXT NOT NULL,
PRIMARY KEY (`aBaseId`)
)
COLLATE='latin1_german1_ci'
ENGINE=InnoDB;

The statement "SHOW CREATE TABLE a_text" says:
CREATE TABLE `a_text` (
`aBaseId` bigint(20) unsigned NOT NULL default '0',
`aTxtChgTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`aTxtChgUser` bigint(20) unsigned NOT NULL default '0',
`aTxtText` mediumtext character set utf8,
PRIMARY KEY (`aBaseId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci

It differs in the table charset (latin1) and the charset at column aTxtText (utf8).
Furthermore the "Collation"-column in the column-list underneath is empty in the row for column aTxtText.

On another PC (with r3603) the create code and the column list is OK. Hope that helps.
Written by Plasm
3 years ago
72 posts since Fri, 10 Sep 10
r3668 (oldest available version) has the same problem
Written by ansgar
3 years ago
4967 posts since Fri, 07 Apr 06
Fixed in r3713
Written by Plasm
3 years ago
72 posts since Fri, 10 Sep 10
Thanks.

But it still differs from the "SHOW CREATE TABLE" output
Column:
Heidi = collation
SHOW CREATE = character set

Table:
Heidi = collation
SHOW CREATE = default charset + collation

Is there a reason for that? First I thought it´s an MySQL-Version issue, since it appeared on 4.1.12. But it´s the same on 5.5.9
I don´t think, that this behaviour is a real problem, but it confuses me.
Written by ansgar
3 years ago
4967 posts since Fri, 07 Apr 06
HeidiSQL generates the CREATE TABLE code by itself, so it's very normal that there are minor differences.

A collation is a subset of a charset, and the charset has a default collation. See that with a SHOW COLLATION, and watch the "Default" column. The collation is therefore the exact thing, and the charset is not required to be mentioned if there is already a collation.
Written by Plasm
3 years ago
72 posts since Fri, 10 Sep 10
Yes, that´s why I wrote "I don´t think, that this behaviour is a real problem".
Didn´t know that Heidi doesn´t use SHOW CREATE TABLE

Everything fine now
 

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