MySQL Forums
Forum List  »  InnoDB

Table with POINT data type not rolling back in transaction
Posted by: Erik Littell
Date: January 16, 2015 10:22AM

I am using the following version of MySQL:


innodb_version,1.1.8
protocol_version,10
slave_type_conversions,
version,5.5.29
version_comment,"Source distribution"
version_compile_machine,i386
version_compile_os,osx10.7

I have a table with the following description:

id,int(11),NO,PRI,NULL,auto_increment
deal_id,int(11),YES,MUL,NULL,
merchant_location_id,int(11),YES,,NULL,
lat_lng_point,point,NO,MUL,NULL,
data,blob,YES,,NULL,


I am using Ruby on Rails to access MySQL.

Through that I issue (roughly) the following commands:

SELECT COUNT(*) FROM some_table
SELECT COUNT(*) FROM some_other_table
SELECT COUNT(*) FROM table_with_point
BEGIN TRANSACTION
INSERT INTO some_table () VALUES ()
INSERT INTO some_other_table () VALUES ()
INSERT INTO table_with_point () VALUES ()
ROLLBACK
SELECT COUNT(*) FROM some_table
SELECT COUNT(*) FROM some_other_table
SELECT COUNT(*) FROM table_with_point

I expected the three counts to be the same before and after (i.e. [3, 4, 5] == [3, 4, 5]) But that isn't what is happening.

Instead, the insert into table_with_point isn't being rolled back BUT the other two inserts are being rolled back.

This just seems really odd to me.

Is this a bug? I searched, but I couldn't find anything that says anything about transactions and the GEOSPATIAL functions or the POINT datatype.

Any help would be appreciated.

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Table with POINT data type not rolling back in transaction
2014
January 16, 2015 10:22AM


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.