I have mysterious problem with quite large program that uses Mariadb database.
Setup:
Fedora 43 linux with local MariaDB version "Ver 15.1 Distrib 10.11.16-MariaDB"
Program is compiled with Lazarus 4.6 FPC 3.2.2 (From Fedora package)
I have replicated database in local server (Old Fedora, in local LAN same subnet) running with Mariadb version "Ver 15.1 Distrib 10.5.15-MariaDB"
Using program there is a phase where I delete triggers from one table during for another operation and then restore triggers back. Table has around 20000 rows.
Now, if there are triggers program HALT when trying to delete them. If there are no triggers (deleted by previous tests, or manual) program HALT when trying to create triggers.
If I change Database Connect settings to point to my server replica of my database everything works fine without HALT during trigger delete and create.
(NOTE: Connection change requires program restart.)
If I then change Database Connect settings back to local computer, but use ipv6 localhost "::1" instead of 127.0.0.1, previously used, everything works ok again!
But only current session. If I restart program the HALT is again there even if ipv6 localhost still used.
I have made further debugging starting my program with --debug=-64 parameter. Then it prints all database communication that happens between Freepascal SQL unit and Sql server.
From that debug I can see that program sends proper trigger delete/create command to MariaDB but then everything stops.
I have traced that also by tcpdump and program really sends TCP frame having that command to MariaDB, but MariaDB does not give any response.
If I leave program in halt state and open a command console and make connect to MariaDB I can see that the trigger that program is trying to delete is still there in
table.
If I issue same trigger delete command from MariaDB console it also halts without giving prompt back !!
When I kill program it also releases MariaDB console and the if I then check triggers the trigger has gone away (delete trigger command has been run, via released command console. I think).
I have tried to Google same kind of symptoms, without luck.
It can be MariaDB bug (because why mysql console halts too?), SQL unit bug or simply just my program bug (most likely).
But if there is any MariaDB guru who can suggest further testings I would like to hear about those.
P.S.
OK, I just talk about "program" without any example. It is in my GitHub
https://github.com/OH1KH/CqrlogAlpha/tree/devel but its is quite hard to make run without further assistance. And there is lots of source to look at.
How ever the trigger delete/create can be found from dLogUpload.pas lines 1251 and 1293. Trigger create scripts are in dData.lfm named scOnlineLogTriggers
(if someone has deep intrest ).