MySQL Forums
Forum List  »  InnoDB

Re: rollback vs. left join problem ?
Posted by: Peter Blokland
Date: August 10, 2005 06:07AM

everything is happening in 1 session, sequentially. that suggests that the isolation level should not be a problem (at least, as i understand it). still, i've tried it with READ COMMITTED to get this :

mysql> select @@tx_isolation;
+----------------+
| @@tx_isolation |
+----------------+
| READ-COMMITTED |

mysql> set autocommit=0;

mysql> select * from a left join b on (a.id_a=b.id_a);
+------+--------+------+-------+
| id_a | text_a | id_a | int_b |
+------+--------+------+-------+
| 1 | text | 1 | 1 |
| 2 | text2 | NULL | NULL |

mysql> delete from b;

mysql> rollback;

mysql> select * from a left join b on (a.id_a=b.id_a);
+------+--------+------+-------+
| id_a | text_a | id_a | int_b |
+------+--------+------+-------+
| 1 | text | NULL | NULL |
| 2 | text2 | NULL | NULL |

mysql> show create table b;

<output snipped>

mysql> select * from a left join b on (a.id_a=b.id_a);
+------+--------+------+-------+
| id_a | text_a | id_a | int_b |
+------+--------+------+-------+
| 1 | text | 1 | 1 |
| 2 | text2 | NULL | NULL |

to be clear : only the 'show create table b' works, NOT for instance a 'show create table a'...

lost here...

Options: ReplyQuote


Subject
Views
Written By
Posted
3084
August 09, 2005 04:33AM
1977
August 10, 2005 05:25AM
Re: rollback vs. left join problem ?
1969
August 10, 2005 06:07AM
1934
August 10, 2005 06:45AM


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.