MySql Primary Key turns to Unique Index (new table)

daltinkurt's profile image daltinkurt posted 4 years ago in General Permalink

I am using v10.3.0.5831, (released: 2019-12-11) when i try to create new table, The "Primary Key" that I added turns to a Unique index (called "PRIMARY").

this situation started to coexist with the last update.

2 attachment(s):
  • heidisql-1
  • heidisql-2
ansgar's profile image ansgar posted 4 years ago Permalink

Oh that sounds like issue #856, which I could not reproduce here.

ansgar's profile image ansgar posted 4 years ago Permalink

Still cannot reproduce, neither on MySQL 5.7 nor on MariaDB 10.3. Which server is it on your side?

daltinkurt's profile image daltinkurt posted 4 years ago Permalink

these are the screenshots..

3 attachment(s):
  • heidi-1
  • Heidi-2
  • Heidi-3
daltinkurt's profile image daltinkurt posted 4 years ago Permalink

these are the screenshots..

2 attachment(s):
  • Heidi-4
  • Heidi-5
daltinkurt's profile image daltinkurt posted 4 years ago Permalink

same as issue #856

ansgar's profile image ansgar posted 4 years ago Permalink

I spent again half an hour to reproduce this issue, but again I failed

  • downloaded MySQL 5.6.47 server, started it
  • ensured I have the same sql_mode set: STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION
  • tried on MySQL 5.1
  • tried on MariaDB 10.3
  • created a new table via table designer
  • created a table via SQL code from your screenshot (please paste text the next time)
  • created a primary key via right-click on column Create > Primary key
  • created a primary key via Add button on Indexes tab

All attempts give me a normal primary key, not a unique key:

Description

I suspect the following query to return some non-standard strings on your server. Please run it and post the result here:

SHOW INDEXES FROM `testtable` FROM `allatpl`;
daltinkurt's profile image daltinkurt posted 4 years ago Permalink

here is the result "SHOW INDEXES FROM testtable FROM allatpl;"

1 attachment(s):
  • heidi-0
daltinkurt's profile image daltinkurt posted 4 years ago Permalink

this screenshots maybe give hint

no issue with exporting table.

3 attachment(s):
  • heidi-1
  • heidi-2
  • heidi-3
ansgar's profile image ansgar posted 4 years ago Permalink

Ok thanks for the screenshots.

Is it the latest build you are using now? If not please update.

daltinkurt's profile image daltinkurt posted 4 years ago Permalink

I am using the latest build, I always keep up to date. this problem started about 2 weeks ago, was not before

1 attachment(s):
  • Heidi
daltinkurt's profile image daltinkurt posted 4 years ago Permalink

I uninstalled "heidisql" and installed it again. problem solved. the simplest solution :)

ansgar's profile image ansgar posted 4 years ago Permalink

Ok, but you are now using the v10.3 release, not the latest build, or?

daltinkurt's profile image daltinkurt posted 4 years ago Permalink

I downloaded and installed HeidiSQL 10.3 from https://www.heidisql.com/download.php. now i am using Version 10.3.0.5771 (released 2019-12-11), not the latest

ansgar's profile image ansgar posted 4 years ago Permalink

Ok, that solves the issue for you, but leaves it broken in the latest build. I will have to find out why primary keys are not always detected as such.

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