MySQL Forums
Forum List  »  Stored Procedures

Reliable row_count with a multithreaded java client
Posted by: Liepa Kuraite
Date: December 28, 2012 08:25AM

Hi, I have an application that calls the same procedure in multiple threads at approximatelly the same time. The procedure inserts rows in the same table (but with different information) for all threads. Is it safe to say that if I call row_count() inside the procedure right after INSERT statement it will get the affected row count for that statement for that thread? Or will it get the latest affected row count for the database in general (i.e. if some other threads were updating some other tables)?

Or maybe if I want to doublecheck how many rows were inserted I could increment some varable with every inserted row - would that be more reliable?

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Reliable row_count with a multithreaded java client
2530
December 28, 2012 08:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.