Mysql multithread

Hi,

I am using ruby-mysql gem 2.9.4 in a multithreaded application:
I have three threads trying to access db and get information from the
same table but I am getting sql exception with message:
invalid packet: sequence number mismatch(53 != 6(expected))

Is there anything to do to solve this problem
regards,

On Thu, Dec 29, 2011 at 11:23 PM, rubix Rubix [email protected]
wrote:

Hi,

I am using ruby-mysql gem 2.9.4 in a multithreaded application:
I have three threads trying to access db and get information from the
same table but I am getting sql exception with message:
invalid packet: sequence number mismatch(53 != 6(expected))

Is there anything to do to solve this problem

Wild guess: you are using the same connection for all threads.
Solution: create a connection for each thread.

Jesus.

True :slight_smile:
thx