Commit 3723a5a90d4b8fb6f73d4e7d555783a9c6ff677e
1 parent
2b3455a0
KTS-698 - test for transaction support in the database.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5210 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
14 additions
and
0 deletions
setup/postcheckup.php
| ... | ... | @@ -120,6 +120,20 @@ if (PEAR::isError($selectPriv)) { |
| 120 | 120 | print '<p>Basic database query successful.</p>'; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | +$sTable = KTUtil::getTableName('system_settings'); | |
| 124 | +DBUtil::startTransaction(); | |
| 125 | +$res = DBUtil::autoInsert($sTable, array( | |
| 126 | + 'name' => 'transactionTest', | |
| 127 | + 'value' => 1, | |
| 128 | +)); | |
| 129 | +DBUtil::rollback(); | |
| 130 | +$res = DBUtil::getOneResultKey("SELECT id FROM $sTable WHERE name = 'transactionTest'", 'id'); | |
| 131 | +if (!empty($res)) { | |
| 132 | + print '<p><font color="red">Transaction support not available in database</font></p>'; | |
| 133 | +} else { | |
| 134 | + print '<p>Database has transaction support.</p>'; | |
| 135 | +} | |
| 136 | +DBUtil::whereDelete($sTable, array('name' => 'transactionTest')); | |
| 123 | 137 | ?> |
| 124 | 138 | |
| 125 | 139 | <? | ... | ... |