Это старая версия документа.
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/inc/parser/handler.php on line 1458
Warning: Declaration of syntax_plugin_tablecalc::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/tablecalc/syntax.php on line 41
Warning: Declaration of syntax_plugin_tablecalc::render($mode, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/tablecalc/syntax.php on line 72
Warning: Declaration of syntax_plugin_offline::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/offline/syntax.php on line 60
Warning: Declaration of syntax_plugin_offline::render($format, &$renderer, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/lib/plugins/offline/syntax.php on line 67
Warning: preg_match(): Compilation failed: invalid range in character class at offset 3416 in /home/users/p/prom-auto/domains/prom-auto.ru/wiki/inc/parser/lexer.php on line 118
====== fix commit problem in qsql_ibase.cpp ====== ==== the problem ==== Transaction with unsuccessful commit can never be rollbacked. This migth cause some metaobjects get locked and as result hanging of any client (including itself) which tries to use that metaobjects. Example: - given the following:<code sql> CREATE SEQUENCE myseq; CREATE TABLE mytbl (id integer); CREATE OR ALTER trigger mytrig_bi0 for mytbl active before insert position 0 AS begin new.id = next value for myseq; end </code> - qt code:<code cpp> QSqlDatabase db = ... QString sql = "drop sequence myseq"; db.transaction(); QSqlQuery q(sql, db); qDebug() << q.lastError().text(); // no error! q.close(); db.commit(); qDebug() << q.lastError().text(); // error: unsuccessful metadata update... // trying to drop once more time db.transaction(); QSqlQuery q(sql, db); // blocked forever... </code> ==== the solution ==== Edit file ''...qtbase/src/sql/drivers/ibase/qsql_ibase.cpp'': <code cpp> bool QIBaseDriver::commitTransaction() { Q_D(QIBaseDriver); if (!isOpen() || isOpenError()) return false; if (!d->trans) return false; isc_commit_transaction(d->status, &d->trans); // d->trans = 0; // return !d->isError(QT_TRANSLATE_NOOP("QIBaseDriver", "Unable to commit transaction"), // QSqlError::TransactionError); bool res = !d->isError(QT_TRANSLATE_NOOP("QIBaseDriver", "Unable to commit transaction"), QSqlError::TransactionError); if( !res ) isc_rollback_transaction(d->status, &d->trans); d->trans = 0; return res; } </code> ==== ps ==== Prefer explicit transation **start** and **commit** as shown above because it is not possible to avoid this problem executing queries with implicit transaction control.