[Solved] MySQL rollback won't roll!

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

[Solved] MySQL rollback won't roll!

Post by AxWald » Mon Feb 02, 2015 3:10 pm

Hi, (solution at the end)

I have this (relevant snippets only):

Code: Select all

on BeginTrans DBID
   put "Start Transaction;" into StrSQL
   revExecuteSQL DBID,StrSQL
   get the result --#debug
end BeginTrans
=> result "0"

--[1 SELECT & 1 INSERT statements here, that work]
--[now I want to know if can roll back:]

On RollbackTrans DBID
   put "Rollback;" into StrSQL
   revExecuteSQL DBID,StrSQL
   get the result --#debug
   -- get revdb_rollback(DBID)
end RollbackTrans
=> result "0", or empty in the commented version
The rollback is ignored. As if I hadn't called it.
I don't get any MySQL errors (as happens if I send a wrong SQL), I don't get any LC errors, it just writes the data, but refuses to roll back.

What I'm doing wrong? MySQL is 5.6.21

I'm sure it's another stupid error, thx for any help!

Have fun!

Edit & Solution:

The MySQL is MyISAM, and this doesn't support transactions ...
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

Post Reply

Return to “Databases”