Bug report: wrong table sorting

[expired user #8611]'s profile image [expired user #8611] posted 6 years ago in General Permalink

How to reproduce:

  1. execute the commands below
  2. select database HeidiSQL_bugreport at left panel
  3. go to right panel and order tables by name
  4. you will find, that tables are not order alphabetically (see screenshot attached) image description
DROP DATABASE  HeidiSQL_bugreport;
CREATE DATABASE HeidiSQL_bugreport;
CREATE TABLE HeidiSQL_bugreport.`40AB_Abc` (
    `dummy` VARCHAR(32) NOT NULL
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM
;
CREATE TABLE HeidiSQL_bugreport.`2SN_beta` (
    `dummy` VARCHAR(32) NOT NULL
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM
;
CREATE TABLE HeidiSQL_bugreport.`2SN100_beta` (
    `dummy` VARCHAR(32) NOT NULL
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM
;
CREATE TABLE HeidiSQL_bugreport.`2SN100_gamma_3` (
    `dummy` VARCHAR(32) NOT NULL
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM
;
CREATE TABLE HeidiSQL_bugreport.`2SN100_alpha_1` (
    `dummy` VARCHAR(32) NOT NULL
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM
;
CREATE TABLE HeidiSQL_bugreport.`lorem` (
    `dummy` VARCHAR(32) NOT NULL
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM
;
CREATE TABLE HeidiSQL_bugreport.`ipsum` (
    `dummy` VARCHAR(32) NOT NULL
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM
;
1 attachment(s):
  • HeidiSQL_bugreport
ansgar's profile image ansgar posted 6 years ago Permalink

Seems my sorting algorithm removes non-digits from names which start with a digit. If you do that virtually here, the names look as follows:

  • 2
  • 40
  • 2100
  • 21001
  • 21003
  • ipsum
  • lorem

This is of course wrong.

Nice reproduction recipe by the way!

Could you post this in the tracker please?

[expired user #8611]'s profile image [expired user #8611] posted 6 years ago Permalink

Ticket raised: https://github.com/HeidiSQL/HeidiSQL/issues/570

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