I am running Fedora 42 KDE spin, and the output from mysql -V is
mysql Ver 15.1 Distrib 10.11.11-MariaDB, for Linux (x86_64) using EditLine wrapper
I have a script that runs weekly that creates a large data table and then runs various other scripts to generate various reports. One of the reports is a union of a few selects which involve joins. While those joins were running, I opened another terminal and, without thinking, fired off a maintenance script which removes duplicates and then drops the non-unique index and builds a primary key in the large table. My question is, what did that do to the first job (running the joins)? Will Maria lock the index during the join and therefore not drop it until after the first job completes? Will the first job complete correctly but much much more slowly? Is there any defensive coding I can add to either or both scripts that would protect against user stupidity like this?