Below is the list of changes that have just been committed into a local
5.0 repository of serg. When serg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1815 05/03/16 08:42:06 serg@stripped +2 -0
sql/handler.cc
smarter xid-to-str routiine
fixed assert crash in XA RECOVER
sql/sql_parse.cc
XA COMMIT/ROLLBACK did not send_ok in some cases
sql/sql_parse.cc
1.419 05/03/16 08:41:57 serg@stripped +4 -4
XA COMMIT/ROLLBACK did not send_ok in some cases
sql/handler.cc
1.147 05/03/16 08:41:57 serg@stripped +20 -6
smarter xid-to-str routiine
fixed assert crash in XA RECOVER
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: serg
# Host: serg.mylan
# Root: /usr/home/serg/Abk/mysql-5.0
--- 1.146/sql/handler.cc Sun Mar 13 21:58:00 2005
+++ 1.147/sql/handler.cc Wed Mar 16 08:41:57 2005
@@ -762,6 +762,14 @@
for (i=0; i < xid->gtrid_length+xid->bqual_length; i++)
{
uchar c=(uchar)xid->data[i];
+ bool is_next_dig;
+ if (i < XIDDATASIZE)
+ {
+ char ch=xid->data[i+1];
+ is_next_dig=(c >= '0' && c <='9');
+ }
+ else
+ is_next_dig=FALSE;
if (i == xid->gtrid_length)
{
*s++='\'';
@@ -774,9 +782,11 @@
if (c < 32 || c > 126)
{
*s++='\\';
- *s++='x';
- *s++=_dig_vec_lower[c >> 4];
- *s++=_dig_vec_lower[c & 15];
+ if (c > 077 || is_next_dig)
+ *s++=_dig_vec_lower[c >> 6];
+ if (c > 007 || is_next_dig)
+ *s++=_dig_vec_lower[(c >> 3) & 7];
+ *s++=_dig_vec_lower[c & 7];
}
else
{
@@ -862,6 +872,10 @@
my_xid x=list[i].get_my_xid();
if (!x) // not "mine" - that is generated by external TM
{
+#ifndef DBUG_OFF
+ char buf[XIDDATASIZE*4+6]; // see xid_to_str
+ sql_print_information("ignore xid %s", xid_to_str(buf, list+i));
+#endif
found_foreign_xids++;
continue;
}
@@ -962,9 +976,9 @@
if (xid->get_my_xid())
continue; // skip "our" xids
protocol->prepare_for_resend();
- protocol->store_long((longlong)xid->formatID);
- protocol->store_long((longlong)xid->gtrid_length);
- protocol->store_long((longlong)xid->bqual_length);
+ protocol->store_longlong((longlong)xid->formatID, FALSE);
+ protocol->store_longlong((longlong)xid->gtrid_length, FALSE);
+ protocol->store_longlong((longlong)xid->bqual_length, FALSE);
protocol->store(xid->data, xid->gtrid_length+xid->bqual_length,
&my_charset_bin);
if (protocol->write())
--- 1.418/sql/sql_parse.cc Tue Mar 15 00:14:55 2005
+++ 1.419/sql/sql_parse.cc Wed Mar 16 08:41:57 2005
@@ -4382,6 +4382,8 @@
{
if (!(res= !ha_commit_or_rollback_by_xid(&thd->lex->ident, 1)))
my_error(ER_XAER_NOTA, MYF(0));
+ else
+ send_ok(thd);
break;
}
if (thd->transaction.xa_state == XA_IDLE && thd->lex->xa_opt == XA_ONE_PHASE)
@@ -4390,9 +4392,7 @@
if ((r= ha_commit(thd)))
my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0));
else
- {
send_ok(thd);
- }
}
else
if (thd->transaction.xa_state == XA_PREPARED && thd->lex->xa_opt == XA_NONE)
@@ -4400,9 +4400,7 @@
if (ha_commit_one_phase(thd, 1))
my_error(ER_XAER_RMERR, MYF(0));
else
- {
send_ok(thd);
- }
}
else
{
@@ -4419,6 +4417,8 @@
{
if (!(res= !ha_commit_or_rollback_by_xid(&thd->lex->ident, 0)))
my_error(ER_XAER_NOTA, MYF(0));
+ else
+ send_ok(thd);
break;
}
if (thd->transaction.xa_state != XA_IDLE &&
| Thread |
|---|
| • bk commit into 5.0 tree (serg:1.1815) | Sergei Golubchik | 16 Mar |