[MDEV-12141] Identify EVENT in INFORMATION_SCHEMA.PROCESSLIST Created: 2017-02-27  Updated: 2020-10-03

Status: Stalled
Project: MariaDB Server
Component/s: Admin statements, Events
Fix Version/s: N/A

Type: Task Priority: Minor
Reporter: Tadas Balaišis Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: beginner-friendly


 Description   

How to identify the process corresponding to specific EVENT?



 Comments   
Comment by Sergei Golubchik [ 2017-05-25 ]

What do you mean by that?

Comment by Tadas Balaišis [ 2017-05-26 ]

I mean EVENT (CREATE EVENT) is repeatedly executed based on specified schedule (ON SCHEDULE). I suppose it use some process to perform planned action. And that process is listed in INFORMATION_SCHEMA.PROCESSLIST. I would be pleased to recognize what process in processlist corresponds to which Event.

Comment by Sergei Golubchik [ 2017-05-26 ]

This is not a support forum. Please ask your questions on maria-discuss@lists.launchpad.net or on #maria channel on Freenode.

Or just try it and see — individual events and the event scheduler itself and perfectly visible in the SHOW PROCESSLIST output (or INFORMATION_SCHEMA.PROCESSLIST table.

Comment by Tadas Balaišis [ 2017-05-27 ]

Maybe you didn't understand my request.
I agree that in INFORMATION_SCHEMA.PROCESSLIST there is visible entry corresponding current executed event statement. But I want to see the name of the EVENT in some of INFORMATION_SCHEMA.PROCESSLIST field. Because the statement could be the same (from the same procedure), but called from different Events.
If you are familiar with Oracle system views, there is a way to determine session corresponding job (Event analog):

SELECT id2 job FROM v$lock join v$session USING (sid) WHERE v$lock.TYPE='JQ'

So this would be useful in MariaDB either.

Comment by Sergei Golubchik [ 2017-05-27 ]

You're right, I didn't, sorry.

Showing the event name is a quite reasonable request.

I've reopened the issue.

Comment by Tadas Balaišis [ 2017-05-27 ]

Thank you.

Comment by Tadas Balaišis [ 2020-09-30 ]

Any progress on this?

Comment by Tadas Balaišis [ 2020-09-30 ]

What I'm trying to accomplish is possibility to run several Events (aka jobs in Oracle) that run the same procedure. But. Inside the procedure I want to be able to detect the ID of Event to filter my work. This gives me mechanism of parallelism when several server sessions work on input data flow each with own separated/filtered part. And by increasing the number of Events/jobs I can increase intensity of data handling process. So ability to identify Event is essential.

Generated at Thu Feb 08 07:55:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.