[MDEV-23107] Questions about Mariadb Created: 2020-07-07  Updated: 2020-07-07  Resolved: 2020-07-07

Status: Closed
Project: MariaDB Server
Component/s: N/A
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Philip orleans Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: performance


 Description   

I have a server with many IP address, let's say 20.
A client connects and executes a stored procedure. How do I know inside the stored procedure that IP that he connected to? I know how to obtain his IP, but I need to know which one of my IPs did he use to connect and execute my stored procedure.
Also: suppose my server allows up to 200 simultaneous connections. Is there a way to know the thread ID, or something that uniquely identifies the connection? I am trying to avoid many threads to update the same record at the same time, causing a bottleneck.
For example, every thread has to update this piece of code
INSERT mdirectdips (codclient, day, kount)
VALUES (codclientx, CURDATE(), 1) ON DUPLICATE KEY UPDATE kount = kount + 1;
This causes a tremendous problem.



 Comments   
Comment by Daniel Black [ 2020-07-07 ]

There is a user function and connection_id.

What you have isn't a server bug. Suggest using https://dba.stackexchange.com/, https://mariadb.zulipchat.com or ask a question in the mariadb kb in previous links.

Generated at Thu Feb 08 09:19:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.