By issuing the SET LOW_PRIORITY_UPDATES = 1 command, you affect the value of the variable for the session. Therefore, this can be seen by checking the value of the variable in the session.
I know two ways to do this:
1- SHOW SESSIONS VARIABLES AS "low_priority_dapdates"
it shows on / off
2- select @@ session.low_priority_updates
it gives 0/1
Important: the above statements / calls will show the values ββof the variables in the session in which they are executed. Therefore, you will need to run them using the connections themselves to see the values. I do not know a method in MySQL where you can select values ββfor variables belonging to another session.
If you want to see them as a list, you may need to do the work by creating a table and registering this information yourself. eg:
CREATE TABLE `mydb`.`my_low_priority_updates` ( `connection_id` INT , `low_priority_updates_value` INT NOT NULL ) ENGINE = MyISAM;
then you need an instruction that inserts the connection identifier and value into the table:
insert into my_low_priority_updates(connection_id,low_priority_updates_value) select connection_id(),@@session.low_priority_updates from dual where not exists (select 1 from my_low_priority_updates where connection_id=connection_id())
You can put this statement in the procedure and make sure that it is called or added to the trigger of the table that you know is updated / inserted.
then querying the my_low_priority_updates table will later show you the variable values ββin each connection.
source share