8000 Unable to delete/edit rows with binary primary key on Chinese locale · Issue #2255 · HeidiSQL/HeidiSQL · GitHub
[go: up one dir, main page]

Skip to content

Unable to delete/edit rows with binary primary key on Chinese locale #2255

@wangyushun

Description

@wangyushun

Description

I'm using binary(16) to store UUID as the primary key, but deletion fails because the ID value in the SQL statement doesn't match the ID value in the record.

Image

HeidiSQL version

12.11.0.7096

Database server version

MariaDB 10.5.29

Reproduction recipe

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

CREATE DATABASE IF NOT EXISTS `aihub` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin */;
USE `aihub`;

CREATE TABLE IF NOT EXISTS `imageai_task_log` (
  `id` binary(16) NOT NULL,
  `task_id` varchar(32) NOT NULL,
  `content` longtext NOT NULL,
  `created_at` datetime(6) NOT NULL,
  `status` varchar(16) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `imageai_tas_task_id_b2ef9c_idx` (`task_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

INSERT INTO `imageai_task_log` (`id`, `task_id`, `content`, `created_at`, `status`) VALUES
	(_binary 0x068ca27ab276768e8000921326ee2e11, 'test', 'content', '2025-09-17 03:14:51.155805', 'ok');

/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;

Error/Backtrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDefective behaviour in HeidiSQL

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0