Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

/proc/kallsyms format, sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas

Links

XODOX
Impressum

#1: problem doing insert into a table when using XAConnection

Posted on 2006-09-12 23:46:54 by Sadhana Jain

------_=_NextPart_001_01C6D6B4.F71FE7A0
Content-Type: multipart/alternative;
boundary="----_=_NextPart_002_01C6D6B4.F71FE7A0"


------_=_NextPart_002_01C6D6B4.F71FE7A0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

=20

I am using MySql latest server (5.0.24) and the
mysql-connector-java-5.0.3-bin.jar driver.=20

=20

I am attaching the sample problem I wrote to isolate the bug. When using
the XAConnection

(setting testWithXA=3Dtrue) and doing the insert into the table, the
executeUpdate succeeds and returns 1 but

Nothing gets written to the table.

=20

When using non-XA connection (setting testWithXA=3Dfalse), the entry =
gets
inserted into the table fine.

=20

The output of the program with XA (or non-XA):

=20

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 =3D1

=20

Using command line client (when XA):

mysql> select * from SequenceHistory;

Empty set (0.00 sec)

=20

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)

=20

=20

Can someone please tell me if I am missing some settings when using
XAConnection or this seems like a bug with MySQL?

=20

Thanks very much for any help!

Sadhana


------_=_NextPart_002_01C6D6B4.F71FE7A0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I am using MySql latest server (5.0.24) and the =
mysql-connector-java-5.0.3-bin.jar
driver. <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I am attaching the sample problem I wrote to isolate =
the
bug. When using the XAConnection<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>(setting testWithXA=3Dtrue) and doing the insert into =
the
table, the executeUpdate succeeds and returns 1 =
but<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Nothing gets written to the =
table.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>When using non-XA connection (setting =
testWithXA=3Dfalse), the
entry gets inserted into the table fine.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>The output of the program with XA (or =
non-XA):<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>URL string =
is:jdbc:mysql://localhost:3306/test<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>UserId: root Password: =
password<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>XAConnection Successful!<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Connection successful!<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;1 -&gt; =
uuid:3BADFD00-C692-D46C-193A-E511ED7E9453<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;2 -&gt; 1158085128<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;3 -&gt; 0<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;4 -&gt; 86400000<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;5 -&gt; 1158085695<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>num rows written =3D1<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Using command line client (when =
XA):<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>mysql&gt; select * from =
SequenceHistory;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Empty set (0.00 sec)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Using command line client (when non =
XA):<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>mysql&gt; select * from =
SequenceHistory;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>+---------------------------------------- ---+---------=
----------+--------+------<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>--------+----------------+--------------- ----+--------=
--------+<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>|
sequenceID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
| lastMessageNumber | closed | creat<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>ionTime | lastAccessTime | inactivityTimeout |
expirationTime |<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>+---------------------------------------- ---+---------=
----------+--------+------<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>--------+----------------+--------------- ----+--------=
--------+<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>| uuid:3BADFD00-C692-D46C-193A-E511ED7E9453 |&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;0
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp; =
115<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>8085128 |&nbsp;&nbsp;&nbsp;&nbsp; 1158085695
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 86400000
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;
0 |<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>+---------------------------------------- ---+---------=
----------+--------+------<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>--------+----------------+--------------- ----+--------=
--------+<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>1 row in set (0.21 sec)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Can someone please tell me if I am missing some =
settings
when using XAConnection or this seems like a bug with =
MySQL?<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks very much for any =
help!<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Sadhana<o:p></o:p></span></font></p>

</div>

</body>

</html>

------_=_NextPart_002_01C6D6B4.F71FE7A0--


------_=_NextPart_001_01C6D6B4.F71FE7A0
Content-Type: text/plain; charset=us-ascii


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
------_=_NextPart_001_01C6D6B4.F71FE7A0--

Report this message

#2: Re: problem doing insert into a table when using XAConnection

Posted on 2006-09-15 11:45:40 by Tonci Grgin

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/bugs?unsub=gcdmb-bugs@m.gmane.org

Report this message

#3: RE: problem doing insert into a table when using XAConnection

Posted on 2006-09-15 19:08:41 by Sadhana Jain

Hi Tonci,

I later found that it's not a bug in MySql. The problem I was seeing
(for the case when I am not using global transaction) was due to the
fact that auto commit was set to false because I was using XAConnection
to get the Connection object but I didn't have to use XAConnection in
this case (when not in global transaction).=20

A. Works.

DataSource ds =3D (DataSource) createXADataSource();
Connection conn =3D ds.getConnection();
System.out.println("auto commit value =3D"+conn.getAutoCommit());

The auto commit value is set to true in this case and the insert into
the table worked fine after this.

However, if I was using:
B. Doesn't work.

XADataSource xds =3D createXADataSource();
XAConnection xconn =3D xds.getXAConnection();
Connection conn =3D xconn.getConnection();
System.out.println("auto commit value =3D"+conn.getAutoCommit());

The auto commit value is set to false. And the insert into the table
didn't happen.

I am using Case A now and it works fine.
Thanks for your reply.

Hope this helps.
Sadhana




-----Original Message-----
From: Tonci Grgin [mailto:tonci@mysql.com]=20
Sent: Friday, September 15, 2006 2:46 AM
To: Sadhana Jain
Cc: bugs@lists.mysql.com
Subject: Re: problem doing insert into a table when using XAConnection

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

Hi Sadhana.

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

--=20
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/bugs?unsub=3Dgcdmb-bugs@m.gmane.org

Report this message

#4: Re: problem doing insert into a table when using XAConnection

Posted on 2006-09-15 19:47:23 by Mark Matthews

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sadhana Jain wrote:
> Hi Tonci,
>
> I later found that it's not a bug in MySql. The problem I was seeing
> (for the case when I am not using global transaction) was due to the
> fact that auto commit was set to false because I was using XAConnection
> to get the Connection object but I didn't have to use XAConnection in
> this case (when not in global transaction).
>
> A. Works.
>
> DataSource ds = (DataSource) createXADataSource();
> Connection conn = ds.getConnection();
> System.out.println("auto commit value ="+conn.getAutoCommit());
>
> The auto commit value is set to true in this case and the insert into
> the table worked fine after this.
>
> However, if I was using:
> B. Doesn't work.
>
> XADataSource xds = createXADataSource();
> XAConnection xconn = xds.getXAConnection();
> Connection conn = xconn.getConnection();
> System.out.println("auto commit value ="+conn.getAutoCommit());
>
> The auto commit value is set to false. And the insert into the table
> didn't happen.
>
> I am using Case A now and it works fine.
> Thanks for your reply.
>
> Hope this helps.
> Sadhana

Hi Sadhana,

Just a clarification that auto-commit being disabled on an XAConnection
is by design (and is required by the JDBC specification).

-Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFCucrtvXNTca6JD8RAn4kAKCzSYs/SVFT4SrhQLuDDpSj3h1SOgCg iQ2e
DBofwmwH4IvvQYWH/R1gV04=
=n3mz
-----END PGP SIGNATURE-----

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Report this message

#5: RE: problem doing insert into a table when using XAConnection

Posted on 2006-09-15 19:55:41 by Sadhana Jain

-----Original Message-----
From: Mark Matthews [mailto:mark@mysql.com]=20
Sent: Friday, September 15, 2006 10:47 AM
To: Sadhana Jain
Cc: tonci@mysql.com; bugs@lists.mysql.com
Subject: Re: problem doing insert into a table when using XAConnection

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sadhana Jain wrote:
> Hi Tonci,
>=20
> I later found that it's not a bug in MySql. The problem I was seeing
> (for the case when I am not using global transaction) was due to the
> fact that auto commit was set to false because I was using
XAConnection
> to get the Connection object but I didn't have to use XAConnection in
> this case (when not in global transaction).=20
>=20
> A. Works.
>=20
> DataSource ds =3D (DataSource) createXADataSource();
> Connection conn =3D ds.getConnection();
> System.out.println("auto commit value =3D"+conn.getAutoCommit());
>=20
> The auto commit value is set to true in this case and the insert into
> the table worked fine after this.
>=20
> However, if I was using:
> B. Doesn't work.
>=20
> XADataSource xds =3D createXADataSource();
> XAConnection xconn =3D xds.getXAConnection();
> Connection conn =3D xconn.getConnection();
> System.out.println("auto commit value =3D"+conn.getAutoCommit());
>=20
> The auto commit value is set to false. And the insert into the table
> didn't happen.
>=20
> I am using Case A now and it works fine.
> Thanks for your reply.
>=20
> Hope this helps.
> Sadhana

Hi Sadhana,

Just a clarification that auto-commit being disabled on an XAConnection
is by design (and is required by the JDBC specification).

-Mark
True. I realized that too that case B also works as expected (per the
spec) but didn't work in my situation.
Thanks,
Sadhana

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFCucrtvXNTca6JD8RAn4kAKCzSYs/SVFT4SrhQLuDDpSj3h1SOgCg iQ2e
DBofwmwH4IvvQYWH/R1gV04=3D
=3Dn3mz
-----END PGP SIGNATURE-----

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=3Dgcdmb-bugs@m.gmane.org

Report this message