<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — cancel_transaction (not really a bug)]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7402</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7402&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in cancel_transaction (not really a bug).]]></description>
		<lastBuildDate>Fri, 16 Mar 2018 21:04:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: cancel_transaction (not really a bug)]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31142#p31142</link>
			<description><![CDATA[<p>I think it is for puritanism only. The reset should be sufficient for now. If any third-party careless code called it, possibly it might go into negative.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 16 Mar 2018 21:04:44 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31142#p31142</guid>
		</item>
		<item>
			<title><![CDATA[Re: cancel_transaction (not really a bug)]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31140#p31140</link>
			<description><![CDATA[<p>I have never heard of any problems here before. Please be a little more specific. If this is an error the test is very hard to setup, so please be sure that you have observed a problem.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Fri, 16 Mar 2018 17:42:16 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31140#p31140</guid>
		</item>
		<item>
			<title><![CDATA[Re: cancel_transaction (not really a bug)]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31138#p31138</link>
			<description><![CDATA[<p>The <strong>cancel_transaction()</strong> resets the value of the <strong>$transaction_level</strong> to <strong>0</strong> whenever a script is called in FA, and it happens when the DB connection is setup each time in <strong>includes/db/connect_db_mysqli.inc</strong>.</p><p>@joe: any fixes here?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 16 Mar 2018 16:08:27 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31138#p31138</guid>
		</item>
		<item>
			<title><![CDATA[Re: cancel_transaction (not really a bug)]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31137#p31137</link>
			<description><![CDATA[<p>Yes, I was referring to sql_functions.inc. The commit_transaction() could cause the transaction level to go negative, which would nullify all following transactions. I was just thinking that commit transaction should test transaction level for &gt; 0 before decrementing the value.</p>]]></description>
			<author><![CDATA[null@example.com (oakstreet1)]]></author>
			<pubDate>Fri, 16 Mar 2018 15:59:27 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31137#p31137</guid>
		</item>
		<item>
			<title><![CDATA[Re: cancel_transaction (not really a bug)]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31124#p31124</link>
			<description><![CDATA[<p>There are no BEGIN ... COMMIT raw blocks in FA core codebase and possibly not even in any official Extension.</p><p>However, local SQL wrapper functions <strong>begin_transaction()</strong> and <strong>commit_transaction()</strong> exist and have such a check for non negative values as defined in <strong>includes/db/sql_functions.inc</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 16 Mar 2018 03:51:58 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31124#p31124</guid>
		</item>
		<item>
			<title><![CDATA[cancel_transaction (not really a bug)]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31123#p31123</link>
			<description><![CDATA[<p>I&#039;m just familiarizing myself with the code before I get started on a rather major extension ...</p><p>In /includes/db/sql_functions.inc, there is a function called &quot;cancel_transaction&quot;. I&#039;m not sure if or when that is called, but if it were called inside of nested calls to begin/commit transaction calls and any function called &quot;commit&quot;, the global $transaction_level would go to -1, which would cause all following begin/commit calls to be ignored.</p><p>I could be missing something, and maybe the cancel is never called, but I can imagine some additional checks to be sure that $transaction_level never goes negative. I&#039;m not here to criticize something I don&#039;t completely understand. I just thought someone might want to consider this as a source of some unpredictable behavior, as, once the global was out of range, all subsequent &quot;transactions&quot; would actually not be done as transactions.</p>]]></description>
			<author><![CDATA[null@example.com (oakstreet1)]]></author>
			<pubDate>Thu, 15 Mar 2018 21:20:13 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31123#p31123</guid>
		</item>
	</channel>
</rss>
