Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
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.