dbTalk Databases Forums  

question on semantics of "xa end"

mailing.database.mysql-internals mailing.database.mysql-internals


Discuss question on semantics of "xa end" in the mailing.database.mysql-internals forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Zardosht Kasheff
 
Posts: n/a

Default question on semantics of "xa end" - 06-05-2012 , 10:32 PM






Hello all,

In mysql-test/t/xa.test, I see the following test copied below.

Why does the command "xa end 'a','c';" return an error? What are the
semantics of xa end? How is the storage engine supposed to ensure that
xa end returns that error? I don't see a handlerton function that maps
to xa end.

Thanks
-Zardosht

create table t1(a int, b int, c varchar(20), primary key(a)) engine = innodb;
insert into t1 values(1, 1, 'a');
insert into t1 values(2, 2, 'b');

connect (con1,localhost,root,,);
connect (con2,localhost,root,,);

--connection con1
xa start 'a','b';
update t1 set c = 'aa' where a = 1;
--connection con2
xa start 'a','c';
update t1 set c = 'bb' where a = 2;
--connection con1
--send update t1 set c = 'bb' where a = 2
--connection con2
--sleep 1
--error ER_LOCK_DEADLOCK
update t1 set c = 'aa' where a = 1;
select count(*) from t1;
--error ER_XA_RBDEADLOCK
xa end 'a','c';

--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.