From 639d1fab9aa2b5336cc7ca70a5f50d51a643ef99 Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Tue, 14 May 2024 21:44:08 -0300 Subject: [PATCH] Fix #8112 - Error isc_read_only_trans (335544361) should report SQLSTATE 25006. --- src/include/firebird/impl/msg/jrd.h | 2 +- src/msgs/sqlstates.sql | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/include/firebird/impl/msg/jrd.h b/src/include/firebird/impl/msg/jrd.h index 346adcfb64..c99e8c143c 100644 --- a/src/include/firebird/impl/msg/jrd.h +++ b/src/include/firebird/impl/msg/jrd.h @@ -39,7 +39,7 @@ FB_IMPL_MSG(JRD, 37, open_trans, -901, "01", "002", "cannot disconnect database FB_IMPL_MSG(JRD, 38, port_len, -901, "HY", "000", "message length error (encountered @1, expected @2)") FB_IMPL_MSG(JRD, 39, read_only_field, -151, "42", "000", "attempted update of read-only column @1") FB_IMPL_MSG(JRD, 40, read_only_rel, -150, "42", "000", "attempted update of read-only table") -FB_IMPL_MSG(JRD, 41, read_only_trans, -817, "42", "000", "attempted update during read-only transaction") +FB_IMPL_MSG(JRD, 41, read_only_trans, -817, "25", "006", "attempted update during read-only transaction") FB_IMPL_MSG(JRD, 42, read_only_view, -150, "42", "000", "cannot update read-only view @1") FB_IMPL_MSG(JRD, 43, req_no_trans, -901, "25", "000", "no transaction for request") FB_IMPL_MSG(JRD, 44, req_sync, -901, "HY", "000", "request synchronization error") diff --git a/src/msgs/sqlstates.sql b/src/msgs/sqlstates.sql index 0f2ad41d63..81dab419c1 100644 --- a/src/msgs/sqlstates.sql +++ b/src/msgs/sqlstates.sql @@ -94,12 +94,13 @@ set bulk_insert INSERT INTO SQLSTATES (SQL_CLASS, SQL_SUBCLASS, SQL_STATE_TEXT) -- 23 Integrity Constraint Violation ('23', '000', 'Integrity constraint violation') -- 24 Invalid Cursor State -('24', '000', 'Invalid cursor state') +('24', '000', 'Invalid cursor state') ('24', '504', 'The cursor identified in the UPDATE, DELETE, SET, or GET statement is not positioned on a row') -- 25 Invalid Transaction State ('25', '000', 'Invalid transaction state') +('25', '006', 'Read-only SQL-transaction') ('25', 'S01', 'Transaction state') -('25', 'S02', 'Transaction is still active') +('25', 'S02', 'Transaction is still active') ('25', 'S03', 'Transaction is rolled back') -- 26 Invalid SQL Statement Name ('26', '000', 'Invalid SQL statement name')