Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Critical
-
Resolution: Unresolved
-
11.5.2, 11.6.2
-
None
-
Official docker image mariadb:11.6.2
Also tested with mariadb 11.5.2
Description
For some SELECT queries with a CONCAT in a sub-query on a table with a lot of data, I get the "ERROR 1062 (23000): Duplicate entry 'NULL' for key 'key0'" error.
I was able to get a minimal set of anonymised data to reproduce the issue.
Step to reproduce :
- Execute `01_schema.sql`
- Execute `02_data_partner.sql`
- Execute `03_data_movement.sql`
Run the following query:
SELECT (SELECT CONCAT(partner.companyName, partner.lastName) |
FROM test_partner partner |
WHERE mvt.delivery_fk = partner.id) AS val |
FROM test_movement mvt |
WHERE mvt.documentId > 'a'; |
You will get the error.
The `WHERE mvt.documentId > 'a';` filter is necessary to trigger the bug.
Using docker:
# Setup a clean mariadb
|
docker run --rm --name mariadb_test -d --env MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:11.6 |
|
# Create a test db
|
docker exec mariadb_test mariadb -e 'CREATE DATABASE test' |
|
# Import schema
|
docker exec -i mariadb_test mariadb test < 01_schema.sql |
|
# Import data
|
docker exec -i mariadb_test mariadb test < 02_data_partner.sql |
docker exec -i mariadb_test mariadb test < 03_data_movement.sql |
|
# Execute the query to trigger the bug
|
docker exec -i mariadb_test mariadb test < 04_query.sql |
|
# Cleanup
|
docker stop mariadb_test
|
Attachments
Issue Links
- is caused by
-
MDEV-9101 Limit size of created disk temporary files and tables
- Closed