Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.11.11
-
Debian 12 Linux (Bookworm)
-
Can result in unexpected behaviour
Description
I am using a plugin called Litebans for my spigot Minecraft server, it utilizes a MariaDB 10.11.11-MariaDB-0+deb12u1 database, one of its normal queries, checking if a player is muted, started causing errors out of nowhere, the query in question is this:
SELECT * |
FROM litebans_mutes WHERE((UUID='2790f6f1-48da-407f-96df-146c8f368578' OR(ipban=1 AND(ip='24.12.104.36' OR(ipban_wildcard=1 |
AND active=1 |
AND '24.12.104.36' LIKE ip)))) AND(server_scope='*' |
OR server_scope='factions')) |
AND active=1 AND(UNTIL<1 |
OR UNTIL>1748198010528) |
LIMIT 1
|
I have determined that setting:
SET optimizer_switch='rowid_filter=off'; |
causes the query to behave as expected (returning an empty set), but when i turn it back on, the query fails with this error:
ERROR 1032 (HY000): Can't find record in 'litebans_mutes'
|
I believe the reason the issue started out of nowhere is because enough players got muted to push the size of the table above a level where the rowid_filter optimization became enabled this is just a theory though
Table description:
|
+-------------------+---------------------+------+-----+---------------------+-------------------------------+
|
| Field | Type | Null | Key | Default | Extra |
|
+-------------------+---------------------+------+-----+---------------------+-------------------------------+
|
| id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
|
| uuid | varchar(36) | YES | MUL | NULL | |
|
| ip | varchar(45) | YES | MUL | NULL | |
|
| reason | varchar(2048) | NO | | NULL | |
|
| banned_by_uuid | varchar(36) | YES | MUL | NULL | |
|
| banned_by_name | varchar(128) | YES | | NULL | |
|
| removed_by_uuid | varchar(36) | YES | | NULL | |
|
| removed_by_name | varchar(128) | YES | | NULL | |
|
| removed_by_date | timestamp | NO | | current_timestamp() | on update current_timestamp() |
|
| time | bigint(20) | NO | MUL | NULL | |
|
| until | bigint(20) | NO | MUL | NULL | |
|
| server_scope | varchar(32) | YES | | NULL | |
|
| server_origin | varchar(32) | YES | | NULL | |
|
| silent | bit(1) | NO | | NULL | |
|
| ipban | bit(1) | NO | MUL | NULL | |
|
| ipban_wildcard | bit(1) | NO | MUL | NULL | |
|
| active | bit(1) | NO | MUL | NULL | |
|
| removed_by_reason | varchar(2048) | YES | | NULL | |
|
| template | tinyint(3) unsigned | NO | MUL | 255 | |
|
+-------------------+---------------------+------+-----+---------------------+-------------------------------+
|
Dumping the database and running on a fresh machine determines the bug is easy to replicate, you should be able to see this by downloading the attached SQL file, which is an export of the litebans_mutes table and running the same query on mariadb 10.11.11-MariaDB-0+deb12u1, note the data has been modified from the real data to preserve privacy but the bug still occurs on this modified data
Attachments
Issue Links
- duplicates
-
MDEV-27366 SIGSEGV in handler_index_cond_check on SELECT in connection with rowid_filter setting
-
- In Review
-