Re: problem doing insert into a table when using XAConnection

Tonci Grgin <[email protected]> Fri, 15 Sep 2006 11:45:40 +0200
Newsgroups gmane.comp.db.mysql.bugs
Organization MySQL AB
Message-ID <[email protected]>
Sadhana Jain wrote:
> Hi,
> 
>  
> 
> I am using MySql latest server (5.0.24) and the 
> mysql-connector-java-5.0.3-bin.jar driver.
> 
>  
> 
> I am attaching the sample problem I wrote to isolate the bug. When using 
> the XAConnection
> 
> (setting testWithXA=true) and doing the insert into the table, the 
> executeUpdate succeeds and returns 1 but
> 
> Nothing gets written to the table.
> 
>  
> 
> When using non-XA connection (setting testWithXA=false), the entry gets 
> inserted into the table fine.
> 
>  
> 
> The output of the program with XA (or non-XA):
> 
>  
> 
> URL string is:jdbc:mysql://localhost:3306/test
> 
> UserId: root Password: password
> 
> XAConnection Successful!
> 
> Connection successful!
> 
>  1 -> uuid:3BADFD00-C692-D46C-193A-E511ED7E9453
> 
>  2 -> 1158085128
> 
>  3 -> 0
> 
>  4 -> 86400000
> 
>  5 -> 1158085695
> 
> num rows written =1
> 
>  
> 
> Using command line client (when XA):
> 
> mysql> select * from SequenceHistory;
> 
> Empty set (0.00 sec)
> 
>  
> 
> Using command line client (when non XA):
> 
> mysql> select * from SequenceHistory;
> 
> +-------------------------------------------+-------------------+--------+------
> 
> --------+----------------+-------------------+----------------+
> 
> | sequenceID                                | lastMessageNumber | closed 
> | creat
> 
> ionTime | lastAccessTime | inactivityTimeout | expirationTime |
> 
> +-------------------------------------------+-------------------+--------+------
> 
> --------+----------------+-------------------+----------------+
> 
> | uuid:3BADFD00-C692-D46C-193A-E511ED7E9453 |                 0 |      0 
> |   115
> 
> 8085128 |     1158085695 |          86400000 |              0 |
> 
> +-------------------------------------------+-------------------+--------+------
> 
> --------+----------------+-------------------+----------------+
> 
> 1 row in set (0.21 sec)
> 
>  
> 
>  
> 
> Can someone please tell me if I am missing some settings when using 
> XAConnection or this seems like a bug with MySQL?
> 
>  
> 
> Thanks very much for any help!
> 
> Sadhana
> 
> 
> ------------------------------------------------------------------------
> 
> 

Hi Sadhana.

Can you please provide small but complete java test case demonstrating 
this problem? I would also like to know more of your environment.

-- 
Tonci Grgin, Support Engineer
MySQL AB, Croatia, www.mysql.com

Are you MySQL certified?  www.mysql.com/certification

-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]